version=D_16

Luís Marques via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 10 12:46:38 PDT 2017


Hello,

Johan Engelen suggested I bring further attention to this issue 
here in the D forums.

We need a version identifier for 16-bit code (e.g. to 
conditionally define size_t correctly). This is not theoretical, 
it's an actual need, since LDC essentially works for MSP430, even 
though it isn't officially supported. I'm assuming that adding a 
predefined version identifier isn't problematic, so the only 
issue is how it should be named. Here's what I wrote on GitHub:

"I defined a version identifier for 16-bit code called D_P16, by 
analogy with D_LP64. Now, D_LP64 was an awful name because it 
means 64-bit in general and not C's LP64 in particular. I chose 
D_P16 to mean pointers are 16-bit, but now I'm thinking if we 
should just call it D_16. In theory we could have a Harvard 
architecture where the native integer size is different from the 
native pointer size. That's one argument in favor of D_P16. 
Another argument would be consistency with D_LP64." -> but maybe 
that's overcomplicating and D_16 suffices?

Bikeshed all the things! \o

- Luís


More information about the Digitalmars-d mailing list