That function is not pure, it writes to error. When marked as pure, the compiler is allowed to assume it does not do anything to error, so it can remain NULL, which would result in an invalid read in print_error().