This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 2.4.0-test7 spurious '##' patches
- To: Keith Owens <kaos at ocs dot com dot au>
- Subject: Re: 2.4.0-test7 spurious '##' patches
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Thu, 31 Aug 2000 22:02:45 -0700
- Cc: Richard Henderson <rth at twiddle dot net>, linux-kernel at vger dot kernel dot org, Martin Mares <mj at suse dot cz>, Olaf Kirch <okir at monad dot swb dot de>, torvalds at transmeta dot com, gcc-bugs at gcc dot gnu dot org
- References: <20000831214416.A8344@twiddle.net> <3855.967784200@kao2.melbourne.sgi.com>
On Fri, Sep 01, 2000 at 03:56:40PM +1100, Keith Owens wrote:
> On Thu, 31 Aug 2000 21:44:16 -0700,
> Richard Henderson <rth@twiddle.net> wrote:
> >On Thu, Aug 31, 2000 at 07:09:00PM +1100, Keith Owens wrote:
> >> Compiling 2.4.0-test7 with the latest IA64 toolchain, gcc version
> >> 2.96-ia64-000717 snap 000828. It complained about various include
> >> files, "pasting would not give a valid preprocessing token", this
> >> version of gcc is a bit more paranoid about the use of '##'.
> >
> >> -#define dprintk(args...) dfprintk(FACILITY, ## args)
> >> +#define dprintk(args...) dfprintk(FACILITY, args)
> >
> >This one isn't. This is a gcc extension to remove the previous token
> >if "args" is empty. So you'd get
> >
> > dfprintk(FACILITY);
> >instead of
> > dfprintk(FACILITY, );
>
> I know about that extension and I originally tried
> dfprintk(FACILITY , ##args) which is what gcc info recommends, but that
> still gave a warning message.
With a snapshot that recent, (FACILITY , ## args) and (FACILITY, ##args)
are equivalent. Older gcc (including 2.95 and all 2.96 up through May
or so) would delete too much if you used the second form.
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.
zw