[llvm-bugs] [Bug 47770] New: _MSVC_TRADITIONAL is missing in MSVC compatibility mode

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 8 11:37:08 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47770

            Bug ID: 47770
           Summary: _MSVC_TRADITIONAL is missing in MSVC compatibility
                    mode
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jarccc7788 at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

currently when -fms-compatibility is set it always uses a preprocessor
compatible with the traditional MSVC c-preprocessor.
since Visual Studio 2019 version 16.5 a predefined macro is used to detect
whether the compiler is using a conforming or the traditional c-preprocessor
'_MSVC_TRADITIONAL'.

https://docs.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?view=vs-2019

This macro is missing in clang when running in MSVC compatible mode.
this could (but probably won't) break compatibility with newer headers from the
Windows SDK.

the MSVC uses the new preprocessor when running with either /std:c11 or
/std:c17 where clang doesn't.

https://docs.microsoft.com/en-us/cpp/preprocessor/c-cpp-preprocessor-reference?view=vs-2019

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201008/1dd8cfea/attachment.html>


More information about the llvm-bugs mailing list