aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copy.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-05-23 10:23:29 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-23 10:23:29 +0000
commitb30f86de98a05244dbe3bf57f6afd170f2421f23 (patch)
tree0b2984aa4e45544a09aff85097c0e32994bb0e3e /gcc/tree-ssa-copy.c
parent026733d84e1f13ec9fdfc124d5d727fcce64e91c (diff)
downloadgcc-b30f86de98a05244dbe3bf57f6afd170f2421f23.zip
gcc-b30f86de98a05244dbe3bf57f6afd170f2421f23.tar.gz
gcc-b30f86de98a05244dbe3bf57f6afd170f2421f23.tar.bz2
[Ada] Implementation of AI12-0131: legality of class-wide precondition
This patch refines the legality check on a class-wide precondition on a type extension when ancestor does not have a class-wide precondition. Previously the compiler accepted such a precondition when the ancestor had a class-wide postcondition. Compiling pck.ads must yield: pck.ads:7:04: illegal class-wide precondition on overriding operation ---- package Pck is type Parent is tagged null record; procedure Init (P : Parent) with Post'Class => True; type Child is new Parent with null record; overriding procedure Init (C : Child) with Pre'Class => True; end Pck; 2018-05-23 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on class-wide precondition on a type extension when ancestor does not have a class-wide precondition. Previously the compiler accepted such a precondition when the ancestor had a class-wide postcondition. From-SVN: r260592
Diffstat (limited to 'gcc/tree-ssa-copy.c')
0 files changed, 0 insertions, 0 deletions