Menu

#855 Don't allocate for string constant in sizeof

open
nobody
None
5
2022-08-08
2022-08-04
No

The following program allocates code space for the string, even though it's only used at compile time by sizeof().

int main()
{
    return sizeof("hello");
}

I see the issue still in current sdcc from trunk.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.