This is the mail archive of the
mailing list for the GCC project.
About cpp and multi-line strings
- To: gcc at gcc dot gnu dot org
- Subject: About cpp and multi-line strings
- From: Marc Espie <espie at schutzenberger dot liafa dot jussieu dot fr>
- Date: Mon, 20 Aug 2001 17:42:05 +0200
- Reply-To: Marc dot Espie at liafa dot jussieu dot fr
It looks like it's really a bad idea to deprecate multi-line strings
because of extended asm, but a good idea otherwise.
The question is, how then to warn properly if multi-line strings are
used outside of extended asm ?
The main concern is that finding out whether a string is used for
extended asm or not is not the lexer job at all.
The following scheme might make sense: allow the preprocessor to
insert __attribute__((multiline_string)) in the flow to tag the
corresponding, resulting string. Then it's up to the next stage to
decide what to do with it, and gcc grammar could react to it by properly
warning if multi-line strings are used outside of extended asm, and not
warn if it's used within extended asm.
Would this be hard to implement ?