Sounds ok... It IS better to optimize when code is correct. And c++ takes the other approach. Is Pragma suppress part of the ARM or some extension? "Marin David Condic" a �crit dans le message news: 9j9vmh$c5p$1@nh.pace.co.uk... > Oh, you'll pay - just not with CPU cycles. :-) Consider it this way: Its > better to have the checks there by default (and by virtue of the language - > not by virtue of someone being "nice" and checking manually) and removing > them from the small percentage of code that may be performance critical (via > pragma Supress) than to have them NOT there by default (and requiring that > the programmers "roll their own", rather than have them by virtue of the > language) and try to intersperse them in the code as you start discovering > you have mysterious errors. > > I can't even begin to tell you how often my hide has been saved by having > compiletime & runtime checks in place in Ada that exposed eggregious errors > that would have been very hard to track down without them. When I wear the > embedded/realtime hat, I understand the desirability of getting rid of the > checks (in some cases) but I'm glad they are there for me to decide to get > rid of rather than have to insert them myself *after* I start discovering > problems. > > Now if C++ had some sort of compile-time switch that could be thrown that > said "Insert Checks", and the language actually had syntax/semantics that > provided information to check (ranges on numbers, array constraints, etc.) > then I'd think that C++ and Ada were at least equivalent in this area. > However, since there aren't any activatable checks and the language doesn't > provide nearly as much safety information anyway, I find this a major > liability. >