On Wed, May 16, 2012 at 05:15:18PM +0200, Smets, Jan (Jan) wrote:
> test.c:8: Error: Return statement with a value in function returning void
> Error in doStatement (Errormsg.Error)
> Error: Cabs2cil had some errors
> 
> I think CIL should not warn in this example. 

I understand why gcc accepts it, but this is invalid C99 code and I prefer to
keep CIL that way in this regard.  One of the changes introduced by C99 is:
> A return statement with an expression shall not appear in a function whose
> return type is void. A return statement without an expression shall only 
> appear
> in a function whose return type is void.
(6.8.6.4 The return statement)

Best regards,
-- 
Gabriel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to