+2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
+ (print_ada_methods): Likewise.
+ (print_ada_declaration): Likewise.
+
2017-08-07 Martin Liska <mliska@suse.cz>
* array-notation-common.c: Add new includes.
/* If there are user-defined methods, they are deemed non-trivial. */
for (tree fld = TYPE_FIELDS (type); fld; fld = DECL_CHAIN (fld))
- if (TREE_CODE (TREE_TYPE (fld)) == METHOD_TYPE && !DECL_ARTIFICIAL (fld))
+ if (TREE_CODE (fld) == FUNCTION_DECL && !DECL_ARTIFICIAL (fld))
return true;
return false;
int res = 1;
for (tree fld = TYPE_FIELDS (node); fld; fld = DECL_CHAIN (fld))
- if (TREE_CODE (TREE_TYPE (fld)) == METHOD_TYPE)
+ if (TREE_CODE (fld) == FUNCTION_DECL)
{
if (res)
{
if (is_constructor && RECORD_OR_UNION_TYPE_P (type))
for (tree fld = TYPE_FIELDS (type); fld; fld = DECL_CHAIN (fld))
- if (TREE_CODE (TREE_TYPE (fld)) == METHOD_TYPE
- && cpp_check (fld, IS_ABSTRACT))
+ if (TREE_CODE (fld) == FUNCTION_DECL && cpp_check (fld, IS_ABSTRACT))
{
is_abstract_class = true;
break;
is_interface = 0;
has_fields = true;
}
- else if (TREE_CODE (TREE_TYPE (fld)) == METHOD_TYPE
+ else if (TREE_CODE (fld) == FUNCTION_DECL
&& !DECL_ARTIFICIAL (fld))
{
if (cpp_check (fld, IS_ABSTRACT))