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

Re: [PATCH] Kill spurious "pasting would" warnings (was Re: 2.4.0-test7 spurious '##' patches)


On Fri, Sep 01, 2000 at 08:07:05AM -0400, Jakub Jelinek wrote:
> On Thu, Aug 31, 2000 at 10:02:45PM -0700, Zack Weinberg wrote:
> > 
> > The 'pasting would not give ...' warning is supposed to be suppressed
> > in this context, but obviously it isn't working.  I'll look into it.
> 
> Hi!
> 
> This works for me: VAR_ARGS flag should be checked in the current context,
> not current - 1 and other code uses posn - 1 to index into tokens (otherwise
> it points to the closing paren).
> Ok to commit?

It looks good to me.  You can apply it if...

> We should probably have some good testcase to check that the warning is
> emited where it should and is not where it should not, like:
> #define a(x, y, z...) b(x , ## y)
> a(x, y, y, z)
> should emit the warning while
> #define c(x, y, z...) d(x, y , ## z)
> c(x, y, y, z)
> should not.

you write this test case for gcc.dg/cpp and check it in too.

Thanks.

zw

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