From patchwork Mon Oct 18 18:34:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 68226 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id AAC2BB70FF for ; Tue, 19 Oct 2010 05:35:14 +1100 (EST) Received: (qmail 961 invoked by alias); 18 Oct 2010 18:35:08 -0000 Received: (qmail 692 invoked by uid 22791); 18 Oct 2010 18:35:06 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL, BAYES_00, TW_BJ, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Oct 2010 18:34:58 +0000 Received: from eggs.gnu.org ([140.186.70.92]:34514) by fencepost.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P7uXw-00016p-JT for gcc-patches@gnu.org; Mon, 18 Oct 2010 14:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7uXv-0002E1-AM for gcc-patches@gnu.org; Mon, 18 Oct 2010 14:34:56 -0400 Received: from smtp201.iad.emailsrvr.com ([207.97.245.201]:37167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7uXv-0002Du-7k for gcc-patches@gnu.org; Mon, 18 Oct 2010 14:34:55 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp50.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 3A77237050E for ; Mon, 18 Oct 2010 14:34:54 -0400 (EDT) X-Orig-To: gcc-patches@gnu.org Received: from dynamic8.wm-web.iad.mlsrvr.com (dynamic8.wm-web.iad1a.rsapps.net [192.168.2.149]) by smtp50.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 1DC98370956 for ; Mon, 18 Oct 2010 14:34:54 -0400 (EDT) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic8.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 4DAFB3050085 for ; Mon, 18 Oct 2010 14:34:52 -0400 (EDT) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Mon, 18 Oct 2010 20:34:52 +0200 (CEST) Date: Mon, 18 Oct 2010 20:34:52 +0200 (CEST) Subject: ObjC @encode bugfix from apple/trunk From: "Nicola Pero" To: "gcc-patches@gnu.org" MIME-Version: 1.0 X-Type: plain Message-ID: <1287426892.310532175@192.168.2.230> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 + 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 + + Radar 4301047 + * c-parse.in (objc_quals): Build objc qualifier list same way + as gcc-3.3 + +2010-10-18 Nicola Pero + 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 + + * objc.dg/proto-qual-1.m: Adjust test for GNU runtime to match + bugfix. + +2010-10-18 Nicola Pero 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