[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [csmith-bugs] missing return with --check-global
Hi Chucky,
Didn't know you were hanging out on this list :-)
> main is not required to have a return statement in at least c99 and later.
> (n1256 5.1.2.2.3:1) "... reaching the } that terminates the main function
> returns a value of 0."
Well, CompCert C has saner semantics and requires that all non-void
functions return something. I hope we will all agree that it is
terrible style not to do this...
> I'm excited to hear you are working on an interpreter!
At the moment it's still a fun hack, but I've been pleasantly
surprised already at how effective it is to animate a small-step
transition semantics like CompCert C's.
Cheers,
- Xavier