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: Request of new __attribute__ for switch statements (elimination of the bounds check)


> > It's just that I see removing the bounds checks on a switch statement
> > as a marginal optimization compared to the risk.  I've never seen a
> > switch be the bottleneck in anything.

I find this a remkarable attitude for a C compiler :-)

Even Ada allows the programmer to remove all checks if that is what the
programmer wants!

After all in a safety critical program, such checks would not be permitted,
because you simply cannot have a check that always succeeds, and whose
failure branch is therefore deactivated code.


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