IBM Support

IV95419: -P CAUSING DRIVER TO INSERT #PRAGMA TLS INTO PREPROCESSED FILE

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When compiling with -P, the resulting xlc_r driver seems to
    insert #pragma tls into the source code.
    
    When compiling the .i file, the xlc_r compiler then complains
    that  #pragma tls is not supported.
    
    ===== COMPILE COMMAND:
    xlc_r -P test.c
    xlc_r test.i
    
    ===== TESTCASE:
    $ cat test.c
    #include <stdio.h>
    
    int main(int argc, char *args[])
    {
        printf("Hello, world!\n");
        return 0;
    }
    $
    
    
    ===== ACTUAL OUTPUT:
    $ /opt/IBM/xlc/13.1.3/bin/xlc_r test.i
    "test.i", line 2.1: 1506-865 (W) The pragma tls is not
    supported.
    "test.i", line 1325.1: 1506-865 (W) The pragma tls is not
    supported.
    $
    
    ===== EXPECTED OUTPUT:
    The #pragma tls should not be inserted and we shouldn't be
    issuing the warning messages.
    

Local fix

  • N/a
    

Problem summary

  • USERS AFFECTED:
    Users that perprocess C source with -P option on AIX maybe
    affected by this issue.
    
    PROBLEM DESCRIPTION:
    The C preprocessor on AIX is emitting #pragma tls in the
    preprocessed output
    when using -P option which causes a warning message when the
    preprocessed code is compiled.
    

Problem conclusion

  • The C preprocessor is changed to not emit #pragma tls with -P
    option.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV95419

  • 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

    2017-04-26

  • Closed date

    2017-04-27

  • Last modified date

    2017-04-27

  • 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 #: IV95419

Modified date: 27 April 2017