]> gcc.gnu.org Git - gcc.git/commit
Reject components in extensions overlapping with the parent
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 2 Jul 2020 08:26:49 +0000 (10:26 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 2 Jul 2020 08:29:34 +0000 (10:29 +0200)
commit6153cfd7a342f131d347de1aea87f352f3ccd4e7
tree9c095d99c19e7bf2cd573a9ada4be774d39422c5
parentece21ff6ea9d969d3b6aae82136622a7126eefc1
Reject components in extensions overlapping with the parent

Such problematic components can be specified by means of a component
clause but they cannot be fully supported by the type system.  They
had initially been forbidden, then we decided to accept them by working
around the type system, but this is very fragile and, for example, any
static aggregate is guaranteed to trigger an ICE with the current
implementation.

We now reject them again, except if the -gnatd.K switch is passed.

gcc/ada/ChangeLog:
* debug.adb (d.K): Document new usage.
* fe.h (Debug_Flag_Dot_KK): Declare.
* gcc-interface/decl.c (gnat_to_gnu_field): Give an error when the
component overlaps with the parent subtype, except with -gnatd.K.
gcc/ada/debug.adb
gcc/ada/fe.h
gcc/ada/gcc-interface/decl.c
This page took 0.05846 seconds and 5 git commands to generate.