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: [email protected]
Reporter: [email protected]
CC: [email protected],
[email protected]
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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs