Other projects seem to take a more relaxed approach, violating the standard and making use of compiler-specific language extensions liberally and even unintentionally.
My C code to date has been firmly in the second camp. However, for an upcoming project I would like to be more disciplined and write only standard-compliant code (or only use extensions by choice, where they are both necessary and safe). This will improve the portability of my code and also its correctness - I hope to avoid repeating my recent experience of code silently failing to work due to a standard violation (in this case, of the definition of "constant expression" - see my Stack Overflow question [2]).
What tools/techniques would you recommend to avoid violating the ANSI C standard and to ensure I am writing strictly standard-compliant code?
[1] https://www.lua.org/
[2] http://stackoverflow.com/q/39917921/200783