Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
Because of how
g77 generates code via the back end,
it doesn't always provide warnings the user wants.
PROGRAM X PRINT *, A END
Currently, the above is not flagged as a case of
using an uninitialized variable,
g77 generates a run-time library call that looks,
to the GBE, like it might actually modify `A' at run time.
(And, in fact, depending on the previous run-time library call,
Fixing this requires one of the following:
libg77, that provides a more "clean" interface, vis-a-vis input, output, and modified arguments, so the GBE can tell what's going on.
This would provide a pretty big performance improvement, at least theoretically, and, ultimately, in practice, for some types of code.
g77pass a pointer to a temporary containing a copy of `A', instead of to `A' itself. The GBE would then complain about the copy operation involving a potentially uninitialized variable.
This might also provide a performance boost for some code, because `A' might then end up living in a register, which could help with inner loops.
g77use a GBE construct similar to
ADDR_EXPRbut with extra information on the fact that the item pointed to won't be modified (a la
Probably the best solution for now, but not quite trivial to implement in the general case.
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|