diff options
| author | Harald van Dijk <harald@gigawatt.nl> | 2021-01-25 00:56:45 +0000 |
|---|---|---|
| committer | Harald van Dijk <harald@gigawatt.nl> | 2021-01-25 00:56:45 +0000 |
| commit | f4537935dcdbf390c863591cf556e76c3abab9c1 (patch) | |
| tree | 0f0ba3497c083222febe3e0bb4c57c4a5f445229 /llvm/lib/CodeGen/MachineCombiner.cpp | |
| parent | a80ebd01798ca82a4f5ffd6d355c5c9facd83375 (diff) | |
Suppress non-conforming GNU paste extension in all standard-conforming modes
The GNU token paste extension that removes the comma in , ## __VA_ARGS__
conflicts with C99/C++11's requirements when a variadic macro has no
named parameters: according to the standard, an invocation as FOO()
gives it a single empty argument, and concatenation of anything with an
empty argument is well-defined. For this reason, the GNU extension was
already disabled in C99 standard-conforming mode. It was not yet
disabled in C++11 standard-conforming mode.
The associated comment suggested that GCC keeps this extension enabled
in C90/C++03 standard-conforming mode, but it actually does not, so
rather than adding a check for C++ language version, this change simply
removes the check for C language version.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D91913
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
0 files changed, 0 insertions, 0 deletions
