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

John McCall rjmccall at apple.com
Mon Jul 27 16:33:06 PDT 2009


Fariborz Jahanian wrote:
> On Jul 27, 2009, at 3:33 PM, Daniel Dunbar wrote:
>
>   
>> I think what Fariborz was asking for was to actually modify the AST
>> for main to return 0, change the type, etc.
>>     
>
> No. I just wanted AST to carry the info. somehow, so clients do not
> deduce this based on target language. An analogy being that
> we put enough info. in the ASTs for synthesized ivars so clients can  
> do this.
>   

So would something like Eli's suggestion be sufficient --- i.e. just 
changing the triggering condition on my original patch to some sort of 
AST-hosted "has well-defined implicit return" predicate, which would 
currently just defer to isMain()?  I've been experimenting with 
synthesizing return statements, and it feels like that would be a much 
more intrusive change for clients.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090727/c24e8bd3/attachment.html>


More information about the cfe-commits mailing list