This is the mail archive of the gcc@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: Comments with -fpreprocessed


dewar@gnat.com wrote:
> 
> <<I disagree. 2.95.2 does not accept comments in preprocessed source, so
> accepting them now is a regression. IMO, options should do exactly what they
> >>
> 
> How can accepting something you did not before constitute a regression.
> That's an odd use of the word. Normaly regression means that something that
> worked before does not work now. When something used not to work, and works
> now, that;s not a regression in my book.
but my point of view is that it *did* work before - it correctly rejected
an ill-formed program. 'accepting something that you did not before' is
a regression, if `something' is ill-formed.

In 2.95 we had separate cpp and cc1. if you fed a file directly to cc1 it
had already been `preprocessed'. Now cc1 includes cpp, so you have to tell
it explicitly whether the file has been `preprocessed' or not. I think
-fpreprocessed is that flag, and should give the same semantics.

Now, this may all seem like quibling over details, but I find that if I'm
having to grovel over the preprocessed source in order to understand some
strange diagnostic, then I'd really like cc1 to behave *exactly* the same
when given the original source or the preprocessed source and appropriate
switches. Incidentally, it was exactly that kind of grovelling that caused
me to discover the repeated macro expansion problem that Zack fixed -- I
was extremely confused by cc1plus's behaviour.

I consider what Neil wants, to be additional functionality which should be
turned on by a different command line switch.

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org


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