diff --git a/compiler2/Type.cc b/compiler2/Type.cc index 10acf4423f797b8a0bae30fc38ab1fca9cf1d9b9..0f0221295106f10e5d01a265c1206df2e9ad1542 100644 --- a/compiler2/Type.cc +++ b/compiler2/Type.cc @@ -3112,14 +3112,22 @@ namespace Common { err = true; } break; - case T_INT: + case T_INT: { + boolean first_digit = false; // there's at least one digit for (size_t i = (dval[0] == '-') ? 1 : 0; i < dval_len; ++i) { if (dval[i] < '0' || dval[i] > '9') { err = true; break; // from the loop } + else { + first_digit = true; + } } - break; + if (!first_digit) { + // empty value or just a '-' + err = true; + } + break; } case T_REAL: { if (strcmp(dval, "infinity") == 0 || strcmp(dval, "-infinity") == 0 || strcmp(dval, "not_a_number") == 0) { diff --git a/regression_test/templateRecof/TmultiplePermutations.ttcn b/regression_test/templateRecof/TmultiplePermutations.ttcn index e4e900fa4b254929923e1b90a9cb8450594304a3..2795960670d2a2922b38580bb0ed1829f1c8914c 100644 --- a/regression_test/templateRecof/TmultiplePermutations.ttcn +++ b/regression_test/templateRecof/TmultiplePermutations.ttcn @@ -1,15 +1,15 @@ /****************************************************************************** - * Copyright (c) 2000-2019 Ericsson Telecom AB - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html - * - * Contributors: - * Balasko, Jeno - * Baranyi, Botond - * - ******************************************************************************/ +* Copyright (c) 2000-2019 Ericsson Telecom AB +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v2.0 +* which accompanies this distribution, and is available at +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html +* +* Contributors: +* Balasko, Jeno +* Baranyi, Botond +* +******************************************************************************/ // Test cases for TR HQ19911: // Adding multiple permutations to the same template variable, testing if permutation data is // cleared properly between commands diff --git a/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc b/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc index dbb2b1ba32a5147d09f3d328b1ddced6ce23a8b4..47ee1d286e018c8b672637f2b8289460cd446d18 100644 --- a/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc +++ b/usrguide/referenceguide/6-compiling_ttcn3_and_asn1_modules.adoc @@ -401,7 +401,7 @@ Create the makefile with library as the default target. The name of the generate * `-m` + -Always use `makedepend` for dependencies. By default, for makefiles used by GNU `make`, the compiler (usually GCC) is used to generate dependency information in an incremental fashion. This switch reverts to the process for generic make tools, which uses the `makedepend` tool. +Always use `makedepend` for dependencies. By default, for makefiles used by GNU `make`, the compiler (usually GCC) is used to generate dependency information in an incremental fashion. This switch reverts to the process for generic make tools, which use the `makedepend` tool. This switch has no effect if switch `-g` (GNU make) is not set. * `-M` +