ImportC and #pragma pack

Imperatorn johan_forsberg_86 at
Fri Oct 1 10:21:04 UTC 2021

On Thursday, 30 September 2021 at 11:52:37 UTC, Dukc wrote:
> On Thursday, 30 September 2021 at 00:53:27 UTC, Walter Bright 
> wrote:
>> [...]
> Let's see. Since it's not documented, it'd be unwise to write a 
> struct like that. So, if I somehow had a C struct like that, 
> I'd want an error. Then I'd move `#pragma pack(1)` either above 
> or below the whole struct start depending on what I meant.
> Well, there might be some unwritten convention on how the 
> compilers handle this but as long as we are not aware of one, 
> it's best to do the right thing.

I agree, should be an error

More information about the Digitalmars-d mailing list