Annoying -Wdeprecated-declarations

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Ilya333
Earned some good credits
Earned some good credits
Posts: 136
Joined: Sun Jan 11, 2015 3:30 pm

Annoying -Wdeprecated-declarations

Post by Ilya333 » Sun May 24, 2015 1:15 pm

Hello everyone!
Afetr the GCC 5.1.1 update, wxWidgets produces lots (in my case, 150) -Wdeprecated-declarations warnings. They occur when exppanding wxDEPRECATED, wxDEPRECATED_BUT_USED_INTERNALLY_INLINE and other similar macros.
How can I disable this warnings, while leaving other warnings (those, enabled by -Wall) active?

User avatar
tierra
Site Admin
Site Admin
Posts: 1343
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Re: Annoying -Wdeprecated-declarations

Post by tierra » Sun May 24, 2015 5:41 pm

You could turn off WXWIN_COMPATIBILITY_3_0, WXWIN_COMPATIBILITY_2_8, or WXWIN_COMPATIBILITY_2_6 if you're using 2.8 (hopefully not if you're attempting to use this new of a compiler though). From configure, you can turn those off using --disable-compat30, --disable-compat28, or --disable-compat26. wxWidgets provides backwards-compatible API through the last stable release branch by default, but triggers deprecation warnings through those macros. If you turn off that compatibility API, most of those macros won't be hit. I think a few might still be used outside of that compatibility layer though.

Post Reply