public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* ada/4601: printf() arg checking doesn't work with merged strings
@ 2001-10-17 20:46 dgillies
  0 siblings, 0 replies; 2+ messages in thread
From: dgillies @ 2001-10-17 20:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4601
>Category:       ada
>Synopsis:       printf() arg checking doesn't work with merged strings
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 17 20:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     dgillies@graviton.com <Donald W. Gillies>
>Release:        unknown-1.0
>Organization:
>Environment:
gcc version 2.95.2 19991024 (release)
FreeBSD 4.2
>Description:

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.

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ada/4601: printf() arg checking doesn't work with merged strings
@ 2001-10-17 21:16 Zack Weinberg
  0 siblings, 0 replies; 2+ messages in thread
From: Zack Weinberg @ 2001-10-17 21:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-17 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-17 20:46 ada/4601: printf() arg checking doesn't work with merged strings dgillies
2001-10-17 21:16 Zack Weinberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).