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

Eli Friedman eli.friedman at gmail.com
Mon Jul 27 15:18:56 PDT 2009

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.)


More information about the cfe-commits mailing list