This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: Implement _Pragma operator
- To: Neil Booth <NeilB at earthling dot net>
- Subject: Re: cpplib: Implement _Pragma operator
- From: "Zack Weinberg" <zackw at Stanford dot EDU>
- Date: Mon, 30 Oct 2000 12:46:01 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20001030203100.A4074@daikokuya.demon.co.uk>
On Mon, Oct 30, 2000 at 08:31:00PM +0000, Neil Booth wrote:
> This patch implements _Pragma as introduced in the C99 standard. A
> few minor changes to existing infrastructure were necessary.
Yay! That's a major C99 compliance checklist item. Thank you.
> 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.
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.)
zw