]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
PR modula2/109032 - message 'compiler checks to force' is too complicated
authorGaius Mulley <gaiusmod2@gmail.com>
Fri, 17 Mar 2023 14:32:22 +0000 (14:32 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Fri, 17 Mar 2023 14:32:22 +0000 (14:32 +0000)
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>
gcc/m2/gm2-gcc/m2expr.cc
gcc/m2/lang.opt

index 920cbaaa9bbaae9d64734519721bc622640348f2..0470f7c7f8f8d654cc13d0bf0e9e6346a2517ce2 100644 (file)
@@ -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,
index 691a75f2e4e0f24c5bd92feaffafb72d502962d2..4d54a16b3e219b2b7dcad985541bcd5b3c83bff6 100644 (file)
@@ -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