On Fri, Dec 01, 2006 at 07:57:51PM -0800, Andrew Pinski wrote: > On Fri, 2006-12-01 at 17:21 +0000, Al Viro wrote: > > There's a bunch of related issues, some kernel, some gcc, > > thus the Cc from hell on that one. > > I don't really see how this is a GCC question, rather I see this > as a C question which means this should have gone to either > [EMAIL PROTECTED] or the C news group.
In this case, I think the issue is important enough to ask the gcc people directly. Let's face it, some people are "more equal than others"; it is very important for the gcc folks to help the Linux kernel folks get it right; they are not just some random programmers. Now, I do hope that detailed discussions of what to do about the issue aren't crossposted to gcc from here forward. > Then create an union which contains the two different types of call > back. > You know: > union a > { > void (*callbackwithulong) (unsigned long); > void (*callbackwithptr) (void*); > }; This is a good suggestion. > I don't see why there is a mystery about this? But I wish you hadn't added this. Unfortunately, while compiler developers know the standards documents backwards and forwards (or at least aspire to that), most code is developed by throwing it at the compiler and seeing what works. It's only been recently that compilers (not just gcc) have been taking more advantage of the aliasing rules to generate better code, and we're going to need to help users deal with the problems this causes, not just insult them.