From Bugzilla Helper: User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.9-13smp-MO i686; Nav) Description of problem: See attached example code. gcc v3 fails to compile giving a confused error about selecting one method over another due to "because worst conversion for the former is better than worst conversion for the latter" Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. see attached. untar tarball, 2. run doit (./doit) 3. observe error messages Actual Results: bogus error messages Expected Results: clean compile with no error messages Additional info:
Created attachment 45860 [details] sample program that fails to compile
This is covered in ISO C++ 98 [over] chapter. By default, g++ now defaults to -pedantic-errors, unless -pedantic or -fpermissive is given. If you use -pedantic with g++ 2.96-RH or earlier, you'll get an error too. The problem is that one overloading candidate is const qualified, the other one has worse type. As quick workaround, you can use -fpermissive, long term the code needs to be fixed.