Re: Manipulating bit fields is behaving inconsistently

2016-02-19 Thread Joseph Myers
On Fri, 19 Feb 2016, Wink Saville wrote: > The two links in msg00156.html point to single emails and the > formatting is odd, such as in 13560.txt: > > i =3D =5FGeneric(st.bf, > > Is there a way to look at the actual email thread using a browser or > some other means? I'm not aware of any WG1

Re: Manipulating bit fields is behaving inconsistently

2016-02-19 Thread Wink Saville
The two links in msg00156.html point to single emails and the formatting is odd, such as in 13560.txt: i =3D =5FGeneric(st.bf, Is there a way to look at the actual email thread using a browser or some other means? On Fri, Feb 19, 2016 at 9:30 AM, Joseph Myers wrote: > See the references I ga

Re: Manipulating bit fields is behaving inconsistently

2016-02-19 Thread Joseph Myers
See the references I gave in . -- Joseph S. Myers jos...@codesourcery.com

Re: Manipulating bit fields is behaving inconsistently

2016-02-19 Thread Richard Biener
On Fri, Feb 19, 2016 at 12:43 PM, Wink Saville wrote: > What is the process for a patch with a new option to allow a different > behavior? Write one (with testcases), test it and then post it here for review. Richard.

Re: Manipulating bit fields is behaving inconsistently

2016-02-19 Thread Wink Saville
What is the process for a patch with a new option to allow a different behavior?

Re: Manipulating bit fields is behaving inconsistently

2016-02-19 Thread Richard Biener
On Fri, Feb 19, 2016 at 12:14 PM, Wink Saville wrote: > Can you point me to previous discussions, or maybe some search terms? I'm > curious about the rationale for the odd behavior. I don't remember discussions about a specific decision how to implement the GCC extension but I remember when fixin

Re: Manipulating bit fields is behaving inconsistently

2016-02-19 Thread Richard Biener
On Thu, Feb 18, 2016 at 5:31 PM, Wink Saville wrote: > You've convinced me that this isn't a bug, but I assume you'd agree > its weird at best. I tested it with clang and it works as I'd expect: > > $ make > clang -x c -m64 -O3 -Wall -o test.o -c test.c > objdump -d test.o > test.txt > clang -m64

Re: Manipulating bit fields is behaving inconsistently

2016-02-18 Thread Wink Saville
You've convinced me that this isn't a bug, but I assume you'd agree its weird at best. I tested it with clang and it works as I'd expect: $ make clang -x c -m64 -O3 -Wall -o test.o -c test.c objdump -d test.o > test.txt clang -m64 -O3 -Wall test.o -o test wink@wink-desktop:~/prgs/large_fields_are_

Re: Manipulating bit fields is behaving inconsistently

2016-02-18 Thread Bernd Edlinger
Hi, > struct fields { > long long unsigned f0:12; > long long unsigned f1:52; > } __attribute__((__packed__)); the C99 standard ISO/IEC 9899 forbids this type: 6.7.2.1 Structure and union specifiers 4 A bit-field shall have a type that is a qualified or unqualified version of _Bool, signed

Manipulating bit fields is behaving inconsistently

2016-02-17 Thread Wink Saville
When I shift a bit field in an expression small bit fields behave one way and large bit fields another. I'm using gcc 5.3.0 on Arch Linux: $ gcc --version gcc (GCC) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO wa