aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sprint.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-12-05 11:59:09 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-12-05 11:59:09 +0100
commita53c56136d37b424f4f6b89e903763b82c33cfb9 (patch)
tree4c0fa6b38c44a576559169d8ac21ad008797f8bd /gcc/ada/sprint.adb
parent5e29ae8259c54bdc25e82b3e71c956cde0a49a99 (diff)
downloadgcc-a53c56136d37b424f4f6b89e903763b82c33cfb9.zip
gcc-a53c56136d37b424f4f6b89e903763b82c33cfb9.tar.gz
gcc-a53c56136d37b424f4f6b89e903763b82c33cfb9.tar.bz2
[multiple changes]
2012-12-05 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): Handle properly the generation of discriminant checks when the left-hand side has a type with hidden discriminants. * sem_ch3.ads (Is_Visible_Component): Add defaulted parameter to specify the node on which component visibility is being checked. * sem_ch3.adb (Is_Visible_Component): Use new parameter to determine whether the reference comes from a type conversion to a full view of a private type with unknown discriminants. * sem_ch4.adb (Analyze_Selected_Component): Call Is_Visible_Component with added parameter. 2012-12-05 Arnaud Charlet <charlet@adacore.com> * make.adb: Minor comment update. 2012-12-05 Arnaud Charlet <charlet@adacore.com> * gnatlink.adb: Also use -x adascil in CodePeer mode when calling gcc. * exp_ch5.adb: Minor reformatting. 2012-12-05 Bob Duff <duff@adacore.com> * exp_ch4.adb: Minor comment. 2012-12-05 Bob Duff <duff@adacore.com> * par-ch4.adb: Set Paren_Count correctly for a parenthesized expression containing a conditional expression or quantified expression. * sprint.adb: Update comment. 2012-12-05 Bob Duff <duff@adacore.com> * style.adb, scans.ads, styleg.adb: Update comments. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Selected_Component): Handle properly an expanded name whose prefix is the expanded name of an enclosing entry, that is to say a construct such as T.E.X, where T is an enclosing concurrent type and E is an enclosing entry. From-SVN: r194204
Diffstat (limited to 'gcc/ada/sprint.adb')
-rw-r--r--gcc/ada/sprint.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 0eee5d5..e80708e 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -1162,6 +1162,10 @@ package body Sprint is
Alt : Node_Id;
begin
+ -- The syntax for case_expression does not include parentheses,
+ -- but sometimes parentheses are required, so unconditionally
+ -- generate them here.
+
Write_Str_With_Col_Check_Sloc ("(case ");
Sprint_Node (Expression (Node));
Write_Str_With_Col_Check (" is");
@@ -1963,6 +1967,10 @@ package body Sprint is
Then_Expr : constant Node_Id := Next (Condition);
begin
+ -- The syntax for if_expression does not include parentheses,
+ -- but sometimes parentheses are required, so unconditionally
+ -- generate them here.
+
Write_Str_With_Col_Check_Sloc ("(if ");
Sprint_Node (Condition);
Write_Str_With_Col_Check (" then ");