[PATCH] D128649: [clang-cl] Accept a pragma alloc_text corner case accepted by MSVC

Stephen Long via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 27 07:45:22 PDT 2022


steplong added a comment.

This does make us accept, but MSVC doesn't:

  static void f();
  extern "C" {
    static void f();
  }
  #pragma alloc_text(c, f);
  static void f() {}

MSVC and GCC fail with an error for conflicting declaration.
GCC: https://godbolt.org/z/Tavvx88E4
MSVC: https://godbolt.org/z/vj41TWdYh


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128649/new/

https://reviews.llvm.org/D128649



More information about the cfe-commits mailing list