[Patch] Warning during GCC bootstrap on i686-pc-mingw32
Danny Smith
dansmister@gmail.com
Thu Apr 24 12:53:00 GMT 2008
On Thu, Apr 17, 2008 at 11:07 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Thu, 17 Apr 2008, Danny Smith wrote:
>
> > On Thu, Apr 17, 2008 at 12:03 AM, Joseph S. Myers
> > <joseph@codesourcery.com> wrote:
> > > On Wed, 16 Apr 2008, Danny Smith wrote:
> > >
> > > > 2008-04-16 Danny Smith <dannysmith@users.net>
> > > >
> > > > * c-format.c (check_format_info_main): Use strncmp rather than a magic prefix
> > > > to handle multichar length specs.
> > >
> > > This C front-end change is OK, but you need to add a testcase that
> > > verifies the correct diagnostic in this case (passes with and fails
> > > without the patch).
> > >
> > Is attached testcase suitable?
>
> Since the bug was saying "''" instead of "'I64'" in the diagnostic text,
> testing for "C" doesn't suffice; "C" is in both old and new diagnostic
> strings. I'd suggest testing for a longer string, "'I64' ms_printf length
> modifier" or similar.
As committed.
The new testcase uses the "'I64' ms_printf length
modifier" string suggested by Joseph Myers.
gcc
* c-format.c (check_format_info_main): Use strncmp rather than a magic prefix
to handle multichar length specs.
* config/i386/msformat-c.c (format_length_info ms_printf_length_specs):
Don't prefix "I64" and "I32" with '\0'.
testsuite
* gcc.dg/format/ms-warnI64-1.c: New file.
Danny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msformat.diff
Type: text/x-diff
Size: 3421 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080424/2a5d1e3d/attachment.bin>
More information about the Gcc-patches
mailing list