public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][C family] Fix pp_c_type_specifier IDENTIFIER_NODE handling
@ 2011-06-09 14:07 Richard Guenther
  2011-06-09 14:19 ` Joseph S. Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Guenther @ 2011-06-09 14:07 UTC (permalink / raw)
  To: gcc-patches; +Cc: Joseph S. Myers


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.

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:

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][C family] Fix pp_c_type_specifier IDENTIFIER_NODE handling
  2011-06-09 14:07 [PATCH][C family] Fix pp_c_type_specifier IDENTIFIER_NODE handling Richard Guenther
@ 2011-06-09 14:19 ` Joseph S. Myers
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph S. Myers @ 2011-06-09 14:19 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc-patches

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.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-09 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 14:07 [PATCH][C family] Fix pp_c_type_specifier IDENTIFIER_NODE handling Richard Guenther
2011-06-09 14:19 ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).