How to crash your compiler

An unusual link from me, but this thread in the OGRE forum is great: Shortest way to crash the Visual Studio compiler. Best find so far:

enum{}(

Didn't know there were so many and simple ways to make the compiler crash. Great :)

three comments, already:

omg i’m going to try this!
Virion () (link) - 31 10 08 - 20:40

Today I was crashing VS2005 because I didn’t dispose of a timer properly. I’d open the control in the designer and then close it, only to have the IDE crash a few seconds later. When the timer event was triggered after I had closed the designer a null exception got thrown and killed Visual Studio.
Michael - 01 11 08 - 04:45

works as expected on GCC for me, no crash:


  1. cat test.cpp


enum{}(


  1. gcc -o test test.cpp
    test.cpp:1: error: expected unqualified-id at end of input
    test.cpp:1: error: expected `)’ at end of input
    Gothi[c] - 01 11 08 - 15:28


    Name:  
    Remember personal info?
    yes
    no
    Email (optional):
    URL (optional):
    Enter "layered" (antispam):
    Comment:Emoticons / Textile

      ( Register your username / Log in )

    Notify: Yes, send me email when someone replies.  

    Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
    Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.