summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-ada-spec.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-08 21:58:10 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-08 21:58:10 +0000
commit0124237ff14017980cc53da1f167e308021d4fe9 (patch)
tree523c4a6e20b7581ef5df5cc9b8d5fc7f78bd3b4f /gcc/c-family/c-ada-spec.c
parent386ef929491c3bd00483807105092ca7d39a8759 (diff)
downloadgcc-0124237ff14017980cc53da1f167e308021d4fe9.tar.gz
c-family/
* c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR. * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors. cp/ * decl2.c (cpp_check): Deal with IS_CONSTEXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225585 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-ada-spec.c')
-rw-r--r--gcc/c-family/c-ada-spec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c
index 38a8fb266ac..be8ef244b96 100644
--- a/gcc/c-family/c-ada-spec.c
+++ b/gcc/c-family/c-ada-spec.c
@@ -2887,6 +2887,7 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
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 *buffer, tree t, tree type, int spc)
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 *buffer, tree t, tree type, int spc)
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;