[Insight-developers] VS6 compiles and passes all tests

Sean McBride sean at rogue-research.com
Mon May 25 11:40:29 EDT 2009


On 5/24/09 7:55 AM, Bill Lorensen said:

>Also, on Friday, VS6 was the only compiler to generate a compilation
>error in 3 tests that all used the same incorrect C++. For example
>see:
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Review/
>Statistics/itkSampleTest2.cxx?root=Insight&r1=1.1&r2=1.2&sortby=date

That's disturbing, because gcc can warn about that type of thing:

--------
class Foo
{
	virtual void Clear()
	{
		return 6;
	}
};

int main (int argc, char * const argv[])
{
}
--------

$ g++ /Users/sean/Desktop/test.cxx 
/Users/sean/Desktop/test.cxx: In member function 'virtual void Foo::Clear()':
/Users/sean/Desktop/test.cxx:7: error: return-statement with a value, in
function returning 'void'

I didn't even need to pass any warning flags!

Was this really not caught by any other dashboard?

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the Insight-developers mailing list