This is the mail archive of the gcc@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]

Function-like macro definitions


We're a bit loose in our syntax checking of the parameter lists in the definition of function-like macros. It seems to me that we allow commas without intervening parameter names, and parameter names without intervening commas, i.e. #define foo(g h,,) g h is a valid 2-parameter macro definition. I've tightened this up in what I'm working on. Is there any good reason for that being the case? Also, I'm considering reducing the status of redefinitions like #define F(X) X #define F(Y) Y where the only difference is the spelling of the parameters, from hard error to pedantic warning. Are there objections to any of the above? Neil.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]