Am 24.11.25 um 13:54 schrieb Maarten Brock:

I would not qualify the stack as large for the mcs51 large & huge
memory models. Medium, large and huge do not place every variable in
the <= 248 bytes data memory, but still use it for itemps. So stack
space (= unallocated idata) remains very limited.

And when using --xstack the stack still is limited to 256 bytes pdata.
There is no stack implementation in xdata.

[…]

So my recommendation is to keep this behaviour for all targets with a
stack space of 256 bytes or less.
Except pdk, where despite the the stack being small, there is no point in omitting the promotion (and AFAIR pdk never omitted it). I'm not sufficiently familiar with ds390 to make changes there, so I guess for now, we'd keep the omission for ms51, mos6502, mos65c02, ds390.

Benedikt raised an interesting point regarding this: _BitInt does not undergo integer promotion, so by passing a _BitInt(8), one can pass a single byte variable argument that only uses one byte of the stack (except for pdk) in a standard-conforming way.

So once most users use at least C23, we can revisit this, since users do have a good alternative, and will then no longer have a need to omit promotion on char.

Philipp



_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to