diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-02-02 13:32:01 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-02-02 13:32:01 +0100 |
commit | 6e937c1c5c91aa000bbb549e2dcd8290fcc20a7d (patch) | |
tree | 30150d4eda55a02c6bc00f9262c17b795a63423d /gcc/ada/ali.adb | |
parent | d560b0aa2ab4f07365674f3a7d2e4a4626c363c5 (diff) | |
download | gcc-6e937c1c5c91aa000bbb549e2dcd8290fcc20a7d.zip gcc-6e937c1c5c91aa000bbb549e2dcd8290fcc20a7d.tar.gz gcc-6e937c1c5c91aa000bbb549e2dcd8290fcc20a7d.tar.bz2 |
[multiple changes]
2004-02-02 Vincent Celier <celier@gnat.com>
* gprcmd.adb (Check_Args): If condition is false, print the invoked
comment before the usage.
Gprcmd: Fail when command is not recognized.
(Usage): Document command "prefix"
* g-md5.adb (Digest): Process last block.
(Update): Do not process last block. Store remaining characters and
length in Context.
* g-md5.ads (Update): Document that several call to update are
equivalent to one call with the concatenated string.
(Context): Add fields to allow new Update behaviour.
* fname-uf.ads/adb (Get_File_Name): New Boolean parameter May_Fail,
defaulted to False.
When May_Fail is True and no existing file can be found, return No_File.
* 6vcstrea.adb: Inlined functions are now wrappers to implementation
functions.
* lib-writ.adb (Write_With_Lines): When body file does not exist, use
spec file name instead on the W line.
2004-02-02 Robert Dewar <dewar@gnat.com>
* ali.adb: Read and acquire info from new format restrictions lines
* bcheck.adb: Add circuits for checking restrictions with parameters
* bindgen.adb: Output dummy restrictions data
To be changed later
* ali.ads, checks.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb,
exp_ch3.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_util.adb,
freeze.adb, gnat1drv.adb, sem_attr.adb, sem_ch10.adb, sem_ch11.adb,
sem_ch12.adb, targparm.adb, targparm.ads, tbuild.adb, sem_ch2.adb,
sem_elab.adb, sem_res.adb: Minor changes for new restrictions handling.
* exp_ch9.adb (Build_Master_Entity): Cleanup the code (also suppresses
the warning message on access to possibly uninitialized variable S)
Minor changes for new restrictions handling.
* gnatbind.adb: Minor reformatting
Minor changes for new restrictions handling
Move circuit for -r processing here from bcheck (cleaner)
* gnatcmd.adb, gnatlink.adb: Minor reformatting
* lib-writ.adb: Output new format restrictions lines
* lib-writ.ads: Document new R format lines for new restrictions
handling.
* s-restri.ads/adb: New files
* Makefile.rtl: Add entry for s-restri.ads/adb
* par-ch3.adb: Fix bad error messages starting with upper case letter
Minor reformatting
* restrict.adb: Major rewrite throughout for new restrictions handling
Major point is to handle restrictions with parameters
* restrict.ads: Major changes in interface to handle restrictions with
parameters. Also generally simplifies setting of restrictions.
* snames.ads/adb: New entry for proper handling of No_Requeue
* sem_ch3.adb (Count_Tasks): New circuitry for implementing Max_Tasks
restriction counting.
Other minor changes for new restrictions handling
* sem_prag.adb: No_Requeue is a synonym for No_Requeue_Statements.
Restriction_Warnings now allows full parameter notation
Major rewrite of Restrictions for new restrictions handling
2004-02-02 Javier Miranda <miranda@gnat.com>
* par-ch3.adb (P_Identifier_Declarations): Give support to the Ada 0Y
syntax rule for object renaming declarations.
(P_Array_Type_Definition): Give support for the Ada 0Y syntax rule for
component definitions.
* sem_ch3.adb (Analyze_Component_Declaration): Give support to access
components.
(Array_Type_Declaration): Give support to access components. In addition
it was also modified to reflect the name of the object in anonymous
array types. The old code did not take into account that it is possible
to have an unconstrained anonymous array with an initial value.
(Check_Or_Process_Discriminants): Allow access discriminant in
non-limited types.
(Process_Discriminants): Allow access discriminant in non-limited types
Initialize the new Access_Definition field in N_Object_Renaming_Decl
node. Change Ada0Y to Ada 0Y in comments
* sem_ch4.adb (Find_Equality_Types): Allow anonymous access types in
equality operators.
Change Ada0Y to Ada 0Y in comments
* sem_ch8.adb (Analyze_Object_Renaming): Give support to access
renamings Change Ada0Y to Ada 0Y in comments
* sem_type.adb (Find_Unique_Type): Give support to the equality
operators for universal access types
Change Ada0Y to Ada 0Y in comments
* sinfo.adb (Access_Definition, Set_Access_Definition): New subprograms
* sinfo.ads (N_Component_Definition): Addition of Access_Definition
field.
(N_Object_Renaming_Declaration): Addition of Access_Definition field
Change Ada0Y to Ada 0Y in comments
* sprint.adb (Sprint_Node_Actual): Give support to the new syntax for
component definition and object renaming nodes
Change Ada0Y to Ada 0Y in comments
2004-02-02 Jose Ruiz <ruiz@act-europe.fr>
* restrict.adb: Use the new restriction identifier
No_Requeue_Statements instead of the old No_Requeue for defining the
restricted profile.
* sem_ch9.adb (Analyze_Requeue): Check the new restriction
No_Requeue_Statements.
* s-rident.ads: Adding restriction No_Requeue_Statements (AI-00249)
that supersedes the GNAT specific restriction No_Requeue. The later is
kept for backward compatibility.
2004-02-02 Ed Schonberg <schonberg@gnat.com>
* lib.ads, i-cobol.ads, * s-stoele.ads, s-thread.ads, style.ads,
5staprop.adb, atree.adb, atree.ads, g-crc32.ads: Remove redundant
pragma and fix incorrect ones.
* sem_prag.adb For pragma Inline and pragma Pure_Function, emit a
warning if the pragma is redundant.
2004-02-02 Thomas Quinot <quinot@act-europe.fr>
* 5staprop.adb: Add missing 'constant' keywords.
* Makefile.in: use consistent value for SYMLIB on
platforms where libaddr2line is supported.
2004-02-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* utils.c (end_subprog_body): Do not call rest_of_compilation if just
annotating types.
2004-02-02 Olivier Hainque <hainque@act-europe.fr>
* init.c (__gnat_install_handler): Setup an alternate stack for signal
handlers in the environment thread. This allows proper propagation of
an exception on stack overflows in this thread even when the builtin
ABI stack-checking scheme is used without support for a stack reserve
region.
* utils.c (create_field_decl): Augment the head comment about bitfield
creation, and don't account for DECL_BIT_FIELD in DECL_NONADDRESSABLE_P
here, because the former is not accurate enough at this point.
Let finish_record_type decide instead.
Don't make a bitfield if the field is to be addressable.
Always set a size for the field if the record is packed, to ensure the
checks for bitfield creation are triggered.
(finish_record_type): During last pass over the fields, clear
DECL_BIT_FIELD when possible in the !STRICT_ALIGNMENT case, as this is
not covered by the calls to layout_decl. Adjust DECL_NONADDRESSABLE_P
from DECL_BIT_FIELD.
From-SVN: r77110
Diffstat (limited to 'gcc/ada/ali.adb')
-rw-r--r-- | gcc/ada/ali.adb | 130 |
1 files changed, 119 insertions, 11 deletions
diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb index 37e62de..8f340e8 100644 --- a/gcc/ada/ali.adb +++ b/gcc/ada/ali.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2004 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- -- @@ -120,6 +120,13 @@ package body ALI is -- be ignored by Scan_ALI and skipped, and False if the lines -- are to be read and processed. + Restrictions_Initial : Rident.Restrictions_Info; + pragma Warnings (Off, Restrictions_Initial); + -- This variable, which should really be a constant (but that's not + -- allowed by the language) is used only for initialization, and the + -- reason we are declaring it is to get the default initialization + -- set for the object. + Bad_ALI_Format : exception; -- Exception raised by Fatal_Error if Err is True @@ -371,7 +378,6 @@ package body ALI is Skip_Space; V := 0; - loop V := V * 10 + (Character'Pos (Getc) - Character'Pos ('0')); exit when At_End_Of_Field; @@ -546,7 +552,7 @@ package body ALI is Normalize_Scalars => False, Ofile_Full_Name => Full_Object_File_Name, Queuing_Policy => ' ', - Restrictions => (others => ' '), + Restrictions => Restrictions_Initial, Sfile => No_Name, Task_Dispatching_Policy => ' ', Time_Slice_Value => -1, @@ -733,7 +739,7 @@ package body ALI is Queuing_Policy_Specified := Getc; ALIs.Table (Id).Queuing_Policy := Queuing_Policy_Specified; - -- Processing fir flags starting with S + -- Processing for flags starting with S elsif C = 'S' then C := Getc; @@ -803,7 +809,7 @@ package body ALI is C := Getc; - -- Acquire restrictions line + -- Acquire first restrictions line if C /= 'R' then Fatal_Error; @@ -815,18 +821,17 @@ package body ALI is Checkc (' '); Skip_Space; - for J in All_Restrictions loop + for R in All_Boolean_Restrictions loop C := Getc; - ALIs.Table (Id).Restrictions (J) := C; case C is when 'v' => - Restrictions (J) := 'v'; + ALIs.Table (Id).Restrictions.Violated (R) := True; + Cumulative_Restrictions.Violated (R) := True; when 'r' => - if Restrictions (J) = 'n' then - Restrictions (J) := 'r'; - end if; + ALIs.Table (Id).Restrictions.Set (R) := True; + Cumulative_Restrictions.Set (R) := True; when 'n' => null; @@ -841,6 +846,109 @@ package body ALI is C := Getc; + -- See if we have a second R line + + if C /= 'R' then + + -- If not, just ignore, and leave the restrictions variables + -- unchanged. This is useful for dealing with old format ALI + -- files with only one R line (this can be removed later on, + -- but is useful for transitional purposes). + + null; + + -- Here we have a second R line, ignore it if ignore flag set + + elsif Ignore ('R') then + Skip_Line; + C := Getc; + + -- Otherwise acquire second R line + + else + Checkc (' '); + Skip_Space; + + for RP in All_Parameter_Restrictions loop + + -- Acquire restrictions pragma information + + case Getc is + when 'n' => + null; + + when 'r' => + ALIs.Table (Id).Restrictions.Set (RP) := True; + + declare + N : constant Integer := Integer (Get_Nat); + begin + ALIs.Table (Id).Restrictions.Value (RP) := N; + + if Cumulative_Restrictions.Set (RP) then + Cumulative_Restrictions.Value (RP) := + Integer'Min (Cumulative_Restrictions.Value (RP), N); + else + Cumulative_Restrictions.Set (RP) := True; + Cumulative_Restrictions.Value (RP) := N; + end if; + end; + + when others => + Fatal_Error; + end case; + + -- Acquire restrictions violations information + + case Getc is + when 'n' => + null; + + when 'v' => + ALIs.Table (Id).Restrictions.Violated (RP) := True; + Cumulative_Restrictions.Violated (RP) := True; + + declare + N : constant Integer := Integer (Get_Nat); + pragma Unsuppress (Overflow_Check); + + begin + ALIs.Table (Id).Restrictions.Count (RP) := N; + + if RP in Checked_Max_Parameter_Restrictions then + Cumulative_Restrictions.Count (RP) := + Integer'Max (Cumulative_Restrictions.Count (RP), N); + else + Cumulative_Restrictions.Count (RP) := + Cumulative_Restrictions.Count (RP) + N; + end if; + + exception + when Constraint_Error => + + -- A constraint error comes from the addition in + -- the else branch. We reset to the maximum and + -- indicate that the real value is now unknown. + + Cumulative_Restrictions.Value (RP) := Integer'Last; + Cumulative_Restrictions.Unknown (RP) := True; + end; + + if Nextc = '+' then + Skipc; + ALIs.Table (Id).Restrictions.Unknown (RP) := True; + Cumulative_Restrictions.Unknown (RP) := True; + end if; + + when others => + Fatal_Error; + end case; + end loop; + + Skip_Eol; + C := Getc; + end if; + -- Acquire 'I' lines if present while C = 'I' loop |