https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31763
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Joseph S. Myers from comment #2) > This is user error setting environment variables in a way that interferes > with the ordering of the compiler's internal directories. However, I'm > not sure if it's deliberate that the environment variables do not act > like -I options in this regard, or whether these settings should have been > ignored just like -I/usr/include is ignored. that is because C_INCLUDE_PATH is like isystem and not -I. And this is documented too: The remaining environment variables apply only when preprocessing the particular language indicated. Each specifies a list of directories to be searched as if specified with -isystem, but after any paths given with -isystem options on the command line.