This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Still a lot of C++ files getting "fixed"
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: Re: Still a lot of C++ files getting "fixed"
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Wed, 26 Jan 2000 17:49:40 -0500
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, zack at wolery dot cumb dot org, austern at sgi dot com, autogen at linuxbox dot com, gcc-bugs at gcc dot gnu dot org, mark at codesourcery dot com
- References: <200001262138.QAA12458@caip.rutgers.edu> <00012623085400.07257@enzo.bigblue.local>
On Wed, Jan 26, 2000 at 10:56:13PM +0100, Franz Sirl wrote:
> Am Mit, 26 Jan 2000 schrieb Kaveh R. Ghazi:
> >> From: Zack Weinberg <zack@wolery.cumb.org>
> > > >
> > > > Since the "foo//*bar*/" case is valid c89, I think _not_ warning is
> > > > perhaps the right thing to do.
> > >
> > > I think you misunderstand. -ansi -pedantic shouldn't parse // as a
> > > comment start at all. -std=gnu89 -pedantic should parse // as a
> > > comment start but give a warning because an extension is being used.
> > > (Probably only once per input file, to avoid extreme obnoxiousness.)
> > > zw
> >
> >Yes, for user code.
> >
> >I still think we should always silently accept // comments in system
> >headers no matter what. Even if -ansi -pedantic. (Otherwise we can't
> >stop "fixing" these headers.)
>
> What I'm stating here might be totally silly, but this question was in my mind
> since this -ansi discussion restarted.
>
> Aren't there international treatys between ISO and the local standard
> organizations like ANSI, stating that ISO standards are automatically local
> standards too? So if ISO defines C99 it's also an ANSI standard? For me that
> would mean -ansi now should check for ISO C99 compliance and if a user wants to
> check for the old and now outdated ANSI C89 he has to use a different flag like
> -ansi=c89. So -ansi or -iso would always mean the latest official standard.
IIRC it is up to the local standard organization to adopt the ISO standard.
One of the last things I did officially as a member of X3J11 is formally vote
to resind the original ansi standard that was adopted in 1989, and approve
replacing it with the ISO C standard that was adopted in 1990. Technically,
the ISO standard is the same as the originally ANSI standard, except that it
was reformatted to meet the ISO rules, which included adding some chapters in
the beginning, which force most of the chapters to be renumbered, and to drop
the list of participants (boo hoo) and rationale. Once the vote is taken, no
further vote is needed to adopt either the addenda that were published or the
new C99 standard. For countries other than the USA, I believe there needs to
be a vote to adopt the ISO standard, but I'm not sure (it has 6-8 years since I
attended the meetings...).
We really should adopt a -iso switch (possibly an -iso=year switch to go
between the two revisions of the standard) and phase out the -ansi switch.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
Work: meissner@redhat.com phone: 978-486-9304 fax: 978-692-4482
Non-work: meissner@spectacle-pond.org