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/7976: macro definition


The following reply was made to PR preprocessor/7976; it has been noted by GNATS.

From: Andreas Schwab <schwab@suse.de>
To: neil@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org,
	stoppel@immt.pwr.wroc.pl, gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/7976: macro definition
Date: Thu, 19 Sep 2002 15:45:21 +0200

 neil@gcc.gnu.org writes:
 
 |> Synopsis: macro definition
 |> 
 |> State-Changed-From-To: closed->open
 |> State-Changed-By: neil
 |> State-Changed-When: Thu Sep 19 06:13:38 2002
 |> State-Changed-Why:
 |>     Sorry, ignore previous message.  I'll look at this later.
 
 IMHO your previous analysis was right.
 
 UINT32_C(123) ->
 __CONCAT__(__CONCAT_U__(123),l) ->
 __CONCAT_U__(123) ## l
 
 and )l is not a token.  This needs to be written like this:
 
 #define __CONCAT2__(_A,_B) _A ## _B
 #define __CONCAT__(_A,_B) __CONCAT2__(_A,_B)
 #define __CONCAT_U__(_A) _A ## u
 #define UINT32_C(__c) __CONCAT__(__CONCAT_U__(__c),l)
 
 Andreas.
 
 -- 
 Andreas Schwab, SuSE Labs, schwab@suse.de
 SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
 Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
 "And now for something completely different."


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