On 4/29/12 11:46 AM, Alex Iljin wrote:
> In the same way I define DEBUG_ASSERT_PROGMEM macro.
> It is OK, but I want to use many trace and assert functions, so there
> is a question.
> Is there way to place function name in program memory?
> Maybe there are specific __FUNC_PROGMEM__ marco, or some compiler parameters,
> which switch __func__ from charecter array to string literal?

I had thought that __FUNCTION__ and __PRETTY_FUNCTION__ acted like
string literals and could be used this way, but I just tested and they
seem to act like __func__.

The type of __func__ is presumably dictated by the C++ standard, but
__FUNCTION__ and __PRETTY_FUNCTION__ are gcc-isms. Is there a technical
reason that the compiler couldn't treat them as equivalent to a
double-quoted string?



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

Reply via email to