the actual c9x patch
Jeffrey A Law
law@cygnus.com
Wed Dec 2 00:24:00 GMT 1998
In message < 199812020103.UAA16926@blastula.phys.columbia.edu >you write:
> >And even if it does not
> >change in the draft it is too stupid to be followed.
>
> There are plenty of stupid things in the standard that we go along
> with, at least if conforming mode is on.
Right. And that's how we should approach anything that is just *totally*
stupid.
> >> What are the intended semantics of -std=gnu? In particular, is the
> >> library expected to define only C9x stuff when -std=c9x?
> >
> >This is what you mean by adding -std and not -ansi. I don't like the
> >idea to keep -ansi with the old meaning at all. It should have been
> >implemented using -std=c89 or so in the first place.
> >
> >I.e., -std=c89 in fact is what -ansi is in the moment. You want to
> >express different versions of GNU C but Ireally don't understand why.
> >Let there be only one GNU C version. This is how it always worked,
> >whenever gcc extended the language. There always will be a gcc
> >version which cannot understand what all others can.
>
> Let me rephrase. Right now -ansi and -std=blah do two things that I
> think should be separate options. They activate conforming mode in
> the compiler, and they select which version of the standard to conform
> to.
First, I'm strongly against changing what -ansi means. That's changing a
very visible and often used behavior in the compiler. Maybe someday when
C9X dominates the C compiler space like ANSI c89 does now we'll consider
switching. Right now I don't see a compelling reason to make that change.
> It is perfectly reasonable to want to compile code to C89 plus gcc's
> language extensions: suppose you've used `attribute' unqualified, but
> need to avoid the C9x syntax changes. You can't ask for that right now.
Agreed. Or to compile to C9X + GNU extensions or future standards + GNU
extensions.
IMHO, whatever scheme we come up with needs to be able to select a base
standard (c89, ansi, traditional) that's either strictly enforced or
allows gnu extensions.
Jeff
More information about the Gcc-patches
mailing list