===================================================================
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3.
typedef enum {
HAS_DEPENDENT_TEMPLATE_ARGS,
IS_ABSTRACT,
+ IS_CONSTEXPR,
IS_CONSTRUCTOR,
IS_DESTRUCTOR,
IS_COPY_CONSTRUCTOR,
===================================================================
@@ -2887,6 +2887,7 @@ print_ada_declaration (pretty_printer *b
bool is_method = TREE_CODE (TREE_TYPE (t)) == METHOD_TYPE;
tree decl_name = DECL_NAME (t);
bool is_abstract = false;
+ bool is_constexpr = false;
bool is_constructor = false;
bool is_destructor = false;
bool is_copy_constructor = false;
@@ -2898,6 +2899,7 @@ print_ada_declaration (pretty_printer *b
if (cpp_check)
{
is_abstract = cpp_check (t, IS_ABSTRACT);
+ is_constexpr = cpp_check (t, IS_CONSTEXPR);
is_constructor = cpp_check (t, IS_CONSTRUCTOR);
is_destructor = cpp_check (t, IS_DESTRUCTOR);
is_copy_constructor = cpp_check (t, IS_COPY_CONSTRUCTOR);
@@ -2911,6 +2913,10 @@ print_ada_declaration (pretty_printer *b
if (is_constructor || is_destructor)
{
+ /* Skip constexpr default constructors. */
+ if (is_constexpr)
+ return 0;
+
/* Only consider constructors/destructors for complete objects. */
if (strncmp (IDENTIFIER_POINTER (decl_name), "__comp", 6) != 0)
return 0;
===================================================================
@@ -4070,6 +4070,8 @@ cpp_check (tree t, cpp_operation op)
}
case IS_ABSTRACT:
return DECL_PURE_VIRTUAL_P (t);
+ case IS_CONSTEXPR:
+ return DECL_DECLARED_CONSTEXPR_P (t);
case IS_CONSTRUCTOR:
return DECL_CONSTRUCTOR_P (t);
case IS_DESTRUCTOR: