From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27341 invoked by alias); 1 May 2012 20:46:18 -0000 Received: (qmail 27331 invoked by uid 22791); 1 May 2012 20:46:17 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED 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; Tue, 01 May 2012 20:46:04 +0000 From: "jyasskin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/37743] Bogus printf format warning with __builtin_bswap32. Date: Tue, 01 May 2012 20:46: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-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jyasskin 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-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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-05/txt/msg00028.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D37743 Jeffrey Yasskin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jyasskin at gcc dot gnu.org --- Comment #7 from Jeffrey Yasskin 2012-05-0= 1 20:45:33 UTC --- This also causes the result of __builtin_bswap32 to fail overload resolutio= n: $ cat test.cc void foo(unsigned int x); void foo(int x); void bar(long long x) { foo(__builtin_bswap32(x)); } $ g++-4.8pre -c test.cc test.cc: In function =E2=80=98void bar(long long int)=E2=80=99: test.cc:5:27: error: call of overloaded =E2=80=98foo(unsigned int)=E2=80=99= is ambiguous test.cc:5:27: note: candidates are: test.cc:1:6: note: void foo(unsigned int) test.cc:2:6: note: void foo(int) $ g++-4.8pre --version g++-4.8pre (GCC) 4.8.0 20120330 (experimental) It's not terribly important to me: a wrapper can easily cast to the expected type.