From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31148 invoked by alias); 30 Jan 2015 18:38:27 -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 26818 invoked by uid 48); 30 Jan 2015 18:38:18 -0000 From: "tromey at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64877] strange warning message from -Waddress Date: Fri, 30 Jan 2015 18:38: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 2015-01/txt/msg03550.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64877 --- Comment #2 from Tom Tromey --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #1) > Hard to say without a minimized testcase. Yeah. The original code is here: https://dxr.mozilla.org/mozilla-central/source/gfx/gl/ScopedGLHelpers.h#35 My attempt to minimize it failed. Here's what I tried. I can't explain why this doesn't=20 give any warnings as I would expect one on the second "assert", based on what the manual says. template struct S { void m() { } S() { if (&S::Unwrap !=3D &Derived::Unwrap) m(); if (!(&Derived::UnwrapImpl)) m(); } void Unwrap() { } }; struct T : public S { void UnwrapImpl() { } }; T t; >>From gcc-bugs-return-475558-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jan 30 18:50:03 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 25354 invoked by alias); 30 Jan 2015 18:50:03 -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 25059 invoked by uid 48); 30 Jan 2015 18:49:53 -0000 From: "tromey at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64877] strange warning message from -Waddress Date: Fri, 30 Jan 2015 18:50: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 2015-01/txt/msg03551.txt.bz2 Content-length: 638 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64877 --- Comment #3 from Tom Tromey --- Oops, had the wrong gcc in $PATH. That test case does warn: pokyo. g++ -std=3Dc++11 -c -Wall -Waddress -O2 x.cc x.cc: In instantiation of =E2=80=98S::S() [with Derived =3D T]=E2= =80=99: x.cc:19:8: required from here x.cc:9:29: warning: the address of =E2=80=98void S::Unwrap() [with= Derived =3D T]=E2=80=99 will never be NULL [-Waddress] if (&S::Unwrap !=3D &Derived::Unwrap) ^ I think I would expect a warning on the second assert, but not the first. >>From gcc-bugs-return-475557-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jan 30 18:50:03 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 25320 invoked by alias); 30 Jan 2015 18:50:01 -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 25151 invoked by uid 48); 30 Jan 2015 18:49:55 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64867] warning for passing non-POD to varargs function Date: Fri, 30 Jan 2015 18:50: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: cc 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: 2015-01/txt/msg03552.txt.bz2 Content-length: 423 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64867 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #10 from Jakub Jelinek --- FYI, g++ stopped warning on #c4 with r149721.