xcode 7 how to suppress warning "overrides a member function but is not marked 'override'"

15,059

You need to turn off the -Winconsistent-missing-override flag which automatically gets added with -Wall on recent versions of clang. You can do this by passing the -Wno-inconsistent-missing-override flag. See.

Share:
15,059
Rong Yang
Author by

Rong Yang

Updated on June 19, 2022

Comments

  • Rong Yang
    Rong Yang almost 2 years

    I updated xcode to 7 today. After the update the project I am working on has the warning "overrides a member function but is not marked 'override'". Since our project set "treade warning as error" to true. I got lots of errors.

    I double checked "Other Linker Flags" and pretty sure the flag "-Wsuggest-override" is not included.

    Since it is a big project I prefer to suppress the warning instead add the keyword "override" everywhere.

    Any suggestion for disabling the warning?

    Thanks