serious: GCC 2.95.3 accepts illegal function call

Michael Noisternig michael.noisternig@sbg.ac.at
Fri Sep 7 11:22:00 GMT 2001


Check this:

--- begin code ---

typedef long long uint64;

uint64 calculate_cpu_timing_factors (unsigned int instr)
{
	// ...
}

uint64 calculate_cpu_timing()
{
	return calculate_cpu_timing(calculate_cpu_timing(10000)/1024);
}

--- end code ---

This piece of code is happily accepted by the compiler! Check it 'til
you find the error, it took me the whole day :-(((

Michael Noisternig.



More information about the Gcc-bugs mailing list