This is the mail archive of the gcc@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: libgcc_s, Linux, and PT_GNU_EH_FRAME, and binutils


On Tue, Aug 06, 2002 at 11:18:49AM -0700, Mark Mitchell wrote:
> The real oddity here is that "long long : 64" is aligned more strictly
> than "long long" by the C compiler.

By *which* C compiler?  Yes, gcc 3.2 aligns a long long bitfield
to 64-bit, but egcs 2.91 certainly does not.

	struct s
	{
	  int a;
	  long long : 64;
	  int b;
	};

	main()
	{
	  struct s s;
	  printf("%ld\n", &s.b - &s.a);
	  return 0;
	}

Yields:

	egcs 1.1.2	3
	gcc 2.95.3	3
	gcc 2.96-108	4
	gcc 3.0.3	4
	gcc 3.2		4

So what do we do?  Personally I'm for fixing the bug.


r~


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