Most modern PC C compilers are able to use forward-slash and back-slash interchangeably to avoid MacOS / Linux / Unix / Windows issues. Even the Microsoft compilers do a good job of tolerating either. The forward-slash is very likely used internally by the GCC compiler in the same way that you would use a back-slash.
The forward-slash is very likely used internally by the GCC compiler in the same way that you would use a back-slash.
I suspect that the compiler actually uses the path portion in the message to get to a directory, then looks for the named file (from the include statement). When that file doesn't exist the compiler generates an error message that contains the path and the file name. Rather than a bunch of #ifdef statements to assure that the slash goes the right direction for the OS that the code is running on, a forward slash was hard-coded in the error message display code.