This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64531] New: `casting between pointer-to-function and pointer-to-object` is still a warning instead of error with `-pedantic -pedantic-errors`
- From: "iamsupermouse at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Jan 2015 22:16:20 +0000
- Subject: [Bug c++/64531] New: `casting between pointer-to-function and pointer-to-object` is still a warning instead of error with `-pedantic -pedantic-errors`
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64531
Bug ID: 64531
Summary: `casting between pointer-to-function and
pointer-to-object` is still a warning instead of error
with `-pedantic -pedantic-errors`
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: iamsupermouse at mail dot ru
`-pedantic` causes g++ to emit a warning `ISO C++ forbids casting between
pointer-to-function and pointer-to-object` on this code:
int main()
{
(void (*)()) (void *) 0;
}
I would expect `-pedantic -pedantic-errors` to generate a error with the same
message on this code, but it's still a warning.