Re: [PATCH][all-langs] Defer size_t and sizetype setting to the middle-end

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran,gmane.comp.gcc.java.devel
Message-ID <[email protected]>
On 06/01/2011 12:34 PM, Richard Guenther wrote:
> >
> > 	java/
> > 	* decl.c (java_init_decl_processing): Properly initialize
> > 	size_type_node.
> >
> > Index: gcc/java/decl.c
> > ===================================================================
> > --- gcc/java/decl.c	(revision 174520)
> > +++ gcc/java/decl.c	(working copy)
> > @@ -606,7 +606,14 @@ java_init_decl_processing (void)
> >
> >    /* This is not a java type, however tree-dfa requires a definition for
> >       size_type_node.  */
> > -  size_type_node = make_unsigned_type (POINTER_SIZE);
> > +  if (strcmp (SIZE_TYPE, "unsigned int") == 0)
> > +    size_type_node = make_unsigned_type (INT_TYPE_SIZE);
> > +  else if (strcmp (SIZE_TYPE, "long unsigned int") == 0)
> > +    size_type_node = make_unsigned_type (LONG_TYPE_SIZE);
> > +  else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
> > +    size_type_node = make_unsigned_type (LONG_LONG_TYPE_SIZE);
> > +  else
> > +    gcc_unreachable ();
> >    set_sizetype (size_type_node);
> >

OK.

Andrew.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.