[cfe-commits] [patch] Falling off main() returns zero

Daniel Dunbar daniel at zuster.org
Mon Jul 27 15:33:44 PDT 2009

I think what Fariborz was asking for was to actually modify the AST
for main to return 0, change the type, etc.

 - Daniel

On Mon, Jul 27, 2009 at 3:18 PM, Eli Friedman<eli.friedman at gmail.com> wrote:
> On Mon, Jul 27, 2009 at 2:54 PM, Daniel Dunbar<daniel at zuster.org> wrote:
>> My initial reaction was to agree with Mike, but I think I've come
>> around to believing it should be in the AST.
> How about just adding the following to FunctionDecl?
> bool hasImplicitReturnZero() { return isMain(); }
> (Yes, it looks slightly silly, but I don't see the need for something
> more complicated.)
> -Eli

More information about the cfe-commits mailing list