diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-03-19 17:41:25 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-03-19 17:41:25 +0100 |
commit | 2a1f6a1f9045969b4b04f3316a7f80969ff7c22b (patch) | |
tree | 9e8370f258615466dcb25746f2f0432ed0898d2c /gcc/ada/par-ch4.adb | |
parent | 119e3be6ca8ad32ed4cb683a5d1f7ae0b7279a8a (diff) | |
download | gcc-2a1f6a1f9045969b4b04f3316a7f80969ff7c22b.zip gcc-2a1f6a1f9045969b4b04f3316a7f80969ff7c22b.tar.gz gcc-2a1f6a1f9045969b4b04f3316a7f80969ff7c22b.tar.bz2 |
[multiple changes]
2012-03-19 Yannick Moy <moy@adacore.com>
* sem_ch6.adb: Minor code clean up.
2012-03-19 Vincent Celier <celier@adacore.com>
* make.adb (Scan_Make_Arg): Make sure all significant -m switches
on the command line are counted.
2012-03-19 Robert Dewar <dewar@adacore.com>
* sem_elab.adb (Generate_Elab_Warnings): Fix spec, fix attribute
reference case
2012-03-19 Robert Dewar <dewar@adacore.com>
* par-ch4.adb (Check_Bad_Exp): New procedure
2012-03-19 Robert Dewar <dewar@adacore.com>
* exp_attr.adb, sem_attr.adb, sem_attr.ads, snames.ads-tmpl: Add
initial framework for Valid_Scalars attribute.
2012-03-19 Robert Dewar <dewar@adacore.com>
* scng.adb (Scan): Recognize incorrect preprocessor directive
2012-03-19 Robert Dewar <dewar@adacore.com>
* atree.adb (Allocate_Initialize_Node): Use Num_Extension_Nodes
* atree.ads (Num_Extension_Nodes): New variable
* debug.adb: New debug flag -gnatd.N
* gnat1drv.adb (Adjust_Global_Switches): Adjust
Num_Extension_Nodes if -gnatd.N set
2012-03-19 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads: Minor update to First_Rep_Item and Has_Gigi_Rep_Item
descriptions.
2012-03-19 Robert Dewar <dewar@adacore.com>
* opt.ads: Remove HLO_Active flag.
* sem.adb: Remove call of high level optimizer.
* sem.ads (New_Nodes_OK): Removed.
* sem_ch10.adb: Remove references to New_Nodes_OK.
* switch-c.adb: Remove handling of -gnatH switch.
From-SVN: r185528
Diffstat (limited to 'gcc/ada/par-ch4.adb')
-rw-r--r-- | gcc/ada/par-ch4.adb | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index 59884d2..79aa85f 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, 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- -- @@ -81,6 +81,9 @@ package body Ch4 is -- Called to place complaint about bad range attribute at the given -- source location. Terminates by raising Error_Resync. + procedure Check_Bad_Exp; + -- Called after scanning a**b, posts error if ** detected + procedure P_Membership_Test (N : Node_Id); -- N is the node for a N_In or N_Not_In node whose right operand has not -- yet been processed. It is called just after scanning out the IN keyword. @@ -107,6 +110,20 @@ package body Ch4 is Resync_Expression; end Bad_Range_Attribute; + ------------------- + -- Check_Bad_Exp -- + ------------------- + + procedure Check_Bad_Exp is + begin + if Token = Tok_Double_Asterisk then + Error_Msg_SC ("parenthesization required for '*'*"); + Scan; -- past ** + Discard_Junk_Node (P_Primary); + Check_Bad_Exp; + end if; + end Check_Bad_Exp; + -------------------------- -- 4.1 Name (also 6.4) -- -------------------------- @@ -1933,6 +1950,7 @@ package body Ch4 is Scan; -- past ** Set_Left_Opnd (Node2, Node1); Set_Right_Opnd (Node2, P_Primary); + Check_Bad_Exp; Node1 := Node2; end if; @@ -2320,6 +2338,7 @@ package body Ch4 is Scan; -- past ** Set_Left_Opnd (Node2, Node1); Set_Right_Opnd (Node2, P_Primary); + Check_Bad_Exp; return Node2; else return Node1; |