void main


when I have a void main() I get this error:
'main' must return 'int'.

Is it possible to disable this? Of course it should be enabled by default
but for me it would be better if it can be disabled.


That's entirely non-standard. Why not just return 0?

I'm not using clang for standard purposes. Just as an embedded compiler.
If you have for example glsl they define void main() as the main entry
point (nehe.gamedev.net/data/articles/article.asp?article=21).

I want to do a similar thing and therefore want to switch off all
magic that is associated with main.

I already found

if (NewFD->isMain())

In SemaDecl.cpp. I only need to find where the isMain property gets


that's great: I only have to do
langOptions.Freestanding = 1;