gcc error

I’m porting an application in QNX6 (NT0 2.1) with long define as below :

#define Bus_Arbitrator__CREATE_M(Fip,Label,Listes,Programme_BA)
fdm_ba_load_macrocycle_manual(Fip,
sizeof(Listes)/sizeof(PTR_LISTS),
sizeof(Programme_BA)/sizeof(PTR_INSTRUCTIONS),
Label,Listes,Programme_BA)

when I compile my file, gcc reports “stray ‘’ in program” for macro.

could you help me

thanks,

PAYRE serge <spayre@centralp.fr> wrote:

I’m porting an application in QNX6 (NT0 2.1) with long define as below :

#define Bus_Arbitrator__CREATE_M(Fip,Label,Listes,Programme_BA)
fdm_ba_load_macrocycle_manual(Fip,
sizeof(Listes)/sizeof(PTR_LISTS),
sizeof(Programme_BA)/sizeof(PTR_INSTRUCTIONS),
Label,Listes,Programme_BA)

when I compile my file, gcc reports “stray ‘’ in program” for macro.

could you help me

thanks,

Since I don’t have any of your defines or variable types, I made everything
an int:

#define PTR_LISTS int
#define PTR_INSTRUCTIONS int

#define Bus_Arbitrator__CREATE_M(Fip,Label,Listes,Programme_BA)
fdm_ba_load_macrocycle_manual(Fip, sizeof(Listes)/sizeof(PTR_LISTS),
sizeof(Programme_BA)/sizeof(PTR_INSTRUCTIONS),
Label,Listes,Programme_BA)

void fdm_ba_load_macrocycle_manual(int a, int b, int c, int d, int e, int f)
{
return;
}

int main()
{
int a, b, c, d;
Bus_Arbitrator__CREATE_M(a, b, c, d);

return(0);
}

It seems to work fine:

[] /home/gp:>gcc foo.c -ofoo
[] /home/gp:>

Please put together a small complete test case that demonstrates
the problem, and I will look into it.

Regards,
GP


Graeme Peterson
QNX Tools Group
gp@qnx.com

Just a hunch - check to make sure that you don’t have DOS style
newlines in your files. This really throws cpp for a loop.

PAYRE serge <spayre@centralp.fr> wrote:

I’m porting an application in QNX6 (NT0 2.1) with long define as below :

#define Bus_Arbitrator__CREATE_M(Fip,Label,Listes,Programme_BA)
fdm_ba_load_macrocycle_manual(Fip,
sizeof(Listes)/sizeof(PTR_LISTS),
sizeof(Programme_BA)/sizeof(PTR_INSTRUCTIONS),
Label,Listes,Programme_BA)

when I compile my file, gcc reports “stray ‘’ in program” for macro.

could you help me

thanks,




cburgess@qnx.com

In article <96u61h$cbh$1@nntp.qnx.com>,
Colin Burgess <cburgess@qnx.com> wrote:

Just a hunch - check to make sure that you don’t have DOS style
newlines in your files. This really throws cpp for a loop.

More to the point, make sure the backslash is the last thing
on the line. Sometimes when transferring files (or using cut&paste),
you can also end up with a space. This gives GCC fits, and doesn’t escape
the newline as intended – (C newbies take note, \ is not a continuation
character).

PAYRE serge <> spayre@centralp.fr> > wrote:
I’m porting an application in QNX6 (NT0 2.1) with long define as below :

#define Bus_Arbitrator__CREATE_M(Fip,Label,Listes,Programme_BA)
fdm_ba_load_macrocycle_manual(Fip,
sizeof(Listes)/sizeof(PTR_LISTS),
sizeof(Programme_BA)/sizeof(PTR_INSTRUCTIONS),
Label,Listes,Programme_BA)

when I compile my file, gcc reports “stray ‘’ in program” for macro.

could you help me

thanks,





\

cburgess@qnx.com

Steve Furr email: furr@qnx.com
QNX Software Systems, Ltd.

Just try to do textto -l

This might help.

Didier.

Colin Burgess <cburgess@qnx.com> a écrit dans le message :
96u61h$cbh$1@nntp.qnx.com

Just a hunch - check to make sure that you don’t have DOS style
newlines in your files. This really throws cpp for a loop.

PAYRE serge <> spayre@centralp.fr> > wrote:
I’m porting an application in QNX6 (NT0 2.1) with long define as below :

#define Bus_Arbitrator__CREATE_M(Fip,Label,Listes,Programme_BA)
fdm_ba_load_macrocycle_manual(Fip,
sizeof(Listes)/sizeof(PTR_LISTS),
sizeof(Programme_BA)/sizeof(PTR_INSTRUCTIONS),
Label,Listes,Programme_BA)

when I compile my file, gcc reports “stray ‘’ in program” for macro.

could you help me

thanks,





\

cburgess@qnx.com