diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-07-17 08:10:04 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-07-17 08:10:04 +0000 |
commit | 69720717c143a9dc77d4c52dd5e2f19858425fa8 (patch) | |
tree | 58f1e9f5f651c6376b9924d9b982df13c26b31c8 /gcc/ada/gcc-interface/gigi.h | |
parent | 123483ca18f7d6d0c5b28230e826a44a7cf4f111 (diff) | |
download | gcc-69720717c143a9dc77d4c52dd5e2f19858425fa8.zip gcc-69720717c143a9dc77d4c52dd5e2f19858425fa8.tar.gz gcc-69720717c143a9dc77d4c52dd5e2f19858425fa8.tar.bz2 |
[Ada] Type mismatch warning for imported C++ class
2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Define for
METHOD_TYPE too.
(TYPE_RETURN_UNCONSTRAINED_P): Likewise.
(TYPE_CI_CO_LIST): Likewise.
* gcc-interface/gigi.h (is_cplusplus_method): Delete.
(fntype_same_flags_p): Adjust comment.
* gcc-interface/decl.c (Has_Thiscall_Convention): Delete.
(gnat_to_gnu_entity) <E_Subprogram_Type>: Do not set the "thiscall"
attribute directly.
(is_cplusplus_method): Make static and adjust head comment.
(gnat_to_gnu_param): Return a pointer for the "this" parameter of
C++ constructors.
(gnat_to_gnu_subprog_type): Turn imported C++ constructors into their
callable form. Generate a METHOD_TYPE node for imported C++ methods.
Set param_list at the very end of the processing.
(substitute_in_type) <METHOD_TYPE>: New case.
* gcc-interface/misc.c (gnat_print_type) <METHOD_TYPE>: Likewise.
(gnat_type_hash_eq): Accept METHOD_TYPE.
* gcc-interface/trans.c (Identifier_to_gnu): Deal with METHOD_TYPE.
(Attribute_to_gnu): Likewise.
(Call_to_gnu): Likewise.
(process_freeze_entity): Likewise.
* gcc-interface/utils.c (create_subprog_decl): Adjust head comment.
(fntype_same_flags_p): Likewise.
From-SVN: r262792
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index a6bc1f0..a75cb90 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -110,10 +110,6 @@ extern void elaborate_entity (Entity_Id gnat_entity); /* Get the unpadded version of a GNAT type. */ extern tree get_unpadded_type (Entity_Id gnat_entity); -/* Return whether the E_Subprogram_Type/E_Function/E_Procedure GNAT_ENTITY is - a C++ imported method or equivalent. */ -extern bool is_cplusplus_method (Entity_Id gnat_entity); - /* Create a record type that contains a SIZE bytes long field of TYPE with a starting bit position so that it is aligned to ALIGN bits, and leaving at least ROOM bytes free before the field. BASE_ALIGN is the alignment the @@ -548,7 +544,7 @@ extern int gnat_types_compatible_p (tree t1, tree t2); /* Return true if EXPR is a useless type conversion. */ extern bool gnat_useless_type_conversion (tree expr); -/* Return true if T, a FUNCTION_TYPE, has the specified list of flags. */ +/* Return true if T, a {FUNCTION,METHOD}_TYPE, has the specified flags. */ extern bool fntype_same_flags_p (const_tree, tree, bool, bool, bool); /* Create an expression whose value is that of EXPR, |