Its not an error in some compiler but try compiling the same in GCC compiler and you should see at least a warning.