From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28642 invoked by alias); 23 Aug 2012 23:34:25 -0000 Received: (qmail 28432 invoked by uid 22791); 23 Aug 2012 23:34:23 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Aug 2012 23:34:06 +0000 From: "strikosn at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54361] New: Compiling for c++11 gives a warning on scanf() with %as format specifier Date: Thu, 23 Aug 2012 23:34: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: strikosn at gmail 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-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-08/txt/msg01645.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54361 Bug #: 54361 Summary: Compiling for c++11 gives a warning on scanf() with %as format specifier Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: strikosn@gmail.com Target: x86_64-unknown-linux-gnu Configured with: /home/utils/src/gcc-4.7.0/configure --prefix=/home/utils/gcc-4.7.0 --enable-languages=c,c++,objc,fortran --with-gmp=/home/utils/gmp-5.0.2-static --with-mpfr=/home/utils/mpfr-3.1.0-static --with-mpc=/home/utils/mpc-0.9-static --with-as=/home/utils/binutils-2.21.1/bin/as --with-ld=/home/utils/binutils-2.21.1/bin/ld Thread model: posix gcc version 4.7.0 (GCC) Source code attached as c.cpp $ g++ -std=c++11 -Wall -Werror c.cpp c.cpp: In function 'int main()': c.cpp:10:26: error: format '%a' expects argument of type 'float*', but argument 2 has type 'char**' [-Werror=format] c.cpp:7:7: error: unused variable 'a' [-Werror=unused-variable] cc1plus: all warnings being treated as errors