Re: 2.4.7 -- GCC-3.0 -- "multiline string literals deprecated" -- PATCH

Gareth Hughes (gareth.hughes@acm.org)
Wed, 01 Aug 2001 01:57:52 +1000


Horst von Brand wrote:
>
> AFAIU, they are non-standard, and can easily hide bugs (in opening a string
> and forgetting to close you are in escence commenting out lines of code)

Zack Weinberg, who's post started the thread, gave three main criteria
for their removal in
http://gcc.gnu.org/ml/gcc-patches/2001-07/msg00327.html, including:

<quote>
There is only one argument in my mind for keeping them:

- It makes it easier to write lengthy chunks of inline assembly.

This is certainly true, however, writing a lengthy chunk of inline
assembly is almost always a mistake; it interferes with the compiler's
ability to do its job. Therefore I do not think there is any
compelling need to make that easy.
</quote>

If I ever write inline assembly, then it's for a very good reason. I'd
hesitate to call almost all uses of inline assembly a "mistake",
particlarly in places like the kernel, or math-intensive ones like 3D
graphics.

> Right. If you use a compiler, you shouldn't need it much. Better make
> other, more important, things easy/more foolproof, even at some cost for
> the asm() writer. (Hint: Count the lines of asm in the kernel (an
> _extremely_ heavy asm user!) vs the lines of plain C)

No argument re: lines of code. However, if I have to write a decent
chunk of inline assembly, multiline strings are much nicer IMHO.

> Yep, this is a braindead argument. There must have been others (sensible
> ones)...

See above ;-)

> I hope they disallow multiline strings pretty soon.

I don't have strong feelings either way. And I sure don't want to have
this argument again...

-- Gareth
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/