From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4639 invoked by alias); 14 Mar 2014 08:49:55 -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 4556 invoked by uid 48); 14 Mar 2014 08:49:52 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60520] stack adjustment are not merged anymore Date: Fri, 14 Mar 2014 08:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: RESOLVED 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/msg01134.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60520 --- Comment #7 from Uro=C5=A1 Bizjak --- (In reply to Jakub Jelinek from comment #6) > Furthermore, it is already fixed since r208551. Indeed, the fix for PR57320 also fixed this one. >>From gcc-bugs-return-446266-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Mar 14 08:53:26 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 11697 invoked by alias); 14 Mar 2014 08:53:26 -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 11680 invoked by uid 48); 14 Mar 2014 08:53:22 -0000 From: "david at westcontrol dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60523] New: Warning flag for octal literals Date: Fri, 14 Mar 2014 08:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: david at westcontrol 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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/msg01135.txt.bz2 Content-length: 1308 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60523 Bug ID: 60523 Summary: Warning flag for octal literals Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: david at westcontrol dot com It would be nice if there were a warning flag that triggered on octal literals. Octal literals are rarely used in modern C and C++ code, but can easily be introduced by mistake - "int x = 050;" appears at first reading to set x to 50, but in C and C++ the leading 0 means it is interpreted as octal and therefore sets x to 40 (decimal). As octal literals are seldom useful, and often confusing or accidental, they are banned by coding standards like MISRA. But as they are part of the language defined by the C and C++ standards, and are used in some existing code, they obviously cannot be removed. As a compromise, I would like to propose the introduction of a warning flags "-Woctal" which would produce a diagnostic message when a literal is interpreted as an octal number. Of preference, this would be included in "-Wextra" (it probably should not be in "-Wall", since octal literals are valid C and C++).