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)


On Tue, Oct 15, 2002 at 09:41:21PM -0400, Robert Dewar wrote:
> > > 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.

Good point.  I withdraw this objection.

zw


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