[Bug c++/96877] Erroneous warning when default initializing function pointer types defined using std::declval

2020-09-02 Thread insertinterestingnamehere at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96877 --- Comment #6 from Ian Henriksen --- Thanks, this makes sense. I originally got this idea from https://stackoverflow.com/a/27489923. The discussion there implied there was some kind of ambiguity in the standard and showed some examples where

[Bug c++/96877] Erroneous warning when default initializing function pointer types defined using std::declval

2020-09-01 Thread insertinterestingnamehere at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96877 --- Comment #4 from Ian Henriksen --- It's worth noting that, with g++ using function_type = void (*)(void*) noexcept; actually works, but typedef void(*function_type)(void*) noexcept; does not. clang++ rejects both though.

[Bug c++/96877] Erroneous warning when default initializing function pointer types defined using std::declval

2020-09-01 Thread insertinterestingnamehere at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96877 --- Comment #3 from Ian Henriksen --- The goal of doing it that way was get the exception specification onto the pointer type in C++11 and C++14. The intent was to get the equivalent of typedef void(*function_type)(void*) noexcept; but with

[Bug c++/96877] Erroneous warning when default initializing function pointer types defined using std::declval

2020-09-01 Thread insertinterestingnamehere at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96877 Ian Henriksen changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/96877] New: Erroneous warning when default initializing function pointer types defined using std::declval

2020-08-31 Thread insertinterestingnamehere at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: insertinterestingnamehere at gmail dot com Target Milestone: --- When compiling the following with -Wextra (C++11 and later, all recent version of gcc

[Bug c++/85775] New: False positive with -Wparentheses

2018-05-14 Thread insertinterestingnamehere at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: insertinterestingnamehere at gmail dot com Target Milestone: --- g++ 8.1 warns about unnecessary parentheses in some cases where they are actually needed to designate something as a single argument to a macro. Here's a minimal example