GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CPARSER(1) FreeBSD General Commands Manual CPARSER(1)

cparser
C compiler

cparser [-c | -S | -E | --print-ast] [--print-implicit-cast] [--print-parenthesis] [-ansi] [-std=standard] [--[no-]gcc] [--[no-]ms] [-g] [-Olevel] [-W[no-][error=]warning] [-w] [-I dir] [-L dir] [-Dmacro[=defn]] [-Umacro] [-f option] [-finput-charset=encoding] [-b option] [-l library] [-o outfile] [-x language] [-Wl,option] [-Wp,option] file ...

cparser is a C compiler, which can parse C90 and C99 as well as many GCC and some MSC extensions. It also provides many useful analyses for warnings and generates concise messages in case of error. It uses libFIRM for optimization and code generation. The compiler driver is largely compatible with GCC.

Compile the input files to object files. The default output filename is the input filename with the extension replaced by .o.
Compile the input files to assembler. The default output filename is the input filename with the extension replaced by .s.
Preprocess the input file only. By default the result is output to stdout.
Output the abstract syntax tree of the parsed input file as C again.
When using --print-ast, show casts, which are inserted by the semantic checks.
When using --print-ast, show all expressions fully parenthesized.
Same as -std=c90 (for C) or -std=c++98 (for C++).
standard
Select the language standard. Supported values are:
 
 
ISO C90
ISO C90 with GCC extensions
 
ISO C99
ISO C99 with GCC extensions
 
ISO C11
ISO C11 with GCC extensions
ISO C++ 1998. Not supported yet.
ISO C++ 1998 with GCC extensions. Not supported yet.
[no-]gcc
Disable/enable GCC extensions. This switch supersedes -std.
[no-]ms
Disable/enable MSC extensions.
When compiling C files, add debug information in stabs format.
level
Select the optimization level. Sensible values are between 0 and 4, inclusive.
warning
Enable the specified warning.
warning
Disable the specified warning.
warning
Enable the specified warning and turn it into an error.
warning
Force the specified warning to only be a warning, even in the presence of -Werror. This neither enables nor disables the warning itself.
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.
Warn about defining or calling a function, which returns a struct or union by value.
Activate most warnings. In particular these are -Waddress, -Wattribute, -Wchar-subscripts, -Wcomment, -Wempty-statement, -Wformat, -Wimplicit-function-declaration, -Wimplicit-int, -Winit-self, -Wmain, -Wnonnull, -Wparentheses, -Wpointer-arith, -Wredundant-decls, -Wreturn-type, -Wshadow-local, -Wsign-compare, -Wstrict-prototypes, -Wswitch-enum, -Wunknown-pragmas, -Wunreachable-code, -Wunused-function, -Wunused-label, -Wunused-parameter, -Wunused-value, -Wunused-variable.
Warn whenever a pointer cast removes qualifiers from the pointed-to type, e.g. casting a const char* to char*.
Warn about using an expression of type char as array subscript, e.g. char c; arr[c].
Warn about mixing declarations and statements, which is not allowed prior to C99.
Warn about compile-time integer division by zero.
Warn about empty statements, i.e. statements which only consist of a single ‘;’. Use {} as replacement to avoid this warning.
Treat warnings as errors, i.e. do not continue after parsing when a warning is encountered.
(Alias -W) Activate some more warnings. In particular these are -Wempty-statement, -Wshadow, -Wunused-parameter, -Wunused-value.
Immediately abort compilation when encountering an error.
Check format strings of char and wchar_t functions.
Activate -Wimplicit-function-declaration, -Wimplicit-int.
Warn about calling a function without a prior declaration.
Warn about declarations whose declaration specifiers do not include a type specifier.
Warn about uninitialized variables which are initialized with themselves.
Warn if the type ‘long long’ is used.
Warn if the type of ‘main’ is suspicious, i.e. if it is not a non-static function declared as either int main(void), int main(int, char**) or, as an extension, int main(int, char**, char**).
Warn if a non-static function or a global variable without a storage class is defined without a prior declaration. This is typically a sign of a missing #include or that the object should be static.
Warn about functions, which are candidates for the attribute ‘noreturn’.
Warn if a global function is defined without a previous prototype declaration.
Warn if a multicharacter constant (‘FOOF’) is used.
Warn if an ‘extern’ declaration is encountered within a function.
Warn if parentheses are omitted in certain contexts. Warn if an assignment is used as condition, e.g. if (x = 23). Warn if && without parentheses is used within ||, e.g. if (x || y && z). Warn if it there may be confusion which ‘if’-statement an ‘else’-branch belongs to, e.g. if (x) if (y) {} else {}. Warn if cascaded comparisons appear which do not have their mathematical meaning, e.g. if (23 <= x < 42). Warn if + or - is used as operand of << or >>, e.g. x + y << z.
Warn about redundant declarations, i.e. multiple declarations of the same object or static forward declarations which have no use before their definition.
Warn when a new declaration shadows another declaration with the same name in an outer scope.
Like -Wshadow, but only warn if the shadowed declaration is not global, e.g. a local variable shadows a parameter or another local variable.
Warn when the compiler determines that a statement (or in some cases a part thereof) will never be executed.
Activate -Wunused-function, -Wunused-label, -Wunused-parameter, -Wunused-value, -Wunused-variable.
Warn when a parameter is never used or only ever read to calculate its own new value, e.g. x = x + 1.
Warn when a variable is never used or only ever read to calculate its own new value, e.g. x = x + 1.
Suppress all warnings.
dir
Add the directory dir to the paths to be searched for include files.
dir
Add the directory dir to the paths to be searched for libraries.
macro
Define the preprocessor macro macro which will expand to 1.
macro=defn
Define the preprocessor macro macro and set its expanded value to defn.
macro
Undefine the preprocessor macro macro.
option
Set a frontend or optimizer option. Use -fhelp to get a list of supported optimizer options.
[no-]diagnostics-show-option
Show the switch, which controls a warning, after each warning. Default is on.
encoding
Select the encoding of the input. Supported values are ISO_8859-1:1987 (aliases CP819, IBM819, ISO-8859-1, ISO8859-1, ISO_8859-1, csISOLatin1, iso-ir-100, l1 and latin1), ISO-8859-15 (aliases ISO8859-15, ISO_8859-15 and Latin-9), windows-1252 (alias cp1252) and UTF-8 (default). Case is ignored.
[no-]show-column
Show the column number in diagnostic messages.
Define ‘char’ to have the same range, representation and behaviour as ‘signed char’.
Define ‘char’ to have the same range, representation and behaviour as ‘unsigned char’.
option
Set a backend option. Use -bhelp to get a list of supported options.
library
Link with the specified library.
outfile
Specify the output filename. This is only valid when using a single input filename. - as filename uses stdout for output.
language
Overwrite the language auto-detection for the following filenames by the specified language. Supported values are:
Assembler file
Assembler file, which needs to be preprocessed
 
C file
 
C++ file
Revert to auto-detection
option
Pass option to the linker.
option
Pass option to the preprocessor.

gcc(1), http://www.libfirm.org/

Probably many - if you hit one, please report it.

cparser needs to support more switches for better GCC compatibility.

This manual page is incomplete.

cparser was written by Matthias Braun ⟨matze@braunis.de⟩, Christoph Mallon ⟨christoph.mallon@gmx.de⟩ and Michael Beck.
July 9, 2012

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.