]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Incorrect ineffective use type clause warning
authorJustin Squirek <squirek@adacore.com>
Fri, 21 Jan 2022 17:09:29 +0000 (17:09 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 10 May 2022 08:19:29 +0000 (08:19 +0000)
commita77ab90ed3a3077a1e9320ac43b32c850d7c525f
treed2046761f32af2c72df09111c0cee3095440f7ce
parentd5e6a22b54b0bfc78288c7ffb94ac6afad39ee7e
[Ada] Incorrect ineffective use type clause warning

This patch fixes an issue in the compiler whereby a use_type_clause
incorrectly gets flagged as ineffective when the use of it comes after a
generic package instantiation where the installation of private use
clauses are required and one such clause references the same type.

gcc/ada/

* sem_ch8.adb (Use_One_Type): Remove code in charge of setting
Current_Use_Clause when Id is known to be redundant, and modify
the printing of errors associated with redundant use type
clauses so that line number gets included in more cases.
gcc/ada/sem_ch8.adb