aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-03-17 14:32:22 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2023-03-17 14:32:22 +0000
commit6bfb5eae96b65894da1301e966568fdf32bf64d0 (patch)
tree0dacc53835840ec2b54cd38d5a7ea5dc5bb9aaee
parent57688950b9328cbb4a9c21eb3199f9132b5119d3 (diff)
downloadgcc-6bfb5eae96b65894da1301e966568fdf32bf64d0.zip
gcc-6bfb5eae96b65894da1301e966568fdf32bf64d0.tar.gz
gcc-6bfb5eae96b65894da1301e966568fdf32bf64d0.tar.bz2
PR modula2/109032 - message 'compiler checks to force' is too complicated
Correct typos and improve the descriptions of command line options. Improve comments in gm2-gcc/m2expr.cc. gcc/m2/ChangeLog: PR modula2/109032 * gm2-gcc/m2expr.cc: Correct ? : order in comments. (m2expr_BuildDivM2): Improve comment. * lang.opt: Improve option descriptions. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
-rw-r--r--gcc/m2/gm2-gcc/m2expr.cc17
-rw-r--r--gcc/m2/lang.opt10
2 files changed, 15 insertions, 12 deletions
diff --git a/gcc/m2/gm2-gcc/m2expr.cc b/gcc/m2/gm2-gcc/m2expr.cc
index 920cbaa..0470f7c 100644
--- a/gcc/m2/gm2-gcc/m2expr.cc
+++ b/gcc/m2/gm2-gcc/m2expr.cc
@@ -3617,8 +3617,9 @@ m2expr_BuildCap (location_t location, tree t)
return error_mark_node;
}
-/* BuildDivM2 if iso or pim4 then build and return ((op2 < 0) : (op1
- divceil op2) ? (op1 divfloor op2)) otherwise use divtrunc. */
+/* BuildDivM2 if iso or pim4 then all modulus results are positive
+ and the results from the division are rounded to the floor otherwise
+ use BuildDivTrunc. */
tree
m2expr_BuildDivM2 (location_t location, tree op1, tree op2,
@@ -3627,6 +3628,8 @@ m2expr_BuildDivM2 (location_t location, tree op1, tree op2,
op1 = m2expr_FoldAndStrip (op1);
op2 = m2expr_FoldAndStrip (op2);
ASSERT_CONDITION (TREE_TYPE (op1) == TREE_TYPE (op2));
+ /* If iso or pim4 then build and return ((op2 < 0) ? (op1
+ divceil op2) : (op1 divfloor op2)) otherwise use divtrunc. */
if (M2Options_GetPIM4 () || M2Options_GetISO ()
|| M2Options_GetPositiveModFloor ())
return fold_build3 (
@@ -3642,7 +3645,7 @@ m2expr_BuildDivM2 (location_t location, tree op1, tree op2,
}
/* BuildDivM2Check - build and
- return ((op2 < 0) : (op1 divtrunc op2) ? (op1 divfloor op2))
+ return ((op2 < 0) ? (op1 divtrunc op2) : (op1 divfloor op2))
when -fiso, -fpim4 or -fpositive-mod-floor-div is present else
return op1 div trunc op2. Use the checking div equivalents. */
@@ -3685,8 +3688,8 @@ m2expr_BuildISOModM2Check (location_t location,
}
-/* BuildModM2Check if iso or pim4 then build and return ((op2 < 0) : (op1
- modceil op2) ? (op1 modfloor op2)) otherwise use modtrunc.
+/* BuildModM2Check if iso or pim4 then build and return ((op2 < 0) ? (op1
+ modceil op2) : (op1 modfloor op2)) otherwise use modtrunc.
Use the checking mod equivalents. */
tree
@@ -3703,8 +3706,8 @@ m2expr_BuildModM2Check (location_t location, tree op1, tree op2,
return m2expr_BuildModTruncCheck (location, op1, op2, lowest, min, max);
}
-/* BuildModM2 if iso or pim4 then build and return ((op2 < 0) : (op1
- modceil op2) ? (op1 modfloor op2)) otherwise use modtrunc. */
+/* BuildModM2 if iso or pim4 then build and return ((op2 < 0) ? (op1
+ modceil op2) : (op1 modfloor op2)) otherwise use modtrunc. */
tree
m2expr_BuildModM2 (location_t location, tree op1, tree op2,
diff --git a/gcc/m2/lang.opt b/gcc/m2/lang.opt
index 691a75f..4d54a16 100644
--- a/gcc/m2/lang.opt
+++ b/gcc/m2/lang.opt
@@ -56,7 +56,7 @@ turns on runtime subrange, array index and indirection via NIL pointer checking
fcase
Modula-2
-turns on runtime checking to check whether a CASE statement requires an ELSE clause when on was not specified
+turns on runtime checking to check whether a CASE statement requires an ELSE clause when one was not specified
fcpp
Modula-2
@@ -104,7 +104,7 @@ allows opaque types to be implemented as any type (a GNU Modula-2 extension)
ffloatvalue
Modula-2
-turns on runtime checking to check whether a floating point number is about to exceed range
+turns on runtime checking to check whether a floating point number will exceed range
fgen-module-list=
Modula-2 Joined
@@ -120,7 +120,7 @@ use ISO dialect of Modula-2
flibs=
Modula-2 Joined
-specify the library order, currently legal entries include: log, min, pim, iso or their directory name equivalent m2log, m2min, m2pim, m2iso.
+specify the library order, the libraries maybe specified by a comma separated abbreviation: log,min,pim,iso or by directory names: m2log,m2min,m2pim,m2iso.
flocation=
Modula-2 Joined
@@ -212,7 +212,7 @@ specify the list of runtime modules and their initialization order
fscaffold-dynamic
Modula-2
-the modules initialization order is dynamically determined by M2RTS and application dependancies
+the modules initialization order is dynamically determined by M2RTS and application dependencies
fscaffold-c
Modula-2
@@ -264,7 +264,7 @@ turns on all division and modulus by zero checking for ordinal values
fwholevalue
Modula-2
-turns on runtime checking to check whether a whole number is about to exceed range
+turns on runtime checking to check whether a whole number will exceed range
static-libgm2
Driver