[all-commits] [llvm/llvm-project] 8364f5: Revert "Suppress non-conforming GNU paste extensio...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Wed Jan 27 16:40:32 PST 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 8364f5369eeeb2da8db2bae7716c549930d8df93
      https://github.com/llvm/llvm-project/commit/8364f5369eeeb2da8db2bae7716c549930d8df93
  Author: Reid Kleckner <rnk at google.com>
  Date:   2021-01-27 (Wed, 27 Jan 2021)

  Changed paths:
    M clang/lib/Lex/TokenLexer.cpp
    M clang/test/Preprocessor/macro_fn_comma_swallow2.c

  Log Message:
  -----------
  Revert "Suppress non-conforming GNU paste extension in all standard-conforming modes"

This reverts commit f4537935dcdbf390c863591cf556e76c3abab9c1.
This reverts commit b43c26d036dcbf7a6881f39e4434cf059364022a.

This GNU and MSVC extension turns out to be very popular. Most projects
are not using C++20, so cannot use the new __VA_OPT__ feature to be
standards conformant. The other workaround, using -std=gnu*, enables too
many language extensions and isn't viable.

Until there is a way for users to get the behavior provided by the
`, ## __VA_ARGS__` extension in the -std=c++17 and earlier language
modes, we need to revert this.

(cherry picked from commit 61a66e4b5ec18e9e73c2f6334f6b7f7dd4bca77e)




More information about the All-commits mailing list