Skip to content

gcc fails on typedef of iree_atomic_intptr_t #1269

Closed

Description

@marbre

Building IREE with gcc 8.3 or 9.3, the build fails due to

/home/mbrehler/repos/iree/iree/base/atomics.h:72:9: error: ‘_Atomic’ does not name a type
   72 | typedef _Atomic __INTPTR_TYPE__ iree_atomic_intptr_t;
      |         ^

This results in

/home/mbrehler/repos/iree/iree/base/atomics.h:97:22: error: ‘iree_atomic_intptr_t’ was not declared in this scope; did you mean ‘iree_atomic_store’?
   97 | static_assert(sizeof(iree_atomic_intptr_t) == sizeof(intptr_t),
      |                      ^~~~~~~~~~~~~~~~~~~~
      |                      iree_atomic_store

and further the missing iree_atomic_intptr_t does effect iree/vm/module.h and iree/vm/ref.h.

Reproducible with #1268 merged.

Activity

  1. added
    bug 🐞
    on Mar 26, 2020
  2. marbre commented on Mar 26, 2020

    @marbre
    MemberAuthor

    The C11 keyword _Atomic is not implemented in C++, which seems to be a common issue.

  3. added a commit that references this issue on Jul 19, 2020
    271dfbf
  4. added a commit that references this issue on Jul 19, 2020
    3fbec04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐞

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions