mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-26 16:51:01 +08:00
sem_ch3.adb (Analyze_Object_Declaration): Swap a couple of tests in a condition so Following_Address_Clause is invoked...
2014-11-20 Eric Botcazou <ebotcazou@adacore.com> * sem_ch3.adb (Analyze_Object_Declaration): Swap a couple of tests in a condition so Following_Address_Clause is invoked only if need be. * exp_util.ads (Following_Address_Clause): Add small note. From-SVN: r217834
This commit is contained in:
parent
58b81ab059
commit
4a0a5d5fc1
@ -1,3 +1,10 @@
|
||||
2014-11-20 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* sem_ch3.adb (Analyze_Object_Declaration): Swap a couple of
|
||||
tests in a condition so Following_Address_Clause is invoked
|
||||
only if need be.
|
||||
* exp_util.ads (Following_Address_Clause): Add small note.
|
||||
|
||||
2014-11-20 Pascal Obry <obry@adacore.com>
|
||||
|
||||
* adaint.c (remove_handle): New local routine without a lock.
|
||||
|
@ -507,6 +507,10 @@ package Exp_Util is
|
||||
-- current declarative part to look for an address clause for the object
|
||||
-- being declared, and returns the clause if one is found, returns
|
||||
-- Empty otherwise.
|
||||
--
|
||||
-- Note: this function can be costly and must be invoked with special care.
|
||||
-- Possibly we could introduce a flag at parse time indicating the presence
|
||||
-- of an address clause to speed this up???
|
||||
|
||||
procedure Force_Evaluation
|
||||
(Exp : Node_Id;
|
||||
|
@ -3648,8 +3648,13 @@ package body Sem_Ch3 is
|
||||
|
||||
if Comes_From_Source (N)
|
||||
and then Expander_Active
|
||||
and then Present (Following_Address_Clause (N))
|
||||
and then Nkind (E) = N_Aggregate
|
||||
|
||||
-- Note the importance of doing this the following test after the
|
||||
-- N_Aggregate test to avoid inefficiencies from too many calls to
|
||||
-- the function Following_Address_Clause which can be expensive.
|
||||
|
||||
and then Present (Following_Address_Clause (N))
|
||||
then
|
||||
Set_Etype (E, T);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user