Re: fxsrintrin.h

2016-08-19 Thread Segher Boessenkool
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

Re: fxsrintrin.h

2016-08-19 Thread Jonathan Wakely
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

Re: fxsrintrin.h

2016-08-18 Thread Jakub Jelinek
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

Re: fxsrintrin.h

2016-08-18 Thread David Wohlferd
Best regards, lh_mouse 2016-08-19 - 发件人:David Wohlferd 发送日期:2016-08-19 11:51 收件人:gcc@gcc.gnu.org 抄送: 主题:fxsrintrin.h According to the docs (https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html), __builtin_ia32_fxsave() has return type 'void.'

Re: fxsrintrin.h

2016-08-18 Thread lhmouse
@gcc.gnu.org 抄送: 主题:fxsrintrin.h According to the docs (https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html), __builtin_ia32_fxsave() has return type 'void.' Given that, does this code (from gcc/config/i386/fxsrintrin.h) make sense? _fxsave (void *__P) {

fxsrintrin.h

2016-08-18 Thread David Wohlferd
According to the docs (https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html), __builtin_ia32_fxsave() has return type 'void.' Given that, does this code (from gcc/config/i386/fxsrintrin.h) make sense? _fxsave (void *__P) { return __builtin_ia32_f