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

            Bug ID: 97854
           Summary: [11 regression] ODR violation in stub-objc.c
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: objc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org
  Target Milestone: ---

stub-objc provides dummy RID enum which causes ODR violation.
This produces warnings with lto-bootstrap:

../../gcc/c-family/c-common.h:63: warning: type ‘rid’ violates the C++ One
Definition Rule [-Wodr]
   63 | enum rid
      |
../../gcc/c-family/stub-objc.c:30: note: an enum with different value name is
defined in another translation unit
   30 | enum rid { DUMMY };
      |
../../gcc/c-family/c-common.h:67: note: name ‘RID_STATIC’ differs from name
‘DUMMY’ defined in another translation unit
   67 |   RID_STATIC = 0,
      |
../../gcc/c-family/stub-objc.c:30: note: mismatching definition
   30 | enum rid { DUMMY };
      |
../../gcc/c-family/c-common.h:63: warning: type ‘rid’ violates the C++ One
Definition Rule [-Wodr]
   63 | enum rid
      |
../../gcc/c-family/stub-objc.c:30: note: an enum with different value name is
defined in another translation unit
   30 | enum rid { DUMMY };
      |
../../gcc/c-family/c-common.h:67: note: name ‘RID_STATIC’ differs from name
‘DUMMY’ defined in another translation unit
   67 |   RID_STATIC = 0,
      |
../../gcc/c-family/stub-objc.c:30: note: mismatching definition
   30 | enum rid { DUMMY };
      |

I think this was introduced in g:9a34a5cce6b50fc3527e7c7ab356808ed435883c

Reply via email to