From patchwork Thu Jun 9 13:16:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 99745 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 4A665B6FE6 for ; Thu, 9 Jun 2011 23:16:38 +1000 (EST) Received: (qmail 17851 invoked by alias); 9 Jun 2011 13:16:36 -0000 Received: (qmail 17843 invoked by uid 22791); 9 Jun 2011 13:16:36 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jun 2011 13:16:20 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 33F466CB00; Thu, 9 Jun 2011 15:16:19 +0200 (CEST) Date: Thu, 9 Jun 2011 15:16:18 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Cc: "Joseph S. Myers" Subject: [PATCH][C family] Fix pp_c_type_specifier IDENTIFIER_NODE handling Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 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 The current IDENTIFIER_NODE handling in pp_c_type_specifier can't work because the first thing pp_c_tree_decl_identifier does is assert that the passed tree is a DECL. Instead the following patch arranges us to use pp_c_identifier to dump an IDENTIFIER_NODE. This (obvious?) patch is required to give a name to sizetype in the middle-end. I'll bootstrap/test it with some other changes, the gcc.dg testsuite is now clean with sizetype having a IDENTIFIER_NODE TYPE_NAME. Ok for trunk? Thanks, Richard. 2011-06-09 Richard Guenther c-family/ * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier to print a IDENTIFIER_NODE. Index: gcc/c-family/c-pretty-print.c =================================================================== --- gcc/c-family/c-pretty-print.c (revision 174841) +++ gcc/c-family/c-pretty-print.c (working copy) @@ -345,7 +345,7 @@ pp_c_type_specifier (c_pretty_printer *p break; case IDENTIFIER_NODE: - pp_c_tree_decl_identifier (pp, t); + pp_c_identifier (pp, IDENTIFIER_POINTER (t)); break; case VOID_TYPE: