This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: Implement _Pragma operator
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: cpplib: Implement _Pragma operator
- From: Neil Booth <NeilB at earthling dot net>
- Date: Tue, 31 Oct 2000 07:28:17 +0000
Zack Weinberg wrote:-
> Preprocessed buffers, definitely. It's not a huge issue, since /* or //
> surviving into phase 6 will always be a syntax error, and you have to
> play evil macro games to get them there. But we ought to get it
> right.
Actually, thinking about it again, maybe there's nothing to do.
If we use -C, well the comments go through untouched, and we should
probably clear them if we re-preprocess such a file again (which we
do at present).
Otherwise, even playing evil macro games, the _cpp_avoid_paste routine
I implemented recently with the big macro rewrite separates a '/' and
('/' or '*') with a space, so even evil macro games can't achieve
pseudo-comments like this. For example:-
bash-2.04$ cat ~/wacky.c
#define STAR *
#define DIVIDE /
DIVIDE/ DIVIDE* /DIVIDE /STAR
bash-2.04$ ./cpp0 ~/wacky.c
# 1 "/home/neil/wacky.c"
/ / / * / / / *
bash-2.04$
Would you agree there's nothing to do?
Neil.