Asking for advice - assert for ImportC

duser duser at neet.fi
Thu Apr 28 08:02:51 UTC 2022


On Thursday, 28 April 2022 at 04:33:18 UTC, Walter Bright wrote:
> I put in a PR to add __assert(assign-expression) to ImportC, 
> for reasons explained in the PR:
>
> https://github.com/dlang/dmd/pull/14026
>
> Unfortunately, some C compilers use __assert. Arghh!
>
> I seem unable to come up with a decent name. Advice welcome!

maybe `_Assert`? similar to `_Static_assert`

it almost looks like something you could expect to see in a 
future C standard

adding a prefix to the double-underscore name would be the safe 
but boring option, something like `__d_assert` or 
`__importc_assert`


More information about the Digitalmars-d mailing list