diff --git a/compiler2/compiler.1 b/compiler2/compiler.1 index bc6392264e7d124bef327fdab395866db2d1cc82..4a8b86caee35670d3af6aff9459cf4dbeb243000 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 "[\| " \-abcdDeEfgiIjlLMnNpqrRsStuwxXyY0 " \|]" +.RB "[\| " \-abcdDeEfFgiIjlLMnNpqrRsStuwxXyY0 " \|]" .RB "[\| " \-V .IR " verb_level" " \|]" .RB "[\| " \-J @@ -104,6 +104,9 @@ Forces the compiler to .I overwrite the output files even if they exist or are unchanged. .TP +.B \-F +Forces the compiler to generate the full C++ classes for records of/sets of basic types (i.e. boolean, integer, float, bitstring, hexstring, octetstring, charstring and unversal charstring). Otherwise only type aliases to pre-generated classes are generated for these types. This also disables the type compatibility between records of/sets of basic types in the Load Test Runtime. +.TP .B \-g The compiler error/warning messages will contain only the starting line number and column, in a format compatible with th GNU compiler (gcc). diff --git a/compiler2/main.cc b/compiler2/main.cc index 9ff9f62d2ec4f1ccb7e41118136ee395af41e9d5..e98ab289290a780780b3698c2b8a0a10fa6668c7 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 [-abcdDeEfgiIjlLMnNOpqrRsStuwxXyY0] [-J file] [-K file] [-z file] [-V verb_level]\n" + "usage: %s [-abcdDeEfFgiIjlLMnNOpqrRsStuwxXyY0] [-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" @@ -411,6 +411,7 @@ static void usage() " -e: enforce legacy handling of 'encode' and 'variant' attributes\n" " -E: display only warnings for unrecognized encoding variants\n" " -f: force overwriting of output files\n" + " -F: force generation of records of/sets of basic types and remove their compatibility\n" " -g: emulate GCC error/warning message format\n" " -i: use only line numbers in error/warning messages\n" " -I: enable real-time testing features\n" diff --git a/usrguide/referenceguide/4-ttcn3_language_extensions.adoc b/usrguide/referenceguide/4-ttcn3_language_extensions.adoc index 101e016f889d6e45975d8d060343198c5605166f..649bba736e4cad21bcb75565dfe79c10e5530093 100644 --- a/usrguide/referenceguide/4-ttcn3_language_extensions.adoc +++ b/usrguide/referenceguide/4-ttcn3_language_extensions.adoc @@ -8314,6 +8314,7 @@ while (f_fill_array(v_roi[sizeof(v_roi)], v_val)) { // and its sizeof would return 4 ---- +[[compatibility_of_record_of_types]] === Compatibility of record of types In the Function Test runtime `record of` and `set of` types of the same element type are compatible with each other. In the Load Test runtime this is only true for the following (TTCN-3) element types: diff --git a/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc b/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc index 74a5760bf8be82a942cfb6fb059145e381780f7d..dbb2b1ba32a5147d09f3d328b1ddced6ce23a8b4 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 [ -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 … ] +compiler [ -abBcdDeEfFgiIjlLMnNOpqrRstuwxXyY0 ] [ -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 @@ -104,6 +104,14 @@ Instructs the variant attribute parser to display warnings instead of errors for + Forces the compiler to overwrite (update) the output files even if they exist or the contents of them will be identical. Without this flag the output {cpp} header and source files will be overwritten only if their contents change compared to the previous version. +* `-F` ++ +Forces the compiler to generate the full {cpp} classes for `records of`/`sets of` basic types (i.e. `boolean`, `integer`, `float`, `bitstring`, `hexstring`, `octetstring`, `charstring` and `unversal charstring`). Otherwise only type aliases to pre-generated classes are generated for these types. This also disables the type compatibility between `records of`/`sets of` basic types in the Load Test Runtime (see <<4-ttcn3_language_extensions.adoc#compatibility_of_record_of_types>>). ++ +As of compiler version /5 R3A (5.3.pl0) the {cpp} classes for the mentioned `record of`/`set of` types are pre-generated, and are part of the runtime library. Before that they were generated into the {cpp} code the same as for other structured types. This command line option is mostly a legacy behavior switch, however the classes generated with this option are not identical to the classes generated with the old behavior (the new classes contain all codecs and the code needed to handle any possible coding instructions, not just the ones specified for the type). ++ +This option is used internally for pre-generating the mentioned {cpp} classes. + * `-g` + The compiler error/warning messages will contain the starting line number, and the starting column number if available. This option provides compatibility with the GNU compiler and many tools which are able to interpret its output (including Eclipse).