avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using __func__ once increases _end (variable area size) by 446 bytes?


From: Britton Kerin
Subject: using __func__ once increases _end (variable area size) by 446 bytes?
Date: Fri, 18 Dec 2020 15:06:08 -0900

I have a program where changing this:

     POSSIBLY_UNUSED char const *foo = "x";
     printf ("%s, %i\n", foo, __LINE__);

to this:

      POSSIBLY_UNUSED char const *foo = "x";
      printf ("%s, %i\n", __func__, __LINE__);

increases _end from 67b to 839 and causes the produced program to
never do anything (i.e. looks very much like it never executes due to
no stack space, which makes sense given that 0x839 = 2056 > RAM on the
atmega328P).

The function name is only 17 characters.  How can using __func__ cause
such a dramatic increase in the variable area size?

The program generally has a larger variable area than I would expect
at 67b which suggests something more general than __func__ may be
going on (but I haven't carefully verified that I don't somehow have
that many vars around).

Britton



reply via email to

[Prev in Thread] Current Thread [Next in Thread]