This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33877] New: Request for __VA_ARGC__
- From: "michael at fig dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Oct 2007 07:57:55 -0000
- Subject: [Bug c/33877] New: Request for __VA_ARGC__
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It would be really convenient if the C preprocessor exposed the number of
variable arguments supplied to a variadic macro as an integer. I tried to come
up with ways of working around this missing feature, but I can't figure out how
to do it without evaluating the macro arguments twice or causing compiler
warnings.
I can supply a patch, if I am blessed with my proposed solution, to have
__VA_ARGC__ be an integer count of the number of __VA_ARGS__. If you have
suggestions for a better design, I'd like to hear them!
Thanks,
Michael.
--
Summary: Request for __VA_ARGC__
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael at fig dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33877