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

Re: [rfc cpp] extra checking for build(...)

Richard Henderson <> writes:

> For tree-ssa, I need to add an extra operand to CALL_EXPR.  This
> means updating all places that we build CALL_EXPRs.  I think I
> got them all, but the last one took quite a while to locate.
> I was thinking that something like this would make it easier to
> track this sort of thing down.  In time we could transition to 
> the buildN functions, much like we've done with gen_rtx_fmt_ee,
> but that's more churn than I'm willing to get myself into all at
> once.
> Is there a good way to get the preprocessor not to bitch about
> the use of a gcc extension here?  #pragma extensions on/off?

A cheesy way would be: put it at the very end of tree.h and precede
with #pragma GCC system_header.  We have no other way of doing that,
although I would have no objection to adding 
#pragma GCC preprocessor_extensions on/off

It occurs to me that _buildC2 would be simpler if one could write
"rest ## , blah blah" and have the comma deleted - this feature
doesn't exist but only because Neil and I couldn't think of a use for
it, and now here it is.  So if you went and implemented that, then
you'd be restricted to GCC >=3.5 anyway, and there would be no reason
not to do the new #pragma.

> I'll note that I don't know how to write this construct with
> c99 __VA_ARGS__, since (1) apparently c99 requires __VA_ARGS__
> to be *used*

... news to me ...

> and (2) I don't think you can handle zero arguments.

No, you can't.  I filed a DR about this but haven't heard anything.


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