* i-cexten.ads (bool): New type.
2009-07-10 Robert Dewar <dewar@adacore.com>
* sinfo.ads (N_Short_Circuit): New definition
* sem_ch13.adb, sem_ch6.adb, sem_eval.adb, sem_res.adb,
treepr.adb: Minor code reorganization (use N_Short_Circuit)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149467
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-07-10 Arnaud Charlet <charlet@adacore.com>
+
+ * i-cexten.ads (bool): New type.
+
+2009-07-10 Robert Dewar <dewar@adacore.com>
+
+ * sinfo.ads (N_Short_Circuit): New definition
+
+ * sem_ch13.adb, sem_ch6.adb, sem_eval.adb, sem_res.adb,
+ treepr.adb: Minor code reorganization (use N_Short_Circuit)
+
2009-07-10 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Expand_Freeze_Record_Type): Handle constructors of
package Interfaces.C.Extensions is
+ -- Following 7 declarations need comments ???
+
subtype void is System.Address;
subtype void_ptr is System.Address;
subtype incomplete_class_def is System.Address;
type incomplete_class_def_ptr is access incomplete_class_def;
- --
+ subtype bool is plain_char;
+
-- 64bit integer types
- --
subtype long_long is Long_Long_Integer;
type unsigned_long_long is mod 2 ** 64;
- --
-- Types for bitfields
- --
type Unsigned_1 is mod 2 ** 1;
for Unsigned_1'Size use 1;
when N_Null =>
return;
- when N_Binary_Op | N_And_Then | N_Or_Else | N_Membership_Test =>
+ when N_Binary_Op | N_Short_Circuit | N_Membership_Test =>
Check_Expr_Constants (Left_Opnd (Nod));
Check_Expr_Constants (Right_Opnd (Nod));
and then FCE (Left_Opnd (E1), Left_Opnd (E2))
and then FCE (Right_Opnd (E1), Right_Opnd (E2));
- when N_And_Then | N_Or_Else | N_Membership_Test =>
+ when N_Short_Circuit | N_Membership_Test =>
return
FCE (Left_Opnd (E1), Left_Opnd (E2))
and then
Left_Int := Expr_Value (Left);
if (Kind = N_And_Then and then Is_False (Left_Int))
- or else (Kind = N_Or_Else and Is_True (Left_Int))
+ or else
+ (Kind = N_Or_Else and then Is_True (Left_Int))
then
Fold_Uint (N, Left_Int, Rstat);
return;
"(RM 4.9(5))!", N, E);
end if;
- when N_Binary_Op | N_And_Then | N_Or_Else | N_Membership_Test =>
+ when N_Binary_Op | N_Short_Circuit | N_Membership_Test =>
if Nkind (N) in N_Op_Shift then
Error_Msg_N
("shift functions are never static (RM 4.9(6,18))!", N);
when N_Allocator => Resolve_Allocator (N, Ctx_Type);
- when N_And_Then | N_Or_Else
+ when N_Short_Circuit
=> Resolve_Short_Circuit (N, Ctx_Type);
when N_Attribute_Reference
N_In,
N_Not_In,
- -- N_Subexpr, N_Has_Etype
+ -- N_Subexpr, N_Has_Etype, N_Short_Circuit
N_And_Then,
+ N_Or_Else,
+
+ -- N_Subexpr, N_Has_Etype
+
N_Conditional_Expression,
N_Explicit_Dereference,
N_Function_Call,
N_Indexed_Component,
N_Integer_Literal,
N_Null,
- N_Or_Else,
N_Procedure_Call_Statement,
N_Qualified_Expression,
N_At_Clause ..
N_Attribute_Definition_Clause;
+ subtype N_Short_Circuit is Node_Kind range
+ N_And_Then ..
+ N_Or_Else;
+
subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
N_Abort_Statement ..
N_If_Statement;
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- Deal with Left_Opnd and Right_Opnd fields
if Nkind (N) in N_Op
- or else Nkind (N) = N_And_Then
- or else Nkind (N) = N_Or_Else
+ or else Nkind (N) in N_Short_Circuit
or else Nkind (N) in N_Membership_Test
then
-- Print Left_Opnd if present