[Bug c++/64531] New: `casting between pointer-to-function and pointer-to-object` is still a warning instead of error with `-pedantic -pedantic-errors`
iamsupermouse at mail dot ru
gcc-bugzilla@gcc.gnu.org
Wed Jan 7 22:16:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list