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: The meaning of -Wall


"Joseph S. Myers" wrote:

> The tool Joe Average User wants is "make"; they can easily set
> 
> CFLAGS = `if [ -f ~/.gcc-opts ]; then cat ~/.gcc-opts; fi; if [ -f \
>   /etc/gcc-opts ]; then cat /etc/gcc-opts; fi`

If J.A.U. is a solitary programmer without a multi-year history
of makefiles to deal with, yes.

> in their Makefile if they want to.  Adding such functionality to GCC - so
> adding another variable piece of the environment making reproducing bug
> reports more difficult - is not the way to go.

In other words, it is already too difficult for JAU and it is already
time to simplify the interface for providing bug reports.  I agree.
Sounds right to me.  Just call me, "Joe".

> The options used in *BSD
> source trees are centrally configurable.

That is very nice.  I've never worked in a place where they were
centrally configurable.  Distributed into 3,000 makefiles is more
the norm.  Frankly, I don't think these things belong on the
command line anyway, but I'll agree that I'm a heretic on that point.
I think every command line option ought to have a #pragma equivalent,
though it would be okay to render some ineffective after some point
in the compile.

> It's up to wherever the user is
> learning about Unix as a whole from to teach them the culture that any
> nontrivial project has a Makefile with compilation options centrally
> configured.

Yeah, I know.  UNIX traditions _are_ oral, but not all of them preach
minimizing copies of information.  When you move into a company, you
_must_ live with their traditions for a while before trying to tip the
cart; and when you try you may not be able to.  So, it goes back to
designing an interface that is easy to manipulate.  Command line
arguments are just harder to mess with than config files and/or
directive files with a bunch of #pragma's in them.  Principally this
is because of the labrynth of messy makes that have grown up over 
the years.

So, since I'm mulling as I'm typing, I see it coming down to three choices:
1.  Ignore the idea and have more arguments about what goes into -Wall
2.  have a collection of config files just for -Wall
3.  design a general mechanism for handling compile options in a file.
    That file can be either a config file, an early-on-only included
    file with #pragma options, or both.


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