From owner-freebsd-bugs Sun Oct 12 18:50:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA05974 for bugs-outgoing; Sun, 12 Oct 1997 18:50:05 -0700 (PDT) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA05968; Sun, 12 Oct 1997 18:50:02 -0700 (PDT) (envelope-from gnats) Date: Sun, 12 Oct 1997 18:50:02 -0700 (PDT) Message-Id: <199710130150.SAA05968@hub.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: gnu/4748: cc -Wformat too sensitive Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR gnu/4748; it has been noted by GNATS. From: Bruce Evans 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