This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

newbe macro preprocessor question


Hi all,

I'm trying to do this:

#define mypoint	1, 2
#define myDISP(mypointer,mybyte,mybit) mypointer[mybyte] = mypointer[mybyte] | (0x01<<mybit)
unsigned char testpointer[20];
myDISP(testpointer,mypoint);

and I get this error:

macro "myDISP" requires 3 arguments, but only 2 given

I'm not understanding why "mypoint" definition isn't expanded in myDISP invocation ?

Any help really appreciated :)
Andrea


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]