This is the mail archive of the
mailing list for the GCC project.
Re: RFC: #pragma optimization_level
On 2005-04-05, at 16:12, Nix wrote:
I could turn the question back: What's so hard about grepping the
Because one does not expect to find compilation flags embedded in the
One does - if not grown up in the limited gcc "community". All the high
compilers out there DO IT.
Because generated source is fairly common?
No it isn't.
that runs you into `what's so hard about predicting the behaviour of
this code generator in order to...' and then you ram straight into
the halting problem, or, worse, Qt's qmake program. :)
(None of these are strong arguments, I'll admit, but if your argument
*for* is `it's convenient', then an argument *against* of `it's
unexpected' is stronger than it looks.
... Lot's of perfectly valid descriptions of by autoconf/automake are a
software maintenance point of view deleted... Please look around the
away from the JBLD (Joes Bloated Linux Distro). It doesn't have to be
the difficult to just control the compilation process ...
Actually, glibc is a good argument *against* the need for this feature:
it has a large number of places where unusual one-off CFLAGS are
required, and it manages to do them all via one-file overrides in the
makefiles. See e.g. linuxthreads/sysdeps/i386/Makefile for an extensive
use of this. csu/Makefile has an example of *completely* overriding the
CFLAGS for a single file that is especially delicate (initfini.s).
Please reread what you describe: You describe a packages, which needs a
way to fine control the compilation options. I think it can't be
a sufficiently low level of system programming there is such a need.
Another striking example is the need of the Linux kernel to disable the
firmly in the schedule() function to maintain the stack layout for a
You see: The requirement is for a single function and not a file.
Some goes for glibc where what you describe is less then esthetically
Since those packages don't have any other choice they resort to ugly
very very fragile thing: environment variables.
Look there *are* good reasons why so many high grade professional
compilers do it.
It's not something pretty. But the alternatives are just plain ugly