<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [sema] Missing warning for name mangling changes on noexcept function signatures."
href="https://bugs.llvm.org/show_bug.cgi?id=39656">39656</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[sema] Missing warning for name mangling changes on noexcept function signatures.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>matthew.davis@sony.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>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?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>