[llvm-bugs] [Bug 31585] New: clang does not allow Microsoft's __FUNCTION__, __FUNCSIG__, and __FUNCDNAME predefined macros in conditional preprocessing directives
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 9 11:35:39 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31585
Bug ID: 31585
Summary: clang does not allow Microsoft's __FUNCTION__,
__FUNCSIG__, and __FUNCDNAME predefined macros in
conditional preprocessing directives
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: thonerma at synopsys.com
CC: llvm-bugs at lists.llvm.org,
sig-rnd-sat-clang-bugs at synopsys.com
Classification: Unclassified
Microsoft's compiler allows the __FUNCTION__, __FUNCSIG__, and __FUNCDNAME
predefined macros to appear in conditional preprocessing directives as defined
macros:
$ cat t.cpp
#if !defined(__FUNCTION__)
#error __FUNCTION__ is not defined.
#endif
#if !defined(__FUNCSIG__)
#error __FUNCSIG__ is not defined.
#endif
#if !defined(__FUNCDNAME__)
#error __FUNCDNAME__ is not defined.
#endif
$ cl /c t.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
t.cpp
<no errors>
$ clang --version
clang version 3.9.0 (tags/RELEASE_390/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
...
$ clang -c -fms-extensions t.cpp
t.cpp:2:2: error: __FUNCTION__ is not defined.
#error __FUNCTION__ is not defined.
^
t.cpp:5:2: error: __FUNCSIG__ is not defined.
#error __FUNCSIG__ is not defined.
^
t.cpp:8:2: error: __FUNCDNAME__ is not defined.
#error __FUNCDNAME__ is not defined.
^
3 errors generated.
--
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/20170109/10db0eb5/attachment.html>
More information about the llvm-bugs
mailing list