Function resolution bug in g++ ?

Bill Huey billh@gnuppy.monkey.org
Tue Jul 16 05:18:00 GMT 2002


Hello,

This looks like a bug, so I'm posting my report here.

I'm getting this nasty error:

	/usr/home/billh/javasrc_1_3_scsl/hotspot1.3.1/src/share/vm/memory/markSweep.cpp: In
	   static member function `static void MarkSweep::mark_sweep_phase1(jint&, long 
	   int)':
	/usr/home/billh/javasrc_1_3_scsl/hotspot1.3.1/src/share/vm/memory/markSweep.cpp:573: call
	   of overloaded `TraceTime(char[8], bool)' is ambiguous
	/usr/home/billh/javasrc_1_3_scsl/hotspot1.3.1/src/share/vm/runtime/timer.hpp:64: candidates
	   are: TraceTime::TraceTime(const char*, elapsedTimer*, long int = v_true, 
	   long int = v_false)
	/usr/home/billh/javasrc_1_3_scsl/hotspot1.3.1/src/share/vm/runtime/timer.hpp:63: 
	                  TraceTime::TraceTime(const char*, long int = v_true)
	/usr/home/billh/javasrc_1_3_scsl/hotspot1.3.1/src/share/vm/memory/markSweep.cpp: In
	   static member function `static void MarkSweep::mark_sweep_phase2()':

from this code:

	TraceTime tm("phase 2", (bool) PrintGC && Verbose);

with these class function definitions:

	TraceTime(const char* title, bool doit = true);
	TraceTime(const char* title, elapsedTimer* accumulator, bool doit = true, bool verbose = false);

What's going on here ?

bill



More information about the Gcc-bugs mailing list