]> git.ipfire.org Git - thirdparty/gcc.git/commit
Reduce usage of limited_with clauses with -fdump-ada-spec
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 18 May 2022 14:27:55 +0000 (16:27 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 18 May 2022 14:30:48 +0000 (16:30 +0200)
commit0d189b16f81fb9dced0b29495b5d100492b779d8
treeb0c8faae6ad001bd54008f6f564c82db259f566a
parent297a69068ddfe2eaeddfce7249c5709504a83dcb
Reduce usage of limited_with clauses with -fdump-ada-spec

The problem is that subtypes are not part of the limited view of a package
so we need to use types in conjunction with limited_with clauses, which is
not always desirable as this yields less portable Ada bindings.  The patch
also contains a small enhancement for complex floating-point types.

gcc/c-family/
* c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
floating-point complex types.
<POINTER_TYPE>: Do not use limited_with clause if the designated
type is a scalar type.
gcc/c-family/c-ada-spec.cc