This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A warning option for confusing overload resolution


Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:

> At 13:47 14.07.98 , Tobias Ringstrom wrote:
> >On 14-Jul-98 Jason Merrill wrote:
> >> No, I think the better choice is to fix the warning to not be so stupid.
> >> Does this do the trick for you?
> >
> >Yes, thanks.  Especially since you fixed it without the small testcase I
> >prepared, but forgot to include in my previous mail. :-(
> 
> yeah, it works for me too. THANKS!! It was really hard to see the important
> warnings/errors with any qt-based project due to this warning flood.
> 
> Tobias, can you compile qnpsupport.cpp from qt-1.40/qt-980706 with the
> latest cvs-egcs? I get a new error:
> 
> kernel/qnpsupport.cpp: In function `int qt_event_handler(union _XEvent *)':
> kernel/qnpsupport.cpp:41: `qt_np_leave_cb' is not a function
> kernel/qnpsupport.cpp:135: in call to `qt_np_leave_cb'
> 
> which wasn't there a few days ago.

I had this problem too. I had to fix it with a patch to Qt (I think I cannot
disribute the patch because of the free Qt license). Basically, I had to 
change

	qn_np_leave_cb(e); 

to 

	(*qn_np_leave_cb)(e); 

I would consider this a bug in egcs. 

Here is a small test case to show it:

class X {}; 
void (*fptr)(X *); 

f(X &x)
{
	fptr(&x); 
}

It fails with

tfp.c: In function `int f(class X &)':
tfp.c:3: `fptr' is not a function
tfp.c:7: in call to `fptr'

If fptr takes no arguments it compiles fine, so clearly a bug. 


-Andi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]