Hello,

I am the author of Foundry build system which is now transitioning to the use 
of gcc from another compiler.  This is great because gcc is an excellent 
compiler.  However. there is a potential problem for me.

I hope that the designers of gcc are aware, that some of the gcc (as any 
advanced software tool) options, are for "convenience", while some are for 
"uniformity".

With a small system, like, a few files to compile, convenience is the key - you 
want to write the necessary commands to do your compilation, as quickly as 
possible. 

With a huge system of hundreds of thousands of files, convenience goes out the 
window, and the important thing is instead, uniformity. The useful features are 
the ones who behave in a simple way and always in the same way.  That is the 
only way, with such a large system, for a human to get a handle on the 
behaviour of the system.

Case in point, is the use of "current directory" for -I/-iquote include file 
searches.  That the "current directory" (the directory that the currently 
preprocessed file was found) is searched first, is a "convenience" feature.  
For a system with few files, it is very useful.  For a huge system, with 
gazillions of files with duplicate names all over, in order to be sure that the 
intended include files are included and not some other duplicates, it is 
crucial to have a simple, uniform algorithm for the search, which lends itself 
easily to script automation.  

The addition of "current directory" to the search algorithm, makes it in 
practice impossible to ensure always the correct files are included (in a huge 
system).  

That is why I always disabled the "current directory" (and also disabled the 
use of "system" directories, and disabled any difference between "" and <>). 
That way, the one and only thing to worry about is the ordering of -I 
directories. 

As I can see, the only way to get this effect in gcc, is with -I- put before 
all the -I options.  In fact, -I- option is really for something else, and this 
disabling of current directory is a side effect.  The whole option is obsolete, 
and the side effect is in fact thought of as a nuisance in the manual.  

Nothing could be more misguided!  This "strange side effect" is in fact very 
important.  


So please don't remove -I- (or make it possible to disable the current 
directory search, with some other option).  


Thank you,

Mark Galeck

Reply via email to