aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2007-12-23 12:34:45 -0500
committerDaniel Franke <dfranke@gcc.gnu.org>2007-12-23 12:34:45 -0500
commit57c65fb59c62beb1cbe6db6be2e42c0a9a077915 (patch)
tree57a9a5c60ea2fc02c8e7f025201bd38f9eda5124 /gcc/fortran
parent1584031f69250f7c4479b5d64e724fdd0f120422 (diff)
downloadgcc-57c65fb59c62beb1cbe6db6be2e42c0a9a077915.zip
gcc-57c65fb59c62beb1cbe6db6be2e42c0a9a077915.tar.gz
gcc-57c65fb59c62beb1cbe6db6be2e42c0a9a077915.tar.bz2
re PR fortran/34536 (Make support of 2.0**-3*5 tighter: Print warning by default)
gcc/fortran: 2007-12-23 Daniel Franke <franke.daniel@gmail.com> PR fortran/34536 * matchexp.c (match_ext_mult_operand): Print warning for unary operators following arithmetic ones by default. (match_ext_add_operand): Likewise. gcc/testsuite: 2007-12-23 Daniel Franke <franke.daniel@gmail.com> PR fortran/34536 * gfortran.dg/integer_exponentiation_2.f90: Fixed testcase. * gfortran.dg/real_const_3.f90: Likewise. * gfortran.dg/unary_operator.f90: New test. From-SVN: r131149
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/matchexp.c26
2 files changed, 25 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 79c23de..6e99243 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+2007-12-23 Daniel Franke <franke.daniel@gmail.com>
+
+ PR fortran/34536
+ * matchexp.c (match_ext_mult_operand): Print warning for unary
+ operators following arithmetic ones by default.
+ (match_ext_add_operand): Likewise.
+
2007-12-22 Daniel Franke <franke.daniel@gmail.com>
PR fortran/34559
diff --git a/gcc/fortran/matchexp.c b/gcc/fortran/matchexp.c
index c243101..0bc567f 100644
--- a/gcc/fortran/matchexp.c
+++ b/gcc/fortran/matchexp.c
@@ -345,10 +345,15 @@ match_ext_mult_operand (gfc_expr **result)
if (i == 0)
return match_mult_operand (result);
- if (gfc_notify_std (GFC_STD_GNU, "Extension: Unary operator following "
- "arithmetic operator (use parentheses) at %C")
- == FAILURE)
- return MATCH_ERROR;
+ if (gfc_notification_std (GFC_STD_GNU) == ERROR)
+ {
+ gfc_error ("Extension: Unary operator following "
+ "arithmetic operator (use parentheses) at %C");
+ return MATCH_ERROR;
+ }
+ else
+ gfc_warning ("Extension: Unary operator following "
+ "arithmetic operator (use parentheses) at %C");
m = match_ext_mult_operand (&e);
if (m != MATCH_YES)
@@ -449,10 +454,15 @@ match_ext_add_operand (gfc_expr **result)
if (i == 0)
return match_add_operand (result);
- if (gfc_notify_std (GFC_STD_GNU, "Extension: Unary operator following "
- "arithmetic operator (use parentheses) at %C")
- == FAILURE)
- return MATCH_ERROR;
+ if (gfc_notification_std (GFC_STD_GNU) == ERROR)
+ {
+ gfc_error ("Extension: Unary operator following "
+ "arithmetic operator (use parentheses) at %C");
+ return MATCH_ERROR;
+ }
+ else
+ gfc_warning ("Extension: Unary operator following "
+ "arithmetic operator (use parentheses) at %C");
m = match_ext_add_operand (&e);
if (m != MATCH_YES)