Philipp Klaus Krause schreef op 2022-06-21 14:00:
Am 21.06.22 um 13:47 schrieb Maarten Brock:

On a related note: is something specified for non-initialized variables? Currently SDCC creates no implicit initializer to zero when __at is used
and no explicit initializer is provided.
int __at(10) x; // not initilized to zero
int __at(12) y = 0x1234; // is initialized

I suspect that this is a feature of __at that people actually use: the
x in the example could be a memory-mapped I/O register.

Philipp

I know that it's used and indeed this is one of the use cases. What I was wondering is if there is any standardized keyword for this. E.g. __no_init
for IAR.

Maarten


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to