This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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 IF_STMTs in tsubst_expr, where we don't. My patch below, which passes testing, tries in a rather straightforward way to adopt the same mechanisms in the latter. There are quite a few details I'm not sure about: whether we should only use fold_non_dependent_expr for the purpose of suppressing the warnings - thus never touching 'tmp' in the pt.c code handling IF_STMTs - which would be completely conservative in terms of code generation; whether there are subtle interactions with the new if constexpr, which I'm missing at the moment.
Thanks! Paolo. //////////////////
Attachment:
patch_draft_67980
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |