Skip to content
Snippets Groups Projects
Commit 446e13cd authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Legitimized hidden compiler option '-0' (bug 545308)


Change-Id: I2d5ba950928982896ac185e26bbcd1337bef8011
Signed-off-by: default avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 58f742e6
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
compiler \- TTCN-3 and ASN.1 to C++ translator
.SH SYNOPSIS
.B compiler
.RB "[\| " \-abcdDeEfgiIjlLMnNpqrRsStuwxXyY " \|]"
.RB "[\| " \-abcdDeEfgiIjlLMnNpqrRsStuwxXyY0 " \|]"
.RB "[\| " \-V
.IR " verb_level" " \|]"
.RB "[\| " \-J
......@@ -349,6 +349,14 @@ Enables profiling and code coverage in the selected TTCN-3 files. The
.I file
argument contains a list of TTCN-3 files separated by new lines. Each TTCN-3 file must be among the compiler's TTCN-3 file arguments.
.TP
.B \-0
Disables attribute checks for
.I encvalue
and
.I decvalue.
Must be used together with option
.I \-s.
.TP
.B \-
The single dash character as command line argument controls the
.I selective code generation
......
......@@ -395,7 +395,7 @@ static boolean is_valid_asn1_filename(const char* file_name)
static void usage()
{
fprintf(stderr, "\n"
"usage: %s [-abcdDeEfgiIjlLMnNOpqrRsStuwxXyY] [-J file] [-K file] [-z file] [-V verb_level]\n"
"usage: %s [-abcdDeEfgiIjlLMnNOpqrRsStuwxXyY0] [-J file] [-K file] [-z file] [-V verb_level]\n"
" [-o dir] [-U none|type|'number'] [-P modulename.top_level_pdu_name] [-Q number] ...\n"
" [-T] module.ttcn [-A] module.asn ...\n"
" or %s -v\n"
......@@ -442,6 +442,7 @@ static void usage()
" -y: disable subtype checking\n"
" -Y: enforce legacy behaviour for \"out\" function parameters (see refguide)\n"
" -z file: enable profiling and code coverage for the TTCN-3 files in the argument\n"
" -0: disable attribute checks for `encvalue' and `decvalue'\n"
" -T file: force interpretation of file as TTCN-3 module\n"
" -A file: force interpretation of file as ASN.1 module\n"
" -v: show version\n"
......@@ -844,7 +845,7 @@ int main(int argc, char *argv[])
bflag || fflag || iflag || lflag || oflag || pflag || qflag ||
rflag || sflag || tflag || uflag || wflag || xflag || Xflag || Rflag ||
Uflag || yflag || Kflag || jflag || zflag || Fflag || Mflag || Eflag ||
nflag || Bflag || Dflag || eflag || Oflag || Iflag) {
nflag || Bflag || Dflag || eflag || Oflag || Iflag || s0flag) {
errflag = true;
print_usage = true;
}
......@@ -877,6 +878,10 @@ int main(int argc, char *argv[])
output_dir);
errflag = true;
}
if (s0flag && !sflag) {
ERROR("Option `-0' requires option `-s'");
errflag = true;
}
if (file_list_file_name != NULL) {
FILE *fp = fopen(file_list_file_name, "r");
......
......@@ -18,7 +18,7 @@ The program compiler resides in the directory `$TTCN3_DIR/bin`.
The command line syntax of the compiler is the following:
[source]
compiler [ -abBcdDeEfgiIjlLMnNOpqrRstuwxXyY ] [ -J file ] [ -K file ] [ -z file ] [ -N old|new ][ -o dir ] [ -V n ] [ -P toplevel pdu ] [ -Qn ] [ -U none|type|"number" ] …[ -T ] module.ttcn [ -A ] module.asn … [ - module.ttcn module.asn … ]
compiler [ -abBcdDeEfgiIjlLMnNOpqrRstuwxXyY0 ] [ -J file ] [ -K file ] [ -z file ] [ -N old|new ][ -o dir ] [ -V n ] [ -P toplevel pdu ] [ -Qn ] [ -U none|type|"number" ] …[ -T ] module.ttcn [ -A ] module.asn … [ - module.ttcn module.asn … ]
or
......@@ -284,6 +284,10 @@ Enforces legacy behaviour for "out" function parameters ("out" parameters will n
+
Enables code coverage and profiling in the TTCN-3 files listed in the `file` argument. The TTCN-3 files in the list must be separated by new lines and must also appear among the compiler’s arguments.
* `-0`
+
Disables attribute checks for `encvalue` and `decvalue`. Must be used together with option `-s`.
* `-`
+
The single dash character as command line argument has a special meaning: it controls the selective code generation. After the list of all TTCN–3 and ASN.1 modules a subset of these files can be given separated by a dash. This option instructs the compiler to parse all modules, perform the semantic analysis on the entire module hierarchy, but generate code only for those modules that are listed after the dash again. It is not allowed to specify a file name after the dash that was not present in the list before the dash. If the single dash is not present in the command line the compiler will generate code for all modules.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment