Commit cd924144 by Jason Merrill Committed by Jason Merrill

re PR c++/42880 (trunk does not compile boost MPL)

	PR c++/42880
	* semantics.c (begin_class_definition): Don't use type_as_string.

From-SVN: r156336
parent a2fe9203
2010-01-28 Jason Merrill <jason@redhat.com>
PR c++/42880
* semantics.c (begin_class_definition): Don't use type_as_string.
2010-01-28 Dodji Seketeli <dodji@redhat.com> 2010-01-28 Dodji Seketeli <dodji@redhat.com>
PR c++/42713 PR c++/42713
......
...@@ -2371,13 +2371,20 @@ begin_class_definition (tree t, tree attributes) ...@@ -2371,13 +2371,20 @@ begin_class_definition (tree t, tree attributes)
/* According to the C++ ABI, decimal classes defined in ISO/IEC TR 24733 /* According to the C++ ABI, decimal classes defined in ISO/IEC TR 24733
are passed the same as decimal scalar types. */ are passed the same as decimal scalar types. */
if (TREE_CODE (t) == RECORD_TYPE) if (TREE_CODE (t) == RECORD_TYPE
&& !processing_template_decl)
{ {
const char *n = type_as_string (t, TFF_CLASS_KEY_OR_ENUM); tree ns = TYPE_CONTEXT (t);
if ((strcmp (n, "class std::decimal::decimal32") == 0) if (ns && TREE_CODE (ns) == NAMESPACE_DECL
|| (strcmp (n, "class std::decimal::decimal64") == 0) && DECL_CONTEXT (ns) == std_node
|| (strcmp (n, "class std::decimal::decimal128") == 0)) && !strcmp (IDENTIFIER_POINTER (DECL_NAME (ns)), "decimal"))
TYPE_TRANSPARENT_AGGR (t) = 1; {
const char *n = TYPE_NAME_STRING (t);
if ((strcmp (n, "decimal32") == 0)
|| (strcmp (n, "decimal64") == 0)
|| (strcmp (n, "decimal128") == 0))
TYPE_TRANSPARENT_AGGR (t) = 1;
}
} }
/* A non-implicit typename comes from code like: /* A non-implicit typename comes from code like:
......
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