This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Tested on i686-linux, committed on trunk.
In the case of subprograms and generic subprograms, library level
renamings did not propagate Is_Pure and Is_Preelaborated, with the
result that you could get an unexpected categorization error when
with'ing the renamed entity. This patch corrects that oversight.
In the following test programs, f.ads and gp.ads should compile
without any error messages:
with f2;
package f is
pragma Pure (f);
end;
function f1 (S : Integer) return Integer;
pragma Pure (f1);
with f1;
function f2 (S : Integer) return Integer renames f1;
with gp2;
package gp is
pragma Pure (gp);
end;
generic
type Source (<>) is limited private;
procedure gp1 (S : Source);
pragma Pure (gp1);
with gp1;
generic procedure gp2 renames gp1;
AI-405 decreed that null exclusions in object renamings should be allowed
but ignored for conformance checking. AI-405 ruled that null exclusions
would be forbidden altogether in renaming declarations, and added to the
RM a syntax rule to that effect. AI-423 has decided that null exclusions
are allowed in this context, and specifies the static semantic checks in
which they must participate. Thus language design converges, albeit
asymptotically.
This patch completes the current support for limited withed packages
containing nested packages.
See gnat.dg/limited_with.adb
2006-10-31 Robert Dewar <dewar@adacore.com>
Hristian Kirtchev <kirtchev@adacore.com>
Javier Miranda <miranda@adacore.com>
Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb: Minor error msg rewording
(Undefined): When checking for misspellings, invert arguments (to get
expected and found set right)
(Analyze_Subprogram_Renaming): Propagate Is_Pure, Is_Preelaborated
(Analyze_Generic_Renaming): Same fix
(Use_One_Package): Do not take into account the internal entities of
abstract interfaces during the analysis of entities that are marked
as potentially use-visible.
(Find_Type): Handle the case of an attribute reference for
implementation defined attribute Stub_Type (simply let the analysis of
the attribute reference rewrite it).
(Use_One_Type, End_Use_Type): Reject a reference to a limited view of a
type that appears in a Use_Type clause.
(Analyze_Object_Renaming): Add support for renaming of the Priority
attribute.
(Find_Type): In Ada 2005, a task type can be used within its own body,
when it appears in an access definition.
(Analyze_Object_Renaming): Remove warning on null_exclusion.
(Analyze_Object_Renaming): Introduce checks for required null exclusion
in a formal object declaration or in a subtype declaration.
(Analyze_Subprogram_Renaming): Add call to Check_Null_Exclusion.
(Check_Null_Exclusion): New local routine to
Analyze_Subprogram_Renaming. Check whether the formals and return
profile of a renamed subprogram have required null exclusions when
their counterparts of the renaming already impose them.
(In_Generic_Scope): New local routine to Analyze_Object_Renaming.
Determine whether an entity is inside a generic scope.
(In_Open_Scope): First pass of documentation update.
(Find_Expanded_Name): Add support for shadow entities associated with
limited withed packages. This is required to handle nested packages.
(Analyze_Package_Renaming): Remove the restriction imposed by AI-217
that makes a renaming of a limited withed package illegal.
Attachment:
difs
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |