[Bug c/47781] warnings from custom printf format specifiers

mark-gcc at glines dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 17 12:00:00 GMT 2011


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

--- Comment #2 from Mark Glines <mark-gcc at glines dot org> 2011-02-17 11:58:22 UTC ---
Created attachment 23380
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23380
47781.c

Here's a rather silly test case that demonstrates the problem with a simple
"bool" type.

$ gcc -O2 -Wall -o 47781 47781.c
47781.c: In function ‘main’:
47781.c:12: warning: unknown conversion type character ‘b’ in format
47781.c:12: warning: unknown conversion type character ‘b’ in format
47781.c:12: warning: too many arguments for format
$ ./47781
true bool: TRUE  false bool: FALSE
$


(That's on x86-64 linux with gcc 4.4.4-14ubuntu5 and libc6 2.12.1-0ubuntu10.2.)



More information about the Gcc-bugs mailing list