On Fri, Aug 19, 2016 at 08:45:49AM +0200, Jakub Jelinek wrote:
> On Fri, Aug 19, 2016 at 01:50:52PM +0800, lhmouse wrote:
> > Given the `_fxsave()` function returning `void`, it is invalid C but valid
> > C++:
>
> It is also a GNU C extension.
And GCC warns with -Wpedantic (but not without). It
On 19 August 2016 at 07:29, David Wohlferd wrote:
> Interesting. Seems slightly strange, but I've seen stranger. I guess it's
> seen as "cleaner" than forcing this into 2 statements.
That's not the reason for the C++ rule. It's that you don't
necessarily know what the return type is, e.g.
templ
On Fri, Aug 19, 2016 at 01:50:52PM +0800, lhmouse wrote:
> Given the `_fxsave()` function returning `void`, it is invalid C but valid
> C++:
It is also a GNU C extension.
Jakub
Interesting. Seems slightly strange, but I've seen stranger. I guess
it's seen as "cleaner" than forcing this into 2 statements.
IAC, it seems wrong for headers, since they can be used from either C or
C++. Also, seems unnecessary here, since 'return' is implied by the
fact that the 'next'
Given the `_fxsave()` function returning `void`, it is invalid C but valid C++:
# WG14 N1256 (C99) / N1570 (C11)
6.8.6.4 The return statement
Constraints
1 A return statement with an expression shall not appear in a function
whose return type is void. ...
# WG21 N1804 (C++03)
6.6.3 The return sta