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]

Re: RFC: cpplib: multiline strings



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>

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