Summary: | [C++11/14 only] noexcept ignored on function pointer | ||
---|---|---|---|
Product: | gcc | Reporter: | Jason Merrill <jason> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | ai.azuma, egallager, fang, fchelnokov, jason, mpolacek, webrown.cpp |
Priority: | P3 | Keywords: | accepts-invalid, rejects-valid |
Version: | 4.7.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2011-06-08 21:47:18 | |
Bug Depends on: | 12255 | ||
Bug Blocks: |
Description
Jason Merrill
2011-06-08 21:45:39 UTC
Or rather in C++98 it was observable through diagnostics, but couldn't change the behavior of a well-defined program. This still compiles without errors in C++11, but in C++17: 49332.C:4:24: error: invalid conversion from ‘void (*)()’ to ‘void (*)() noexcept’ [-fpermissive] 4 | void (*p)() noexcept = f; // { dg-error "" } | ^ | | | void (*)() *** Bug 103092 has been marked as a duplicate of this bug. *** |