Porting to Fedora gcc 4.0 -parsing backward slash("\") comma(",")

View: New views
2 Messages — Rating Filter:   Alert me  

Porting to Fedora gcc 4.0 -parsing backward slash("\") comma(",")

by mallen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This declaration statement used to work.... it would return 3 arguments to a macro....

DEFINE_CONST( LINE_TEXT,    // argument 1
\{_TEXT("solid")\,_TEXT("dash")\,_TEXT("doubledash")\,\}, // argument 2
"")” // argument 3

now --- building on Fedora Core 4 with gcc 4.0

the statement breaks each backslash (\) comma (,) into arguments so it now returns 6 arguments

which becomes a problem because the macro only expects 3 arguments....
any ideas on how to resolve this.
thanks.

Re: Porting to Fedora gcc 4.0 -parsing backward slash("\") comma(",")

by John (Eljay) Love-Jensen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi mallen,

Use this:

#define COMMA ,

DEFINE_CONST( LINE_TEXT,
{_TEXT("solid") COMMA _TEXT("dash") COMMA _TEXT("doubledash") COMMA },
"")

HTH,
--Eljay