Skip to contentSkip to conversation

Asm style

DISCUSSION Andi Kleen 1 participant 1 message Nov 21, 2001 1 message not in the archive

lore
Share & tools
lore

Andi Kleen

author
#1 lore raw
In reply to a message not in the archive
Quoted 2 lines · vda

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:

Quoted 4 lines
	asm(
	"	cmd	r,r\n"
	"lbl:	cmd	r,r\n"
	"	cmd	r,r\n"

Is bearable with some pains.

Quoted 4 lines
#define NL "\n"
	asm(
	"	cmd	r,r" NL
	"lbl:	cmd	r,r" NL

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

-Andi