Commit bc9bb02d by Arnaud Charlet

[multiple changes]

2008-03-26  Tristan Gingold  <gingold@adacore.com>

	* init.c: Do not adjust pc for HPARITH on alpha/vms.

2008-03-26  Robert Dewar  <dewar@adacore.com>

	* lib-xref.adb: (OK_To_Set_Reference): New function
	(Generate_Reference): Don't set referenced from occurrence in Warnings,
	Unmodified, or Unreferenced pragma

2008-03-26  Robert Dewar  <dewar@adacore.com>

	* alloc.ads: Add entries for Warnings_Off_Pragmas table

2008-03-26  GNAT Script  <nobody@adacore.com>

	* Make-lang.in: Makefile automatically updated

From-SVN: r133586
parent f53f9dd7
...@@ -1968,22 +1968,22 @@ ada/exp_disp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ...@@ -1968,22 +1968,22 @@ ada/exp_disp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \ ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \
ada/restrict.ads ada/restrict.adb ada/rident.ads ada/rtsfind.ads \ ada/restrict.ads ada/restrict.adb ada/rident.ads ada/rtsfind.ads \
ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \ ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \
ada/sem_attr.ads ada/sem_ch6.ads ada/sem_ch8.ads ada/sem_disp.ads \ ada/sem_attr.ads ada/sem_ch6.ads ada/sem_ch7.ads ada/sem_ch8.ads \
ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \ ada/sem_disp.ads ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads \
ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb \
ada/snames.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \
ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ ada/stringt.adb ada/style.ads ada/styleg.ads ada/styleg.adb \
ada/stylesw.ads ada/system.ads ada/s-carun8.ads ada/s-crc32.ads \ ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-carun8.ads \
ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \ ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
ada/s-stoele.adb ada/s-strops.ads ada/s-sopco3.ads ada/s-sopco4.ads \ ada/s-stoele.ads ada/s-stoele.adb ada/s-strops.ads ada/s-sopco3.ads \
ada/s-sopco5.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \ ada/s-sopco4.ads ada/s-sopco5.ads ada/s-string.ads ada/s-traent.ads \
ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads \
ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tbuild.adb \
ada/ttypes.ads ada/types.ads ada/types.adb ada/uintp.ads ada/uintp.adb \ ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/types.adb \
ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \ ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
ada/validsw.ads ada/widechar.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads ada/widechar.ads
ada/exp_dist.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ada/exp_dist.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \ ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
...@@ -3266,14 +3266,14 @@ ada/sem_ch13.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ...@@ -3266,14 +3266,14 @@ ada/sem_ch13.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/erroutc.ads ada/exp_dist.ads ada/exp_tss.ads ada/exp_util.ads \ ada/erroutc.ads ada/exp_dist.ads ada/exp_tss.ads ada/exp_util.ads \
ada/fname.ads ada/fname-uf.ads ada/get_targ.ads ada/gnat.ads \ ada/fname.ads ada/fname-uf.ads ada/get_targ.ads ada/gnat.ads \
ada/g-hesorg.ads ada/g-hesorg.adb ada/g-htable.ads ada/hostparm.ads \ ada/g-hesorg.ads ada/g-hesorg.adb ada/g-htable.ads ada/hostparm.ads \
ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-load.ads \ ada/layout.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
ada/lib-sort.adb ada/lib-xref.ads ada/namet.ads ada/nlists.ads \ ada/lib-load.ads ada/lib-sort.adb ada/lib-xref.ads ada/namet.ads \
ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \
ada/restrict.ads ada/rident.ads ada/rtsfind.ads ada/rtsfind.adb \ ada/output.ads ada/restrict.ads ada/rident.ads ada/rtsfind.ads \
ada/sem.ads ada/sem_ch13.ads ada/sem_ch13.adb ada/sem_ch7.ads \ ada/rtsfind.adb ada/sem.ads ada/sem_ch13.ads ada/sem_ch13.adb \
ada/sem_ch8.ads ada/sem_dist.ads ada/sem_eval.ads ada/sem_res.ads \ ada/sem_ch7.ads ada/sem_ch8.ads ada/sem_dist.ads ada/sem_eval.ads \
ada/sem_type.ads ada/sem_util.ads ada/sem_warn.ads ada/sinfo.ads \ ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_warn.ads \
ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \ ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \ ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
ada/s-rident.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ ada/s-rident.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
...@@ -3547,21 +3547,21 @@ ada/sem_disp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ...@@ -3547,21 +3547,21 @@ ada/sem_disp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \ ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \
ada/restrict.adb ada/rident.ads ada/rtsfind.ads ada/scans.ads \ ada/restrict.adb ada/rident.ads ada/rtsfind.ads ada/scans.ads \
ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_attr.ads \ ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_attr.ads \
ada/sem_ch6.ads ada/sem_ch8.ads ada/sem_disp.ads ada/sem_disp.adb \ ada/sem_ch6.ads ada/sem_ch7.ads ada/sem_ch8.ads ada/sem_disp.ads \
ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \ ada/sem_disp.adb ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads \
ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb \
ada/snames.ads ada/stand.ads ada/stringt.ads ada/style.ads \ ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \
ada/styleg.ads ada/styleg.adb ada/styleg-c.ads ada/stylesw.ads \ ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \
ada/system.ads ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads \ ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \ ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-strops.ads \ ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
ada/s-sopco3.ads ada/s-sopco4.ads ada/s-sopco5.ads ada/s-string.ads \ ada/s-strops.ads ada/s-sopco3.ads ada/s-sopco4.ads ada/s-sopco5.ads \
ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads \ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads \
ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/uintp.ads \ ada/tbuild.ads ada/tree_io.ads ada/ttypes.ads ada/types.ads \
ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \ ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
ada/urealp.ads ada/validsw.ads ada/widechar.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads ada/widechar.ads
ada/sem_dist.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ada/sem_dist.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \ ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -141,6 +141,9 @@ package Alloc is ...@@ -141,6 +141,9 @@ package Alloc is
Unreferenced_Entities_Initial : constant := 1_000; -- Sem_Warn Unreferenced_Entities_Initial : constant := 1_000; -- Sem_Warn
Unreferenced_Entities_Increment : constant := 100; Unreferenced_Entities_Increment : constant := 100;
Warnings_Off_Pragmas_Initial : constant := 500; -- Sem_Warn
Warnings_Off_Pragmas_Increment : constant := 100;
With_List_Initial : constant := 10; -- Features With_List_Initial : constant := 10; -- Features
With_List_Increment : constant := 300; With_List_Increment : constant := 300;
......
...@@ -1395,8 +1395,12 @@ __gnat_handle_vms_condition (int *sigargs, void *mechargs) ...@@ -1395,8 +1395,12 @@ __gnat_handle_vms_condition (int *sigargs, void *mechargs)
#else #else
exception = &constraint_error; exception = &constraint_error;
msg = "arithmetic error"; msg = "arithmetic error";
#ifndef __alpha__
/* No need to adjust pc on alpha: the pc is already on the instruction
after the trapping one. */
__gnat_adjust_context_for_raise (0, (void *)mechargs); __gnat_adjust_context_for_raise (0, (void *)mechargs);
#endif #endif
#endif
break; break;
default: default:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1998-2007, Free Software Foundation, Inc. -- -- Copyright (C) 1998-2008, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -235,6 +235,11 @@ package body Lib.Xref is ...@@ -235,6 +235,11 @@ package body Lib.Xref is
-- --
-- Out param Same as above cases, but OUT parameter -- Out param Same as above cases, but OUT parameter
function OK_To_Set_Referenced return Boolean;
-- Returns True if the Referenced flag can be set. There are a few
-- exceptions where we do not want to set this flag, see body for
-- details of these exceptional cases.
--------------- ---------------
-- Is_On_LHS -- -- Is_On_LHS --
--------------- ---------------
...@@ -310,6 +315,41 @@ package body Lib.Xref is ...@@ -310,6 +315,41 @@ package body Lib.Xref is
return Name (Parent (N)) = N; return Name (Parent (N)) = N;
end Is_On_LHS; end Is_On_LHS;
---------------------------
-- OK_To_Set_Referenced --
---------------------------
function OK_To_Set_Referenced return Boolean is
P : Node_Id;
begin
-- A reference from a pragma Unreferenced or pragma Unmodified or
-- pragma Warnings does not cause the Referenced flag to be set.
-- This avoids silly warnings about things being referenced and
-- not assigned when the only reference is from the pragma.
if Nkind (N) = N_Identifier then
P := Parent (N);
if Nkind (P) = N_Pragma_Argument_Association then
P := Parent (P);
if Nkind (P) = N_Pragma then
if Pragma_Name (P) = Name_Warnings
or else
Pragma_Name (P) = Name_Unmodified
or else
Pragma_Name (P) = Name_Unreferenced
then
return False;
end if;
end if;
end if;
end if;
return True;
end OK_To_Set_Referenced;
-- Start of processing for Generate_Reference -- Start of processing for Generate_Reference
begin begin
...@@ -529,7 +569,7 @@ package body Lib.Xref is ...@@ -529,7 +569,7 @@ package body Lib.Xref is
-- Any other occurrence counts as referencing the entity -- Any other occurrence counts as referencing the entity
else elsif OK_To_Set_Referenced then
Set_Referenced (E); Set_Referenced (E);
-- If variable, this is an OK reference after an assignment -- If variable, this is an OK reference after an assignment
......
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