Article View: gnu.gcc.bug
Article #2175Preprocessor help!
From: Paul Hudson
Date: Fri, 20 Jan 1989 13:50
Date: Fri, 20 Jan 1989 13:50
32 lines
1212 bytes
1212 bytes
There's almost certainly a better place for this, but I don't have access to news, so I thought I'd try here. I would like to declare one of a number of types, for example typedef int Type1; typedef int Type2; If the trailing number is fixed - #define CAT(a, b) typedef int CAT(Type, 1); will do it. However, I'd like to make the number another macro definition. Ie. #define N 6 #define CAT(a, b) typedef int CAT(Type, N); This gives typedef TypeN; because ##-processing happens before macro-rescanning. Is there any way I can do what I require? Paul Hudson Snail mail: Monotype ADG Email: ...!ukc!acorn!moncam!paul Science Park, paul@moncam.co.uk Milton Road, "Sun Microsysytems: Cambridge, The Company is Arrogant (TM)" CB4 4FQ
Technical Details
Message-ID:
<8901201350.AA03025@marvin.moncam.uucp>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!pollux!ti-csl!cs.utexas.edu!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!moncam!paulShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!pollux!ti-csl!cs.utexas.edu!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!moncam!paul From: mcvax!moncam!paul@UUNET.UU.NET (Paul Hudson) Newsgroups: gnu.gcc.bug Subject: Preprocessor help! Message-ID: <8901201350.AA03025@marvin.moncam.uucp> Date: 20 Jan 89 13:50:45 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 32