This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Kill spurious "pasting would" warnings (was Re: 2.4.0-test7 spurious '##' patches)
- To: Jakub Jelinek <jakub at redhat dot com>
- Subject: Re: [PATCH] Kill spurious "pasting would" warnings (was Re: 2.4.0-test7 spurious '##' patches)
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Fri, 1 Sep 2000 10:29:07 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20000831214416.A8344@twiddle.net> <email@example.com> <20000831220245.M13918@wolery.cumb.org> <20000901080705.G21753@devserv.devel.redhat.com>
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.
> 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.