ImportC and #pragma pack
Walter Bright
newshound2 at digitalmars.com
Fri Oct 1 02:56:08 UTC 2021
On 9/30/2021 4:52 AM, Dukc wrote:
> Let's see. Since it's not documented, it'd be unwise to write a struct like
> that.
That has never, ever, stopped anyone before. People will often inadvertently
discover a bug, then build their whole program around it.
For an example, in the olden daze, a popular C comment style used at Microsoft was:
//******************* Big Rocks and Tall Trees ********************\\
Note the last two characters. Microsoft C did not do \ line splicing per the C
Standard. But my compiler did (yay!) But this code failed to compile:
//******************* Big Rocks and Tall Trees ********************\\
int x;
No matter how much I explained that this was a bug in Microsoft's compiler, it
was my fault. I had to do what is called being "bug compatible" with Microsoft.
More information about the Digitalmars-d
mailing list