diff --git a/compiler2/compiler.1 b/compiler2/compiler.1 index dd9051efa61fbfff38cb768a788b1cc6613cacfa..855da355e5b5642e553d1c7f9f47a4541fb8b12a 100644 --- a/compiler2/compiler.1 +++ b/compiler2/compiler.1 @@ -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 diff --git a/compiler2/main.cc b/compiler2/main.cc index 4f81285f7f98ed4fcd7cc4eabf22ce0d8fcd36c6..8ab07b04af41e722285111ca1c98f58cf0f25365 100644 --- a/compiler2/main.cc +++ b/compiler2/main.cc @@ -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"); diff --git a/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc b/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc index cecbca391c9002ed4eac43c4beb110e6bde078b7..74a5760bf8be82a942cfb6fb059145e381780f7d 100644 --- a/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc +++ b/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc @@ -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.