On Wed, May 7, 2014 at 1:56 PM, Florian Weimer <fwei...@redhat.com> wrote: > On 05/06/2014 04:30 PM, Richard Biener wrote: > >> Like I have suggested in the past a good point to do this kind of analysis >> on the (mostly, as you say) unoptimized IL is right after going into SSA >> form and implementing said analysis as an IPA pass (yeah, that somewhat >> conflicts). > > > I don't think this works for -Wunreachable because trivially unreachable > code is already gone when we enter SSA. Or am I missing something?
Depends on what "trivially" unreachable is. Yes, int main() { if (0) foo (); } will already be optimized. But I doubt you want to warn for that given C++ and templates which often have this kind of specializations. Richard. > > -- > Florian Weimer / Red Hat Product Security Team