[Ada] Avoid unhelpful dead code warnings

Pierre-Marie de Rodat derodat@adacore.com
Tue Jun 15 10:20:52 GMT 2021


We have an existing mechanism for suppressing dead code warning messages
in the case of an if-statement within an instance of a generic where the
value of the condition is known statically. Generalize this approach to
also handle case statements.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* exp_util.adb (Kill_Dead_Code): Generalize the existing
	handling of if statements to handle case statements similarly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2391 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210615/98c20e0a/attachment.bin>


More information about the Gcc-patches mailing list