ImportC and #pragma pack

max haughton maxhaton at gmail.com
Tue Sep 28 08:56:31 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?

If it's not too much work I think you might as well implement it 
but an error/warning message must be issued if it is ignored.

__Import__ C must not lie about what it can or cannot do because 
(in the hands of 99% of its users) it is not going to be used as 
a C compiler, but rather a C compiler being deployed to properly 
consume C header files.


More information about the Digitalmars-d mailing list