diff options
author | Robert Dewar <dewar@adacore.com> | 2012-10-02 08:48:27 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-02 10:48:27 +0200 |
commit | 9b16cb57dedec3d7fb690ad7770f2ca9ca85f586 (patch) | |
tree | 427db6631f4424c39ebbfe7c953d008cfee86519 /gcc/ada/sprint.adb | |
parent | cb42ba5d667142c60c27fadd8efba35e0e18e797 (diff) | |
download | gcc-9b16cb57dedec3d7fb690ad7770f2ca9ca85f586.zip gcc-9b16cb57dedec3d7fb690ad7770f2ca9ca85f586.tar.gz gcc-9b16cb57dedec3d7fb690ad7770f2ca9ca85f586.tar.bz2 |
par_sco.adb, [...]: Change name Conditional_Expression to If_Expression.
2012-10-02 Robert Dewar <dewar@adacore.com>
* par_sco.adb, sem_ch3.adb, layout.adb, exp_ch7.adb, exp_imgv.adb,
exp_util.adb, exp_util.ads, exp_attr.adb, sinfo.adb, sinfo.ads,
exp_ch9.adb, style.ads, scos.ads, debug.adb, einfo.ads, scng.adb,
checks.adb, checks.ads, sem.adb, par-ch4.adb, sem_util.adb, types.h,
sem_res.adb, expander.adb, scans.ads, par.adb, exp_ch2.adb,
gnat1drv.adb, stylesw.ads, sem_elab.adb, exp_ch4.adb, exp_ch4.ads,
exp_ch6.adb, sem_ch4.adb, sem_ch4.ads, sem_ch6.adb,
opt.ads, sem_eval.adb, sem_eval.ads, exp_intr.adb, sprint.adb,
sprint.ads, styleg.ads: Change name Conditional_Expression to
If_Expression.
* gcc-interface/trans.c (gnat_to_gnu): Replace
N_Conditional_Expression by N_If_Expression.
* gcc-interface/Make-lang.in: Update dependencies.
From-SVN: r191967
Diffstat (limited to 'gcc/ada/sprint.adb')
-rw-r--r-- | gcc/ada/sprint.adb | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index 17aca3b..0eee5d5 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -1320,27 +1320,6 @@ package body Sprint is Sprint_Indented_List (Else_Statements (Node)); Write_Indent_Str ("end select;"); - when N_Conditional_Expression => - declare - Condition : constant Node_Id := First (Expressions (Node)); - Then_Expr : constant Node_Id := Next (Condition); - - begin - Write_Str_With_Col_Check_Sloc ("(if "); - Sprint_Node (Condition); - Write_Str_With_Col_Check (" then "); - - -- Defense against junk here! - - if Present (Then_Expr) then - Sprint_Node (Then_Expr); - Write_Str_With_Col_Check (" else "); - Sprint_Node (Next (Then_Expr)); - end if; - - Write_Char (')'); - end; - when N_Constrained_Array_Definition => Write_Str_With_Col_Check_Sloc ("array "); Sprint_Paren_Comma_List (Discrete_Subtype_Definitions (Node)); @@ -1978,6 +1957,27 @@ package body Sprint is Set_Debug_Sloc; Write_Id (Node); + when N_If_Expression => + declare + Condition : constant Node_Id := First (Expressions (Node)); + Then_Expr : constant Node_Id := Next (Condition); + + begin + Write_Str_With_Col_Check_Sloc ("(if "); + Sprint_Node (Condition); + Write_Str_With_Col_Check (" then "); + + -- Defense against junk here! + + if Present (Then_Expr) then + Sprint_Node (Then_Expr); + Write_Str_With_Col_Check (" else "); + Sprint_Node (Next (Then_Expr)); + end if; + + Write_Char (')'); + end; + when N_If_Statement => Write_Indent_Str_Sloc ("if "); Sprint_Node (Condition (Node)); |