This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpp.texi tweaks


Zack Weinberg wrote:-

> As long as you're making corrections, could you fix what it says about
> the definition of __STRICT_ANSI__?  See PR other/3199.

Hmm, OK.  It'll have to wait till tomorrow.

> I think ... which deal ... is the appropriate form.  The referent is
> the _pair_ of extensions, which is a plural thing.
> 
> This may be British vs. American usage.

Maybe :-)  Like "the goverment is / are".

I'll revert it if you like.  The things I changed tended to be things
that I had to re-read to understand, or that on first reading seemed
awkward.  Once the first reading experience has gone, it's hard to
remain unbiased.

> It doesn't make sense to put another form _after_ the "anything else"
> form, even if it happens to be an extension.  Also, the "anything
> else" paragraph refers to the "above _three_ forms", but with this
> change there are only two.

Yes, this needs to be reworded.  I was in a rush to get stuff in for
3.0.  I no longer think it's worth trying for 3.0.  We don't accept
the #line extended form any more (we agreed this was the right thing
back in January I think).

> What's left out of the assertion implementation?

If you recall, we expand macros inside the parentheses in preprocessor
conditionals; fixing this in tradcpp is practically impossible without
a rewrite, since it fully macro-replaces the line before starting to
semantically analyze it.

e.g.

#if #cpu(unix)

would expand the "unix" to 1 if you're unlucky (which you mostly are
without -ansi, and if you're -ansi why are you using tradcpp?).
Ironically enough, this was the example that started the whole
argument back in December about introducing assertions to tradcpp for
the benefit of Emacs, and no-one has ever come back to complain that
is never worked since I committed the tradcpp assertion implementation
8-)

> Is it not true that '-isystem/foo/bar/baz' is rejected?

No, it's been OK since the first patch I committed for GCC back in Feb
2000.  Maybe before that even - the driver explicitly allows it.

> (experiments...) Huh, it isn't.  In that case, you should change the
> previous couple of lines as well, take out 'single-letter' between
> 'All' and 'options', and 'letter' between 'option' and 'or with...'

Will do tomorrow.

> I meant to insert here a note like the one in invoke.texi where it
> points out that you cannot combine single letter options, `-dM' is not
> the same thing as `-d' `-M'...

Yah, but you can do "-dMI" which is undocumented, for CPP at least.
My recent work on switches has uncovered various inconsistencies in
switch handling.  For example, CPP accepts -foperater-names but not
-fno-operator-names (or vice versa, you get the idea).  But the front
end accepts both I believe.  There's are various switches in the front
ends where one or other of a pair is rejected.  Some have good reason,
but some are oversights.

> You need to correct invoke.texi on this one as well.

Thanks,

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]