<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
The problem seems to be that we set the type for the segment, use that, and then change it.<br><br>M3CG_HANDLER (BIND_SEGMENT)<br>{<br> gcc_assert (align >= !!size);<br><br> current_segment = var;<br> TREE_TYPE (var) = m3_build_type (type, size, align);<br><br>M3CG_HANDLER (DECLARE_SEGMENT)<br>{<br> TREE_TYPE (var)<br> = m3_build_type_id (T_struct, BIGGEST_ALIGNMENT * 2, BIGGEST_ALIGNMENT, type_id);<br> layout_decl (var, BIGGEST_ALIGNMENT);<br><br><br>however, when I fix lots of configure -enable-checking problems, I get crashes.<br>I suspect this one needs to be this way -- need the correct segment size.<br>Making more passes will enable getting it right up front. Later.<br><br> - Jay<br><br>> From: jay.krell@cornell.edu<br>> To: m3devel@elegosoft.com<br>> Subject: RE: configur -enable-checking vs. types<br>> Date: Tue, 16 Nov 2010 00:00:53 +0000<br>> <br>> <br>> I tried various casts, no luck. I'm confused here.. :(<br>> <br>> - Jay<br>> <br>> <br>> ________________________________<br>> > From: jay.krell@cornell.edu<br>> > To: m3devel@elegosoft.com<br>> > Subject: configur -enable-checking vs. types<br>> > Date: Mon, 15 Nov 2010 10:18:40 +0000<br>> ><br>> > jbook2:graphicutils jay$ cm3cg AMD64_DARWIN/RsrcFilter.mc -quiet -m64<br>> > ../src/RsrcFilter.m3: In function 'RsrcFilter_M3':<br>> > ../src/RsrcFilter.m3:145:0: error: type mismatch in address expression<br>> > struct<br>> > {<br>> > } *<br>> ><br>> > struct<br>> > {<br>> > }<br>> ><br>> > D.1466 = &M_RsrcFilter;<br>> ><br>> ><br>> ><br>> > I don't think this is actually "struct value" vs. "struct pointer".<br>> > It is actually "struct1 pointer" vs. "struct2 pointer".<br>> > So, I can probably just cast it away.<br>> > But it points to a need in compiler to deal differently with types.<br>> > They should be small integers like procs/labels/vars, I believe.<br>> > So should fields.<br>> ><br>> ><br>> > - Jay <br> </body>
</html>