From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20170 invoked by alias); 14 Mar 2014 17:29:16 -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 20111 invoked by uid 48); 14 Mar 2014 17:29:10 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60517] warning/error for taking address of member of a temporary object Date: Fri, 14 Mar 2014 17:29: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.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse 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: 2014-03/txt/msg01181.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60517 --- Comment #8 from Marc Glisse --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #7) > To avoid duplicates, the front-end could just return something else, like > NULL, when it detects this case (I guess the behavior is undefined and we > can do whatever we want, no?). I guess... Then we might as well introduce a call to __builtin_unreachable right before the return, at the same time as we replace the return value. >>From gcc-bugs-return-446313-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Mar 14 17:32:47 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 21898 invoked by alias); 14 Mar 2014 17:32:47 -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 21863 invoked by uid 55); 14 Mar 2014 17:32:44 -0000 From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60523] Warning flag for octal literals Date: Fri, 14 Mar 2014 17:32: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: enhancement X-Bugzilla-Who: joseph at codesourcery dot com 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg01182.txt.bz2 Content-length: 544 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60523 --- Comment #6 from joseph at codesourcery dot com --- Octal literals are also used in macro definitions from system headers, so care would be needed that a warning doesn't apply to those. Such a warning should of course not apply to 0 (and maybe more generally should not apply to any octal constant consisting of some number of leading 0s followed by at most one nonzero digit, as those have the same value whether interpreted as octal or as decimal).