[cfe-commits] [LLVMdev] clang errors on void main()
John McCall
rjmccall at apple.com
Mon Feb 13 16:38:24 PST 2012
On Feb 11, 2012, at 7:31 AM, Vasiliy Korchagin wrote:
> I agree, without setting implicit return zero bit changes in codegen are not necessary. New version of patch is attached.
This check has nothing to do with C99. You should be checking for "has GNU extensions" and "is not C++", i.e.
getLangOptions().GNU && !getLangOptions().CPlusPlus
Also, please have CheckMain just set hasImplicitReturnZero() as appropriate and then make actOnFinishFunctionBody disable fall-through checking when that bit is set.
John.
More information about the cfe-commits
mailing list