diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-21 16:33:09 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-21 16:33:09 +0000 |
commit | 7c80da6e3b28b685078014216cac0c43295503fc (patch) | |
tree | f6613c9cb7abf86dd60c46c21622ad75ef34fe4b /gcc/ada/par-ch5.adb | |
parent | 5bf271d8af82cffe7b2d01e28263f3a3158081f3 (diff) | |
download | gcc-7c80da6e3b28b685078014216cac0c43295503fc.tar.gz |
2014-01-21 Robert Dewar <dewar@adacore.com>
* par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
* par-ch5.adb (P_Condition): New version with expression prescanned.
* par.adb (P_Condition): New version with expression prescanned.
2014-01-21 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document that Allow_Integer_Address is ignored
if Address is not a private type.
* sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
Ignore pragma if System.Address is not a private type.
2014-01-21 Arnaud Charlet <charlet@adacore.com>
* namet.ads (Name_Len): Initialize to 0 to avoid accessing an
uninitialized value.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206892 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-ch5.adb')
-rw-r--r-- | gcc/ada/par-ch5.adb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb index 94c5bd4d073..e20cf11a685 100644 --- a/gcc/ada/par-ch5.adb +++ b/gcc/ada/par-ch5.adb @@ -1256,11 +1256,12 @@ package body Ch5 is -- CONDITION ::= boolean_EXPRESSION function P_Condition return Node_Id is - Cond : Node_Id; - begin - Cond := P_Expression_No_Right_Paren; + return P_Condition (P_Expression_No_Right_Paren); + end P_Condition; + function P_Condition (Cond : Node_Id) return Node_Id is + begin -- It is never possible for := to follow a condition, so if we get -- a := we assume it is a mistyped equality. Note that we do not try -- to reconstruct the tree correctly in this case, but we do at least @@ -1278,7 +1279,7 @@ package body Ch5 is -- Otherwise check for redundant parentheses - -- If the condition is a conditional or a quantified expression, it is + -- If the condition is a conditional or a quantified expression, it is -- parenthesized in the context of a condition, because of a separate -- syntax rule. |