This is the mail archive of the gcc-patches@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]

re: Patch to c-common.c (printf-format checking)



Thank you for the patch, but I don't think this would be a
improvement to the compiler.

The *-precision specifier expects a signed int as its argument.
There are lots of cases where an unsigned int will work, but
there are (at least a few) cases where it won't.  The -Wformat
warnings should catch as many mistakes as it reasonably can.

I think the *-width code is wrong to allow unsigned ints.

                                         -gavin...

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