[C++ patch] typedef'd bitfields

Nathan Sidwell nathan@codesourcery.com
Tue Dec 18 02:37:00 GMT 2001


Hi,
Here's a patch to get bitfields via a non-explicitly signed typedef
to obey the ABI's bitfield signedness. Strange though it is that,

typedef int Int;
struct S {
	Int a : 1;		// might or might not be signed
};

Also tidies up some other bits of grokdeclarator.


built & tested on i686-pc-linux-gnu, ok?

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitfield-2.patch
Type: application/octet-stream
Size: 3597 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20011218/6ea60069/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitfield1.C
Type: application/octet-stream
Size: 596 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20011218/6ea60069/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitfield2.C
Type: application/octet-stream
Size: 595 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20011218/6ea60069/attachment-0002.obj>


More information about the Gcc-bugs mailing list