[cfe-commits] [patch] Falling off main() returns zero
Douglas Gregor
dgregor at apple.com
Mon Jul 27 13:34:49 PDT 2009
On Jul 27, 2009, at 12:38 PM, Fariborz Jahanian wrote:
>
> On Jul 27, 2009, at 12:22 PM, Mike Stump wrote:
>
>> On Jul 27, 2009, at 12:11 PM, Fariborz Jahanian wrote:
>>> Code gen. Should not enforce language rules. This need to go into
>>> AST
>>> build.
>>
>> I like it in CG. :-)
>
> Then make sure that rewriter, PCH, ... all do likewise. ASTs should be
> complete when they get to theirs clients.
I tend to agree with Fariborz... we're pretty careful about handling
all of the language semantics as part of AST construction, so that
CodeGen does not need to interpret language standards. It would be
better to have Sema create an implicit ReturnStmt at the end of main
(), adding an Implicit bit to ReturnStmt so that clients can determine
whether the return was implicit.
- Doug
More information about the cfe-commits
mailing list