This is the mail archive of the gcc-prs@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]
Other format: [Raw text]

Re: preprocessor/7457: failure preprocessing ## directive


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


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