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: GCC and out-of-range constant array indexes?


* Geert Bosch:

> The Ada front end has very extensive warnings. I don't think
> they really contribute measurably to performance.
> We don't try to construct call graphs to determine
> wether the array reference will be executed or not.
> If the line appears in your program, it will cause an
> error if executed, so we will warn: either you wrote
> dead code, or wrong code.

In other languages, dead code doesn't come not just from the
programmer, but also from the preprocessor and from expansion of
generics (in fact, I've seen misleading warnings involving Ada
generics, too).  So the Ada exprience is not likely to translate to
other front ends.


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