[Ada] Misleading warning on variable not assigned
Pierre-Marie de Rodat
derodat@adacore.com
Mon Jul 22 14:02:00 GMT 2019
This patch removes a warning on a referenced entity with no explicit
prior assignment, if the type of the entity has
Preelaborable_Initialixation, such as Exception_Occurrence.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-07-22 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_warn.adb (Check_References): Do not emit s warning on a
referenced entity with no explicit assignment if the type of the
entity has Preelaborable_Initialixation, such as
Exception_Occurrence.
gcc/testsuite/
* gnat.dg/warn25.adb: New testcase.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1438 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190722/88c563b8/attachment.bin>
More information about the Gcc-patches
mailing list