The code is ANSI C Yes, ANSI, you're allowed to declare main() like that in ANSI C but not in C++. The includes for C++ usually don't keep the .h suffix.

In terms of warnings I'd append -Wall to my flags as a general good practice.