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: Feature idea for gcc


On Sun, 1 Dec 2002, Martin Schaffner wrote:

> If the `#use' feature is accepted into the main gcc tree, it will become a
> defacto standard, like many other c/c++ language extension in gcc. Programs
> for GNU systems could use it at will (except maybe gcc itself, to avoid
> bootstrapping problems).

The presumption is very strongly against new extensions.  The problems 
caused by extensions are at least O(n^2) in the number of extensions 
because of interactions between each extension and all the others.  Any 
new nontrivial extension needs to be justified in terms of:
* Does something not reasonably doable without the extension.
* Well-defined, including interactions with other extensions, including 
proposed changes to the wording of the language standard.  (The 
documentation should be written and discussed on the lists before the 
code.)
* Not likely to conflict with extensions in other compilers or future 
standard versions; the proposed language changes should be suitable to go 
directly into a paper for the standards committee if they want to 
standardise that area.

This particular proposal can be done with make and external preprocessors;  
no new compiler features at all are needed; just as literate programming
for C is implemented through external tools (CWEB etc.) that output C
rather than modifying the compiler.

> Maybe the compile-this-file-and-its-dependencies feature doesn't belong to
> gcc, although it would be sexy for gcc to have a `-r' flag like rm, cp, etc.,
> and easier for the newbie if only one command has to be remembered.

Only one command has to be remembered: "make".  A newbie shouldn't be
using gcc directly at all, since they ought to be using at least half a
dozen warning flags (-Wall -W ...) for all their compilations and won't
want to remember them.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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