I notice that GCC's documentation [1] says "Only basic asm statements
can safely be included in naked functions (see Basic Asm). While using
extended asm or a mixture of basic asm and C code may appear to work,
they cannot be depended upon to work reliably and are not supported."
However, a lot of our example code contains naked functions with C
code, such as [2], [3], and [4], as well as indirectly via ISR_NAKED,
such as [5] and [6]. Is there a reason that GCC's documentation
doesn't apply to us here, or is it only by sheer luck that none of
these have resulted in problems in practice?

[1] https://gcc.gnu.org/onlinedocs/gcc/AVR-Function-Attributes.html
[2] http://www.nongnu.org/avr-libc/user-manual/mem_sections.html#c_sections
[3] http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_softreset
[4] http://www.nongnu.org/avr-libc/user-manual/group__avr__watchdog.html#details
[5] 
http://www.nongnu.org/avr-libc/user-manual/group__avr__time.html#ga15aea81a8985a4c3cc9c8b00a06f5d31
[6] 
http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html#attr_interrupt

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to