Date: Thu, 14 Jun 2001 10:59:10 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mark Peek <mark@whistle.com> Cc: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, Sheldon Hearn <sheldonh@starjuice.net>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/stdio printf.3 Message-ID: <Pine.BSF.4.21.0106141048200.71865-100000@besplex.bde.org> In-Reply-To: <p05100314b74d84769ade@[207.76.207.129]>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Jun 2001, Mark Peek wrote: > At 3:41 PM -0400 6/13/01, Garrett Wollman wrote: > ><<On Wed, 13 Jun 2001 21:28:12 +0200, Sheldon Hearn > ><sheldonh@starjuice.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106141048200.71865-100000>