aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/styleg.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2004-11-19 11:56:53 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2004-11-19 11:56:53 +0100
commitbc202b70061a5e8765d537d4222b25284b24361a (patch)
treebd2bdeb5f19ff29203c41b2c8b4fd854bcaa43aa /gcc/ada/styleg.adb
parent1d571f3b00a155910504a2b219c77b839aebbb16 (diff)
downloadgcc-bc202b70061a5e8765d537d4222b25284b24361a.zip
gcc-bc202b70061a5e8765d537d4222b25284b24361a.tar.gz
gcc-bc202b70061a5e8765d537d4222b25284b24361a.tar.bz2
errout.ads, errout.adb: (First_Sloc): New function
* errout.ads, errout.adb: (First_Sloc): New function * par-ch5.adb (P_Condition): Check for redundant parens is now a style check (-gnatyx) instead of being included as a redundant construct warning. * sem_ch6.adb: Change name Style_Check_Subprogram_Order to Style_Check_Order_Subprograms. * style.ads, styleg.ads, styleg.adb, styleg-c.adb, stylesw.ads, stylesw.adb: Add Style_Check_Xtra_Parens * usage.adb: Add line for -gnatyx (check extra parens) * vms_data.ads: Add entry for STYLE_CHECKS=XTRA_PARENS => -gnatyx From-SVN: r90905
Diffstat (limited to 'gcc/ada/styleg.adb')
-rw-r--r--gcc/ada/styleg.adb15
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb
index e382daf..91c807b 100644
--- a/gcc/ada/styleg.adb
+++ b/gcc/ada/styleg.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -28,7 +28,7 @@
-- checking rules. For documentation of these rules, see comments on the
-- individual procedures.
-with Casing; use Casing;
+with Casing; use Casing;
with Csets; use Csets;
with Err_Vars; use Err_Vars;
with Opt; use Opt;
@@ -667,6 +667,17 @@ package body Styleg is
end if;
end Check_Vertical_Bar;
+ -----------------------
+ -- Check_Xtra_Parens --
+ -----------------------
+
+ procedure Check_Xtra_Parens (Loc : Source_Ptr) is
+ begin
+ if Style_Check_Xtra_Parens then
+ Error_Msg ("redundant parentheses?", Loc);
+ end if;
+ end Check_Xtra_Parens;
+
----------------------------
-- Determine_Token_Casing --
----------------------------