aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2017-01-13 10:19:19 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-13 11:19:19 +0100
commitd8f43ee6d0921b73670e8e123cdd0850dfeb330e (patch)
treef478a14a0fa94b8594e529f0aa178c5afedad3df /gcc/ada/checks.adb
parentd4bf622fbf9018b4ffbb743fef37c7af0fa419c6 (diff)
downloadgcc-d8f43ee6d0921b73670e8e123cdd0850dfeb330e.zip
gcc-d8f43ee6d0921b73670e8e123cdd0850dfeb330e.tar.gz
gcc-d8f43ee6d0921b73670e8e123cdd0850dfeb330e.tar.bz2
sem_aggr.adb, [...]: Update all eligible case statements to reflect the new style for case alternatives.
2017-01-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb, exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb, layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb, exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb, exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb, g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb, sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb, prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb, a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb, get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb, g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb, sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb, s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb, contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb, g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb, g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb, a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb, ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb, get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb, prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb, exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb, s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb, a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb, a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb, g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb, par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb, uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb, a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case statements to reflect the new style for case alternatives. Various code clean up and reformatting. From-SVN: r244406
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb60
1 files changed, 37 insertions, 23 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 6913e8f..a42338b 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -4041,26 +4041,30 @@ package body Checks is
if Present (Expr) and then Known_Null (Expr) then
case K is
- when N_Component_Declaration |
- N_Discriminant_Specification =>
+ when N_Component_Declaration
+ | N_Discriminant_Specification
+ =>
Apply_Compile_Time_Constraint_Error
(N => Expr,
- Msg => "(Ada 2005) null not allowed "
- & "in null-excluding components??",
+ Msg =>
+ "(Ada 2005) null not allowed in null-excluding "
+ & "components??",
Reason => CE_Null_Not_Allowed);
when N_Object_Declaration =>
Apply_Compile_Time_Constraint_Error
(N => Expr,
- Msg => "(Ada 2005) null not allowed "
- & "in null-excluding objects??",
+ Msg =>
+ "(Ada 2005) null not allowed in null-excluding "
+ & "objects??",
Reason => CE_Null_Not_Allowed);
when N_Parameter_Specification =>
Apply_Compile_Time_Constraint_Error
(N => Expr,
- Msg => "(Ada 2005) null not allowed "
- & "in null-excluding formals??",
+ Msg =>
+ "(Ada 2005) null not allowed in null-excluding "
+ & "formals??",
Reason => CE_Null_Not_Allowed);
when others =>
@@ -4499,9 +4503,7 @@ package body Checks is
when N_Op_Rem =>
if OK_Operands then
- if Lo_Right = Hi_Right
- and then Lo_Right /= 0
- then
+ if Lo_Right = Hi_Right and then Lo_Right /= 0 then
declare
Dval : constant Uint := (abs Lo_Right) - 1;
@@ -4536,7 +4538,9 @@ package body Checks is
-- For Pos/Val attributes, we can refine the range using the
-- possible range of values of the attribute expression.
- when Name_Pos | Name_Val =>
+ when Name_Pos
+ | Name_Val
+ =>
Determine_Range
(First (Expressions (N)), OK1, Lor, Hir, Assume_Valid);
@@ -7246,12 +7250,22 @@ package body Checks is
function Is_Signed_Integer_Arithmetic_Op (N : Node_Id) return Boolean is
begin
case Nkind (N) is
- when N_Op_Abs | N_Op_Add | N_Op_Divide | N_Op_Expon |
- N_Op_Minus | N_Op_Mod | N_Op_Multiply | N_Op_Plus |
- N_Op_Rem | N_Op_Subtract =>
+ when N_Op_Abs
+ | N_Op_Add
+ | N_Op_Divide
+ | N_Op_Expon
+ | N_Op_Minus
+ | N_Op_Mod
+ | N_Op_Multiply
+ | N_Op_Plus
+ | N_Op_Rem
+ | N_Op_Subtract
+ =>
return Is_Signed_Integer_Type (Etype (N));
- when N_If_Expression | N_Case_Expression =>
+ when N_Case_Expression
+ | N_If_Expression
+ =>
return Is_Signed_Integer_Type (Etype (N));
when others =>
@@ -8468,28 +8482,28 @@ package body Checks is
begin
case Nkind (N) is
- when N_Op_Abs =>
+ when N_Op_Abs =>
Fent := RTE (RE_Big_Abs);
- when N_Op_Add =>
+ when N_Op_Add =>
Fent := RTE (RE_Big_Add);
- when N_Op_Divide =>
+ when N_Op_Divide =>
Fent := RTE (RE_Big_Div);
- when N_Op_Expon =>
+ when N_Op_Expon =>
Fent := RTE (RE_Big_Exp);
- when N_Op_Minus =>
+ when N_Op_Minus =>
Fent := RTE (RE_Big_Neg);
- when N_Op_Mod =>
+ when N_Op_Mod =>
Fent := RTE (RE_Big_Mod);
when N_Op_Multiply =>
Fent := RTE (RE_Big_Mul);
- when N_Op_Rem =>
+ when N_Op_Rem =>
Fent := RTE (RE_Big_Rem);
when N_Op_Subtract =>