I am trying to use gcc to essentially just check if a C++ program validly compiles without paying the cost of code generation. There is a very similar question here which suggests the -fsyntax-only flag.
This is very close to what I want, but unfortunately, apparently this will not instantiate templates which makes it unsuitable for my purposes.
Is there a way to convince gcc to go further, including all actions up to the actual code generation?