Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Query about " w...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 25086 of 27343
Post > Topic >>

Query about " warning parameter names (without types) in function

by prix prad <maalage@[EMAIL PROTECTED] > Mar 23, 2008 at 06:57 PM

Hi All,
         I encountered the above error when I tried to expand a macro
as follows:

#define EXPAND(array) int M_ ## array

The problem occurs when we have 'array' itself as a macro:

say EXPAND(ARR(DECL))
where #define DECL _decl
         #define ARR(name) arr ## name

So the end result would be M_arr_name

The error goes away when I do:

#define EXPAND(array) int PREPEND_ARR(array)
where
PREPEND_ARR(array) M_ ## array

Can someone explain me why the error is about a 'function declaration'
in this case since we are dealing with MACROS?

Thanks,
/prix
 




 4 Posts in Topic:
Query about " warning parameter names (without types) in functio
prix prad <maalage@[EM  2008-03-23 18:57:17 
Re: Query about " warning parameter names (without types) in fun
Jack Klein <jackklein@  2008-03-23 22:17:46 
Re: Query about " warning parameter names (without types) in fun
Andrey Tarasevich <and  2008-03-24 00:32:16 
Re: Query about " warning parameter names (without types) in fun
prix prad <maalage@[EM  2008-03-24 21:02:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 21:48:27 CDT 2008.