title: Force file to be compiled as C, using a directive from the file itself
body: <p>I have some old code files in my C++ project, that need to be compiled as C code - the entire codebase is set to compile as C++.
  I am using Visual Studio, but I'd rather avoid setting this per-file from the project properties, and would rather use some kind of <code>#pragma</code> directive (if possible).</p>
  <p>I have searched around, but found nothing, the closes I could think of is to add an <code>#ifdef</code>, that checks for <code>__cplusplus</code> and fails if does so.</p>
  <p>Basically I am looking for a way to inject the <a href="https://docs.microsoft.com/lt-lt/cpp/build/reference/tc-tp-tc-tp-specify-source-file-type?view=msvc-170&amp;viewFallbackFrom=vs-2017" rel="nofollow noreferrer">/Tc, /Tp, /TC, /TP (Specify Source File Type)</a> commands from the source.</p>