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
Internal Compiler Error with VS 2003
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Re: Internal Compiler Error with VS 2003
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
--Chris
-
Topic authort00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Internal Compiler Error with VS 2003
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
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) )
(Graphical interface: menu>Help>(search something that says updates or something like that) )
-
Topic authort00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Internal Compiler Error with VS 2003
duds26 wrote:You could check if there are updates for your VS 2003 or do you already have the latest version?
Of course.
Fridger