C Code Review Compiler - crccc

Purpose

The C Code Review Compiler compiles C source files for code review static analysis. It produces an .xob output file, which must be linked by using the C Code Review Linker crcld.

Syntax

crccc <source> <xob> <def> <opp> [<options>]

where:

  • <source> is the C source file under analysis

  • <xob> is the name of the generated object file

  • <def> is the standard definitions file. This file is searched in the $ATLTGT directory.

  • <opp> is the parser options file. This file is searched in the $ATLTGT directory.

Description

Analyses the code and produces an .xob object file for use with the C Code Review Linker (crcld).

Options

Command line options can be abbreviated to their shortest unambiguous number of characters and are not case-sensitive.

[-RULE= <file>]

Specifies the code review rule configuration file. By default, a default internal configuration rule set is used

[-INCL= <directory>{[,<directory>]}]

Specifies the locations of included files.

[-STD_INCL= <directory>[,<directory>]]

Specifies the location of additional system include directories.

[-CHECKSYSINCLUDE]

By default, files from system include directories are not analyzed by Code Review. Use this options to force the analysis of system include files.

[-DEFINE= <ident>[ = <value>] {[, <ident>[ = <value>]}]

This option specifies conditions to be applied when the Code Review Compiler starts. These conditions allow you to define C symbols that apply conditions to the generation of any IF ... ELSE ... END IF blocks in the test script.

If the option is used with one of the conditions specified in the IF instruction, the IF ... ELSE block (if ELSE is present) or the ELSE ... END IF block (if ELSE is not present) is analyzed and generated. The ELSE ... END IF block is eliminated.

If the option is not used or if none of the conditions specified in the IF instruction are satisfied, the ELSE ... END IF block is analyzed and generated.

All symbols defined by this option are equivalent to the following line in C

-define <ident> [<value>]

By default, the ELSE ... END IF blocks are analyzed and generated.

[-UNDEF= <identifier>[, <identifier>]]

Allows you to undefine symbols. This is equivalent to the -U option of the compiler.

Example

crccc mysource.c output.xob atus_c.def atl.opp

-rule=$TESTRT_DIR/plugins/Common/lib/confrule.xml

Related Topics

Code review overview | Running a code review | C Code Review Linker - crcld