llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.3k stars 12.11k forks source link

-fms-extensions does not include MSVC empty enum extension #114402

Open StreetwareGames opened 3 weeks ago

StreetwareGames commented 3 weeks ago

MSVC accepts, Clang rejects

https://godbolt.org/z/4nqYeqoor

Edit: Just tried it on my windows machine and it seems to be supported there. compiler explorer runs on linux so I recall -fms-extensions doing next to nothing in that environment. feel free to close

Edit 2: with -fms-extensions on windows, this is the behavior of Clang:

typedef enum a : uint16_t A; // accepted
typedef enum : uint16_t A; // rejected
typedef enum : uint16_t { } A; // rejected
llvmbot commented 3 weeks ago

@llvm/issue-subscribers-c

Author: Streetware (StreetwareGames)

MSVC accepts, Clang rejects https://godbolt.org/z/4nqYeqoor Edit: Just tried it on my windows machine and it seems to be supported there. compiler explorer runs on linux so I recall -fms-extensions doing next to nothing in that environment. feel free to close
llvmbot commented 3 weeks ago

@llvm/issue-subscribers-clang-frontend

Author: Streetware (StreetwareGames)

MSVC accepts, Clang rejects https://godbolt.org/z/4nqYeqoor Edit: Just tried it on my windows machine and it seems to be supported there. compiler explorer runs on linux so I recall -fms-extensions doing next to nothing in that environment. feel free to close
shafik commented 3 weeks ago

CC @AaronBallman