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:31:42 +0000 (16:31 +0200)
commit696fce736841ea77621a1195ce1914a74b840def
tree282b871a4aec3bf289f2ec916e384ffdbced221c
parent9c8125b98cdd406fbad09995529a5c6acffdd928
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