Compiler incorrectly issues error message when it sees a designated initializer used for a union nested inside a structure

XMLWordPrintable

    • Type: Bug
    • Resolution: Known Issue
    • Priority: High
    • Code Generation Tools
    • CODEGEN-1523
    • Hide
      ARM_15.12.3.LTS
       ARM_16.9.0.LTS
      Show
      ARM_15.12.3.LTS  ARM_16.9.0.LTS
    • Hide
      Wrap the designator specifying the member in the anonymous union with braces. In the test case given:

      test_struct_t t3 = {
          .f1 = 0,
          .f2 = 0,
          .s1 = {
              .s1_f1 = 0,
              .s1_f2 = 0,
              .s1_f3 = 0, }, };

      Becomes

      test_struct_t t3 = {
          .f1 = 0,
          .f2 = 0,
          {.s1 = {
              .s1_f1 = 0,
              .s1_f2 = 0,
              .s1_f3 = 0, }, } };
      Show
      Wrap the designator specifying the member in the anonymous union with braces. In the test case given: test_struct_t t3 = {     .f1 = 0,     .f2 = 0,     .s1 = {         .s1_f1 = 0,         .s1_f2 = 0,         .s1_f3 = 0, }, }; Becomes test_struct_t t3 = {     .f1 = 0,     .f2 = 0,     {.s1 = {         .s1_f1 = 0,         .s1_f2 = 0,         .s1_f3 = 0, }, } };
    • This language feature is an extension added to GCC in version 4.6 to support an extension in either the Plan9 or Microsoft compi...

      Compiler incorrectly issues error message when it sees a designated initializer used for a union nested inside a structure

            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-637 - Compiler incorrectly issues error m...
                SYNCHRONIZED
                • Last Sync Date: