About cpp and multi-line strings
Marc Espie
espie@schutzenberger.liafa.jussieu.fr
Mon Aug 20 08:42:00 GMT 2001
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 ?
More information about the Gcc
mailing list