1 .\" Please adjust this date whenever revising the manpage.
9 .Op Fl c | S | E | -print-ast
10 .Op Fl std= Ns Ar standard
11 .Op Fl - Ns Oo Cm no- Oc Ns Cm gcc
12 .Op Fl - Ns Oo Cm no- Oc Ns Cm ms
15 .Op Fl W Ns Oo Cm no- Oc Ns Ar warn
19 .Op Fl D Ns Ar macro Ns Op Ar =defn
29 is a C compiler, which can parse C90 and C99 as well as many GCC and some MSC extensions.
30 It also provides many useful analyses for warnings and generates concise messages in case of error.
31 It uses libFIRM for optimization and code generation.
32 The compiler driver is largely compatible with GCC.
36 Compile the input files to object files.
37 The default output filename is the input filename with the extension replaced by .o.
39 Compile the input files to assembler.
40 The default output filename is the input filename with the extension replaced by .s.
42 Preprocess the input file only.
43 By default the result is output to stdout.
45 Output the abstract syntax tree of the parsed input file as C again.
46 .It Fl std= Ns Ar standard
47 Select the language standard.
49 .Bl -tag -compact -width "iso9899:1990"
54 ISO C90 with GCC extensions
59 ISO C99 with GCC extensions
64 ISO C++ 1998 with GCC extensions.
67 .It Fl - Ns Oo Cm no- Oc Ns Cm gcc
68 Disable/enable GCC extensions.
69 This switch supersedes
71 .It Fl - Ns Oo Cm no- Oc Ns Cm ms
72 Disable/enable MSC extensions.
74 When compiling C files, add debug information in
79 Select the optimization level.
80 Sensible values are between 0 and 4, inclusive.
81 .It Fl W Ns Oo Cm no- Oc Ns Ar warn
83 Disable/enable a specific warning.
84 Every warning option has a corresponding
86 switch to deactivate it.
88 Warn about suspicious use of addresses, like using the address of a function or variable as boolean condition or comparing with the address of a string literal.
90 Activate most warnings.
91 In particular these are
94 .Fl Wchar-subscripts ,
96 .Fl Wempty-statement ,
98 .Fl Wimplicit-function-declaration ,
104 .Fl Wredundant-decls ,
108 .Fl Wstrict-prototypes ,
110 .Fl Wunknown-pragmas ,
111 .Fl Wunreachable-code ,
112 .Fl Wunused-function ,
114 .Fl Wunused-parameter ,
116 .Fl Wunused-variable .
117 .It Fl Wdeclaration-after-statement
118 Warn about mixing declarations and statements, which is not allowed prior to C99.
119 .It Fl Wempty-statement
120 Warn about empty statements, i.e. statements which only consist of a single ';'.
121 Use {} as replacement to avoid this warning.
123 Treat warnings as errors, i.e. abort compilation when a warning is encountered.
125 Activate some more warnings.
126 In particular these are
127 .Fl Wempty-statement ,
128 .Fl Wunused-parameter ,
131 Check format strings of char and wchar_t functions.
134 .Fl Wimplicit-function-declaration ,
136 .It Fl Wimplicit-function-declaration
137 Warn about calling a function without a prior declaration.
139 Warn about declarations whose declaration specifiers do not include a type specifier.
140 .It Fl Wredundant-decls
141 Warn about redundant declarations, i.e. multiple declarations of the same object or static forward declarations which have no use before their definition.
142 .It Fl Wunreachable-code
143 Warn when the compiler determines that a statement (or in some cases a part thereof) will never be executed.
146 .Fl Wunused-function ,
148 .Fl Wunused-parameter ,
150 .Fl Wunused-variable .
151 .It Fl Wunused-parameter
152 Warn when a parameter is never used or only ever read to calculate its own new value, e.g. x = x + 1.
153 .It Fl Wunused-variable
154 Warn when a variable is never used or only ever read to calculate its own new value, e.g. x = x + 1.
156 Suppress all warnings.
160 to the paths to be searched for include files.
164 to the paths to be searched for libraries.
166 Define the preprocessor macro
168 which will expand to 1.
169 .It Fl D Ns Ar macro=defn
170 Define the preprocessor macro
172 and set its expanded value to
175 Undefine the preprocessor macro
178 Set a frontend or optimizer option.
181 to get a list of supported optimizer options.
183 Set a backend option.
186 to get a list of supported options.
188 Link with the specified library.
190 Specify the output filename.
191 This is only valid when using a single input filename.
193 as filename uses stdout for output.
195 Overwrite the language auto-detection for the following filenames by the
198 Supported values are:
199 .Bl -tag -compact -width "assembler-with-cpp"
202 .It Cm assembler-with-cpp
203 Assembler file, which needs to be preprocessed
211 Revert to auto-detection
216 http://www.libfirm.org/
218 Probably many - if you hit one, please report it.
221 needs to support more switches for better GCC compatibility.
227 .Aq matze@braunis.de ,
229 .Aq christoph.mallon@gmx.de