-fno-constraints


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@405 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/asn1c/asn1c.1 b/asn1c/asn1c.1
index 359724b..7ac0015 100644
--- a/asn1c/asn1c.1
+++ b/asn1c/asn1c.1
@@ -22,7 +22,7 @@
 .TP
 \fILanguage Options\fR
 .br
-\fB\-fall-defs-global \-fbless-SIZE \-fnative-types \-funnamed-unions \-ftypes88\fR
+\fB\-fall-defs-global \-fbless-SIZE \-fnative-types \-fno-constraints \-funnamed-unions \-ftypes88\fR
 .TP
 \fIOutput Options\fR
 .br
@@ -82,6 +82,9 @@
 Use the native machine's data types (int, double) whenever possible,
 instead of the compound ASN.1 INTEGER_t, ENUMERATED_t and REAL_t types.
 .TP
+.B \-fno-constraints
+Do not generate ASN.1 subtype constraint checking code. This may make a shorter executable.
+.TP
 .B \-funnamed-unions
 Enable unnamed unions in the definitions of target language's structures.
 .TP
diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c
index 8c3a7e5..ad0cab4 100644
--- a/asn1c/asn1c.c
+++ b/asn1c/asn1c.c
@@ -91,6 +91,8 @@
 			asn1_compiler_flags |= A1C_USE_NATIVE_TYPES;
 		} else if(strcmp(optarg, "native-types") == 0) {
 			asn1_compiler_flags |= A1C_USE_NATIVE_TYPES;
+		} else if(strcmp(optarg, "no-constraints") == 0) {
+			asn1_compiler_flags |= A1C_NO_CONSTRAINTS;
 		} else if(strcmp(optarg, "unnamed-unions") == 0) {
 			asn1_compiler_flags |= A1C_UNNAMED_UNIONS;
 		} else if(strcmp(optarg, "types88") == 0) {
@@ -309,6 +311,7 @@
 "  -fbless-SIZE          Allow SIZE() constraint for INTEGER etc (non-std.)\n"
 "  -fknown-extern-type=<name>    Pretend this type is known\n"
 "  -fnative-types        Use \"int\" instead of INTEGER_t whenever possible\n"
+"  -fno-constraints      Do not generate constraint checking code\n"
 "  -funnamed-unions      Enable unnamed unions in structures\n"
 "  -ftypes88             Use only ASN.1:1988 embedded types\n"
 "\n"
diff --git a/doc/asn1c-usage.lyx b/doc/asn1c-usage.lyx
index 03d8a97..b146744 100644
--- a/doc/asn1c-usage.lyx
+++ b/doc/asn1c-usage.lyx
@@ -1315,7 +1315,7 @@
 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="20" columns="2">
+<lyxtabular version="3" rows="21" columns="2">
 <features>
 <column alignment="left" valignment="top" leftline="true" width="0">
 <column alignment="block" valignment="top" leftline="true" rightline="true" width="3in">
@@ -1646,6 +1646,25 @@
 
 \layout Standard
 
+-fno-constraints
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Do not generate ASN.1 subtype constraint checking code.
+ This may make a shorter executable.
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
 -funnamed-unions
 \end_inset 
 </cell>
diff --git a/doc/asn1c-usage.pdf b/doc/asn1c-usage.pdf
index 85b3108..85ce3b0 100644
--- a/doc/asn1c-usage.pdf
+++ b/doc/asn1c-usage.pdf
Binary files differ