Anonymous struct in union causes type merging failure at -O4

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-2143
    • Hide
      ARM_15.12.0.LTS
       C2000_15.12.0.LTS
      Show
      ARM_15.12.0.LTS  C2000_15.12.0.LTS
    • Hide
      MSP430_15.12.6.LTS
       ARM_15.12.6.LTS
      Show
      MSP430_15.12.6.LTS  ARM_15.12.6.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.
      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.

      Anonymous struct in union causes type merging failure at -O4

            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-851 - Anonymous struct in union causes ty...
                SYNCHRONIZED
                • Last Sync Date: