Thread overview
[Issue 22246] importC: C11 does not allow _Alignof (expression)
[Issue 22246] importC: C11 does not allow '_Alignof (expression)'
Sep 06
Dlang Bot
Sep 08
Dlang Bot
Sep 30
Dlang Bot
September 01
https://issues.dlang.org/show_bug.cgi?id=22246

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ImportC
                 CC|                            |bugzilla@digitalmars.com

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

--- Comment #1 from Walter Bright <bugzilla@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.

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

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|importC: C11 does not allow |importC: C11 does not allow
                   |'_Alignof (expression)'     |_Alignof (expression)

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

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #13051 "fix Issue 22246 - ImportC: C11 does not allow _Alignof (expression)" fixing this issue:

- fix Issue 22246 - ImportC: C11 does not allow _Alignof (expression)

https://github.com/dlang/dmd/pull/13051

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

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #13051 "fix Issue 22246 - ImportC: C11 does not allow _Alignof (expression)" was merged into stable:

- e13faae9efb066a4dcffcb7026dbeee99bbae7c3 by Walter Bright:
  fix Issue 22246 - ImportC: C11 does not allow _Alignof (expression)

https://github.com/dlang/dmd/pull/13051

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #13108 "merge stable" was merged into master:

- 882257997f06dc956c3fb26996af3dd5a35eed77 by Walter Bright:
  fix Issue 22246 - ImportC: C11 does not allow _Alignof (expression)

https://github.com/dlang/dmd/pull/13108

--