Re: gcc compilation broken with SVN r264042

From: Michael Butler <imb_at_protected-networks.net>
Date: Wed, 02 Apr 2014 15:53:34 -0400
On 04/02/14 15:30, David Chisnall wrote:

> I'm trying to reproduce this, but I don't seem to be able to get the
> same error as you.  I do get a warning with GCC about a cast to an
> anonymous struct, which the attached patch fixes, but even without
> this I'm able to build both with the gcc in 9 and the gcc in ports.
> Can you let me know your gcc version?  Unfortunately, the gcc error
> reporting isn't very helpful, so I don't know what it thinks it can't
> convert to a pointer type.  It would be great if you could try this
> patch, and if that doesn't fix it then try splitting the casts and
> dereferences into separate lines and see which part of this it is the
> gcc doesn't like.

This is ..

cc (GCC) 4.2.1 20070831 patched [FreeBSD]

 .. on ..

FreeBSD 11.0-CURRENT #22 r263969: Mon Mar 31 10:45:56 EDT 2014

Splitting it like ..

-       fn.fn_ptr.cxa_func = (void(*)(void*))GET_BLOCK_FUNCTION(func);
+       fn.fn_ptr.cxa_func =
+               (void(*)(void*))
+               GET_BLOCK_FUNCTION(func);

 .. causes the reported error to point at the GET_BLOCK_FUNCTION.

I guess it's time for me to migrate that box to clang :-)

	imb
Received on Wed Apr 02 2014 - 17:53:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:48 UTC