This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/37743] Bogus printf format warning with __builtin_bswap32.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37743

Jeffrey Yasskin <jyasskin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jyasskin at gcc dot gnu.org

--- Comment #7 from Jeffrey Yasskin <jyasskin at gcc dot gnu.org> 2012-05-01 20:45:33 UTC ---
This also causes the result of __builtin_bswap32 to fail overload resolution:

$ 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 âvoid bar(long long int)â:
test.cc:5:27: error: call of overloaded âfoo(unsigned int)â 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]