next up previous contents
Next: Phases underneath tcc Up: Invocation Previous: Invocation   Contents


Usage

tcc $[$-c$]$ $[$-d $\ldots]$ $[$-E$]$ $[$-i default_interface$]$ $[$-l location_file$]$ $[$-n$]$ $[$-q$]$ $[$-r$]$ $[$-w$]$ $[$-W$[$no$]$condition$]$ $[$-O$[$no$]$option$]$ $[$-x element:ext_target $\ldots]$ $[$-t $[$no$]$target $\ldots]$ $[$-u var_use_file$]$ $[$-Xphase,argument$]$ $[$cpp_option$]$ $[$file$]$

tcc -V

-c
only check validity of input, don't build a configuration. If requested, the location file and the variable use file are also generated when using -c
-d
increase debugging level
-E
only run cpp, and send its output to standard output. This is useful for separately running files through cpp, while using the default includes added by tcc.
-i default_interface
interface to use if none is specified in the description file. See section 4.1 for further details.
-l location_file
write a list of source code locations of traffic control elements to the specified file. See section 5.3.1 for details. Using the special file name stderr sends the output to standard error.
-n
do not include default.tc. By default, tcc includes this file, which in turn includes the files described in section 2.13. This can be undesirable, e.g. if operating in a non-TCP/IP context, or if using a different default include file with application-specific definitions. In the latter case, the following options should be used:
tcc $\ldots$ -n $\ldots$ -Xp,--include -Xp,/directory/file $\ldots$
-O$[$no$]$option
enable or disable the specified optimization. The following optimizations are recognized:
cse
common subexpression elimination
ne
turn != into multiple ==s
prefix
generate prefix matches instead of bit tests
By default, all optimizations except cse are turned off.
-q
quiet, produce terse output
-r
remove old queuing disciplines before adding new ones (tc only)
-t $[$elem:$][$no$]$target $\ldots$
enable or disable target (see section 5.2). The only element currently supported is if. Supported targets are all, tc (default), c, and ext. The -t options can be repeated to enable or disable multiple targets.
-u var_use_file
for each variable, write its name and value to the specified file. See section 5.3.2 for details. Using the special file name stderr sends the output to standard error.
-V
print version number and exit
-w
suppress all warnings
-W$[$no$]$condition
enable or disable issuing a warning message on the specified condition. The following conditions are recognized:
constpfx
warn if using the / (mask) operator on a constant IPv4 or IPv6 address, as in ip_src == 1.2.3.0/24, which should probably be ip_src/24 == 1.2.3.0
expensive
generate warnings when encountering ``expensive'' constructs in if classifier. A construct is considered ``expensive'' if processing it may take tcc an unusual amount of time. Operations like negation, certain tests for non-equality, or static classification that follows metering, are ``expensive''.

Because expensive may be overly pessimistic, exppostopt should be used whenever possible.

experror
turns warnings from expensive or exppostopt into fatal errors. Setting experror without also setting expensive or exppostopt has no effect.
explicit
warn if a class if explicitly specified for the inner queuing discipline of dsmark, egress, or ingress
exppostopt
like expensive, but test for ``expensive'' constructs after trying to optimize the expression, which may eliminate some apparently expensive constructs. exppostopt can only indicate in which if classifier the expression occurred, not in which selector of that classifier. expensive has no effect if exppostopt is set.

Note that neither expensive nor exppostopt are useful when using nocombine (see sectionbarriers).

redefine
warn if re-defining variables
truncate
warn if truncating values, e.g. when converting a floating-point number to an integer
unused
report unused variables
By default, all warnings except explicit and unused are turned off.
-x element:ext_target $\ldots$
register external target (see section 5.2). The -x option can be repeated to register multiple external targets.
-Xphase,argument
verbatim argument for specific build phase. See section 5.1.2 for details.
cpp_option
one of the following options for the C pre-processor: -Idir, -Dname$[$=value$]$, or -Uname

tcc also recognizes a number of undocumented options, such as -B and -N. These options usually enable experimental features, like alternative algorithms for processing if expressions, and they are not recommended for normal use of tcc. Changes to undocumented options are mentioned in tcng's change log (file CHANGES).


next up previous contents
Next: Phases underneath tcc Up: Invocation Previous: Invocation   Contents
Martin A. Brown 2003-11-06