diff options
author | Javier Miranda <miranda@adacore.com> | 2022-05-10 17:18:30 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-07-06 13:29:48 +0000 |
commit | 28add0a4c82f52631b434e1e126588cd3f5b7782 (patch) | |
tree | 14d8b2b51395764b1b4b49d1f482964db375eebd /gcc/ada/gcc-interface | |
parent | 3202e9f88fd286a8fc4814abeaa2238d70f4d585 (diff) | |
download | gcc-28add0a4c82f52631b434e1e126588cd3f5b7782.zip gcc-28add0a4c82f52631b434e1e126588cd3f5b7782.tar.gz gcc-28add0a4c82f52631b434e1e126588cd3f5b7782.tar.bz2 |
[Ada] Missing error on tagged type conversion
The compiler does not report an error on a type conversion to/from a
tagged type whose parent type is an interface type and there is no
relationship between the source and target types. This bug has been
dormant since January/2016.
This patch also improves the text of errors reported on interface type
conversions suggesting how to fix these errors.
gcc/ada/
* sem_res.adb (Resolve_Type_Conversion): Code cleanup since the
previous static check has been moved to Valid_Tagged_Conversion.
(Valid_Tagged_Conversion): Fix the code checking conversion
to/from interface types since incorrectly returns True when the
parent type of the operand type (or the target type) is an
interface type; add missing static checks on interface type
conversions.
Diffstat (limited to 'gcc/ada/gcc-interface')
0 files changed, 0 insertions, 0 deletions