mangle.c (write_member_name): Move abi-version=1 code back to...
* mangle.c (write_member_name): Move abi-version=1 code back to... (write_expression): ...here. From-SVN: r155399
This commit is contained in:
parent
6be8006d35
commit
5dd65e227a
@ -1,3 +1,8 @@
|
||||
2009-12-21 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* mangle.c (write_member_name): Move abi-version=1 code back to...
|
||||
(write_expression): ...here.
|
||||
|
||||
2009-12-21 Brian Hackett <bhackett1024@gmail.com>
|
||||
|
||||
* decl.c (finish_function): Rename pre-genericize event.
|
||||
|
@ -2299,12 +2299,7 @@ write_member_name (tree member)
|
||||
if (TREE_CODE (member) == IDENTIFIER_NODE)
|
||||
write_source_name (member);
|
||||
else if (DECL_P (member))
|
||||
{
|
||||
/* G++ 3.2 incorrectly put out both the "sr" code and
|
||||
the nested name of the qualified name. */
|
||||
G.need_abi_warning = 1;
|
||||
write_unqualified_name (member);
|
||||
}
|
||||
write_unqualified_name (member);
|
||||
else if (TREE_CODE (member) == TEMPLATE_ID_EXPR)
|
||||
{
|
||||
tree name = TREE_OPERAND (member, 0);
|
||||
@ -2401,17 +2396,27 @@ write_expression (tree expr)
|
||||
write_string ("at");
|
||||
write_type (TREE_OPERAND (expr, 0));
|
||||
}
|
||||
else if (abi_version_at_least (2) && TREE_CODE (expr) == SCOPE_REF)
|
||||
else if (TREE_CODE (expr) == SCOPE_REF)
|
||||
{
|
||||
tree scope = TREE_OPERAND (expr, 0);
|
||||
tree member = TREE_OPERAND (expr, 1);
|
||||
|
||||
if (!abi_version_at_least (2))
|
||||
{
|
||||
write_string ("sr");
|
||||
write_type (scope);
|
||||
/* G++ 3.2 incorrectly put out both the "sr" code and
|
||||
the nested name of the qualified name. */
|
||||
G.need_abi_warning = 1;
|
||||
write_encoding (member);
|
||||
}
|
||||
|
||||
/* If the MEMBER is a real declaration, then the qualifying
|
||||
scope was not dependent. Ideally, we would not have a
|
||||
SCOPE_REF in those cases, but sometimes we do. If the second
|
||||
argument is a DECL, then the name must not have been
|
||||
dependent. */
|
||||
if (DECL_P (member))
|
||||
else if (DECL_P (member))
|
||||
write_expression (member);
|
||||
else
|
||||
{
|
||||
@ -2576,12 +2581,6 @@ write_expression (tree expr)
|
||||
sorry ("mangling new-expression");
|
||||
break;
|
||||
|
||||
/* Handle pointers-to-members specially. */
|
||||
case SCOPE_REF:
|
||||
write_type (TREE_OPERAND (expr, 0));
|
||||
write_member_name (TREE_OPERAND (expr, 1));
|
||||
break;
|
||||
|
||||
default:
|
||||
for (i = 0; i < TREE_OPERAND_LENGTH (expr); ++i)
|
||||
{
|
||||
|
@ -1,3 +1,7 @@
|
||||
2009-12-21 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* g++.dg/abi/mangle14.C: Add expected mangling.
|
||||
|
||||
2009-12-21 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
|
||||
|
||||
* gcc.dg/pr36901.h: AVR must support address zero.
|
||||
|
@ -1,5 +1,6 @@
|
||||
// { dg-do compile }
|
||||
// { dg-options "-Wabi -fabi-version=1" }
|
||||
// { dg-final { scan-assembler "_Z1g1SIXadsr1ANS0_1fIiEEivEE" } }
|
||||
|
||||
struct A {
|
||||
template <typename T> int f ();
|
||||
|
Loading…
Reference in New Issue
Block a user