This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/38769] New: Sometimes a percent sign is just a percent sign
- From: "jesnow at uh dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jan 2009 20:39:27 -0000
- Subject: [Bug c/38769] New: Sometimes a percent sign is just a percent sign
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider the following code:
#include <stdio.h>
main()
{
printf("hello, world%\n");
printf("hello, world\%\n");
}
The first generates a warning with -Wall:
percent.c:6: warning: unknown conversion type character 0xa in format
But the second is escaped, and should not. But does anyway.
This reduces the usefulness of having warnings turned on at all, as a lot of
spurious warnings are generated if you do much statistics in your code. Any
character after any non-format string percent sign will trigger this warning,
escaped or not.
--
Summary: Sometimes a percent sign is just a percent sign
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jesnow at uh dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38769