Re: [Sdcc-user] space created for unused string constant

2022-08-04 Thread Philipp Klaus Krause
Am 14.10.20 um 03:45 schrieb Ralph Doncaster: 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've opened a ticket: https://sourceforge.net/p/sdcc/feature-requests/855/ Philipp __

[Sdcc-user] space created for unused string constant

2020-10-13 Thread Ralph Doncaster
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"); } Here's the asm: ; ../strsiz.c:4: return sizeof("hello"); mov dptr,#0x0006 ; ../strsiz.c:5: } ret .area CSEG(CODE) .