This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix pr23046


     > It seems like that's defining what an overflow would do when assigning
     > to a bitfield.  But isn't that undefined too?

     No.  Neither is a copy from unsigned long to unsigned char.  It's
     the same thing.

Oh, right.  I forgot about the unsigned case.  But what about the signed case?

If you have

	struct foo {int a:2;} b;

	b.a = 25;

isn't that undefined?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]