Re: Asm style

Andi Kleen (ak@suse.de)
21 Nov 2001 22:23:25 +0100


vda <vda@port.imtp.ilyichevsk.odessa.ua> writes:

> I'm using GCC 3.0.1 and seeing "multi-line literals are deprecated".
> Since a patch is necessary for that (and someone submitted it already)

The best patch for this IMHO would be to just remove the stupid warning
from gcc. It's obvious that whoever added it has never used gcc inline
assembly.

If they want to remove multi-line strings they need to supply a way to
write inline assembly without strings first. Both solutions below
are very error prone and ugly.

Failing that:

> asm(
> " cmd r,r\n"
> "lbl: cmd r,r\n"
> " cmd r,r\n"

Is bearable with some pains.

> #define NL "\n"
> asm(
> " cmd r,r" NL
> "lbl: cmd r,r" NL

Is also bearable, but needs agreement (needs a central #define)

-Andi

-
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/