> This topic has come up on comp.arch.embedded a couple times. > In one of those discussions I looked at the problem with a > quite a bit of detail and was startled to find how many cases > where execution timing was data dependent. For example a > multiple and other library calls. (I know a multiply can be > written with constant time) These can be detected in the > compiler, the real question is at what point does the > compiler tell the application developer that a sequence > cannot be constant timed. When the programmer specifies contant time and the compiler can't fulfill that it should issue an error at the point where the constant time is specified, identifying the exact reason. Maybe or maybe at the call that causes it, with a reference to the constant-time request (like for a double declaration). But in a lot of cases a compiler might be able to choose a constant-time alternative. The user wanted constant-time, so that's what the compiler must do, even at the expense of extra code etc. > A compiler in general does a good job at accounting That is exactly where a compiler shines compared to a human. The human should do the creative part, the compiler the accounting. Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist