This is the mail archive of the gcc@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]

About cpp and multi-line strings


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 ?


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