It doesn't have to give a warning (and rarely will... usually you will get an error or nothing). It might work 100% perfectly because one of your other includes might include the header that declares that function. The standard allows the compiler to be flexible with these things, it's just up to you to be vigilant.