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
__
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)
.