Commit 8936f047 by Jakub Jelinek Committed by Jakub Jelinek

re PR libstdc++/88170 (pretty printer FAILs)

	PR libstdc++/88170
	* c-pretty-print.c (pp_c_enumeration_constant): Print always as
	a C cast in pp_c_flag_gnu_v3 mode.

	* cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as
	a C cast in pp_c_flag_gnu_v3 mode.

From-SVN: r268413
parent 474175e9
2019-01-31 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/88170
* c-pretty-print.c (pp_c_enumeration_constant): Print always as
a C cast in pp_c_flag_gnu_v3 mode.
2019-01-29 Jakub Jelinek <jakub@redhat.com>
PR c/86125
......
......@@ -976,14 +976,14 @@ static void
pp_c_enumeration_constant (c_pretty_printer *pp, tree e)
{
tree type = TREE_TYPE (e);
tree value;
tree value = NULL_TREE;
/* Find the name of this constant. */
for (value = TYPE_VALUES (type);
value != NULL_TREE
&& !tree_int_cst_equal (DECL_INITIAL (TREE_VALUE (value)), e);
value = TREE_CHAIN (value))
;
if ((pp->flags & pp_c_flag_gnu_v3) == 0)
for (value = TYPE_VALUES (type); value != NULL_TREE;
value = TREE_CHAIN (value))
if (tree_int_cst_equal (DECL_INITIAL (TREE_VALUE (value)), e))
break;
if (value != NULL_TREE)
pp->id_expression (TREE_PURPOSE (value));
......
2019-01-31 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/88170
* cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as
a C cast in pp_c_flag_gnu_v3 mode.
2019-01-30 Jakub Jelinek <jakub@redhat.com>
PR c++/88988
......
......@@ -309,14 +309,14 @@ static void
pp_cxx_enumeration_constant (cxx_pretty_printer *pp, tree e)
{
tree type = TREE_TYPE (e);
tree value;
tree value = NULL_TREE;
/* Find the name of this constant. */
for (value = TYPE_VALUES (type);
value != NULL_TREE
&& !tree_int_cst_equal (DECL_INITIAL (TREE_VALUE (value)), e);
value = TREE_CHAIN (value))
;
if ((pp->flags & pp_c_flag_gnu_v3) == 0)
for (value = TYPE_VALUES (type); value != NULL_TREE;
value = TREE_CHAIN (value))
if (tree_int_cst_equal (DECL_INITIAL (TREE_VALUE (value)), e))
break;
if (value != NULL_TREE)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment