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]

Re: system.h


 > From: John Carr <jfc@mit.edu>
 > 
 > > 	With respect to the amount system.h includes, I don't agree
 > > with your view that it includes too much.  You don't state what you
 > > perceive as the disadvantage to including various files, other than to
 > > say they are not ANSI, but I will assume you mean it affects
 > > compilation time.
 > 
 > In my experience #including everything leads to trouble.
 > 
 > The ANSI C files are mostly harmless, but more importantly they are
 > necessary.  The others are neither harmless nor necessary in most
 > cases.
 > 
 > Here is an example: on x86 SVR4 systems <sys/stat.h> defines several
 > static functions.

	Well, I guess that could add some code bloat.  Have you done
any measurements to see if this is a serious problem or not?  Ie, does
it potentially increase the size of cc1 by 0.001%, 1%, 5%?  I'm not
wedded to the idea of including stat.h, but I'd like to know how
serious the problem is before we toss particular system includes
overboard.  If it turns out to add significantly to the size of the
compiler executable, let's jettison it.

	I'm sort of sheepishly thinking to myself there are a couple of
headers I'd like to *add* to system.h, like maybe stddef.h (??) and more
definitely stdarg.h/varargs.h. 

	Maybe a good compromise is to split it into two files,
system.h and system2.h.  One contains very common stuff, the other
contains the rest.  I'd like to hear more opinions and try to reach a
consensus.

		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.


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