Re: [RFC] warn on dead function calls in ipa-pure-const [1/4]

2016-08-01 Thread Richard Biener
On Sun, 31 Jul 2016, Prathamesh Kulkarni wrote: > On 31 July 2016 at 22:01, Jan Hubicka wrote: > >> On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > >> > >> > + warning_at (gimple_location (g), OPT_Wunused_value, > >> > + "Call from %s to %s has no effect", > >> > +

Re: [RFC] warn on dead function calls in ipa-pure-const [1/4]

2016-07-31 Thread Prathamesh Kulkarni
On 31 July 2016 at 22:01, Jan Hubicka wrote: >> On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: >> >> > + warning_at (gimple_location (g), OPT_Wunused_value, >> > + "Call from %s to %s has no effect", >> > + e->caller->name (), e->callee->name ()); >> >> Diagnostics s

Re: [RFC] warn on dead function calls in ipa-pure-const [1/4]

2016-07-31 Thread Jan Hubicka
> On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > > > + warning_at (gimple_location (g), OPT_Wunused_value, > > + "Call from %s to %s has no effect", > > + e->caller->name (), e->callee->name ()); > > Diagnostics should not start with capital letters. Function nam

Re: [RFC] warn on dead function calls in ipa-pure-const [1/4]

2016-07-29 Thread Joseph Myers
On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > + warning_at (gimple_location (g), OPT_Wunused_value, > + "Call from %s to %s has no effect", > + e->caller->name (), e->callee->name ()); Diagnostics should not start with capital letters. Function names in d

[RFC] warn on dead function calls in ipa-pure-const [1/4]

2016-07-25 Thread Prathamesh Kulkarni
Hi, The attached patch emits warnings for functions found to be pure or const by the ipa-pure-const pass. It does not warn for functions with unused return values that have been declared as pure or const by the user since this is already handled in C and C++ FE's. I have split it into parts to indi