diff options
author | Javier Miranda <miranda@adacore.com> | 2024-07-23 11:46:19 +0000 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-08-06 10:54:31 +0200 |
commit | 3e2b3dd728d851480bb752055bb0937cd4812ef1 (patch) | |
tree | 155cb6b88e29fa19e958b2cabe7e5a5862addba0 /libcpp | |
parent | b9be798a007a824376dc2995684cbaeb523aac92 (diff) | |
download | gcc-3e2b3dd728d851480bb752055bb0937cd4812ef1.zip gcc-3e2b3dd728d851480bb752055bb0937cd4812ef1.tar.gz gcc-3e2b3dd728d851480bb752055bb0937cd4812ef1.tar.bz2 |
ada: Spurious error on the default value of a derived scalar type
When the aspect Default_Value is inherited by a derived scalar
type, and both the parent type T and the derived type DT are
declared in the same scope, a spurious error may be reported.
This occurs if a subprogram declared in the same scope has a
parameter of type DT with a default value, leading the compiler
to incorrectly flag the default value specified in the aspect
of type T as having the wrong type.
gcc/ada/
* freeze.adb (Freeze_Entity): For scalar derived types that
inherit the aspect Default_Value, do not analyze and resolve the
inherited aspect, as the type of the aspect remains the parent
type.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions