[Issue 22246] importC: C11 does not allow '_Alignof (expression)'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 6 01:41:06 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22246

--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
C11 6.5.3 says:

    _Alignof ( type-name )

so, you're right. It also works in that 4 is returned. But correctly fails
with:

    return _Alignof(1);

This means the C parser is working correctly. The problem happens because the
translation creates a DotIdExp, which (with D) allows both a type and an
expression. The trouble is in the semantic routine.

--


More information about the Digitalmars-d-bugs mailing list