https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120326

            Bug ID: 120326
           Summary: problems with attribute __ms_struct__
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

struct {
  unsigned char a : 3;
  unsigned char b : 4;
  unsigned short c : 6
};
struct {
  unsigned char a : 3;
  unsigned char b : 4;
  unsigned short c : 6
} __attribute__((__ms_struct__));

lightly derived from clang/test/CodeGen/ms_struct-bitfield.c,
gcc does this:

foundBugs $ ../results/bin/gcc -c -w bug1100.c
foundBugs $ ../results/bin/gcc -c -w -g bug1100.c
bug1100.c:10:1: error: ‘TYPE_CANONICAL’ is not compatible
   10 | } __attribute__((__ms_struct__));
      | ^

Reply via email to