From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12350 invoked by alias); 12 Feb 2015 11:12: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 12213 invoked by uid 48); 12 Feb 2015 11:12:43 -0000 From: "mark at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/65040] [5 Regression] gcc-5 -Wformat broken Date: Thu, 12 Feb 2015 11:12: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: 5.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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-02/txt/msg01332.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65040 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at gcc dot gnu.org --- Comment #5 from Mark Wielaard --- Note that this also triggers for code that looks just fine to the user: #include #include int main (int argc, char **argv) { uint8_t u =3D 16; printf ("u =3D %02" PRIx8 "\n", u); return 0; } m.c: In function =E2=80=98main=E2=80=99: m.c:8:11: warning: format =E2=80=98%x=E2=80=99 expects argument of type =E2= =80=98unsigned int=E2=80=99, but argument 2 has type =E2=80=98int=E2=80=99 [-Wformat=3D] printf ("u =3D %02" PRIx8 "\n", u); ^ Which is somewhat surprising since the user explicitly matched the type and format specifier. This is caused by the definition of the PRIx format specifiers all mapping = back to "x" in inttypes.h /* lowercase hexadecimal notation. */ # define PRIx8 "x" # define PRIx16 "x" # define PRIx32 "x" >>From gcc-bugs-return-477000-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 12 11:15:10 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 30230 invoked by alias); 12 Feb 2015 11:15:10 -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 30161 invoked by uid 48); 12 Feb 2015 11:15:06 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/65039] [5 Regression] g++ 5 segmentation fault when compiling with -O2 optimization Date: Thu, 12 Feb 2015 11:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: 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: 2015-02/txt/msg01333.txt.bz2 Content-length: 232 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65039 --- Comment #2 from Jonathan Wakely --- I reproduced this with an out-of-date trunk build, but using today's trunk it compiles OK, so seems to be fixed.