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] Additional features for -fms-extensions



On Oct 30, 2004, at 12:39 PM, Schönbeck, Andreas wrote:


/*
  Results:

GCC (3.4.2):
test8.cxx:xx: error: cannot bind packed field `a.A::field2' to `int&'


*/

#include <unistd.h>

struct A
{
  char field1;
  int field2;
} __attribute__((packed));

void test(int& value)
{
}

int main()
{
  A a;

test(a.field2);

  return 0;
}

The reason why this error is here because the code will not work


-- Pinski


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