ada/4601: printf() arg checking doesn't work with merged strings

Zack Weinberg zack@codesourcery.com
Wed Oct 17 21:16:00 GMT 2001


The following reply was made to PR ada/4601; it has been noted by GNATS.

From: Zack Weinberg <zack@codesourcery.com>
To: dgillies@graviton.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: ada/4601: printf() arg checking doesn't work with merged strings
Date: Wed, 17 Oct 2001 21:09:35 -0700

 On Thu, Oct 18, 2001 at 03:42:51AM -0000, dgillies@graviton.com wrote:
 > 
 > >Number:         4601
 > >Category:       ada
 
 Why on earth do you think this is a bug in the _Ada_ front end?
 
 ...
 > compile with -Wformat :
 > 
 > printf( "%02bx", 123);
 > printf( "%02" "b" "x", 123 );
 > 
 > line #1 above is a compile error.
 > line #2 above is not a compile error.
 > they are semantically exactly the same.
 
 With 2.95.4-to-be, and 3.0:
 
 test.c: In function `x':
 test.c:4: warning: unknown conversion type character `b' in format
 test.c:4: warning: too many arguments for format
 test.c:5: warning: unknown conversion type character `b' in format
 test.c:5: warning: too many arguments for format
 
 zw



More information about the Gcc-prs mailing list