aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par_sco.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2010-01-26 10:13:33 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-01-26 11:13:33 +0100
commit55e4d23d2b3bfe9f11ddc25eb6d2a00a9d6e909a (patch)
treeba3954fe91ad567ff6bd27c6227483d88e599273 /gcc/ada/par_sco.adb
parent2593c3e1cb8b4325f87ea5a2ce9c1f906c4cf45b (diff)
downloadgcc-55e4d23d2b3bfe9f11ddc25eb6d2a00a9d6e909a.zip
gcc-55e4d23d2b3bfe9f11ddc25eb6d2a00a9d6e909a.tar.gz
gcc-55e4d23d2b3bfe9f11ddc25eb6d2a00a9d6e909a.tar.bz2
par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
2010-01-26 Robert Dewar <dewar@adacore.com> * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR * scos.ads: Clarify handling of logical operators From-SVN: r156239
Diffstat (limited to 'gcc/ada/par_sco.adb')
-rw-r--r--gcc/ada/par_sco.adb17
1 files changed, 6 insertions, 11 deletions
diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb
index e6d71dd..e47dbbc 100644
--- a/gcc/ada/par_sco.adb
+++ b/gcc/ada/par_sco.adb
@@ -95,8 +95,9 @@ package body Par_SCO is
function Is_Logical_Operator (N : Node_Id) return Boolean;
-- N is the node for a subexpression. This procedure just tests N to see
- -- if it is a logical operator (including short circuit conditions) and
- -- returns True if so, False otherwise, it does no other processing.
+ -- if it is a logical operator (including short circuit conditions, but
+ -- excluding OR and AND) and returns True if so, False otherwise, it does
+ -- no other processing.
procedure Process_Decisions (N : Node_Id; T : Character);
-- If N is Empty, has no effect. Otherwise scans the tree for the node N,
@@ -297,9 +298,7 @@ package body Par_SCO is
function Is_Logical_Operator (N : Node_Id) return Boolean is
begin
- return Nkind_In (N, N_Op_And,
- N_Op_Or,
- N_Op_Xor,
+ return Nkind_In (N, N_Op_Xor,
N_Op_Not,
N_And_Then,
N_Or_Else);
@@ -436,15 +435,11 @@ package body Par_SCO is
begin
case Nkind (N) is
- -- Logical operators and short circuit forms, output table
- -- entries and then process operands recursively to deal with
- -- nested conditions.
+ -- Logical operators, output table entries and then process
+ -- operands recursively to deal with nested conditions.
when N_And_Then |
N_Or_Else |
- N_Op_And |
- N_Op_Or |
- N_Op_Xor |
N_Op_Not =>
declare