A bit more experimentation showed me this is only happening when visual studio 2013 is set as the default compiler, or if the default compiler is changed after opening the file. ( C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC ). Should the compiler be even doing anything when a file is opened?
This also happens on windows 7 as well as 10, but opens normally with the tdm-gcc compiler.