On Thursday, 28 November 2019 at 17:37:31 UTC, H. S. Teoh wrote:
On Thu, Nov 28, 2019 at 05:18:59PM +0000, Ernesto Castellotti via Digitalmars-d-announce wrote:
On Thursday, 28 November 2019 at 08:31:36 UTC, Dukc wrote:
> On Wednesday, 27 November 2019 at 19:30:15 UTC, Ernesto > Castellotti wrote: > > > > The support to targets that use 16 bits as a pointer size > > has
> > already been added to LDC
> > (https://github.com/ldc-developers/ldc/pull/2194), so > > minimal AVR
> > support is present (AVR uses 16 bit pointers).
> > Don't you run into trouble with the fact that the defualt > integer size is 32 bits?
In LDC, the integers size depends on the target architecture.

https://github.com/ldc-developers/ldc/blob/0a1a40ebc7ee29b02a6e92daa389e3c5611f086f/gen/tollvm.cpp#L259

Isn't this only for size_t? Because 'int' in D is always 32-bit according to the spec. I can't imagine LDC would deliberately violate the spec this way.


T

Yes LDC sets size_t for the platform, not violating the spec.
int in D is 32-bit as you said, that if you compare it with the size of the types of AVR-GCC it would be long, This is not a problem, just use the type aliases like those in core.stdc.stdint to work around

Reply via email to