Skip to content

Build error with Visual Studio 17.1 due to stdatomic.h #225

@triplef

Description

@triplef

The latest CI build of the GNUstep MSVC toolchain failed building the libobjc2 tests with this error:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\stdatomic.h(15,2): error: <stdatomic.h> is not yet supported when compiling as C, but this is planned for a future release.

What changed since the last CI build is that the GitHub Runner VM was updated from 20220116.1 to 20220220.1, which includes a Visual Studio update from 17.0 to 17.1. The changelog contains the following change regarding stdatomic:

P0943R6 #2008 Supporting C Atomics In C++

  • Note: <stdatomic.h> is currently supported when compiling as C++ (/std:c++latest). It is not yet supported when compiling as C (/std:c11 and /std:c17), but support for C atomics is planned for a future release. For more info, see the September 2020 blog post "C11 and C17 Standard Support Arriving in MSVC".

Not sure if I’m missing something, though it seems a bit crazy that they would have broken stdatomic support in C with this release. Any ideas how to work around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions