This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/58887] Allow recursion in variadic macros?
- From: "mtewoodbury at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 27 Oct 2013 21:56:35 +0000
- Subject: [Bug preprocessor/58887] Allow recursion in variadic macros?
- Auto-submitted: auto-generated
- References: <bug-58887-4 at http dot gcc dot gnu dot org/bugzilla/>
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.