class c {
};
c::c
{
🔒 Locked
Internal Compiler Error
Advertisement
Original Post
Microsoft Visual C++ 6.0 (maybe in others too) ------------------------- Internal Compiler Error means that the compiler had some type of runtime error while trying to parse and compile my code? It also sais at what line of what file the error occured. I don't understand this - how does it know what line in the file caused the error, and how is possible that this file is also a CPP file? The compiler is written in CPP? By the way, I tried to find the shortest expression that would cause this error. Here it is: class c{}c::c{ Or in a nicer form: It also happens if the constructor IS declared in the class.
Quote:
Internal Compiler Error means that the compiler had some type of runtime error while trying to parse and compile my code?
Yes.
Quote:
It also sais at what line of what file the error occured. I don't understand this - how does it know what line in the file caused the error, and how is possible that this file is also a CPP file? The compiler is written in CPP?
Yes, it probably is. It knows the file and line because it was built in a such a way as to record that information for potential debugging -- e.g., when users such as yourself stumble across an internal compiler error (which is usually a bug in the compiler), they report it to the vendor who can look for a way to fix it, starting with that file/line information.
VC++6 is a horrendously poor C++ compiler, having been released before the language itself was standardized. I suggest you upgrade; the Express editions of VS are free and vastly improved.
The code you posted is 100% illegal, it's not really surprising the compiler choked on it considering its an edge case and consider the age of the compiler.
I guess you might have used wrong brackets. The code should look like this:
class c{
};
c::c()
then You wont get an error. I thied this to be sure:
class c{
};
c::c{}
and that gives an INTERNAL COMPILER ERROR. Hope this is what You were looking for.
Huskey
EDIT: jpetrie, I agree about the V6.0, but I just compliled the code under it (still have that version apart from VS2005) and it works fine, so I guess the brackets were the problem.
class c{
};
c::c()
then You wont get an error. I thied this to be sure:
class c{
};
c::c{}
and that gives an INTERNAL COMPILER ERROR. Hope this is what You were looking for.
Huskey
EDIT: jpetrie, I agree about the V6.0, but I just compliled the code under it (still have that version apart from VS2005) and it works fine, so I guess the brackets were the problem.
Thanks for the fast replies. What I wanted to know is what caused those errors.
thanks jpetrie.
I did know that the code was illegal but the compiler should know to handle illegal code and inform the programmer of the syntax errors he has made. Imagine it would crash each time the code had an error...
One error like that would make this compiler so horrible?
And besides, I just like the enviroment and I'm used to it already for a long time.
99% of it is according to the standard and the remaining "non-standards" are things that are probably rarely used anyway.
If I get convinced that I need the better editions, I will definately purchase the best one I can.
EDIT:
I have the CD from about 1998, the time it was released. I kept installing it on every new Computer I bought, each couple of years.
Same goes for my MSDN, which is very "usefull" for learning Win32 API (It barely knows what is HWND).
thanks jpetrie.
I did know that the code was illegal but the compiler should know to handle illegal code and inform the programmer of the syntax errors he has made. Imagine it would crash each time the code had an error...
Quote:
VC++6 is a horrendously poor C++ compiler.
One error like that would make this compiler so horrible?
And besides, I just like the enviroment and I'm used to it already for a long time.
Quote:
released before the language itself was standardized.
99% of it is according to the standard and the remaining "non-standards" are things that are probably rarely used anyway.
Quote:
the Express editions of VS are free and vastly improved.
If I get convinced that I need the better editions, I will definately purchase the best one I can.
EDIT:
Quote:
It is downright confusing to me that people still find copies of VC6 to work on. These same people aren't using Windows 95 or Photoshop 5.0. Where did they get it?
I have the CD from about 1998, the time it was released. I kept installing it on every new Computer I bought, each couple of years.
Same goes for my MSDN, which is very "usefull" for learning Win32 API (It barely knows what is HWND).
Quote:
Original post by Sneftel
It is downright confusing to me that people still find copies of VC6 to work on. These same people aren't using Windows 95 or Photoshop 5.0. Where did they get it?
Well - I, f. ex., used it to work with Symbian C++ S80 because there were some good SDK for it. And I haven't done a format since then.
Wow - I just realised I haven't done a format&reinstall of my windows since... a year an a half now... I'm quite under impression that my windows still works :P
Quote:
Wow - I just realised I haven't done a format&reinstall of my windows since... a year an a half now... I'm quite under impression that my windows still works :P
I would say the same thing, If my windows hadn't suddenly refused to start up, after I accidently pushed the reset button with my thumb...
Quote:
One error like that would make this compiler so horrible?
No, but the fact that it is not really a C++ compiler makes it horrible.
What it compiles looks and feels vaguely like C++, but the moment you attempt to do anything remotely related to real, modern C++ with it, you will be out of luck. It has effectively zero support for templates, improper or incomplete support for scoping issues, proper name resolution and parsing, and dangerous subtle deviances -- particularly in the realm of things that should or should not cause undefined behavior.
Keep using it if you want, but you're not writing C++.
Quote:
99% of it is according to the standard
Visual Studio 8 is approaching 99% compliant. VC++ 6 is well below 50% compliant, if that. The better editions are free. The only reason you would avoid upgrading are if you are have a compelling need to maintain VC6 code -- and "I don't feel like making my code legal C++" is not a compelling reason; a compelling reason would be a major client who won't take an upgrade of that magnitude.
The problem with VC6 isn't that it "doesn't work", it's just that it sucks at the work it does. It's not standards compliant and it doesn't optimize nearly as well as modern compilers.
It's like if you're given the choice between having a FREE college accounting major to do your taxes or a FREE 10 year veteran accountant do your taxes, and you choose the college student.
I've you've never used newer versions of visual studio, you also are probably unaware of how VASTLY improved the interface is, including Intellisense, etc.
It's like if you're given the choice between having a FREE college accounting major to do your taxes or a FREE 10 year veteran accountant do your taxes, and you choose the college student.
I've you've never used newer versions of visual studio, you also are probably unaware of how VASTLY improved the interface is, including Intellisense, etc.
Quote:
Original post by smitty1276
I've you've never used newer versions of visual studio, you also are probably unaware of how VASTLY improved the interface is, including Intellisense, etc.
How very true! I also suggest moving to newer software. Don't have much exp with VS6.0, but I moved to VS2005 after I encountered a bug :P and couldn't go further with my code.
I don't know what you mean when you say it doesn't have support for template.
Everything I ever needed with templates, worked fine. What scoping issues are you talking about? It has some inaccuracies sometimes with name scopes but its very easy to adjust the code.
I don't know about the optimizations but in release mode I think everything is close to maximumly optimized.
Anyway, All those issues you say didn't stop companies from creating massive programs or games using this version, so I can't find a situation in which there will be a practicle side to these issues you say.
Everything I ever needed with templates, worked fine. What scoping issues are you talking about? It has some inaccuracies sometimes with name scopes but its very easy to adjust the code.
I don't know about the optimizations but in release mode I think everything is close to maximumly optimized.
Anyway, All those issues you say didn't stop companies from creating massive programs or games using this version, so I can't find a situation in which there will be a practicle side to these issues you say.
Quote:Just download it and try it, and all will be made clear to you. [grin]
Original post by UriKiller
I don't know what you mean when you say it doesn't have support for template ... What scoping issues are you talking about? ... I think everything is close to maximumly optimized.
Seriously... why the reluctance to use a compiler that isn't a decade old? When VC6 was released, the top-of-the-line Pentium processors were running like 266 MHz. The world has changed, and compilers have changed with it.
Quote:Try doing any sort of template metaprogramming and you'll have internal compiler errors coming out of your ears. It's not that it doesn't support templates, it's that it can't cope with more complicated templates.
Original post by UriKiller
I don't know what you mean when you say it doesn't have support for template.
Everything I ever needed with templates, worked fine.
Quote:Why should you have to adjust the code to account for a broken compiler? That's like saying "Yeah, it generates broken code sometimes, but that's ok; I can write some functions in asm".
Original post by UriKiller
What scoping issues are you talking about? It has some inaccuracies sometimes with name scopes but its very easy to adjust the code.
int i = 4;for(int i=0; i<10; ++i) {}// What do you think i is now? Try it in VC6 and a "correct" compiler.Quote:STL code in particular is really badly optimised, presumably because of the template usage.
Original post by UriKiller
I don't know about the optimizations but in release mode I think everything is close to maximumly optimized.
Quote:Yes, because 10 years ago it was (aruably) the best there was. Some embedded software and other "old" software only has support for VC6, and the libraries haven't been updated, so some companies are still stuck with VC6 for parts of code.
Original post by UriKiller
Anyway, All those issues you say didn't stop companies from creating massive programs or games using this version, so I can't find a situation in which there will be a practicle side to these issues you say.
The main thing that makes me steer clear of it is that under some circumstances it can generate completely broken code. As in, assembly that does not do what the C++ code does. That can cause all sorts of issues with debugging, security, and obscure problems you might never find.
I did see the newer compilers many times.
All I remember is that the compile took more time, and except the different enviroment all was the same.
About templates, I really don't want to get into metaprogramming, at least not in the project type that I am working on now. I don't use STL either. But in VC8 you say that STL is faster? It will always be slower than making things yourself.
All I remember is that the compile took more time, and except the different enviroment all was the same.
About templates, I really don't want to get into metaprogramming, at least not in the project type that I am working on now. I don't use STL either. But in VC8 you say that STL is faster? It will always be slower than making things yourself.
Quote:[lol][lol][lol]
Original post by UriKiller
It will always be slower than making things yourself.
Kid, you've got a lot to learn.
Visual C++ 6 is broken in so many ways. It doesn't even come close to following standard C++, which has gotten increasingly important over the years. It throws up Internal Compiler Error at practically the first sign of trouble. The optimizer barely works at all; check out the assembly generated for a simple for loop if you don't believe me. Its standard library is minimally functional at best. Modern libraries aren't compatible with it -- DirectX hasn't worked in VC6 for years. And in some situations, it generates outright wrong machine code for what the C++ is trying to do.
The vast majority of stupid advice about how to make C++ code faster was created by the years game developers spent with VC6. Using it is essentially taking a hack saw to your own legs.
[Edited by - Promit on August 7, 2007 1:13:07 PM]
Quote:We're talking about more than the "compiler". The newer IDEs are in another league. (Though a profiler would be nice in the newer ones... VC6 did a good job of profiling its non-compliant code for you).
Original post by UriKiller
I did see the newer compilers many times.
But if we're just talking about the compiler, there is nothing to discuss. VC6 is inferior by every standard.
Quote:
Original post by UriKiller
I don't know about the optimizations but in release mode I think everything is close to maximumly optimized.
Anyway, All those issues you say didn't stop companies from creating massive programs or games using this version, so I can't find a situation in which there will be a practicle side to these issues you say.
There is no such thing as maximumly optimized for compilers. Compiler technology is an evolving field and more and better optimizations usually gets added with every version. (does VC6 support named return value optimization for example?).
I'd be more worried about that fact that VC6 is such a horribly broken compiler with respect to its support of the language standard though.
Quote:
About templates, I really don't want to get into metaprogramming, at least not in the project type that I am working on now. I don't use STL either. But in VC8 you say that STL is faster? It will always be slower than making things yourself.
Then you are doing yourself a huge disservice. Templates are incredibly useful and implementing your own (fully tested etc) versions of STL's containers/algorithms etc is a *big* task, and its very likely that your code will end up slower. STL comes with the compiler, and you can bet the people who wrote it had more inside knowledge about how the code is handled in their compiler to make it speedy. (of course you *might* be able to do something faster for a specialized problem, but in the general case that STL targets its doubtful)
Lets not get into this though... do some searches on gamedev if you want argumentation, there are many threads about it.
Quote:Prove it. Seriously. You write a string class that can outperform the VC8 default std::string implementation in most tests, and I'l give you a cookie.
Original post by UriKiller
But in VC8 you say that STL is faster? It will always be slower than making things yourself.
The STL in VC8 (And indeed other compilers) has been written by people who have been writing C/C++ for years. Yes, there's some, very specific cases where you can squeeze a little more performance out by doing your own thing, but that's a different problem.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement