Incompatible redeclaration error with -o4 when using anonymous unions

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-4605
    • Hide
      PRU_2.2.0
       C6000_8.2.0
       C6000_8.1.0B1
      Show
      PRU_2.2.0  C6000_8.2.0  C6000_8.1.0B1
    • Hide
      C6000_8.1.7
       MSP430_16.9.8.LTS
       ARM_16.9.8.LTS
      Show
      C6000_8.1.7  MSP430_16.9.8.LTS  ARM_16.9.8.LTS
    • Do not use anonymous structs or unions; give all struct members a name, even if it is never used.
    • Hide
      Anonymous structs and unions are a GCC extension. They are members of a parent structure and have no names. You access the elements inside them as if they were direct members of the parent class. If you have an anonymous struct or union inside a union and you use -O4 optimization, you may get the mistaken error "symbol so-and-so redeclared with incompatible type" at link time. This bug can only happen in COFF mode.

      Essentially the same bug was previously fixed for EABI and was known as CODEGEN-1191.
      Show
      Anonymous structs and unions are a GCC extension. They are members of a parent structure and have no names. You access the elements inside them as if they were direct members of the parent class. If you have an anonymous struct or union inside a union and you use -O4 optimization, you may get the mistaken error "symbol so-and-so redeclared with incompatible type" at link time. This bug can only happen in COFF mode. Essentially the same bug was previously fixed for EABI and was known as CODEGEN-1191.

      Incompatible redeclaration error with -o4 when using anonymous unions

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-1366 - Incompatible redeclaration error wi...
                SYNCHRONIZED
                • Last Sync Date: