Commit 5a1ccfb1 by Arnaud Charlet

[multiple changes]

2009-07-20  Bob Duff  <duff@adacore.com>

	* sem_ch13.adb (Analyze_Record_Representation_Clause): Use "and then"
	instead of "and", because otherwise Parent_Last_Bit is read
	uninitialized in the case where it's not a tagged type, or the tagged
	parent does not have a complete rep clause.

2009-07-20  Robert Dewar  <dewar@adacore.com>

	* stylesw.ads: Minor documentation change.

	* types.ads: Minor reformatting

2009-07-20  Javier Miranda  <miranda@adacore.com>

	* exp_disp.ads (Apply_Access_Checks): New subprogram that takes care of
	generating the tag checks associated with dispatching calls.
	* exp_disp.adb (Apply_Access_Checks): New subprogram.
	(New_Value): This routine was previously local to expand dispatching
	calls but it is now used also by Apply_Access_Checks.
	(Expand_Dispatching_Calls): Cleanup code because the functionality of
	tag checks is now provided by Apply_Access_Checks. 
	* exp_ch6.adb (Expand_Call): Incorporate generation of tag checks in
	case of dispatching calls.

2009-07-20  Arnaud Charlet  <charlet@adacore.com>

	* gnat1drv.adb (Gnat1drv): Also disable Elaboration_Check in
	CodePeer_Mode.

From-SVN: r149821
parent 151293b5
2009-07-20 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_Record_Representation_Clause): Use "and then"
instead of "and", because otherwise Parent_Last_Bit is read
uninitialized in the case where it's not a tagged type, or the tagged
parent does not have a complete rep clause.
2009-07-20 Robert Dewar <dewar@adacore.com>
* stylesw.ads: Minor documentation change.
* types.ads: Minor reformatting
2009-07-20 Javier Miranda <miranda@adacore.com>
* exp_disp.ads (Apply_Access_Checks): New subprogram that takes care of
generating the tag checks associated with dispatching calls.
* exp_disp.adb (Apply_Access_Checks): New subprogram.
(New_Value): This routine was previously local to expand dispatching
calls but it is now used also by Apply_Access_Checks.
(Expand_Dispatching_Calls): Cleanup code because the functionality of
tag checks is now provided by Apply_Access_Checks.
* exp_ch6.adb (Expand_Call): Incorporate generation of tag checks in
case of dispatching calls.
2009-07-20 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb (Gnat1drv): Also disable Elaboration_Check in
CodePeer_Mode.
2009-07-20 Gary Dismukes <dismukes@adacore.com>
* exp_prag.adb (Expand_Pragma_Import_Export_Exception): When compiling
......
......@@ -2612,12 +2612,14 @@ package body Exp_Ch6 is
return;
-- Expansion of a dispatching call results in an indirect call, which
-- in turn causes current values to be killed (see Resolve_Call), so
-- on VM targets we do the call here to ensure consistent warnings
-- between VM and non-VM targets.
else
Apply_Tag_Checks (N);
-- Expansion of a dispatching call results in an indirect call,
-- which in turn causes current values to be killed (see
-- Resolve_Call), so on VM targets we do the call here to ensure
-- consistent warnings between VM and non-VM targets.
Kill_Current_Values;
end if;
end if;
......
......@@ -170,6 +170,9 @@ package Exp_Disp is
-- Exp_Disp.Default_Prim_Op_Position - indirect use
-- Exp_Disp.Set_All_DT_Position - direct use
procedure Apply_Tag_Checks (Call_Node : Node_Id);
-- Generate checks required on dispatching calls
function Building_Static_DT (Typ : Entity_Id) return Boolean;
pragma Inline (Building_Static_DT);
-- Returns true when building statically allocated dispatch tables
......
......@@ -158,20 +158,22 @@ procedure Gnat1drv is
ASIS_Mode := False;
-- Turn off dynamic elaboration checks: generates inconsitencies in
-- Suppress overflow checks and access checks since they are handled
-- implicitely by CodePeer.
-- Turn off dynamic elaboration checks: generates inconsistencies in
-- trees between specs compiled as part of a main unit or as part of
-- a with-clause.
Dynamic_Elaboration_Checks := False;
-- Suppress overflow checks and access checks since they are handled
-- implicitely by CodePeer. Enable all other language checks.
-- Enable all other language checks
Suppress_Options :=
(Overflow_Check => True,
Access_Check => True,
others => False);
(Overflow_Check => True,
Access_Check => True,
Elaboration_Check => True,
others => False);
Enable_Overflow_Checks := False;
Dynamic_Elaboration_Checks := False;
-- Kill debug of generated code, since it messes up sloc values
......
......@@ -2623,7 +2623,7 @@ package body Sem_Ch13 is
-- this component might overlap a parent field.
if Present (Tagged_Parent)
and Fbit <= Parent_Last_Bit
and then Fbit <= Parent_Last_Bit
then
Pcomp := First_Entity (Tagged_Parent);
while Present (Pcomp) loop
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009 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- --
......@@ -384,10 +384,10 @@ package Types is
-- Type used to identify nodes in the tree
subtype Entity_Id is Node_Id;
-- A synonym for node types, used in the entity package to refer to
-- nodes that are entities (i.e. nodes with an Nkind of N_Defining_xxx)
-- All such nodes are extended nodes and these are the only extended
-- nodes, so that in practice entity and extended nodes are synonymous.
-- A synonym for node types, used in the entity package to refer to nodes
-- that are entities (i.e. nodes with an Nkind of N_Defining_xxx) All such
-- nodes are extended nodes and these are the only extended nodes, so that
-- in practice entity and extended nodes are synonymous.
subtype Node_Or_Entity_Id is Node_Id;
-- A synonym for node types, used in cases where a given value may be used
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment