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

[Bug preprocessor/58887] Allow recursion in variadic macros?


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58887

--- Comment #5 from Max TenEyck Woodbury <mtewoodbury at gmail dot com> ---
(In reply to joseph@codesourcery.com from comment #3)
> We take the view that the preprocessor is deliberately meant to be limited 
> and overly complicated features in it would be contrary to the spirit of 
> C.  Of course if they are introduced in the standard we need to implement 
> them, but otherwise this proposed feature seems inappropriate.

That has not always stopped you all in the past, but that is really neither
here nor there and you use the royal 'we' to boot...  Speak for yourself. 
(ignore that; I'm in a sour mood and you just pushed one of my hot buttons.)

Where option 1 may be a little complicated to implement, option 2, while less
effective, is a real simple addition: define __VA_ARG_COUNT__ (or maybe
__VA_ARGC__) with the same kind of restrictions that apply to __VA_ARGS__.

See also Bug 33877.


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