This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
newbe macro preprocessor question
- From: "Andrea Partinico" <andrea dot partinico at linsys dot it>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 5 Jun 2007 01:09:32 +0200
- Subject: newbe macro preprocessor question
- Reply-to: andrea dot partinico at linsys dot it
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