aboutsummaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2024-04-01 14:05:14 -0400
committerMarc Poulhiès <poulhies@adacore.com>2024-05-20 09:47:06 +0200
commitb3cfe6e88ffcc636d83e4ac5708065c3131e1766 (patch)
tree5fc61bea87459d131e3e49dc2a2ce84d1aa015b1 /libobjc
parent49eb34ea61c6e8fbb10d3a36484cbf5468580fba (diff)
downloadgcc-b3cfe6e88ffcc636d83e4ac5708065c3131e1766.zip
gcc-b3cfe6e88ffcc636d83e4ac5708065c3131e1766.tar.gz
gcc-b3cfe6e88ffcc636d83e4ac5708065c3131e1766.tar.bz2
ada: Allow 'others' in formal packages with overloaded formals
If a generic package has two or more generic formal parameters with the same defining name (which can happen only for formal subprograms), then RM-12.7(4.1/3) disallows named associations in a corresponding formal package. This is not intended to cover "others => <>". This patch allows "others => <>" even when it applies to such formals. Previously, the compiler incorrectly gave an error. Minor related cleanups involving type Text_Ptr. gcc/ada/ * sem_ch12.adb: Misc cleanups and comment fixes. (Check_Overloaded_Formal_Subprogram): Remove the Others_Choice error message. (Others_Choice): Remove this variable; no longer needed. * types.ads (Text_Ptr): Add a range constraint limiting the subtype to values that are actually used. This has the advantage that when the compiler is compiled with validity checks, uninitialized values of subtypes Text_Ptr and Source_Ptr will be caught. * sinput.ads (Sloc_Adjust): Use the base subtype; this is used as an offset, so we need to allow arbitrary negative values.
Diffstat (limited to 'libobjc')
0 files changed, 0 insertions, 0 deletions