[M3devel] configur -enable-checking vs. types

Jay K jay.krell at cornell.edu
Tue Nov 16 22:10:58 CET 2010


The problem seems to be that we set the type for the segment, use that, and then change it.

M3CG_HANDLER (BIND_SEGMENT)
{
  gcc_assert (align >= !!size);

  current_segment = var;
  TREE_TYPE (var) = m3_build_type (type, size, align);

M3CG_HANDLER (DECLARE_SEGMENT)
{
  TREE_TYPE (var)
    = m3_build_type_id (T_struct, BIGGEST_ALIGNMENT * 2, BIGGEST_ALIGNMENT, type_id);
  layout_decl (var, BIGGEST_ALIGNMENT);


however, when I fix lots of configure -enable-checking problems, I get crashes.
I suspect this one needs to be this way -- need the correct segment size.
Making more passes will enable getting it right up front. Later.

 - Jay

> From: jay.krell at cornell.edu
> To: m3devel at elegosoft.com
> Subject: RE: configur -enable-checking vs. types
> Date: Tue, 16 Nov 2010 00:00:53 +0000
> 
> 
> I tried various casts, no luck. I'm confused here.. :(
>  
>  - Jay
> 
> 
> ________________________________
> > From: jay.krell at cornell.edu
> > To: m3devel at elegosoft.com
> > Subject: configur -enable-checking vs. types
> > Date: Mon, 15 Nov 2010 10:18:40 +0000
> >
> > jbook2:graphicutils jay$ cm3cg AMD64_DARWIN/RsrcFilter.mc -quiet -m64
> > ../src/RsrcFilter.m3: In function 'RsrcFilter_M3':
> > ../src/RsrcFilter.m3:145:0: error: type mismatch in address expression
> > struct
> > {
> > } *
> >
> > struct
> > {
> > }
> >
> > D.1466 = &M_RsrcFilter;
> >
> >
> >
> > I don't think this is actually "struct value" vs. "struct pointer".
> > It is actually "struct1 pointer" vs. "struct2 pointer".
> > So, I can probably just cast it away.
> > But it points to a need in compiler to deal differently with types.
> > They should be small integers like procs/labels/vars, I believe.
> > So should fields.
> >
> >
> > - Jay 		 	   		  
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20101116/3983ac0e/attachment-0002.html>


More information about the M3devel mailing list