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]
Other format: [Raw text]

Re: PATCH: Add format string suggestions to -Wformat warnings


On Thu, 14 Aug 2008, Dan Hipschman wrote:

> Index: gcc/testsuite/gcc.dg/format/unnamed-1.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/format/unnamed-1.c	(revision 138884)
> +++ gcc/testsuite/gcc.dg/format/unnamed-1.c	(working copy)
> @@ -19,6 +19,7 @@
>  f (TItype x)
>  {
>    printf("%d", x); /* { dg-warning "expects type" } */
> +  /* { dg-message ": ld, li$" "format suggestion" 21 } */

For 64-bit systems supporting TImode, such a suggestion would be 
incorrect; there would be no correct formats to suggest for TItype.

I think you may need a new effective-target that uses the test for TImode 
support found in this and other tests, so that this dg-message can be made 
conditional on not having TImode support.  (In general the patch should 
probably be tested on both 32-bit and 64-bit systems.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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