Re: [OFFTOPIC] gcc and macros var args in rh7
- From: James Henstridge <james daa com au>
- To: Arturo Tena <arturo directmail org>
- Cc: gnome-devel-list gnome org
- Subject: Re: [OFFTOPIC] gcc and macros var args in rh7
- Date: Sun, 24 Dec 2000 11:17:04 +0800 (WST)
On Fri, 22 Dec 2000, Arturo Tena wrote:
>
> Hello!
>
> I've found some weird things in Red Hat Linux 7.0 and its gcc
> (gcc-2.96-69).
>
> The following simple program shows a warning:
>
>
> $ cat a.c
> #define aaa(args...) ccc(## args)
> int main (void) { return 0; }
> $ gcc a.c
> a.c:1:25: warning: nothing can be pasted after this token
> $
>From the gcc docs, it says that when you use ## like this, it will delete
the previous token if args is empty. So maybe try removing the ##, as you
probably don't want to remove a token when args is empty. That is, you
probably want aaa() to expand to ccc(), rather than ccc).
James.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]