> On Feb 11, 2019, at 6:33 AM, Peter da Silva <res...@gmail.com> wrote:
> 
> I am pretty sure that the code is not legal C because it's using the return
> value of a void function, as well as returning a value from a void
> function. Compilers that "do what I mean" and accept it are in error. It's
> certainly possible that some obscure clause in some C standard blesses it
> but I can't imagine why they would.

I would need to dig through the relevant Standards to confirm, but my memory 
was that C++ added this feature to help with templates (you might have a 
template where the return value was templates on type, so return <void 
expression> was a logical possibility). C did not need this, so didn’t adopt it 
(though possible some later version did for compatibility).

Many C Compilers are also C++.Compilers and often accept code that uses 
features of one language that aren’t in the other as an extension, generating a 
warning only if a ‘be fussy’ flag is set. (Few compilers are fully conforming 
to the Standard by default).

Even if this was adopted by C in some later Standard, the use of this syntax 
would be a needless requirement for a much later version of the Standard than 
would otherwise be needed.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to