]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Small consistency fix for -gnatwv warning
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 31 Oct 2023 16:49:47 +0000 (17:49 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 Nov 2023 09:57:42 +0000 (10:57 +0100)
commit3bf92fe3f2e4d6915ee6b9e9cb9cd9778a3386df
treec8092c601e51ad7c1c0938aed3b3345f24927eb5
parentea60a4cd194eeea2d7a63b93b6b01b9c951302da
ada: Small consistency fix for -gnatwv warning

The goal is to arrange for the warning to be issued consistently between
objects whose address is taken and objects whose address is not taken.

gcc/ada/

* sem_warn.adb (Check_References.Type_OK_For_No_Value_Assigned):
New predicate.
(Check_References): For Warn_On_No_Value_Assigned, use the same test
on the type in the address-not-taken and default cases.

gcc/testsuite/ChangeLog:

* gnat.dg/warn25.adb: Add xfail.
gcc/ada/sem_warn.adb
gcc/testsuite/gnat.dg/warn25.adb