lkml.org 
[lkml]   [2001]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Asm style
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:13    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site