Michael Snyder wrote: > On Wed, 2008-02-27 at 13:03 -0500, Aleksandar Ristovski wrote: >> Hello, >> >> As described in the bug report 2416, the problem is with casting to a reference. >> The attached patch should fix this. >> >> Testing on head, no change in pass rate encountered (probably suggesting there >> is no test case for this - sample code in the bug report should be a good >> starting point). > > I don't understand the change in unpack_long. > You want to treat structs and unions as longs? Hmm... I thought I put it there to handle cases when we end up with these type codes; in that case, I thought, value contains the address and we intepret it as a long... However, now I am having trouble reproducing this case, so maybe I had "covered" this scenario while still searching for a more general solution... in any case, tests give the same results without unpack_long change and the new diff is attached. Thanks, Aleksandar 2008-02-27 Aleksandar Ristovski * eval.c (evaluate_subexp_standard): UNOP_CAST use value_cast_pointers when casting reference to reference. Print error when reference/non-reference mix. * value.c (value_as_address): Call coerce_array only on arrays.