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

Fariborz Jahanian fjahanian at apple.com
Mon Jul 27 12:11:57 PDT 2009


Code gen. Should not enforce language rules. This need to go into AST  
build.

- Fariborz

On Jul 27, 2009, at 12:07 PM, John McCall wrote:

> This patch implements the C/C++ requirement that falling off main  
> returns zero.  The easiest way to do this is to simply initialize  
> the return-value alloca to zero at the start of the function.
>
> This is a pretty obvious patch, but this is my first foray into  
> codegen, so maybe I'm doing this horridly wrong.
>
> John.
> <patch.txt>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list