diff mbox

[C,family] Fix pp_c_type_specifier IDENTIFIER_NODE handling

Message ID alpine.LNX.2.00.1106091514020.810@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener June 9, 2011, 1:16 p.m. UTC
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  <rguenther@suse.de>

	c-family/
	* c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
	to print a IDENTIFIER_NODE.

Comments

Joseph Myers June 9, 2011, 2:07 p.m. UTC | #1
On Thu, 9 Jun 2011, Richard Guenther wrote:

> 2011-06-09  Richard Guenther  <rguenther@suse.de>
> 
> 	c-family/
> 	* c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
> 	to print a IDENTIFIER_NODE.

OK.
diff mbox

Patch

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: