This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor/7457: failure preprocessing ## directive
- From: Zack Weinberg <zack at codesourcery dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 31 Jul 2002 20:16:02 -0000
- Subject: Re: preprocessor/7457: failure preprocessing ## directive
- Reply-to: Zack Weinberg <zack at codesourcery dot com>
The following reply was made to PR preprocessor/7457; it has been noted by GNATS.
From: Zack Weinberg <zack@codesourcery.com>
To: gnicholls@bluephoenixsolutions.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/7457: failure preprocessing ## directive
Date: Wed, 31 Jul 2002 13:15:00 -0700
On Wed, Jul 31, 2002 at 07:50:39PM -0000, gnicholls@bluephoenixsolutions.com wrote:
> >Description:
> The following construct fails compilation:-
> #define LIB_SUFF ".so"
> #define SV_MODULE_NAME_STR "libdrv"##LIB_SUFF
The ## is completely unnecessary in this case. Remove it and your
code will work again.
The C standard specifies that the result of a token-paste is undefined
if the two tokens cannot be combined into a single token. This is
always true of two string constants. That is what the warning is
telling you.
zw