As Jan Waclawek wrote: > Do you find that a sufficient documentation of this feature?
Strictly, that description is only guaranteed to apply to the SEI instruction, not to other ways that modify the I flag. Apparently, this one-instruction delay is implemented in the classic AVR core in a way where it always applies, independent of the way the I flags has actually been set. Given that this appears to be an undocumented feature that has always been present in the "classic" AVR core, and that the compiler has been relying on it all the time (once the early AVR-GCC authors knew about it), the entire world would break down if this behaviour were suddenly changed, so things like wdt_enable() are certainly the least of the problems. For the Xmega core, I've heard this behaviour has really been changed (and is only guaranteed for the SEI instruction still), so the library should generate different code indeed (as the compiler already does). -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-libc-dev