Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 1997 18:50:02 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs
Subject:   Re: gnu/4748: cc -Wformat too sensitive
Message-ID:  <199710130150.SAA05968@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR gnu/4748; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: eserte@cs.tu-berlin.de, FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: gnu/4748: cc -Wformat too sensitive
Date: Mon, 13 Oct 1997 11:40:27 +1000

 >>Description:
 >
 >	cc -Wformat warns about "flag `0' used with type `s'". But due
 >	to the manpage, this is correct and produces the expected
 >	code, too.
 >...
 >	  printf("%08s\n", "12");
 
 Doing something reasonable for this is a BSD extension.  It gives
 undefined behaviour in Standard C, so warning about it is correct.
 The FSF version of gcc has to warn about it because it cannot know
 about extensions in vendor libraries.
 
 BTW, we should start using the C9X format for long long ("%lld" IIRC)
 instead of the BSD extension "%qd".  Removing the special support for
 "%qd" from gcc would be a good start.
 
 Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710130150.SAA05968>