This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: cpplib: multiline strings
- To: Neil Booth <NeilB at earthling dot net>
- Subject: Re: RFC: cpplib: multiline strings
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: 21 Aug 2000 13:00:38 -0700
- CC: gcc at gcc dot gnu dot org
- References: <E13QQs0-0003Ak-00@daikokuya.demon.co.uk>
Neil Booth <NeilB@earthling.net> writes:
> I'd like to get rid of them to be honest, but I know that's not an
> option. Instead, I'd like to propose that we make it undefined
> behaviour if the first non-whitespace (in the C sense, i.e. including
> C-style comments) character on the second or subsequent lines of a
> multiline string is a # (or its digraphed equivalent). Thus
>
> "foo
> bar"
>
> is fine, but
>
> "foo
> # bar"
>
> gives undefined behaviour. This is no great loss: it can be re-written
>
> "foo
> " "# bar"
>
> instead.
This would break
asm ("\
# this little chunk of asm frobs `bar'.
frob bar
# ok, it wasn't a very helpful comment :-).
");
wouldn't it? There are some platforms where '#' is the only reliable
assembler comment character.
--
- Geoffrey Keating <geoffk@cygnus.com>