diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2020-07-02 10:26:49 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2020-07-02 10:29:34 +0200 |
commit | 6153cfd7a342f131d347de1aea87f352f3ccd4e7 (patch) | |
tree | 9c095d99c19e7bf2cd573a9ada4be774d39422c5 /gcc/ada/fe.h | |
parent | ece21ff6ea9d969d3b6aae82136622a7126eefc1 (diff) | |
download | gcc-6153cfd7a342f131d347de1aea87f352f3ccd4e7.zip gcc-6153cfd7a342f131d347de1aea87f352f3ccd4e7.tar.gz gcc-6153cfd7a342f131d347de1aea87f352f3ccd4e7.tar.bz2 |
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.
Diffstat (limited to 'gcc/ada/fe.h')
-rw-r--r-- | gcc/ada/fe.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index 043300d..463a89c 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -59,9 +59,11 @@ extern int Compiler_Abort (String_Pointer, String_Pointer, Boolean) ATTRIBUTE_NO /* debug: */ +#define Debug_Flag_Dot_KK debug__debug_flag_dot_kk #define Debug_Flag_Dot_R debug__debug_flag_dot_r #define Debug_Flag_NN debug__debug_flag_nn +extern Boolean Debug_Flag_Dot_KK; extern Boolean Debug_Flag_Dot_R; extern Boolean Debug_Flag_NN; |