Dominique, what I said was that it is undefined behaviour in C++ to return a *value* in a void function. That is still true.
On Mon, Feb 11, 2019 at 2:49 PM Dominique Devienne <[email protected]> wrote: > On Mon, Feb 11, 2019 at 1:11 PM Clemens Ladisch <[email protected]> > wrote: > > > Peter da Silva wrote: > > > I am pretty sure that the code is not legal C > > > > Indeed; C99 and C11 say in 6.3.2.2: > > | The (nonexistent) value of a void expression (an expression that has > > | type void) shall not be used in any way [...] > > and in 6.8.6.4: > > | A return statement with an expression shall not appear in a function > > | whose return type is void. > > > > Good to know. Thanks. I was merely pointing out that the OP's > "in C++ this is undefined behaviour" wasn't always true. --DD > _______________________________________________ > sqlite-users mailing list > [email protected] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

