mirror of git://gcc.gnu.org/git/gcc.git
c-ada-spec.h (cpp_operation): Revert latest change.
c-family/ * c-ada-spec.h (cpp_operation): Revert latest change. * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit constructors and destructors. cp/ * decl2.c (cpp_check): Revert latest change. From-SVN: r225686
This commit is contained in:
parent
112fc9c399
commit
bb49ee66ef
|
|
@ -1,3 +1,9 @@
|
||||||
|
2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* c-ada-spec.h (cpp_operation): Revert latest change.
|
||||||
|
* c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
|
||||||
|
constructors and destructors.
|
||||||
|
|
||||||
2015-07-09 Andrew MacLeod <amacleod@redhat.com>
|
2015-07-09 Andrew MacLeod <amacleod@redhat.com>
|
||||||
|
|
||||||
* c-common.h: Adjust includes for flags.h changes.
|
* c-common.h: Adjust includes for flags.h changes.
|
||||||
|
|
|
||||||
|
|
@ -2887,7 +2887,6 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
|
||||||
bool is_method = TREE_CODE (TREE_TYPE (t)) == METHOD_TYPE;
|
bool is_method = TREE_CODE (TREE_TYPE (t)) == METHOD_TYPE;
|
||||||
tree decl_name = DECL_NAME (t);
|
tree decl_name = DECL_NAME (t);
|
||||||
bool is_abstract = false;
|
bool is_abstract = false;
|
||||||
bool is_constexpr = false;
|
|
||||||
bool is_constructor = false;
|
bool is_constructor = false;
|
||||||
bool is_destructor = false;
|
bool is_destructor = false;
|
||||||
bool is_copy_constructor = false;
|
bool is_copy_constructor = false;
|
||||||
|
|
@ -2899,7 +2898,6 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
|
||||||
if (cpp_check)
|
if (cpp_check)
|
||||||
{
|
{
|
||||||
is_abstract = cpp_check (t, IS_ABSTRACT);
|
is_abstract = cpp_check (t, IS_ABSTRACT);
|
||||||
is_constexpr = cpp_check (t, IS_CONSTEXPR);
|
|
||||||
is_constructor = cpp_check (t, IS_CONSTRUCTOR);
|
is_constructor = cpp_check (t, IS_CONSTRUCTOR);
|
||||||
is_destructor = cpp_check (t, IS_DESTRUCTOR);
|
is_destructor = cpp_check (t, IS_DESTRUCTOR);
|
||||||
is_copy_constructor = cpp_check (t, IS_COPY_CONSTRUCTOR);
|
is_copy_constructor = cpp_check (t, IS_COPY_CONSTRUCTOR);
|
||||||
|
|
@ -2913,8 +2911,8 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
|
||||||
|
|
||||||
if (is_constructor || is_destructor)
|
if (is_constructor || is_destructor)
|
||||||
{
|
{
|
||||||
/* Skip constexpr default constructors. */
|
/* ??? Skip implicit constructors/destructors for now. */
|
||||||
if (is_constexpr)
|
if (DECL_ARTIFICIAL (t))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Only consider constructors/destructors for complete objects. */
|
/* Only consider constructors/destructors for complete objects. */
|
||||||
|
|
@ -3050,9 +3048,12 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
|
||||||
if (num_fields == 1)
|
if (num_fields == 1)
|
||||||
is_interface = 1;
|
is_interface = 1;
|
||||||
|
|
||||||
/* Also check that there are only virtual methods. */
|
/* Also check that there are only pure virtual methods. Since the
|
||||||
|
class is empty, we can skip implicit constructors/destructors. */
|
||||||
for (tmp = TYPE_METHODS (TREE_TYPE (t)); tmp; tmp = TREE_CHAIN (tmp))
|
for (tmp = TYPE_METHODS (TREE_TYPE (t)); tmp; tmp = TREE_CHAIN (tmp))
|
||||||
{
|
{
|
||||||
|
if (DECL_ARTIFICIAL (tmp))
|
||||||
|
continue;
|
||||||
if (cpp_check (tmp, IS_ABSTRACT))
|
if (cpp_check (tmp, IS_ABSTRACT))
|
||||||
is_abstract_record = 1;
|
is_abstract_record = 1;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ along with GCC; see the file COPYING3. If not see
|
||||||
typedef enum {
|
typedef enum {
|
||||||
HAS_DEPENDENT_TEMPLATE_ARGS,
|
HAS_DEPENDENT_TEMPLATE_ARGS,
|
||||||
IS_ABSTRACT,
|
IS_ABSTRACT,
|
||||||
IS_CONSTEXPR,
|
|
||||||
IS_CONSTRUCTOR,
|
IS_CONSTRUCTOR,
|
||||||
IS_DESTRUCTOR,
|
IS_DESTRUCTOR,
|
||||||
IS_COPY_CONSTRUCTOR,
|
IS_COPY_CONSTRUCTOR,
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* decl2.c (cpp_check): Revert latest change.
|
||||||
|
|
||||||
2015-07-09 Jason Merrill <jason@redhat.com>
|
2015-07-09 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
* pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
|
* pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
|
||||||
|
|
|
||||||
|
|
@ -4070,8 +4070,6 @@ cpp_check (tree t, cpp_operation op)
|
||||||
}
|
}
|
||||||
case IS_ABSTRACT:
|
case IS_ABSTRACT:
|
||||||
return DECL_PURE_VIRTUAL_P (t);
|
return DECL_PURE_VIRTUAL_P (t);
|
||||||
case IS_CONSTEXPR:
|
|
||||||
return DECL_DECLARED_CONSTEXPR_P (t);
|
|
||||||
case IS_CONSTRUCTOR:
|
case IS_CONSTRUCTOR:
|
||||||
return DECL_CONSTRUCTOR_P (t);
|
return DECL_CONSTRUCTOR_P (t);
|
||||||
case IS_DESTRUCTOR:
|
case IS_DESTRUCTOR:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue