This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64531] `casting between pointer-to-function and pointer-to-object` is still a warning instead of error with `-pedantic -pedantic-errors`
- From: "harald at gigawatt dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Feb 2015 08:52:21 +0000
- Subject: [Bug c++/64531] `casting between pointer-to-function and pointer-to-object` is still a warning instead of error with `-pedantic -pedantic-errors`
- Auto-submitted: auto-generated
- References: <bug-64531-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64531
Harald van Dijk <harald at gigawatt dot nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |harald at gigawatt dot nl
--- Comment #2 from Harald van Dijk <harald at gigawatt dot nl> ---
It's already been fixed.
$ g++-4.8.4 -pedantic -pedantic-errors -c test.cc
test.cc: In function âint main()â:
test.cc:1:33: error: ISO C++ forbids casting between pointer-to-function and
pointer-to-object [-Werror=pedantic]
int main() { (void(*)())(void *)0; }
^
cc1plus: some warnings being treated as errors
But the comments in PR 60850 note that this may have been a bad idea (at least
a bad idea for a release branch).