Commit 5d588f83 by Jakub Jelinek

re PR c++/44361 (-Wunused-but-set-variable vs. explicit void cast)

	PR c++/44361
	* cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
	instead of calling mark_exp_read only when not an assignment.

From-SVN: r160188
parent 9fc8dacc
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
(decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust. (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
(init_shadowed_var_for_decl): Adjust initialization. (init_shadowed_var_for_decl): Adjust initialization.
PR debug/44367 PR c++/44361
* semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P, * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result. instead of calling mark_exp_read only when not an assignment.
Set DECL_VALUE_EXPR on var.
PR debug/44367 PR debug/44367
* semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P, * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment