Re: VC++ Compiler issue




"Duke Yasuda" <duke.yasuda@xxxxxxxxxxx> skrev i meddelandet
news:%230hNzkTmFHA.1968@xxxxxxxxxxxxxxxxxxxxxxx
> Hello Bo,
>
> Thank you for your quick reply.
> I am using Visual Studio .NET 2003 Professional Version 7.1.
> My case might fit in "moderately complicated template code" that you
> mentioned.....
> In my code:
> // Variable declartion
> matrix<int,4,4> sqa;
> matrix<int,3,3> stau12=1,2,3,0,6,7,0,0,11;
> .
> .
> if( sqa.sub<3,3>(1,2).U() != stau12 ) // This is the line that
> compiler gave up on.

Looks somewhat complicated, but not that bad. :-)

VC6 would probably choke on a member template (sub<3,3> ?), but 7.1 is
much better.

> .
> .
> where matrix is an overloaded template class and too long to list in
> here.
>
> If you have any idea why the compiler is producing an error message,
> please let me know.

Not really. The line (2712) is not one of the usual suspects, meaning
not showing up on an MSDN search. Perhaps you knew that already.

So, I haven't run into this before, and MS hasn't listed it as a known
problem. If no one else around here have a better idea, you will
probably have to take the statement apart, to see if a simpler version
would compile.


Bo Persson



>
> Thanks.
>
> Duke
>
> "Bo Persson" <bop@xxxxxx> wrote in message
> news:uLpoG1FmFHA.1996@xxxxxxxxxxxxxxxxxxxxxxx
>>
>> "Duke Yasuda" <duke.yasuda@xxxxxxxxxxx> skrev i meddelandet
>> news:OII5j%23EmFHA.3688@xxxxxxxxxxxxxxxxxxxxxxx
>>> Hi,
>>>
>>> I don't know if this is the right place to post my question or
>>> not. If not, I apologize and appreciate it if you could lead me to
>>> the right newsgroup.
>>>
>>> I am trying to migrate a Linux project to a Windows project. It
>>> works fine with gcc3.2.x or above compiler.
>>> However, I get an error message:
>>>
>>>
>>> fatal error C1001: INTERNAL COMPILER ERROR
>>>
>>> (compiler file 'msc1.cpp', line 2712)
>>>
>>> Please choose the Technical Support command on the Visual
>>> C++
>>>
>>> Help menu, or open the Technical Support help file for
>>> more information
>>>
>>> I have searched KB, but there were no direct hit. I am using lots
>>> of template functions.
>>>
>>> Any help would be appreciated.
>>>
>>> Thanks in advance.
>>>
>>> Duke
>>
>> The compiler just gives up, beacuse it cannot make any sense of the
>> code.
>>
>> Could be lots of things, like some gcc extensions that the VC
>> compiler doesn't understand. Really old compilers, like VC6 :-),
>> also have some troubles compiling even moderately complicated
>> template code.
>>
>> Please tell us what version of VC++ you are using, and the code
>> lines around the point of failure. That usually helps!
>>
>>
>> Bo Persson
>>
>>
>>
>
>


.



Relevant Pages

  • Re: templates and inheritance
    ... > Put the template code in the header file, ... with Gnu Compiler 3.2.2 on a command line (side note, ... to my laptop, added the same line to the copy of my NewClass.cpp file, ...
    (alt.comp.lang.learn.c-cpp)
  • Re: How protect source code in template library?
    ... > prevent others from getting .cpp files. ... To instantiate template code for new data types, ... the compiler does need to see the template source code (which ... (while the way to call C-style functions is pretty much ...
    (comp.lang.cpp)
  • Re: templates and inheritance
    ... The compiler has declared them for you, as it must if they are ... instantiate them. ... Put the template code in the header file, ...
    (alt.comp.lang.learn.c-cpp)