https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68427
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- OK, the problem is a bug in your code, not GCC. Your StdIO.h file has this header guard: #ifndef _STDIO_H_ #define _STDIO_H_ That clashes with the name of the header guard in /usr/include/stdio.h so the contents of your StdIO.h are ignored if <stdio.h> has already been included You should not be using a name like _STDIO_H_ in your code, all names starting with _[A-Z_] are reserved for the implementation, for any purpose. Defining a macro with that name results in undefined behaviour, meaning your code is not valid ANSI C and is not valid ISO C++. So you need to fix your header.