Page 1 of 1

Internal Compiler Error with VS 2003

Posted: 10.08.2008, 18:07
by t00fri
For the first time, I get an internal compiler error with my VS 2003 compiler and latest Rev. 4404.

It happens in parseobject.cpp :

This line

if (planetData->getVector("LongLat", longlat) && system != NULL)

gives

c:\Develop\celestia\src\celengine\parseobject.cpp(765): fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2708)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information


It's gone if I modify the line into

if (planetData->getVector("LongLat", longlat) )

and everything builds and runs fine. So what would be a workaround to make things continue to run with VS2003 ??

Fridger

Re: Internal Compiler Error with VS 2003

Posted: 12.08.2008, 00:22
by chris
This is a bug in VC2003. But, there's also an error in the code, albeit an innocuous one. The function ParseObject used to take a parameter called system, but this parameter is no longer necessary. The test for system != NULL should have been removed when the function was changed. Ordinarily, the compiler would generate an error if a function tried to reference a non-existent variable. But, there's a C library function named system so the code continues to build. Since the system function is always defined, the expression system != NULL will always return true, making it completely extraneous and confusing. It shouldn't trigger an internal compiler error, but whatever . . . In this case, your modification is both a workaround for the compiler bug and what the code is *supposed* to look like. Please check in the change.

--Chris

Re: Internal Compiler Error with VS 2003

Posted: 12.08.2008, 16:41
by t00fri
chris wrote:This is a bug in VC2003. But, there's also an error in the code, albeit an innocuous one. The function ParseObject used to take a parameter called system, but this parameter is no longer necessary. The test for system != NULL should have been removed when the function was changed. Ordinarily, the compiler would generate an error if a function tried to reference a non-existent variable. But, there's a C library function named system so the code continues to build. Since the system function is always defined, the expression system != NULL will always return true, making it completely extraneous and confusing. It shouldn't trigger an internal compiler error, but whatever . . . In this case, your modification is both a workaround for the compiler bug and what the code is *supposed* to look like. Please check in the change.

--Chris

Done!

Now it's revision 4406.

Fridger

Re: Internal Compiler Error with VS 2003

Posted: 09.11.2008, 11:30
by duds26
You could check if there are updates for your VS 2003 or do you already have the latest version?
(Graphical interface: menu>Help>(search something that says updates or something like that) )

Re: Internal Compiler Error with VS 2003

Posted: 09.11.2008, 12:21
by t00fri
duds26 wrote:You could check if there are updates for your VS 2003 or do you already have the latest version?

Of course. ;-)

Fridger