This is the mail archive of the gcc-patches@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: a language-specific options hook


>What do you think about replacing that variable with ENABLE_CHECKING,
>as set by the gcc configure switch?  That would allow some reduction
>in the f771 image for those that would never use it.

Not a bad idea, but I think these might be, philosophically, two
different things.

I believe ENABLE_CHECKING is about detecting anomalies, i.e. bugs,
exposed during run time.  By "run time" I mean the generic sense;
in this case, detecting problems while compiling C code, for example.
Only compiler authors are likely to understand how to cope with this
stuff.  (E.g. detecting circularities in a DAG, detecting memory
allocation problems, etc.)

g77's internal consistency-check switch currently is for detecting
what could be thought of as "configuration" problems with g77.
These checks are done only once, per invocation, when the compiler
starts running.  Even people not knowledgeable about compilers might
reasonably try to add new intrinsics or run-time routines, for example,
to the pertinent g77 data bases; these checks make it easy to catch
certain dumb mistakes fairly quickly.  They're "expensive" in that
they muck about with character strings and such, so they're worth
disabling under normal circumstances.  But they should not be made
any harder to invoke than to just provide a different way to invoke
the compiler (since they're built into the compiler itself).

Ideally, this checking would be done at build time.  I just haven't
done that work.

So, I don't believe much reduction in image size would occur if
we conditionally compiled them out; but they're useful almost any
time someone builds a new g77.

Not that g77 couldn't use the ENABLE_CHECKING stuff as well, but
I don't recall any cases offhand where it does checking that would
fit into that model but that is currently under the control of the
ffe_is_do_internal_checks_ global var.

So, I'd suggest that, for now, g77's current mechanism be left
pretty much as-is (modulo the changes I've already suggested),
and the ENABLE_CHECKING stuff be added as appropriate to new
cases.

And, in the meantime, anyone wanting to write build-time checks
to replace the current internal g77 consistency checks is welcome
to do so!  They'd be much preferred, IMO, over the current approach.
(For the most interesting cases, it'd probably be just a matter
of moving some code from one file into a new file, and massaging
the build procedures accordingly.)

But please let's not anyone futz with g77 build procedures until
after the work I'm still doing is installed!  (By end of next week
for sure.)  Otherwise merging will be made unnecessarily difficult.

        tq vm, (burley)


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