Is there a way to check to see if GCC uses the precompiled header or not?
Also, I generate pch.h.gch file like this:
g++ -std=c++20 -Wall -O3 -flto pch.h -o pch.h.gch
But the generated file is always named as pch.h and without the .gch extension. Why is this happening? It used to automatically add the extension. But now it doesn't.
Edit: Another question is that, is it necessary to add an include guard (e.g. #pragma once) to the precompiled header?