aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorIain Sandoe <iains@gcc.gnu.org>2010-05-01 00:32:13 +0000
committerMike Stump <mrs@gcc.gnu.org>2010-05-01 00:32:13 +0000
commit619dea2d5c764e83340099eea2f33296e148b4da (patch)
tree862aeb59dc18687953e343e21d22bb8d5451fde4 /gcc/objc
parent6482762d8114f68c7bc26dc0e253c22088e2c249 (diff)
downloadgcc-619dea2d5c764e83340099eea2f33296e148b4da.zip
gcc-619dea2d5c764e83340099eea2f33296e148b4da.tar.gz
gcc-619dea2d5c764e83340099eea2f33296e148b4da.tar.bz2
[multiple changes]
2010-04-30 Iain Sandoe <iains@gcc.gnu.org> PR objc++/32052 * objc-act.c (encode_aggregate_within): Encode structure tags with template args for ObjC++. 2010-04-30 Iain Sandoe <iains@gcc.gnu.org> PR objc++/32052 * obj-c++.dg/encode-2.mm: Remove XFAIL. Add test for anonymous structure and nested declarations. * obj-c++.dg/encode-3.mm: Remove XFAIL. Add test for anonymous structure and nested declarations. Reduce header clutter and use _exit() rather than abort(). * objc.dg/encode-10.m: New. * objc.dg/encode-11.m: New. From-SVN: r158958
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-act.c14
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index d734681..2f1343b 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-30 Iain Sandoe <iains@gcc.gnu.org>
+
+ PR objc++/32052
+ * objc-act.c (encode_aggregate_within): Encode structure tags
+ with template args for ObjC++.
+
2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
* objc-act.c: Do not include varray.h.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index b802ecd..465376d 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -8129,15 +8129,21 @@ encode_aggregate_within (tree type, int curtype, int format, int left,
/* Encode the struct/union tag name, or '?' if a tag was
not provided. Typedef aliases do not qualify. */
- if (name && TREE_CODE (name) == IDENTIFIER_NODE
#ifdef OBJCPLUS
+ /* For compatibility with the NeXT runtime, ObjC++ encodes template
+ args as a composite struct tag name. */
+ if (name && TREE_CODE (name) == IDENTIFIER_NODE
/* Did this struct have a tag? */
- && !TYPE_WAS_ANONYMOUS (type)
-#endif
- )
+ && !TYPE_WAS_ANONYMOUS (type))
+ obstack_grow (&util_obstack,
+ decl_as_string (type, TFF_DECL_SPECIFIERS | TFF_UNQUALIFIED_NAME),
+ strlen (decl_as_string (type, TFF_DECL_SPECIFIERS | TFF_UNQUALIFIED_NAME)));
+#else
+ if (name && TREE_CODE (name) == IDENTIFIER_NODE)
obstack_grow (&util_obstack,
IDENTIFIER_POINTER (name),
strlen (IDENTIFIER_POINTER (name)));
+#endif
else
obstack_1grow (&util_obstack, '?');