It's most likely you forgot -std=c++0x .
My Mingw version of gcc is 4.6.1/4.7.1, both support nullptr well.
According to description in "The c++ standard library, a tutorial and reference, 2nd", nullptr is a keyword, can automatically convert to each pointer type but not integer type, this overcome the drawback of NULL, which is ambiguous to the following overload function:
void f(int );
void f(void *);
f(NULL); // Ambiguous
f(nullptr); // OK
Test this feature in VC2010 shows that the MSDN document conflicts with the actual compiler, the document said:
The nullptr keyword is not a type and is not supported for use with:
sizeof
typeid
throw nullptr
Actually in VC2010, all of the above operator/expression is legal. sizeof(nullptr) result 4. typeid.name() result std::nullptr_t, and throw nullptr can be caught by "const void *" and "void *"(and other pointer types).
While gcc(4.7.1) looks more rigid about nullptr, throw nullptr cannot be caught by "void *", can be caught by '...'