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/38769] New: Sometimes a percent sign is just a percent sign


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


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