Commit 28e6bb5c authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Legitimized compiler option '-F' (bug 547876)



Change-Id: I3d44ca0eb15b64f3d754cce162ff2ac086dd4a52
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 3f856f6b
......@@ -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).
......
......@@ -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"
......
......@@ -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:
......
......@@ -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).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment