Bug in gcc

Mark Veltzer mark@schema.co.il
Mon Oct 11 17:48:00 GMT 1999


Hello dear GNU GCC maintainers!!!

First - thank you for the best compiler in the world.

And now for the bugs -

-The bug is in the GCC command line parsing mechanism.
GCC does not stop compilation on error when receiving flags that it
does not understand. I am not sure to which flags that applies but I
do have an example for such behaviour.
For instance - when passing a flag like - "-Woverloaded-virtuals"
(which does not exist - the flag that does exist is
"-Woverloaded-virtual"
(without the s)) the compiler just ignores the flag and goes ahead and
compiles. That is a very unrobust behaviour. I would like to know that
the option is unrecognized. In my opinion (although there is no official

draft on the matter) any unrecognized option on the command line
should cause the tool to halt and refuse to do any!!! work.
This looks like a very easy bug to resolve.
-gcc has a way of compiling many targets at once (thus reducing overall
compilation time by not loading the compiler every time...).
The current way is : gcc -c one.cc two.cc.
The files that would be generated are "one.o" and "two.o"
On the other hand, there is no way to specify what is the target
".o" file
for each source. I would like to make two points:
1. multiple compilation of sources in a single compiler run is an
    important feature (for instance - think of installation scripts and
    Makefiles which get distributed and could take for granted the fact
    that the code which they compile has no errors (or at least the
chance
    of an error is slim since this is a distribution build and not a
    development build - these kinds of compile and install sessions
could
    be greatly sped up if the Makefiles (using AutoConf or something)
    were configured to compile all sources at a single run of the
compiler).
2. an not to be looked down upon portion of installation scripts and
    Makefiles do not generate ".o" files in the directory in which the
source
    is (the most common case is when you build for multiple platforms
    and wish to store each object file in an architecture dependant
    directory). These would benefit from some way to give the compiler
    a list of source files but also a list of targets (target for each
source).
3. as the concept of "Full Project Build" takes hold (which is not the
    common use of "Make" today but which does take hold with more
    sophisticated tools like the GPL'd tool "cook" by Peter Miller) The
    demand for compling many sources from multiple directories would
    take hold and gcc should be ready to answer to call.

                                                    Thanks.


More information about the Gcc-bugs mailing list