[llvm-bugs] [Bug 52279] New: Erroneous acceptance of ambiguous conversion of overload template function to function pointer type
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Oct 24 00:15:19 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52279
Bug ID: 52279
Summary: Erroneous acceptance of ambiguous conversion of
overload template function to function pointer type
Product: clang
Version: 12.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++2b
Assignee: unassignedclangbugs at nondot.org
Reporter: fchelnokov at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
This is code is ill-formed due to ambiguous conversion:
```
auto f(auto) { return 1; }
int f(auto) { return 2; }
int main() {
[[maybe_unused]] int(*x)(int) = f;
}
```
it is rejected by GCC, but accepted by Clang. Demo:
https://gcc.godbolt.org/z/oaG1GGxd9
--
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/20211024/51958f7f/attachment.html>
More information about the llvm-bugs
mailing list