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: cpplib: Implement _Pragma operator


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.

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