Commit 8d7559ff by Ed Schonberg Committed by Arnaud Charlet

sem_warn.adb (Warn_On_Known_Condition): Refine warning when applied to a…

sem_warn.adb (Warn_On_Known_Condition): Refine warning when applied to a variable that is statically known to be constant.

2005-09-01  Ed Schonberg  <schonberg@adacore.com>

	* sem_warn.adb (Warn_On_Known_Condition): Refine warning when applied
	to a variable that is statically known to be constant.

From-SVN: r103889
parent 2c867f5a
......@@ -1648,7 +1648,14 @@ package body Sem_Warn is
end if;
if True_Branch then
Error_Msg_N ("condition is always True?", Cond);
if Is_Entity_Name (Original_Node (C))
and then Nkind (Cond) /= N_Op_Not
then
Error_Msg_NE
("object & is always True?", Cond, Original_Node (C));
else
Error_Msg_N ("condition is always True?", Cond);
end if;
else
Error_Msg_N ("condition is always False?", Cond);
end if;
......
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