From owner-cvs-all Wed Jun 13 18: 1:43 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 86EA537B405; Wed, 13 Jun 2001 18:01:36 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id LAA14101; Thu, 14 Jun 2001 11:01:23 +1000 Date: Thu, 14 Jun 2001 10:59:10 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Mark Peek Cc: Garrett Wollman , Sheldon Hearn , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/stdio printf.3 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 13 Jun 2001, Mark Peek wrote: > At 3:41 PM -0400 6/13/01, Garrett Wollman wrote: > >< > said: > > > >> Now just to get gcc to accept it without bitching on -Wformat. :-) > > > >It's in C99, so once gcc learns about C99 it will stop complaining. I > >am under the impression from obrien that gcc 3.x will be a full C99 > >stand-alone implementation. > > Or have obrien approve or commit this patch for now... > > Index: c-common.c > =================================================================== > RCS file: /home/ncvs/src/contrib/gcc/c-common.c,v > retrieving revision 1.8.2.2 > diff -u -r1.8.2.2 c-common.c > --- c-common.c 2000/04/18 21:09:03 1.8.2.2 > +++ c-common.c 2001/06/13 20:54:48 > @@ -1720,9 +1720,6 @@ > if (length_char == 'l' && *format_chars == 'l') > { > length_char = 'q', format_chars++; > - /* FIXME: Is allowed in ISO C 9x. */ > - if (pedantic) > - warning ("ANSI C does not support the `ll' length modifier"); > } > else if (length_char == 'h' && *format_chars == 'h') > { > Index: c-decl.c > =================================================================== > RCS file: /home/ncvs/src/contrib/gcc/c-decl.c,v > retrieving revision 1.1.1.4.2.1 > diff -u -r1.1.1.4.2.1 c-decl.c > --- c-decl.c 2001/04/10 19:22:57 1.1.1.4.2.1 > +++ c-decl.c 2001/06/13 20:54:49 > @@ -4491,8 +4491,6 @@ > error ("`long long long' is too long for GCC"); > else > { > - if (pedantic && ! in_system_header && warn_long_long) > - pedwarn ("ANSI C does not support `long long'"); > longlong = 1; > } > } This would just break the warning. "ANSI" C is the 1990 version. C99 needs to warn about different things. contrib/gcc already has correct code for this: In c-common.c: if (pedantic && (length_char == 'Z' || !flag_isoc99)) ^^^^^^^^^^^^^^^ warning ("ANSI C does not support the `%c' length modifier", length_char); In c-decl.c: if (pedantic && !flag_isoc99 && ! in_system_header ^^^^^^^^^^^^^^^ && warn_long_long) pedwarn ("ANSI C does not support `long long'"); Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message