Using GCC to compile C code, GCC automatically generate .h.gch
files.
Question
How do I suppress this?
I came here looking for an answer to the same problem. I found an answer at another website. If you add the -fsyntax-only option to the compile line, no output files are generated.
gcc -fsyntax-only myheader.h
I purposefully compile .h files I'm working on to check for syntax errors. In this case generation of the .gch file is quite annoying since if the .h file is subsequently modified, and you don't recompile it (to generate a new .gch), then the old .gch file hides the newer .h file for subsequent .c/.cpp compilations (which can really be quite confusing...)
Now I guess you could write a dummy .c/.cpp file to include a new header that you've just written, and then compile that to test it out, but I'm way too lazy for such nonsense. The -fsyntax-only appears to be a much nicer solution.