W

Applies to C Applies to C++

Purpose

Passes the listed option to a designated compiler program.

Syntax


Syntax Diagram

where programs are:


program Description
a Assembler
b Compiler back end
c Compiler front end
I Interprocedural Analysis tool - compile phase
L Interprocedural Analysis tool - link phase
l linkage editor
p compiler preprocessor

Notes

When used in the configuration file, the -W option accepts the escape sequence backslash comma (\,) to represent a comma in the parameter string.

Examples

  1. To compile myprogram.c so that the option -pg is passed to the linkage editor (l) and the assembler (a), enter:
    xlc myprogram.c -Wl,-pg -Wa,-pg
    
  2. In a configuration file, use the \, sequence to represent the comma (,).
    -Wl\,-pg,-Wa\,-pg
    

Related References

Compiler Command Line Options IBM Copyright 2003