Detecting deprecated function usage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Detecting deprecated function usage

Goatfather
What must I do to get g++ to complain when it encounters deprecated
GTKMM function calls?

int main ( int argc, char** argv )
{
     Glib::RefPtr<Gtk::Application > refApp = Gtk::Application::create ();
     Gtk::Label label ( "label" );
     label.set_alignment ( 1.0, 0.5 );
     return ( 0 );
}
// g++ -Wall test.cc `pkg-config gtkmm-3.0 --cflags --libs`

g++ reports neither warning nor error on the set_alignment reference.
I'm using GTKMM 3.20.1 and set_alignment was deprecated in 3.14.


--
Saying what we think gives us a wider conversational range than saying
what we know.
    — Cullen Hightower
_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detecting deprecated function usage

Daniel Boles
not sure right now about warnings, but I know you can outright remove marked deprecated features - and hence convert them to errors - at the preprocessor stage by defining GTKMM_DISABLE_DEPRECATED


_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Detecting deprecated function usage

Phil Wolff-2
Thanks — that's exactly what I need.


On 03/31/2017 07:35 AM, Daniel Boles wrote:

> not sure right now about warnings, but I know you can outright remove
> marked deprecated features - and hence convert them to errors - at the
> preprocessor stage by defining GTKMM_DISABLE_DEPRECATED
>
>
>
> _______________________________________________
> gtkmm-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtkmm-list

--
Saying what we think gives us a wider conversational range than saying
what we know.
    — Cullen Hightower
_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Loading...