Re: [C++ Patch/RFC] PR 67980 ("left shift count is negative [-Wshift-count-negative] generated for unreachable code")

2016-11-03 Thread Jason Merrill
On Tue, Oct 18, 2016 at 4:26 PM, Paolo Carlini wrote: > Thus, I'm back to one of my first tries earlier today: a much more > conservative change which uses fold_non_dependent_expr only for the purpose > of suppressing the unwanted warnings, see the below. This looks

Re: [C++ Patch/RFC] PR 67980 ("left shift count is negative [-Wshift-count-negative] generated for unreachable code")

2016-11-02 Thread Paolo Carlini
.. I'm still looking for some directions about the best way to handle this issue: anyway, in case it wasn't clear, the second patch I posted passes testing. Thanks, Paolo.

Re: [C++ Patch/RFC] PR 67980 ("left shift count is negative [-Wshift-count-negative] generated for unreachable code")

2016-10-18 Thread Paolo Carlini
... sorry, what I sent earlier in fact causes a regression in the libstdc++-v3 testsuite: 23_containers/list/61347.cc. Thus, I'm back to one of my first tries earlier today: a much more conservative change which uses fold_non_dependent_expr only for the purpose of suppressing the unwanted

[C++ Patch/RFC] PR 67980 ("left shift count is negative [-Wshift-count-negative] generated for unreachable code")

2016-10-18 Thread Paolo Carlini
Hi, in the language of our implementations details, submitter noticed that in terms of warnings we handle in a different way COND_EXPRs in tsubst_copy_and_build - we use fold_non_dependent_expr and integer_zerop to suppress undesired warnings by bumping c_inhibit_evaluation_warnings - and