From patchwork Thu Jun 18 16:52:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Torvalds X-Patchwork-Id: 31183 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5IGqrgU010702 for ; Thu, 18 Jun 2009 16:52:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751089AbZFRQwt (ORCPT ); Thu, 18 Jun 2009 12:52:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752051AbZFRQwt (ORCPT ); Thu, 18 Jun 2009 12:52:49 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:40565 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbZFRQwt (ORCPT ); Thu, 18 Jun 2009 12:52:49 -0400 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id n5IGqnZT008239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Jun 2009 09:52:50 -0700 Received: from localhost (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id n5IGqnRG001650; Thu, 18 Jun 2009 09:52:49 -0700 Date: Thu, 18 Jun 2009 09:52:49 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Christopher Li , linux-sparse@vger.kernel.org Subject: Turn off '-Wtransparent-union' by default In-Reply-To: Message-ID: References: User-Agent: Alpine 2.01 (LFD 1184 2008-12-16) MIME-Version: 1.0 X-Spam-Status: No, hits=-3.472 required=5 tests=AWL,BAYES_00 X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org It's a very annoying warning, and it's about a sparse limitation rather than a real feature, so don't do it by default. Sure, our lack of transparent union support will then make us warn about the magic calling convention hacks (eg you'll see warnings like connect.c:240:39: warning: incorrect type in argument 2 (invalid types) connect.c:240:39: expected union __CONST_SOCKADDR_ARG [usertype] __addr connect.c:240:39: got struct sockaddr *ai_addr but it still doesn't mean that we have to be so noisy about just seeing those transparent unions. One annoying warning is not an argument for doing _another_ annoying warning too (and the calling convention warnings at least only happen if you actually use them, unlike the transparent union warning that happens every time we see one, used or not). Signed-off-by: Linus Torvalds --- lib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/lib.c b/lib.c index 2b8d21e..42affcd 100644 --- a/lib.c +++ b/lib.c @@ -206,7 +206,7 @@ int Wparen_string = 0; int Wptr_subtraction_blows = 0; int Wreturn_void = 0; int Wshadow = 0; -int Wtransparent_union = 1; +int Wtransparent_union = 0; int Wtypesign = 0; int Wundef = 0; int Wuninitialized = 1;