<div>Thanks, Chris.</div>
<div> </div>
<div>>Can this be implemented like __has_builtin is? <br></div>
<div>Oh, I totally missed this!  Yes, I'll redo it like this.<br></div>
<div>>This can be done by just not registering the 'magic' macros in no-extensions mode.</div>
<div> </div>
<div>How is no-extensions mode detected?  I was expecting a flag in LangOptions, but I don't see it, and there is no -fno-extensions option.  There is a -fbuiltin option and a NoBuiltin flag in LangOptions, but that seems to be for builtin functions, not preprocessor macros.  Or perhaps it needs adding?  I don't see an equivalent in gcc.  Or perhaps something more specific like "-fno-magic-macros=[0|1]" or "-fno-magic-macro=(macroname)"</div>

<div> </div>
<div>-John</div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br>