   MSVC2008 optimizer crashing (just fun trivia)
  This is not a crucial problem (eg it can be very easily circumvented). But still... :D. The following code causes the optimizer to crash for me. Can anyone replicate this (pretty much for the heck of it)? Any comments on this?struct _lolnode { };class lol{    _lolnode *lolnode;    _lolnode* operator()();    _lolnode* GetNode();};_lolnode* lol::GetNode() { return (*this)(); } // <- THIS LINE HERE_lolnode* lol::operator()() { return lolnode; }edit: fixed typos (should be operator()(), not operator() )   
  Maybe I'm just incoherent for lack of my morning coffee, but doesn't your () operator lead to infinite recursion?   ;Quote:Original post by ApochPiQMaybe I'm just incoherent for lack of my morning coffee, but doesn't your () operator lead to infinite recursion?Oopsie - fixed it. That's what you get when writing code casually in a forum post :D   ;  Works fine for me. Can you actually reproduce the crash with that snippet of code, or is the actual situation more complex?   ;  It's a bit more complex - I'm guarding the function. Otherwise the situation is quite similar. I've noticed the VC compiler has a tendency to crash - in most cases it's a one-time thing (eg the problem goes away when I re-compile the module), but certain code can on rare occasions cause it to choke on itself. Like I mentioned, it's trivial to circumvent this so I'm not concerned. I was simply wondering if it's my code or if the problem was more universal. Guess I have my answer there :).EDIT: funny - I can't reproduce the problem anymore. Neither when I use the above code directly nor when I add guards to it... It was crashing pretty consistently on me just a few minutes ago...   ;  Are you sure that your computer is 100% stable?Any overclock or overheating problems?I've got similar (random compile errors) with gcc in the past when my pc was not stable.;  Yup - it's stable, for all intents and purposes. I can't recall if I've used 2008 on XP, but it might possibly be a Vista thing. In most cases there's no real harm in the compiler crashing since it very rarely does so consistently (in fact, I believe this was the second time - the first time being an odd problem without an apparent explanation just like this one) due to generating some unknown internal error. All I have to do is press Ctrl+Shift+B again and it always ends up linking just fine.   ;  Are you running the latest Service Pack? My experience is that most of these go away after you update. So you might, or might not, want to update! ;)   ;  I run Vista x64 with VC++ 2008 and the linker crashes quite frequently. It's not a problem since hitting F7 again fixes it, but still. I think it's releated to incremental linking somehow.   