This is the mail archive of the gcc@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: concatenation of strings in #include directive.


"Nitin Gupta" <ngupta@GlobespanVirata.com> writes:

|> Hi,
|> 	The preprocessor of veteran egcs 1.1 would
|> 	concatenate the strings appearing in the 
|> 	#include directive to make a single string
|> 	e.g. 
|> 	#include "/foo/" "bar/" "my.h"
|> 	would be converted to
|> 	#include "/foo/bar/my.h"
|> 		or
|> 	#define BAR "bar/"
|> 	#include "/foo/" BAR "my.h"
|> 	would be converted to
|> 	#include "/foo/bar/my.h"
|> 
|> 	The newer version of GCC does not seems to support
|> 	this. I have checked it till 2.96 20000731. 
|> 	I'm particularly interested in this feature because
|> 	as I'm migrating my development environment 
|> 	from egcs to GCC 3.2 released, I see a lot of 
|> 	dependencies of our applications on this feature.
|> 
|> 	I searched but could not find any reference to
|> 	this feature on the list. I request you to please 
|> 	help me in locating the discussion or reason of 
|> 	deprecating this feature. 

>From the C standard's point of view this is invalid code.  Footnote 143 in
6.10.2 make this explicit, but the normative text is quite clear as well.

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]