[llvm-bugs] [Bug 39656] New: [sema] Missing warning for name mangling changes on noexcept function signatures.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Nov 13 18:45:43 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=39656
Bug ID: 39656
Summary: [sema] Missing warning for name mangling changes on
noexcept function signatures.
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: matthew.davis at sony.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
The warning -Wc++17-compat-mangling seems to be missing the case of func2 in
the example below:
// Example
void func1(void (*)() noexcept) {} // Expected warning.
void func2(void (*)(void (*)() noexcept)){} // No warning, is this overlooked?
I get the following warning, as expected, for func1 but not for func2:
"warning: mangled name of 'func1' will change in C++17 due to non-throwing
exception"
I believe that the compiler should be warning of the mangling change for func2.
The noexcept will produce a slightly different mangled symbol name for func2
between c++14 and c++17 dialects:
test.14.o: // --std=c++14
0000000000000020 T _Z5func1PFvvE
0000000000000010 T _Z5func2PFvPFvvEE
test.17.o: // --std=c++17
0000000000000020 T _Z5func1PDoFvvE
0000000000000010 T _Z5func2PFvPDoFvvEE
It looks like the code in Sema::CheckFunctionDeclaration is not recursively
inspecting the types of the formal parameters. Perhaps that is intentional?
--
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/20181114/0e4c077f/attachment.html>
More information about the llvm-bugs
mailing list