IBM Support

IV84210: CANNOT COMPILE DESIGNATED INITIALIZERS

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The following test case issues an unexpected error message:
    
    ===== COMPILE COMMAND:
    xlc test.c
    
    ===== TESTCASE:
    $ cat test.c
    /* Designated initializers for aggregate types */
    #include <stdint.h>
    
    struct smb2_handle {
      uint64_t data[2];
    };
    union smb_handle {
      struct smb2_handle handle;
    };
    struct smb2_ioctl_in {
      union smb_handle file;
    };
    
    int main(int argc, char **argv) {
      struct smb2_handle h = (struct smb2_handle) { .data = { } };
      struct smb2_ioctl_in iotclin = (struct smb2_ioctl_in) {
        .file.handle = h
      };
      return 0;
    }
    $
    
    
    ===== ACTUAL OUTPUT:
    $ xlc test.c
    "test.c", line 17.20: 1506-196 (S) Initialization between types
    "unsigned long long" and "struct smb2_handle" is not allowed.
    $
    
    
    ===== EXPECTED OUTPUT:
    Should compile clean
    

Local fix

  • N/A
    

Problem summary

  • USERS AFFECTED:
    Clients who use a designated initializer with a struct or union
    that has another struct or union as a its member maybe affected
    by this issue.
    
    PROBLEM DESCRIPTION:
    The C frontend assigns a wrong value at this case.
    

Problem conclusion

  • The compiler has been fixed
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV84210

  • Reported component name

    XL C FOR AIX

  • Reported component ID

    5725C7100

  • Reported release

    D13

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-05-02

  • Closed date

    2016-06-10

  • Last modified date

    2016-06-10

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels

  • RD13 PSY

       UP



Document information

More support for: XL C for AIX
Compiler

Software version: D13

Reference #: IV84210

Modified date: 10 June 2016