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/9650: string literal contactenation doesn't work with #include


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

From: Neil Booth <neil@daikokuya.co.uk>
To: frey waid <waid@cisco.com>
Cc: neil@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/9650: string literal contactenation doesn't work with #include
Date: Mon, 10 Feb 2003 23:03:52 +0000

 Neil Booth wrote:-
 
 > frey waid wrote:-
 > 
 > > that's what i was doing before.  so i had this:
 > > 
 > > #include COMP_INC(comp,file)
 > > 
 > > #define COMP_INC(comp,file)   #comp "/include/" #file
 > > 
 > > do you have another method in mind?
 > 
 > Sure 8-)
 > 
 > #include COMP_INC (comp, file)
 > 
 > #define COMP_INC(comp, file) COMP (comp, file)
 > #define COMP(prefix, suffix) str(comp/include/file)
 
 Aargh!  Close but no cigar.
 
 #define COMP(prefix, suffix) str(prefix/include/suffix)
 
 > #define str(x) #x
 > 
 > Not tested, but you get the idea.
  
 Neil.


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