Re: bitfield types

2017-11-14 Thread Joseph Myers
On Tue, 14 Nov 2017, Mike Stump wrote: > The testsuite/gcc.c-torture/execute/pr34971.c seems wrong to me. The > type of the expression x.b << 8 has size 8, a size 8 integral type is a > 64-bit type. If the result is a 64-bit type, then it's argument (x.b) > was a 64-bit type. In C++, we obse

bitfield types

2017-11-14 Thread Mike Stump
The testsuite/gcc.c-torture/execute/pr34971.c seems wrong to me. The type of the expression x.b << 8 has size 8, a size 8 integral type is a 64-bit type. If the result is a 64-bit type, then it's argument (x.b) was a 64-bit type. In C++, we observed what they meant in the C language standard

Re: potential bug in libstc++ ?

2017-11-14 Thread Jonathan Wakely
On 14 November 2017 at 14:35, Sergey Nenakhov wrote: > Hello. > > Excuse me if I'm posting to the wrong mailing list. libstdc++ has its own mailing list (which Richard CC'd). > I've grabbed gcc-7.2.0 > sources and noticed strange statement in the file > gcc-7.2.0\libstdc++-v3\include\bits\locale_

Re: potential bug in libstc++ ?

2017-11-14 Thread Richard Biener
On Tue, Nov 14, 2017 at 3:35 PM, Sergey Nenakhov wrote: > Hello. > > Excuse me if I'm posting to the wrong mailing list. I've grabbed gcc-7.2.0 > sources and noticed strange statement in the file > gcc-7.2.0\libstdc++-v3\include\bits\locale_conv.h which seems like a bug > to me: > Line 434 and 43

potential bug in libstc++ ?

2017-11-14 Thread Sergey Nenakhov
Hello. Excuse me if I'm posting to the wrong mailing list. I've grabbed gcc-7.2.0 sources and noticed strange statement in the file gcc-7.2.0\libstdc++-v3\include\bits\locale_conv.h which seems like a bug to me: Line 434 and 434 of that file are: if (__nbytes < 1) __nbytes == 1; Should