[Ada] Warn on subtype declaration of null range
Pierre-Marie de Rodat
derodat@adacore.com
Thu Jan 6 17:13:19 GMT 2022
This patch adds a warning on a subtype declaration with a
compile-time-known range constraint that is a null range.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Range): Warn on null range, unless we are
inside a generic unit or an instance thereof.
* sem_ch3.adb (Analyze_Subtype_Indication): Minor: avoid double
negative.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2076 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220106/e0e5a947/attachment.bin>
More information about the Gcc-patches
mailing list