public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6737] PR modula2/109032 - message 'compiler checks to force' is too complicated
@ 2023-03-17 14:33 Gaius Mulley
0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2023-03-17 14:33 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:6bfb5eae96b65894da1301e966568fdf32bf64d0
commit r13-6737-g6bfb5eae96b65894da1301e966568fdf32bf64d0
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date: Fri Mar 17 14:32:22 2023 +0000
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>
Diff:
---
gcc/m2/gm2-gcc/m2expr.cc | 17 ++++++++++-------
gcc/m2/lang.opt | 10 +++++-----
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/gcc/m2/gm2-gcc/m2expr.cc b/gcc/m2/gm2-gcc/m2expr.cc
index 920cbaaa9bb..0470f7c7f8f 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 691a75f2e4e..4d54a16b3e2 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-17 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 14:33 [gcc r13-6737] PR modula2/109032 - message 'compiler checks to force' is too complicated Gaius Mulley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).