From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2900 invoked by alias); 24 Oct 2014 13:19:48 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2868 invoked by uid 48); 24 Oct 2014 13:19:45 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60304] Including disables -Wconversion-null Date: Fri, 24 Oct 2014 13:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg01942.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60304 --- Comment #16 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Jonathan Wakely from comment #15) > Yes, that's what the patch I'm testing does. >=20 > IMHO we should only define it for -std=3Dgnu++98 and not any other -std m= ode, > but I'll be conservative and leave it defined for -std=3Dc++98 as well. Thus, the warning also needs fixing. Since the same behavior will occur if = the user directly or indirectly includes stdbool.h. A testcase: # 1 "false.c" # 1 "" # 1 "" # 1 "false.c" # 1 "sys.h" 1 # 2 "sys.h" 3 # 2 "false.c" 2 int * foo() {return=20 # 2 "false.c" 3 false # 2 "false.c" ;} # 1 "nonsys.h" 1 # 4 "false.c" 2 int * bar() {return false;} >>From gcc-bugs-return-464922-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 24 13:23:16 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 5798 invoked by alias); 24 Oct 2014 13:23:15 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 5727 invoked by uid 48); 24 Oct 2014 13:23:07 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60304] Including disables -Wconversion-null Date: Fri, 24 Oct 2014 13:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg01943.txt.bz2 Content-length: 533 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60304 --- Comment #17 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #16) > A testcase: =3D=3D> sys.h <=3D=3D #pragma GCC system_header #if defined false #undef false #endif #define false false =3D=3D> nonsys.h <=3D=3D #if defined false #undef false #endif #define false false =3D=3D> false.c <=3D=3D #include "sys.h" int * foo() {return false;} #include "nonsys.h" int * bar() {return false;} >>From gcc-bugs-return-464923-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 24 13:34:56 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 16055 invoked by alias); 24 Oct 2014 13:34:56 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 16013 invoked by uid 48); 24 Oct 2014 13:34:52 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60304] Including disables -Wconversion-null Date: Fri, 24 Oct 2014 13:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg01944.txt.bz2 Content-length: 464 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60304 --- Comment #18 from Jonathan Wakely --- I assume that testcase is meant to be C++ (because it isn't valid C) but it's not valid C++ either: 17.6.4.3.1 [macro.names] "A translation unit that includes a header shall not contain any macros that define names declared or defined in that header. Nor shall such a translation unit define macros for names lexically identical to keywords."