cpplib: Implement _Pragma operator

Neil Booth NeilB@earthling.net
Mon Oct 30 13:00:00 GMT 2000


Zack Weinberg wrote:-

> Yay! That's a major C99 compliance checklist item.  Thank you.

Actually, your implementing callbacks about 2 months ago made it
almost trivial.

> > Firstly, the destringized string does not pass through stages 1 and 2
> > of processing; i.e. trigraphs, UCNs and escaped newlines are not
> > processed.  We should not do this for preprocessed input either, but
> > we have been doing.  I added a new flag "from_stage3" to indicate not
> > to do this, and we use this for _Pragma, command line directives, and
> > preprocessed buffers.
> 
> We shouldn't be processing comments either.

Hmmm.  We should for _Pragma since they're a stage 3 item.  Command
line directives is a toss-up since we can make our own rules up there,
so say we do since we do at the moment for simplicity.  Are you
referring to preprocessed buffers?  If so; it's a simple fix so I'll
do that soon with a test.

> I had been under the impression that string constant concatenation was
> legal inside _Pragma, but in fact it isn't.  It might make sense as an
> extension, though; thoughts?  (If we do, we ought to apply it to #line
> and #include too, for consistency.)

No! <g> Please, let's keep it simple.  At least until we move string
concatenation into cpplib.

Neil.


More information about the Gcc-patches mailing list