This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ObjC @encode bugfix from apple/trunk
- From: "Nicola Pero" <nicola dot pero at meta-innovation dot com>
- To: "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Mon, 18 Oct 2010 20:34:52 +0200 (CEST)
- Subject: ObjC @encode bugfix from apple/trunk
Another small merge from FSF apple/trunk. I hope this fixes failures
of the proto-qual-1.m and threedotthree-dabi-1.m tests on next. :-)
Committed to trunk (preapproved by Mike)
Thanks
Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog (revision 165654)
+++ gcc/ChangeLog (working copy)
@@ -1,5 +1,17 @@
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
+ Merge from 'apple/trunk' branch on FSF servers.
+ * c-parser.c (c_parser_objc_type_name): Adapted to new parser the
+ following Objective-C change:
+
+ 2005-10-10 Fariborz Jahanian <fjahanian@apple.com>
+
+ Radar 4301047
+ * c-parse.in (objc_quals): Build objc qualifier list same way
+ as gcc-3.3
+
+2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
+
Merge from 'apple/trunk' branch on FSF servers.
* c-parser.c (c_parser_typeof_specifier): Adapted to new parser
the following Objective-C change:
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog (revision 165654)
+++ gcc/testsuite/ChangeLog (working copy)
@@ -1,4 +1,9 @@
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ * objc.dg/proto-qual-1.m: Adjust test for GNU runtime to match
+ bugfix.
+
+2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
Index: gcc/testsuite/objc.dg/proto-qual-1.m
===================================================================
--- gcc/testsuite/objc.dg/proto-qual-1.m (revision 165653)
+++ gcc/testsuite/objc.dg/proto-qual-1.m (working copy)
@@ -44,20 +44,10 @@ static void scan_initial(const char *pattern) {
int main(void) {
meth = [proto descriptionForInstanceMethod: @selector(address:with:)];
-#ifndef __NEXT_RUNTIME__
- scan_initial("O@%u@%u:%uRN@%uo^^S%u");
-#else
- /* The NEXT runtime tries to be compatible with gcc-3.3 */
scan_initial("O@%u@%u:%uNR@%uo^^S%u");
-#endif
CHECK_IF(offs3 == offs2 + aligned_sizeof(id) && totsize == offs3 + aligned_sizeof(unsigned));
meth = [proto descriptionForClassMethod: @selector(retainArgument:with:)];
-#ifndef __NEXT_RUNTIME__
- scan_initial("Vv%u@%u:%uoO@%un^*%u");
-#else
- /* The NEXT runtime tries to be compatible with gcc-3.3 */
scan_initial("Vv%u@%u:%uOo@%un^*%u");
-#endif
CHECK_IF(offs3 == offs2 + aligned_sizeof(id) && totsize == offs3 + aligned_sizeof(char **));
return 0;
}
Index: gcc/c-parser.c
===================================================================
--- gcc/c-parser.c (revision 165654)
+++ gcc/c-parser.c (working copy)
@@ -7228,7 +7228,7 @@ c_parser_objc_type_name (c_parser *parser)
|| token->keyword == RID_BYREF
|| token->keyword == RID_ONEWAY))
{
- quals = chainon (quals, build_tree_list (NULL_TREE, token->value));
+ quals = chainon (build_tree_list (NULL_TREE, token->value), quals);
c_parser_consume_token (parser);
}
else