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