This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/64531] New: `casting between pointer-to-function and pointer-to-object` is still a warning instead of error with `-pedantic -pedantic-errors`


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]