ImportC and #pragma pack

Guillaume Piolat first.name at notexisting.com
Tue Sep 28 12:50:35 UTC 2021


On Tuesday, 28 September 2021 at 06:05:04 UTC, Walter Bright 
wrote:
> https://issues.dlang.org/show_bug.cgi?id=22315
>
> I'm on the fence about implementing this. On the one hand, I 
> can do it and make it work. On the other hand, the C11 way is 
> to use _Alignas, and that's 10 years old now. How far do we go 
> with implementing all the nutburger obsolete C extension cruft 
> out there?

I tried ImportC with TCC and warp as preprocessor.
TCC stdlib uses #pragma pack also.
The conundrum with ImportC is that it seems to me you have to 
build with the right cstdlib headers if you intend to use this or 
that backend.
So in the end I managed to convert none of the STB headers 
libraries with ImportC (not only due to pragma pack).


More information about the Digitalmars-d mailing list