This is the mail archive of the
mailing list for the GCC project.
Re: About cpp and multi-line strings
- To: Marc dot Espie at liafa dot jussieu dot fr
- Subject: Re: About cpp and multi-line strings
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Mon, 20 Aug 2001 18:23:04 +0200
- Cc: gcc at gcc dot gnu dot org
At 17:42 20.08.2001, Marc Espie wrote:
>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 ?
Well, why? Initially when this all started in gcc-2.97 I was in your camp
too, but after some experience now, I don't think it's worth it, cause I
can't see what's especially bad about the new way to write these asms:
stw 1,3 \n\
stwu 4,2 \n\
I find that equally readable and editable as the old method, and in by far
the most cases one rarely changes an inline asm as soon as it's tested OK.
Some more typing initially, but that's it.