This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __VA_ARGS__ patch for cccp.c
On Mon, Mar 09, 1998 at 06:34:04PM -0800, Jim Wilson wrote:
> We really should have a way of specifying the c9x standard before adding
> features that are specific to it. I'll bring that up in another message.
yes, please, that's my bigest concern. there was quite some discussion,
but no result...
> This looks mostly OK. However, I don't see anything in the C9X draft about
> using ## to delete a preceeding argument if the ... part is empty. This stuff
Yes...
#define msg(frmt,...)
just doesn't work (as in msg("hi")), you have to use
#define msg(...)
and hope that functions you are calling happen to have the right argument
order. bad bad.
, ## etc.. is really missing from c9x.
> should not be enabled if using the c9x style variable argument macros.
I don't agree. gcc should be able to grok iso-c _by default_,
if possible every version of it. selecting between different standards
imho only makes sense when:
- two standards (or versions of it) disagree on the same syntax.
- you want strict conformance and use gcc as a tool to warn
about possible (conformance) problems (like -pedantic should do).
I agree that the patch behavious should be selectable by (which??)
switch. It's time to agree on one.
[ varargs enabled with -pedantic}
> That looks like a bug to me. This patch seems to fix it.
fine! I fell into that trap a week ago ;)
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg@goof.com |e|
-=====/_/_//_/\_,_/ /_/\_\ --+
The choice of a GNU generation |
|