This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47281] [4.6 Regression] error: non-trivial conversion at assignment
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Jan 2011 12:27:29 +0000
- Subject: [Bug middle-end/47281] [4.6 Regression] error: non-trivial conversion at assignment
- Auto-submitted: auto-generated
- References: <bug-47281-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47281
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |46076
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-14 12:26:47 UTC ---
It's the transitivity problem in
(void (*)(void))(void (*)())(void (*)(int))make_mess
The first conversion is useless as is the second. But
(void (*)(void))(void (*)(int))make_mess
is not useless. That's of course a bug in the type system as implemented
as we rely on
1) useless_type_conversion_p is transitive.
If a < b and b < c then a < c.
So we either have to revert the fix for PR46076 or need to make
conversions to unprototyped function pointers not generally useless.
I'm going for reverting the fix for 4.6.