blob: 8c5ee48dbf7a52331c2ebcf6f5f4b2bd647c6a06 [file] [log] [blame]
2013-12-20 Trevor saunders <tsaunders@mozilla.com>
* gcc-interface/decl.c (components_to_record): Replace stack_vec with
auto_vec.
2013-12-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in (ARM linux, GNU eabi): Tweak regexp.
2013-12-12 Eric Botcazou <ebotcazou@adacore.com>
Iain Sandoe <iain@codesourcery.com>
PR ada/55946
* gcc-interface/Make-lang.in (ada/doctools/xgnatugn): Use gnatmake.
* gcc-interface/Makefile.in (GCC_LINK): Add LDFLAGS.
(../../gnatmake): Remove LDFLAGS.
(../../gnatlink): Likewise.
2013-12-04 Eric Botcazou <ebotcazou@adacore.com>
PR ada/59382
* indepsw-darwin.adb: New file.
2013-12-04 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Add specific handling
for fields with zero size and no representation clause.
2013-12-04 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Case_Statement_to_gnu): Do not push a binding
level for each branch if this is a case expression in Ada 2012.
(gnat_to_gnu) <case N_Expression_With_Actions>: Adjust comment.
2013-11-29 Eric Botcazou <ebotcazou@adacore.com>
PR ada/54040
PR ada/59346
* s-osinte-hpux.ads (timespec): Change type of tv_nsec field to time_t.
* s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
* s-osinte-solaris-posix.ads (timespec): Likewise.
2013-11-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Loop_Statement_to_gnu): Set TREE_SIDE_EFFECTS
on the conditional expression directly.
2013-11-22 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/trans.c: Add required include files from gimple.h.
2013-11-22 David Malcolm <dmalcolm@redhat.com>
* gcc-interface/utils2.c (build_call_raise): Remove use of
input_line macro.
(build_call_raise_range): Likewise.
(build_call_raise_column): Likewise.
2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
Mike Stump <mikestump@comcast.net>
Richard Sandiford <rdsandiford@googlemail.com>
* gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi.
* gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_to_uhwi.
* gcc-interface/utils.c (make_packable_type): Likewise.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi rather than
tree_low_cst.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c:
Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* gcc-interface/cuintp.c: Update comments to refer to
tree_fits_shwi_p rather than host_integerp.
* gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_fits_uhwi_p
rather than host_integerp.
* gcc-interface/utils.c (rest_of_record_type_compilation): Likewise.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* gcc-interface/decl.c, gcc-interface/misc.c, gcc-interface/utils.c:
Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* gcc-interface/cuintp.c: Replace host_integerp (..., 0) with
tree_fits_shwi_p throughout.
2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (TARGET_ABI_OPEN_VMS): Delete as redundant.
2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): For an Out parameter passed by
copy and that don't need to be copied in, only evaluate its address.
2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Deal with an
error mark as renamed object in type annotating mode.
2013-11-15 H.J. Lu <hongjiu.lu@intel.com>
PR ada/54040
* s-linux-x32.ads: New file.
* s-osprim-x32.adb: Likewise.
* s-linux.ads (time_t): New type.
* s-linux-alpha.ads (time_t): Likewise.
* s-linux-hppa.ads (time_t): Likewise.
* s-linux-mipsel.ads (time_t): Likewise.
* s-linux-sparc.ads (time_t): Likewise.
* s-osinte-linux.ads (time_t): Mark it private. Replace long
with System.Linux.time_t.
(timespec): Replace long with time_t.
* s-osinte-posix.adb (To_Timespec): Likewise.
* s-taprop-linux.adb (timeval): Replace C.long with
System.OS_Interface.time_t.
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Replace
s-linux.ads with s-linux-x32.ads, s-osprim-posix.adb with
s-osprim-x32.adb for x32.
2013-11-14 H.J. Lu <hongjiu.lu@intel.com>
* gcc-interface/trans.c: Include gimple.h and pointer-set.h.
2013-11-14 Diego Novillo <dnovillo@google.com>
* gcc-interface/decl.c: Include stringpool.h
Include stor-layout.h
* gcc-interface/misc.c: Include stor-layout.h
Include print-tree.h
* gcc-interface/trans.c: Include stringpool.h
Include stor-layout.h
Include stmt.h
Include varasm.h
* gcc-interface/utils.c: Include stringpool.h
Include stor-layout.h
Include attribs.h
Include varasm.h
* gcc-interface/utils2.c: Include stringpool.h
Include stor-layout.h
Include attribs.h
Include varasm.h
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/trans.c: Include gimplify.h.
2013-11-11 Tristan Gingold <gingold@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (gnat_build_constructor): Also set the flag
CONSTRUCTOR_NO_CLEARING on the constructor.
2013-10-30 Sharad Singhai <singhai@google.com>
* gnat_ugn.texi: Remove option description for PR middle-end/58134.
2013-10-29 David Malcolm <dmalcolm@redhat.com>
* gcc-interface/trans.c (finalize_nrv): Update for conversion of
symtab types to a true class hierarchy.
* gcc-interface/utils.c (gnat_write_global_declarations): Likewise.
2013-10-28 Trevor Saunders <tsaunders@mozilla.com>
* gcc-interface/decl.c (components_to_record): Adjust stack vector.
2013-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc-interface/Make-lang.in (ADA_DEPS): Fix quoting.
2013-10-19 Thomas Quinot <quinot@adacore.com>
* gcc-interface/Makefile.in: Use canonical absolute path to refer to
the top source directory and to the libgcc subidrectories.
2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (scale_by_factor_of): New function.
(rest_of_record_type_compilation): Use scale_by_factor_of in order to
scale the original offset for both rounding cases; in the second case,
take into accout the addend to compute the alignment. Tidy up.
2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/cuintp.c: Remove useless include directives.
(build_cst_from_int): Use standard predicate.
(UI_To_gnu): Simplify.
(UI_From_gnu): Fix formatting.
* gcc-interface/trans.c (post_error): Likewise.
(post_error_ne): Likewise.
2013-10-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (gnat_set_type_context): New function.
(gnat_pushdecl): Use it to set the context of the type.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_Dependency_Clause):
Recognize the scenario where successful clause matching has
depleted the available refinement items and the clause to match
technically refines to null => null.
2013-10-17 Tristan Gingold <gingold@adacore.com>
* exp_prag.adb (Expand_Pragma_Import_Or_Interface): Specify
External_Name instead of Link_Name for the RTTI declaration.
2013-10-17 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Record_Possible_Body_Reference): Fix test for
being in body.
(Add_Constituent): Merged into Check_Refined_Global_Item.
(Check_Matching_Constituent): A constituent that has the proper Part_Of
option and comes from a private child or a sibling is now collected.
(Check_Matching_Modes): Merged into Check_Refined_Global_Item.
(Check_Refined_Global_Item): Code cleanup.
(Collect_Constituent): New routine.
(Inconsistent_Mode_Error): Moved out from Check_Matching_Modes.
2013-10-17 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Check_Current_Instance, Process): Add RM reference
and mention immutably limited types, when the current instance
is illegal in Ada 2012.
2013-10-17 Ed Schonberg <schonberg@adacore.com>
* sem_warn.adb (Check_Unused_Withs): If the main unit is a
subunit, apply the check to the units mentioned in its context
only. This provides additional warnings on with_clauses that
are superfluous.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Analyze_Declarations): Emit an
error message concerning state refinement when the spec defines at
least one non-null abstract state and the body's SPARK mode is On.
(Requires_State_Refinement): New routine.
2013-10-17 Robert Dewar <dewar@adacore.com>
* sem_ch7.ads: Comment fixes.
2013-10-17 Robert Dewar <dewar@adacore.com>
* sem_ch7.adb (Analyze_Package_Specification): Remove circuit
for ensuring that a package spec requires a body for some other
reason than that it contains the declaration of an abstract state.
2013-10-17 Tristan Gingold <gingold@adacore.com>
* exp_ch11.adb (Expand_N_Raise_Expression): Fix call of
Possible_Local_Raise.
2013-10-17 Thomas Quinot <quinot@adacore.com>
* exp_pakd.adb (Expand_Bit_Packed_Element_Set): Unchecked
conversion of Or_Rhs to Etype of New_Rhs is required only when
the latter is the result of a byte swap operation.
2013-10-17 Thomas Quinot <quinot@adacore.com>
* exp_dist.adb (Build_To_Any_Function): For a type with opaque
representation that is not transmitted as an unconstrained value,
use 'Write, not 'Output, to generate the opaque representation.
2013-10-17 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Short_Circuit): Only
generate expression-with-action when full expansion is set.
2013-10-17 Yannick Moy <moy@adacore.com>
* debug.adb Remove obsolete comment.
2013-10-17 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb (Process_Transient_Object.Find_Enclosing_Contexts):
Avoid late insertion when expanding an expression with action
nested within a transient block; Do not inconditionally generate
a finalization call if the generated object is from a specific
branch of a conditional expression.
2013-10-17 Pascal Obry <obry@adacore.com>
* g-arrspl.adb: Ensure Finalize call is idempotent.
* g-arrspl.adb (Finalize): Makes the call idempotent.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Is_Matching_Input): Account
for the case where a state with a null refinement appears as
the last input of a refinement clause.
2013-10-17 Robert Dewar <dewar@adacore.com>
* sem_aux.ads, sem_aux.adb: Minor reformatting.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb, aspects.ads, sem_prag.ads: Remove all entries
for Refined_Pre from the various tables.
* par-prag.adb: Remove the entry for Refined_Pre from the list
of pragmas not needing special processing by the parser.
* sem_ch13.adb (Analyze_Aspect_Specifications):
Remove the processing for aspect Refined_Pre.
(Check_Aspect_At_Freeze_Point): Remove the entry for aspect
Refined_Pre.
* sem_prag.adb (Analyze_Pragma): Refined_Pre is no longer a
valid assertion kind. Remove the analysis of pragma Refined_Pre.
(Analyze_Refined_Pragma): Update the comment on usage.
(Find_Related_Subprogram_Or_Body): Update the comment on
usage. Pragma Refined_Pre is no longer processed by this routine.
(Is_Valid_Assertion_Kind): Refined_Pre is no longer a valid
assertion kind.
* snames.ads-tmpl: Remove predefined name Refined_Pre. Remove
the pragma id for Refined_Pre.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb, exp_util.ads (Entity_Of): Moved to Sem_Util.
* sem_prag.adb (Analyze_Global_In_Decl_List): Mark a null
item list as being analyzed.
(Analyze_Global_List): Mark a
null global list and multiple global items as being analyzed.
(Analyze_Input_Item): Check the unit that defines the input
variable or state, not the reference to it.
* sem_util.ads, sem_util.adb (Entity_Of): Moved from Exp_Util. Ensure
that the input has an entity.
2013-10-17 Thomas Quinot <quinot@adacore.com>
* exp_util.adb (Get_Current_Value_Condition,
Set_Current_Value_Condition): Handle the case of expressions
with actions * exp_util.adb (Insert_Actions): Handle the case
of an expression with actions whose Actions list is empty.
* exp_util.adb (Remove_Side_Effects.Side_Effect_Free): An
expression with actions that has no Actions and whose Expression
is side effect free is itself side effect free.
* exp_util.adb (Remove_Side_Effects): Do not set an incorrect etype on
temporary 'R' (Def_Id), which is in general an access to Exp_Type, not
an Exp_Type.
* sem_res.adb (Resolve): For an expression with
actions, resolve the expression early. * sem_res.adb
(Resolve_Expression_With_Actions): Rewrite an expression with
actions whose value is compile time known and which has no
actions into just its expression, so that its constant value is
available downstream.
* sem_res.adb (Resolve_Short_Circuit):
Wrap the left operand in an expression with actions to contain
any required finalization actions.
* exp_ch4.adb (Expand_Expression_With_Actions): For an
expression with actions returning a Boolean expression, ensure
any finalization action is kept within the Actions list.
* sem_warn.adb (Check_References, Check_Unset_Reference): add
missing circuitry to handle expressions with actions.
* checks.adb (Ensure_Valid): For an expression with actions,
insert the validity check on the Expression.
* sem_ch13.adb (Build_Static_Predicate.Get_RList): An expression
with actions that has a non-empty Actions list is not static. An
expression with actions that has an empty Actions list has the
static ranges of its Expression.
* sem_util.adb (Has_No_Obvious_Side_Effects): An expression with
actions with an empty Actions list has no obvious side effects
if its Expression itsekf has no obvious side effects.
2013-10-17 Ed Schonberg <schonberg@adacore.com>
* sem_aux.ads, sem_aux.adb (Is_Immutably_Limited_Type): Make
predicate compatible with Ada 2012 definition
(Is_Limited_View): New name for previous version of
Is_Immutably_Limited_Type. Predicate is true for an untagged
record type with a limited component.
* exp_ch7.adb, exp_ch6.adb, exp_ch4.adb, exp_ch3.adb, exp_aggr.adb,
sem_util.adb, sem_res.adb, sem_prag.adb, sem_attr.adb, sem_ch8.adb,
sem_ch6.adb, sem_ch3.adb, exp_util.adb: Use Is_Limited_View
* freeze.adb Use Is_Immutably_Limited_Type to check the legality
of references to the current instance, Is_Limited_View otherwise.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Flag aspect
Refined_Pre as not supported.
* sem_prag.adb (Analyze_Pragma): Ignore pragma Refined_Pre.
2013-10-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Validated_Access_Subprogram_Instance): According
to AI05-288, actuals for access_to_subprograms must be subtype
conformant with the generic formal. Previous to AI05-288
only mode conformance was required, but the AI is a binding
interpretation that applies to previous versions of the language,
2013-10-17 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Minor text correction.
* ug_words: Add entry for -gnateu /IGNORE_UNRECOGNIZED.
* vms_data.ads: Add /IGNORE_UNRECOGNIZED for -gnateu.
2013-10-17 Tristan Gingold <gingold@adacore.com>
* impunit.adb (Non_Imp_File_Names_95): Add g-cppexc.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Constituent): Move the check
concerning option Part_Of to routine Check_Matching_Constituent.
(Check_Matching_Constituent): Verify that an abstract state
that acts as a constituent has the proper Part_Of option in
its aspect/pragma Abstract_State. Account for the case when a
constituent comes from a private child or private sibling.
* sem_util.ads, sem_util.adb (Is_Child_Or_Sibling): New routine.
2013-10-17 Tristan Gingold <gingold@adacore.com>
* g-cppexc.adb, g-cppexc.ads: New files.
* gcc-interface/Makefile.in: Add g-cppexc when building zcx runtimes.
2013-10-17 Thomas Quinot <quinot@adacore.com>
* exp_ch7.adb: Minor reformatting.
2013-10-17 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Process_Minus, Process_Divide): Label dimension
expression with standard operator and type, for pretty-printing
use.
2013-10-17 Bob Duff <duff@adacore.com>
* gnat_ugn.texi: Document --pp-new and --pp-old switches.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag 159 is now known as From_Limited_With. Replace
all references to attribute From_With_Type with From_Limited_With.
(From_With_Type): Renamed to From_Limited_With.
(Set_From_With_Type): Renamd to Set_From_Limited_With.
* einfo.ads: Remove attribute From_With_Type and occurrences in
nodes. Add attribute From_Limited_With along with occurrences
in nodes.
(From_With_Type): Renamed to From_Limited_With along with pragma Inline.
(Set_From_With_Type): Renamed to
Set_From_Limited_With along with pragma Inline.
* sem_ch7.adb, sem_ch8.adb, sem_ch12.adb, sem_ch13.adb, sem_disp.adb,
sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb,
exp_attr.adb, exp_disp.adb, freeze.adb, itypes.adb, layout.adb,
lib-writ.adb, rtsfind.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
sem_ch4.adb: Replace all references to attribute From_With_Type
with From_Limited_With.
* sem_ch6.adb: Replace all references to attribute From_With_Type
with From_Limited_With.
(Designates_From_With_Type): Renamed to Designates_From_Limited_With.
(Process_Formals): Update the call to Designates_From_With_Type.
* sem_ch10.adb: Replace all references to attribute From_With_Type
with From_Limited_With.
(Build_Limited_Views): Reimplemented.
* gcc-interface/decl.c Replace all references to attribute
From_With_Type with From_Limited_With.
(finalize_from_with_types): Renamed to finalize_from_limited_with.
* gcc-interface/gigi.h (finalize_from_with_types): Renamed to
finalize_from_limited_with.
* gcc-interface/trans.c: Replace all references to attribute
From_With_Type with From_Limited_With.
(Compilation_Unit_to_gnu): Update the call to finalize_from_with_types.
2013-10-17 Pascal Obry <obry@adacore.com>
* projects.texi: Update VCS_Kind documentation.
2013-10-17 Matthew Heaney <heaney@adacore.com>
* a-convec.adb, a-coinve.adb, a-cobove.adb (Insert, Insert_Space):
Inspect value range before converting type.
2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Flag the use of pragma Refined_Pre as
illegal.
2013-10-17 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Remove VMS conversion of -gnatet and -gnateT,
now that they are both in ug_words.
* ug_words: Update qualifier for -gnatet Add qualifier for -gnateT
* vms_data.ads: Update qualifier for -gnatet Add qualifier
for -gnateT
* projects.texi: Continue to update the project documentation
for VMS.
2013-10-17 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb (Has_Body_References): New flag.
(Body_References): New field.
* sem_prag.adb (Record_Possible_Body_Reference): New procedure
(Analyze_Input_Output): Call Record_Possible_Body_Reference
(Analyze_Global_Item): Call Record_Possible_Body_Reference
(Analyze_Refinement_Clause): Output messages if illegal global refs.
2013-10-17 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Check_Component_Storage_Order): Reject a record or
array type that does not have an explicit Scalar_Storage_Order
attribute definition if a component of the record, or the
elements of the array, have one.
* gnat_rm.texi (attribute Scalar_Storage_Order): Document the above
rule.
2013-10-17 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Add examples of switches -gnateD, including
one where the value is a string.
* projects.texi: Do not convert switches in project files to
VMS qualifiers.
2013-10-17 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Report_Extra_Clauses): Don't complain about
refinements with null input since null should be considered to
always match.
2013-10-17 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document -gnatw.y/-gnatw.Y.
* opt.ads (List_Body_Required_Info): New flag.
* prep.adb: Minor reformatting.
* sem_ch7.adb (Unit_Requires_Body_Info): New
procedure (Analyze_Package_Specification): Add call to
Unit_Requires_Body_Info.
* ug_words: Add entries for -gnatw.y and -gnatw.Y.
* usage.adb: Add line for new warning switch -gnatw.y/.Y.
* vms_data.ads: Add entry for [NO_]WHY_SPEC_NEEDS_BODY warning
qualifier.
* warnsw.ads, warnsw.adb: Implement new warning switch -gnatw.y/.Y.
2013-10-17 Yannick Moy <moy@adacore.com>
* sem_ch8.adb (Find_Direct_Name): Keep track of assignments for
renamings in SPARK mode.
2013-10-17 Yannick Moy <moy@adacore.com>
* exp_spark.adb (Expand_SPARK): Remove special case for NOT IN
operation.
* sinfo.ads: Add special comment section to describe SPARK mode
effect on tree.
* exp_spark.ads: Remove comments, moved to sinfo.ads.
2013-10-17 Yannick Moy <moy@adacore.com>
* exp_ch3.adb (Expand_Freeze_Class_Wide_Type,
Expand_Freeze_Class_Wide_Type, Expand_Freeze_Class_Wide_Type):
Remove useless special cases.
* exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Allocator,
Expand_N_Op_Expon): Remove useless special cases.
* exp_ch6.adb (Is_Build_In_Place_Function_Call): Disable build-in-place
in SPARK mode by testing Full_Expander_Active instead of
Expander_Active.
(Make_Build_In_Place_Call_In_Allocator): Remove useless special case.
* exp_util.adb (Build_Allocate_Deallocate_Proc): Remove
useless special case.
* sem_eval.adb (Compile_Time_Known_Value): Remove special handling of
deferred constant.
2013-10-17 Yannick Moy <moy@adacore.com>
* gnat_ugn.texi: Document -gnateT and target file format.
2013-10-17 Vincent Celier <celier@adacore.com>
* prep.adb (Check_Command_Line_Symbol_Definition): Is_A_String is
always False, even when the value starts and ends with double quotes.
2013-10-17 Tristan Gingold <gingold@adacore.com>
* a-exexpr-gcc.adb: Synchronize declarations of other/all others.
2013-10-17 Thomas Quinot <quinot@adacore.com>
* exp_pakd.adb: Add missing guard protecting Reverse_Storage_Order
call.
* sem_res.adb: Minor code cleanup: use named parameter association
(not positional) for Boolean parameter Sec_Stack in calls to
Establish_Transient_Scope.
2013-10-15 Thomas Quinot <quinot@adacore.com>
* exp_pakd.adb (Expand_Packed_Element_Set,
Expand_Packed_Element_Reference): Adjust for the case of packed
arrays of reverse-storage-order types.
2013-10-15 Robert Dewar <dewar@adacore.com>
* sem_prag.adb: Minor reformatting.
2013-10-15 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute_Specification, case
To_Address): If the expression is an identifier, do not modify
its type; it will be converted when necessary, and the type of
the expression must remain consistent with that of the entity
for back-end consistency.
2013-10-15 Robert Dewar <dewar@adacore.com>
* sem_ch7.adb (Unit_Requires_Body): Add flag
Ignore_Abstract_State (Analyze_Package_Specification): Enforce
rule requiring Elaborate_Body if a non-null abstract state is
specified for a library-level package.
* sem_ch7.ads (Unit_Requires_Body): Add flag Ignore_Abstract_State.
2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Constituent): When
a state acts as a constituent of another state, ensure that
the said state has a Part_Of dependency in its corresponding
aspect/pragma Abstract_State.
2013-10-15 Robert Dewar <dewar@adacore.com>
* par-ch4.adb (P_If_expression): Handle redundant ELSE cleanly.
2013-10-15 Thomas Quinot <quinot@adacore.com>
* atree.ads (New_Copy, Relocate_Node): Improve documentation
(note that these subprograms reset Is_Overloaded).
2013-10-15 Thomas Quinot <quinot@adacore.com>
* checks.adb (Check_Needed): Handle the case where the test in
the left operand of the short circuit is wrapped in a qualified
expression, type conversion, or expression with actions.
2013-10-15 Thomas Quinot <quinot@adacore.com>
* sem_type.adb, sem_type.ads (Save_Interps): Also propagate
Is_Overloaded to New_N, for consistency.
2013-10-15 Ed Schonberg <schonberg@adacore.com>
* a-tienau.adb (Put): Use file parameter to query values of
current column and line length.
2013-10-15 Robert Dewar <dewar@adacore.com>
* sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
Minor reformatting.
2013-10-15 Eric Botcazou <ebotcazou@adacore.com>
* targparm.ads: Fix minor typo in comment.
2013-10-15 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb: handle full views that are derived from private
types.
* sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
mode: the elaboration entity is not in the source, and plays no
role in semantic analysis. Minor reformatting.
2013-10-15 Tristan Gingold <gingold@adacore.com>
* adaint.c (__gnat_get_executable_load_address): Remove AIX
specific code.
2013-10-15 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Aggr_Size_OK): Refine criteria to better handle
large static aggregates with static record components, to avoid
generating a large number of asignments. Conversely, improve
handling of aggregates initialized by a single association,
which are most efficiently implemented with a loop.
2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Input_Item): Emit an
error when the input item comes from the related package.
2013-10-15 Arnaud Charlet <charlet@adacore.com>
* exp_ch11.adb (Expand_Exception_Handlers): Restrict previous
change.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* gcc-interface/gigi.h (standard_datatypes): Add
ADT_set_exception_parameter_decl
(set_exception_parameter_decl): New macro.
* gcc-interface/trans.c (gigi): Initialize set_exception_parameter_decl.
(Exception_Handler_to_gnu_zcx): Initialize the choice parameter.
* gcc-interface/trans.c: Synchronize declarations of other/all others
between gigi and the runtime.
2013-10-14 Robert Dewar <dewar@adacore.com>
* exp_attr.adb (Find_Stream_Subprogram): Optimize
Storage_Array stream handling.
(Find_Stream_Subprogram): Optimize Stream_Element_Array stream handling
* rtsfind.ads: Add entry for Stream_Element_Array Add
entries for RE_Storage_Array subprograms Add entries for
RE_Stream_Element_Array subprograms
* s-ststop.ads, s-ststop.adb: Add processing for System.Storage_Array.
Add processing for Ada.Stream_Element_Array.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* a-except-2005.ads, a-except-2005.adb:
(Get_Exception_Machine_Occurrence): New function.
* raise-gcc.c (__gnat_unwind_exception_size): New constant.
2013-10-14 Robert Dewar <dewar@adacore.com>
* sem_res.adb: Minor fix to error message text.
* errout.ads, erroutc.ads: Minor reformatting.
* s-ststop.ads, s-stratt.ads: Clean up documentation of block IO
mode for streams.
* s-stratt-xdr.adb: Minor comment update.
2013-10-14 Robert Dewar <dewar@adacore.com>
* sem_aux.adb, sem_aux.ads, sem_prag.adb: Minor reformatting.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Actuals): Add error message for a
subprogram with an in-out parameter when used in a predicate,
to clarify subsequent error at the point of call.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Is_Matching_Input): Consume a matching null input.
2013-10-14 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Record): Don't give warning about packed
and foreign convention.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* sem_aux.adb, sem_aux.ads (Package_Specification): New function, to
replace the less efficient idiom Specification.
(Unit_Declaration_Node (Pack_Id)), which handles library units and
child units.
* sem_ch3.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, sem_ch6.adb,
exp_disp.adb, sem_cat.adb, exp_dist.adb: Use Package_Specification.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb (Expand_Update_Attribute): Update the call to
Process_Range_Update.
(Process_Range_Update): Add new formal parameter Typ and associated
comment on usage. Add local constant Index_Typ. Add a type conversion
as part of the indexed component to ensure that the loop variable
corresponds to the index type.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* a-exexpr-gcc.adb: Adjust comment.
(Others_Value, All_Others_Value,
Unhandled_Others_Value): Declare as Character to slightly reduce
memory footprint.
2013-10-14 Robert Dewar <dewar@adacore.com>
* freeze.adb (Size_Known): Size is not known for packed record
with aliased components
2013-10-14 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor fix to error message.
* a-exexpr-gcc.adb, sem_util.adb, sem_case.adb, exp_ch11.adb: Minor
reformatting.
2013-10-14 Arnaud Charlet <charlet@adacore.com>
* exp_ch11.adb: Fix typo.
2013-10-14 Thomas Quinot <quinot@adacore.com>
* exp_util.ads: Minor reformatting.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Derived_Record_Type): Reject full views
with no explicit discriminant constraints, when the parents of
the partial view and the full view are constrained subtypes with
different constraints.
2013-10-14 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Array_Type): New procedure, abstracts out
this code from Freeze.
(Freeze_Array_Type): Detect pragma Pack overriding foreign convention
(Freeze_Record_Type): Ditto.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Dependency_Clause): Add new local variable
Non_Null_Output_Seen. Update the call to Analyze_Input_Output.
(Analyze_Input_Item): Streamline the detection mechanism of null and
non-null items.
(Analyze_Input_List): Add new local variable
Non_Null_Input_Seen. Update all calls to Analyze_Input_Output.
(Analyze_Input_Output): Add new formal parameter Non_Null_Seen
and update the related comment on usage. Update the
recursive call to itself. Attribute 'Result is now treated
as a non-null item. Detect mixes of null and non-null items.
(Analyze_Initialization_Item): Streamline the detection mechanism
of null and non-null items.
2013-10-14 Vincent Celier <celier@adacore.com>
* projects.texi: Add documentation for the new project level
attribute Library_Rpath_Options.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* a-exexpr-gcc.adb (Set_Exception_Parameter): New procedure.
(Set_Foreign_Occurrence): New procedure, extracted from
Setup_Current_Excep.
* exp_ch11.adb (Expand_Exception_Handlers): Do not expand choice
parameter in case of zcx.
* sem_ch11.adb (Analyze_Exception_Handlers): Need debug info
for the choice parameter.
* raise-gcc.c: Add comments.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add an entry in table Canonical_Aspect for
Initial_Condition.
* aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
Aspect_Names and Aspect_Delay for Initial_Condition.
* einfo.adb (Get_Pragma): Include pragma Initial_Condition to
categorization pragmas.
* einfo.ads (Get_Pragma): Update comment on usage.
* exp_ch7.adb (Expand_N_Package_Body): Add a runtime check to
verify the assertion introduced by pragma Initial_Condition.
(Expand_N_Package_Declaration): Add a runtime check to
verify the assertion introduced by pragma Initial_Condition.
(Expand_Pragma_Initial_Condition): New routine.
* par-prag: Include pragma Initial_Condition to the list of
pragmas that do not require special processing by the parser.
* sem_ch3.adb (Analyze_Declarations): Analyze pragma
Initial_Condition at the end of the visible declarations.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
for aspect Initial_Condition.
(Check_Aspect_At_Freeze_Point):
Aspect Initial_Condition does not need inspection at freezing.
* sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part):
New routine.
(Analyze_Pragma): Update all calls
to Check_Declaration_Order. Add processing for pragma
Initial_Condition. Initial_Condition is now a valid assertion
kind. Add an entry in table Sig_Flags for Initial_Condition.
(Check_Declaration_Order): Reimplemented to handle arbitrary
pragmas.
(Is_Valid_Assertion_Kind): Add an entry for
Initial_Condition.
* sem_pag.ads (Analyze_Initial_Condition_In_Decl_Part):
New routine.
* sem_util.adb (Add_Contract_Item): Pragma Initial_Condition
can now be associated with a package spec.
* sem_util.ads (Add_Contract_Item): Update comment on usage.
* sinfo.ads: Update the documentation of node N_Contract
* snames.ads-tmpl: Add new predefined name Initial_Condition. Add
new pragma id for Initial_Condition.
2013-10-14 Thomas Quinot <quinot@adacore.com>
* exp_pakd.adb: Minor reformatting.
2013-10-14 Robert Dewar <dewar@adacore.com>
* exp_prag.adb: Minor reformatting.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* sem_case.adb (Check_Against_Predicate): Handle properly an
others clause in various cases.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_Matching_Constituent): Do
not inspect the hidden states if there are no hidden states. This
case arises when the constituents are states coming from a
private child.
2013-10-14 Doug Rupp <rupp@adacore.com>
* init.c [ARMEL and VxWorks] (__gnat_map_signal): Re-arm guard
page by clearing VALID bit vice setting page protection.
2013-10-14 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi, adaint.c: Fix typo.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_Variable, In_Protected_Function): In the
body of a protected function, the protected object itself is a
constant (not just its components).
2013-10-14 Vincent Celier <celier@adacore.com>
* snames.ads-tmpl: Add new standard name Library_Rpath_Options.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* sem_prag.adb (Process_Import_Or_Interface): Allow importing
of exception using convention Cpp.
* exp_prag.adb (Expand_Pragma_Import_Or_Interface): Expand cpp
imported exceptions.
* raise-gcc.c (is_handled_by): Filter C++ exception occurrences.
* gnat_rm.texi: Document how to import C++ exceptions.
2013-10-14 Jose Ruiz <ruiz@adacore.com>
* sem_ch13.adb (Sem_Ch13.Analyze_Aspect_Specification): For
Priority and CPU aspects, when checking, issue a warning only
if it is obviously not a main program.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* adaint.c: Fix condition for AIX. Minor reformatting.
2013-10-14 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_prag.adb, prj.ads: Minor reformatting.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Depends_In_Decl_Part):
Rename Outputs_Seen to All_Outputs_Seen and update all occurrences
of the variable.
(Analyze_Input_Output): Add an item to
All_Inputs_Seen when it is an input or a self-referential output.
(Check_Mode): Comment reformatting.
(Analyze_Abstract_State): Remove the restriction that an Export state
must also have mode Input_Only or Output_Only.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag 263 is now known as Has_Visible_Refinement.
(Has_Non_Null_Refinement): New routine.
(Has_Null_Refinement): The routine is now synthesized.
(Has_Visible_Refinement): New routine.
(Set_Has_Visible_Refinement): New routine.
(Write_Entity_Flags): Remove the output for
Has_Null_Refinement. Add output for Has_Visible_Refinement.
* einfo.ads: Update the occurrences of Has_Non_Null_Refinement,
Has_Null_Refinement and Has_Visible_Refinement in entities.
(Has_Non_Null_Refinement): New synthesized attribute.
(Has_Null_Refinement): This attribute is now synthesized.
(Has_Visible_Refinement): New routine with corresponding
pragma Inline.
(Set_Has_Visible_Refinement): New routine with corresponding pragma
Inline.
* sem_ch3.adb (Analyze_Declarations): Add new local
variable In_Package_Body. Remove state refinements from
visibility at the end of the package body declarations.
(Remove_Visible_Refinements): New routine.
* sem_prag.adb (Analyze_Constituent): Collect a null
constituent and mark the state as having visible refinement.
(Analyze_Global_Item): Use attribute Has_Visible_Refinement to
detect a state with visible refinement.
(Analyze_Input_Output): Use attribute Has_Visible_Refinement to detect
a state with visible refinement.
(Check_Dependency_Clause): Use attribute Has_Non_Null_Refinement rather
than checking the contents of list Refinement_Constituents.
(Check_In_Out_States): Use attribute Has_Non_Null_Refinement rather
than checking the contents of list Refinement_Constituents.
(Check_Input_States): Use attribute Has_Non_Null_Refinement rather
than checking the contents of list Refinement_Constituents.
(Check_Matching_Constituent): Mark a state as having visible refinement.
(Check_Output_States): Use attribute Has_Non_Null_Refinement rather than
checking the contents of list Refinement_Constituents.
(Check_Refined_Global_Item): Use attribute Has_Visible_Refinement
to detect a state with visible refinement.
(Is_Matching_Input): Use attribute Has_Non_Null_Refinement rather than
checking the contents of list Refinement_Constituents.
* sem_util.adb (Is_Refined_State): Use attribute
Has_Visible_Refinement to detect a state with visible refinement.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_Mode): Do not emit an
error when inspecting a self referencial output item of an
unconstrained type.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* exp_prag.adb (Expand_Pragma_Import_Export_Exception): Fix
target type for code of VMS imported exception.
* init.c: Replace Exception_Code by void *.
* s-vmexta.adb (Hash, Base_Code_In): Adjust code after changing
the type of Exception_Code.
2013-10-14 Vincent Celier <celier@adacore.com>
* prj.ads: Minor comment updates.
* prj-attr.adb: New attribute Library_Rpath_Options.
2013-10-14 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Library_Level attribute now applies to an
entity name.
* sem_attr.adb (Analyze_Attribute, case Library_Level): Prefix
is now an entity name.
2013-10-14 Jose Ruiz <ruiz@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specification): For
Priority and CPU aspects in subprograms, the expression in the
aspect is analyzed and exported.
2013-10-14 Robert Dewar <dewar@adacore.com>
* s-valuti.adb, prep.adb, scng.adb, errout.adb: Minor reformatting.
2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
* adaint.c: Further disable __gnat_get_executable_load_address
for Linux.
2013-10-14 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Add documentation for comparing symbols to
integers in preprocessing expressions.
2013-10-14 Jose Ruiz <ruiz@adacore.com>
* sem_prag.adb (Analyze_Aspect_Specification): For
Priority and CPU aspects in subprograms, the expression in the
aspect is analyzed and exported.
(Analyze_Pragma): When having a Priority pragma in the
main subprogram, load a unit that will force the initialization
of the tasking run time, which is needed for setting the required
priority.
2013-10-14 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Check_Interfaces): Put in Other_Interfaces all
non Ada interface files.
* prj.ads (Project_Data): New component Other_Interfaces.
2013-10-14 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Target pairs clean ups.
2013-10-14 Vincent Celier <celier@adacore.com>
* errout.adb (Write_Error_Summary): Do not output the number
of lines when Main_Source_File is unknown.
(Output_Messages): Do not write the header when Main_Source_File is
unknown.
2013-10-14 Vincent Celier <celier@adacore.com>
* prep.adb (Expression): Accept terms of the form 'symbol <relop>
integer", where relop is =, <, <=, > or >=.
(Parse_Def_File): Accept literal integer values.
* gcc-interface/Make-lang.in: Add s-valint.o, s-valuns.o and
s-valuti.o to the compiler object files.
2013-10-14 Robert Dewar <dewar@adacore.com>
* exp_prag.adb, exp_ch11.adb, s-exctab.adb: Minor reformatting.
* usage.adb: Add line for -gnateu switch.
2013-10-14 Vincent Celier <celier@adacore.com>
* lib-writ.ads: Add comments to indicate that a path name in
D lines may be quoted if the path name includes directories
with spaces.
2013-10-14 Robert Dewar <dewar@adacore.com>
* debug.adb: Document -gnatd.E.
* gnat1drv.adb (Adjust_Global_Switches): Set Error_To_Warning
if -gnatd.E set.
* opt.ads (Error_To_Warning): New switch.
* osint.adb: Minor reformatting.
* sem_warn.adb (Warn_On_Overlapping_Actuals): Overlap is error
in some cases in Ada 2012 mode (unless Error_To_Warning) is set.
* sem_warn.ads (Warn_On_Overlapping_Actuals): Document error
in Ada 2012 mode.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* cstand.adb: Add a comment for Standard_Exception_Type.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Process_Transient_Object): If a transient scope
has already been created, use the corresponding Node_To_Be_Wrapped
as the insertion point for the controlled actions.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* cstand.adb (Create_Standard): Change Import_Code component
of Standard_Exception_Type to Foreign_Data. Its type is now
Standard_A_Char (access to character).
* exp_prag.adb (Expand_Pragma_Import_Export_Exception): Adjust
definition of Code to match the type of Foreign_Data.
* s-stalib.ads (Exception_Data): Replace Import_Code by Foreign_Data
Change the definition of standard predefined exceptions.
(Exception_Code): Remove.
* raise.h (Exception_Code): Remove (Exception_Data): Replace
Import_Code field by Foreign_Data.
* rtsfind.ads (RE_Exception_Code): Remove
(RE_Import_Address): Add.
* a-exexpr-gcc.adb (Import_Code_For): Replaced by Foreign_Data_For.
* exp_ch11.adb (Expand_N_Exception_Declaration): Associate null
to Foreign_Data component.
* raise-gcc.c (Import_Code_For): Replaced by Foreign_Data_For.
(is_handled_by): Add comments. Use replaced function. Change
condition so that an Ada occurrence is never handled by
Foreign_Exception.
* s-exctab.adb (Internal_Exception): Associate Null_Address to
Foreign_Data component.
* s-vmexta.adb, s-vmexta.ads (Exception_Code): Declare Replace
SSL.Exception_Code by Exception_Code.
2013-10-14 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document -gnateu switch.
* opt.ads (Ignore_Unrecognized_VWY_Switches): New switch.
* stylesw.adb: Ignore unrecognized switch if
Ignore_Unrecognized_VWY_Switches set.
* switch-c.adb: Implement -gnateu (sets
Ignore_Unrecognized_VWY_Switches).
* validsw.adb: Ignore unrecognized switch if
Ignore_Unrecognized_VWY_Switches set.
* warnsw.adb: Ignore unrecognized switch if
Ignore_Unrecognized_VWY_Switches set.
2013-10-14 Robert Dewar <dewar@adacore.com>
* exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor
reformatting.
2013-10-14 Vincent Celier <celier@adacore.com>
* ali.adb (Get_File_Name): New Boolean parameter May_Be_Quoted,
defaulted to False. Calls Get_Name with May_Be_Quoted.
(Get_Name): New Boolean parameter May_Be_Quoted, defaulted to
False. If May_Be_Quoted is True and first non blank charater is
'"', unquote the name.
(Scan_ALI): For the file/path name on the D line, call Get_File_Name
with May_Be_Quoted = True, as it may have been quoted.
* lib-util.adb, lib-util.ads (Write_Info_Name_May_Be_Quoted): New
procedure to write file/path names that may contain spaces and if they
do are quoted.
* lib-writ.adb (Write_ALI): Use new procedure
Write_Info_Name_May_Be_Quoted to write file/path names on D lines.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Depends_In_Decl_Part,
Analyze_Global_In_Decl_Part,
Analyze_Pre_Post_Condition_In_Decl_Part): Install the subprogram
and its formals only when it is not already installed.
* sem_util.adb (Is_Refined_State): A state is refined when it
has a non-empty list of constituents.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* adaint.c: Disable __gnat_get_executable_load_address for linux.
* exp_prag.adb: Add comment in Expand_Pragma_Import_Export_Exception.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* s-vmexta.ads: Add comments.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
for pragma Refined_State.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
for aspect Refined_Depends.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
Use Find_Related_Subprogram_Or_Body to find the related
context. Use the current scope when determining whether to
ensure proper visibility.
(Analyze_Depends_In_Decl_Part):
Add local variable Spec_Id. Update the comment on usage of
Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
related context. Extract the corresponding spec of the body
(if any). Use the current scope when determining when to
ensure proper visibility.
(Analyze_Global_In_Decl_Part):
Add local variable Spec_Id. Update the comment on usage of
Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
related context. Extract the corresponding spec of the body
(if any). Use the current scope when determining when to
ensure proper visibility.
(Analyze_Global_Item): Use the
entity of the subprogram spec when performing formal parameter
checks. Perform state-related checks.
(Analyze_Input_Output):
Use Is_Attribute_Result to detect 'Result. Query the
entity of a subprogram spec when verifying the prefix of
'Result. Perform state-related checks. (Analyze_Pragma):
Merge the analysis of Refined_Depends and Refined_Global.
(Analyze_Refined_Depends_In_Decl_Part): Provide implemenation.
(Analyze_Refined_Global_In_Decl_Part): Move state-related checks
to the body of Analyze_Global_In_Decl_Part. Rename local constant
List to Items. (Analyze_Refined_Pragma): Remove circuitry to
find the proper context, use Find_Related_Subprogram_Or_Body
instead.
(Check_Function_Return): Query the entity of
the subprogram spec when verifying the use of 'Result.
(Check_In_Out_States, Check_Input_States, Check_Output_States):
Avoid using Has_Null_Refinement to detect a state with
a non-null refinement, use the Refinement_Constituents
list instead.
(Check_Matching_Constituent): Remove initialization code.
(Check_Mode_Restriction_In_Function): Use the entity of the subprogram
spec when verifying mode usage in functions.
(Collect_Global_Items): New routine.
(Collect_Subprogram_Inputs_Outputs): Add local
variable Spec_Id. Add circuitry for bodies-as-specs. Use
pragma Refined_Global when collecting for a body.
(Create_Or_Modify_Clause): Use the location of the
clause. Rename local variable Clause to New_Clause to avoid
confusion and update all occurrences. Use Is_Attribute_Result
to detect 'Result.
(Find_Related_Subprogram): Removed.
(Find_Related_Subprogram_Or_Body): New routine.
(Is_Part_Of): Move routine to top level.
(Normalize_Clause): Update the
comment on usage. The routine can now normalize a clause with
multiple outputs by splitting it.
(Collect_Global_Items):
Rename local constant List to Items. Remove the check for
a null list.
(Requires_Profile_Installation): Removed.
(Split_Multiple_Outputs): New routine.
* sem_prag.ads: Update the comments on usage of various
pragma-related analysis routines.
* sem_util.adb (Contains_Refined_State): The routine can now
process pragma [Refined_]Depends.
(Has_Refined_State): Removed.
(Has_State_In_Dependency): New routine.
(Has_State_In_Global): New routine.
(Is_Attribute_Result): New routine.
* sem_util.ads (Is_Attribute_Result): New routine.
2013-10-14 Emmanuel Briot <briot@adacore.com>
* s-regpat.adb (Compile): Fix finalization of the automaton
when its size was automatically computed to be exactly 1000 bytes.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Complete_Private_Subtype): If the full view of
the base type is constrained, the full view of the subtype is
known to be constrained as well.
2013-10-14 Vincent Celier <celier@adacore.com>
* projects.texi: Add documentation for new attributes of package
Clean: Artifacts_In_Object_Dir and Artifacts_In_Exec_Dir.
2013-10-14 Tristan Gingold <gingold@adacore.com>
* adaint.c, adaint.h (__gnat_get_executable_load_address):
New function.
* a-exexda.adb (Append_Info_Basic_Exception_Traceback): Add
executable load address (Basic_Exception_Tback_Maxlength): Adjust.
2013-10-14 Vincent Celier <celier@adacore.com>
* prj-attr.adb: New attributes in package Clean:
Artifacts_In_Exec_Dir, Artifacts_In_Object_Dir.
* prj-nmsc.adb (Process_Clean (Attributes)): New
procedure to process attributes Artifacts_In_Exec_Dir and
Artifacts_In_Object_Dir in package Clean.
* prj.ads (Project_Configuration): New components
Artifacts_In_Exec_Dir and Artifacts_In_Object_Dir.
* snames.ads-tmpl: New standard names Artifacts_In_Exec_Dir and
Artifacts_In_Object_Dir used only by gprclean.
2013-10-14 Robert Dewar <dewar@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): Add error
entry for Library_Level attribute (which should not survive
to expansion)
* gnat_rm.texi: Document attribute Library_Level
* sem_attr.adb (Analyze_Attribute, case Library_Level): Implement
this new attribute (Set_Boolean_Result): Replaces Set_Result
(Check_Standard_Prefix): Document that Check_E0 is called
(Check_System_Prefix): New procedure
* snames.ads-tmpl: Add entry for Library_Level attribute
2013-10-14 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb, sinfo.ads: Minor reformatting.
* checks.adb (Overlap_Check): Use identifier casing in messages.
2013-10-14 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb (Default_Aspect_Component_Value): Is on base type
only.
* exp_aggr.adb (Expand_Array_Aggregate): Handle proper
initialization of <> component.
* exp_ch3.adb, exp_tss.adb: Minor reformatting
* sem_ch13.adb (Default_Aspect_Component_Value, Default_Aspect_Value):
Is on base type only.
* sinfo.ads: Minor comment revision.
2013-10-14 Robert Dewar <dewar@adacore.com>
* g-decstr.adb (Decode_Wide_Wide_Character): Fix failure
to detect invalid sequences where longer than necessary
sequences are used for encoding.
(Validate_Wide_Character):
Call Decode_Wide_Character to get the above validations.
(Validate_Wide_Wide_Character): Same fix
* g-decstr.ads: Add documentation making it clear that the UTF-8
implementation here recognizes all valid UTF-8 sequences, rather
than the well-formed subset corresponding to characters defined
in Unicode.
(Next_Wide_Character): Remove comment about this
being more efficient than Decode_Wide_Character (because this
no longer the case).
(Prev_Wide_Character): Add note that valid encoding is assumed.
2013-10-14 Robert Dewar <dewar@adacore.com>
* a-wichha.adb (Character_Set_Version): New function.
* a-wichha.ads: Remove comments for pragma Pure (final RM has
this).
(Character_Set_Version): New function.
* gnat_rm.texi: Update doc.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag263 is now known as Has_Null_Refinement.
(Has_Null_Refinement): New routine.
(Set_Has_Null_Refinement): New routine.
(Write_Entity_Flags): Output the status of flag
Has_Null_Refinement.
* einfo.ads: Add new flag Has_Null_Refinement along with
comment on usage and update all nodes subject to the flag.
(Has_Null_Refinement): New routine along with pragma Inline.
(Set_Has_Null_Refinement): New rouitine along with pragma Inline.
* sem_prag.adb (Analyze_Constituent): Mark a state as having
a null refinement when the sole constituent is "null".
(Analyze_Global_List): Handle null input/output items.
(Analyze_Refined_Global_In_Decl_Part): Add local variable
Has_Null_State. Add logic to handle combinations of states
with null refinements and null global lists and/or items.
(Check_In_Out_States, Check_Input_States, Check_Output_States):
Use attribute Has_Null_Refinement to detect states with
constituents.
(Check_Refined_Global_List): Handle null input/output items.
(Process_Global_Item): Handle states with null refinements.
(Process_Global_List): Handle null input/output items.
2013-10-14 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Entity): Reset Is_True_Constant for
aliased object
* gnat_ugn.texi: Update doc on aliased variables and constants.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* exp_pakd.adb (Expand_Packed_Element_Reference): If the
reference is an actual in a call, the prefix has not been fully
expanded, to account for the additional expansion for parameter
passing. the prefix itself is a packed reference as well,
recurse to complete the transformation of the prefix.
2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
* exp_dbug.adb (Debug_Renaming_Declaration): Do not
materialize the entity when the renamed object contains an
N_Explicit_Dereference.
* sem_ch8.adb (Analyze_Object_Renaming):
If the renaming comes from source and the renamed object is a
dereference, mark the prefix as needing debug information.
2013-10-14 Doug Rupp <rupp@adacore.com>
* system-vxworks-arm.ads (Stack_Check_Probes, Stack_Check_Limits):
Enable Stack Probes, Disable Stack Limit Checking.
* init.c [VxWorks] (__gnat_inum_to_ivec): Caste return value.
(__gnat_map_signal): Fix signature.
(__gnat_error_handler): Make
static, fix signature, remove prototype, fix prototype warning.
[ARMEL and VxWorks6] (__gnat_map_signal): Check and re-arm guard
page for storage_error.
* exp_pakd.adb: Minor reformatting.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Global_In_Decl_Part): Remove local
variable Contract_Seen. Add local variable Proof_Seen.
(Analyze_Global_List): Remove the processing for mode
Contract_In. Add support for mode Proof_In.
(Analyze_Pragma): Update the grammar of pragmas Global and
Refined_Global.
* snames.ads-tmpl: Remove predefined name Contract_In. Add
predefined name Proof_In.
2013-10-14 Robert Dewar <dewar@adacore.com>
* exp_prag.adb (Expand_Pragma_Check): Generate proper string
for invariant
* gnat_rm.texi: Add documentation for pragmas
Type_Invariant[_Class]
* par-prag.adb: Add entries for pragmas Type_Invariant[_Class]
* sem_ch13.adb: Minor reformatting
* sem_prag.adb: Implement pragmas Type_Invariant[_Class]
* snames.ads-tmpl: Add entries for pragmas Type_Invariant[_Class]
2013-10-14 Johannes Kanig <kanig@adacore.com>
* debug.adb: Release now unused debug switches that were only
relevant for gnat2why backend, not the frontend
* frontend.adb (Frontend) Do not stop when -gnatd.H is present,
was unused
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Global_Item): Allow
references to enclosing formal parameters.
2013-10-14 Thomas Quinot <quinot@adacore.com>
* einfo.adb (Equivalent_Type): Add missing case
E_Access_Subprogram_Type in guard (for remote access to
subprograms) * sem_ch8.adb (Find_Direct_Name, Find_Expanded_Name):
Add missing guards to account for the presence of RAS types
that have already been replaced with the corresponding fat
pointer type.
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add an entry in table Canonical_Aspect for
Initializes.
* aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
Aspect_Names and Aspect_Delay for Initializes.
* atree.ads, atree.adb (Ekind_In): New seven argument versions of the
routines.
* einfo.adb: Remove Refined_State_Pragma from the list of node
usage. Finalizer is now at position 28.
(Contract): Package
and package bodies now have a contract.
(Finalizer): Update
the assertion and node usage.
(Get_Pragma): Update the Is_CDG
flag to include Abstract_State, Initializes and Refined_State.
(Refined_State_Pragma): Removed.
(Set_Contract): Package and
package bodies now have a contract.
(Set_Finalizer): Update the
assertion and node usage.
(Set_Refined_State_Pragma): Removed.
(Write_Field8_Name): Remove the output for Refined_State_Pragma.
(Write_Field24_Name): Remove the output for Finalizer. Package
and package bodies now have a contract.
(Write_Field28_Name):
Add output for Finalizer.
* einfo.ads: Update the documentation and usage in entities
of attribute Contract. Update the node position and usage in
entities of attribute Finalizer. Remove the documentation
and usage in entities for attribute Refined_State_Pragma.
(Refined_State_Pragma): Removed along with pragma Inline.
(Set_Refined_State_Pragma): Removed along with pragma Inline.
* par-prag.adb: Add Initializes to the pragmas that do not
require special processing by the parser.
* sem_ch3.adb (Analyze_Declarations): Add local variable
Prag. Update the retrieval of pragma Refined_State. Analyze
aspect/pragma Initializes at the end of the visible declarations
of the related package.
* sem_ch6.adb (Analyze_Subprogram_Body_Contract):
Add local variables Ref_Depends and Ref_Global. Analyze
pragmas Refined_Global and Refined_Depends in that order.
(Analyze_Subprogram_Contract): Add local variables Depends and
Global. Analyze pragmas Global and Depends in that order.
* sem_ch7.adb (Analyze_Package_Body_Helper): Package
bodies now have a contract. Move the analysis of the aspect
specifications after the defining entity has been decorated.
(Analyze_Package_Declaration): Packages now have a contract. Move
the analysis of the aspect specifications after the defining
entity has been decorated.
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Packages
now have contracts.
* sem_ch13.adb (Analyze_Pragma): Code cleanup for aspect
Abstract_State. Add processing for aspect Initializes.
(Check_Aspect_At_Freeze_Point): Add an entry for Initializes.
* sem_prag.adb: Use Get_Pragma_Arg to extract the expression
of a pragma argument. Add an entry in table Sig_Flags for
Initializes.
(Analyze_Initializes_In_Decl_Part): New routine.
(Analyze_Pragma): Check the declaration order of pragmas
Abstract_State and Initializes. Abstract_State is now part of
the package contract. Analyze pragma Initializes. Check for
duplicate Refined_State pragma. Refined_State is now part of
the package contract.
(Check_Declaration_Order): New routine.
(Check_Test_Case): Alphabetized.
* sem_prag.ads (Analyze_Initializes_In_Decl_Part): New routine.
* sem_util.adb (Add_Contract_Item): Rename formal Subp_Id
to Id. This routine can now support contracts on packages and
package bodies.
* sem_util.ads (Add_Contract_Item): Rename formal Subp_Id to
Id. Update comment on usage.
* sinfo.ads: Update the usage of N_Contract nodes.
* snames.ads-tmpl: Add predefined name Initializes. Add new
pragma id for Initializes.
2013-10-13 Nicolas Roche <roche@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Make-lang.in (ada/%.o): Replace individual rules with
generic rule and add $(POSTCOMPILE).
(ADA_DEPS): New.
(.adb.o): Add @$(ADA_DEPS).
(.ads.o): Likewise.
(ada/a-except.o): Likewise.
(ada/s-excdeb.): Likewise.
(ada/s-assert.o): Likewise.
(ada/a-tags.o): Likewise.
(ada_generated_files): New variable.
Use them as dependency order for GNAT1_ADA_OBJS and GNATBIND_OBJS.
(ADA_DEPFILES): New variable.
Include them.
(ada_OBJS): Define.
2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Force all local
variables with aggregate types in memory if not optimizing.
2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_Mode): Do
not emit an error when we are looking at inputs and
the item is an unconstrained or tagged out parameter.
(Check_Mode_Restriction_In_Enclosing_Context): Use Get_Pragma
to find whether the context is subject to aspect/pragma Global.
(Collect_Subprogram_Inputs_Outputs): Unconstrained or tagged
out parameters are now considered inputs. Use Get_Pragma to
find wheher the subprogram is subject to aspect/pragma Global.
(Is_Unconstrained_Or_Tagged_Item): New routine.
2013-10-13 Thomas Quinot <quinot@adacore.com>
* einfo.ads: Minor reformatting.
* gcc-interface/Make-lang.in: Update dependencies.
2013-10-13 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Add documentation for pragmas Pre[_Class]
Post[_Class].
* par-ch2.adb (Skip_Pragma_Semicolon): Handle extra semicolon nicely.
* par-prag.adb: Add entries for pragmas Pre[_Class] and
Post[_Class].
* sem_prag.adb: Add handling of pragmas Pre[_Class] and
Post[_Class].
* sem_util.adb (Original_Aspect_Name): Moved here from
Sem_Prag.Original_Name, and modified to handle pragmas
Pre/Post/Pre_Class/Post_Class.
* sem_util.ads (Original_Aspect_Name): Moved here from
Sem_Prag.Original_Name.
* snames.ads-tmpl: Add entries for pragmas Pre[_Class] and
Post[_Class].
2013-10-13 Robert Dewar <dewar@adacore.com>
* einfo.adb, sem_ch6.adb: Minor reformatting.
2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Add node/list usage for Refined_State
and Refinement_Constituents.
(Get_Pragma): Update the
initialization of Is_CDG to include Refined_Global and
Refined_Depends. Rename constant Delayed to In_Contract and update
all of its occurrences.
(Is_Non_Volatile_State): New routine.
(Is_Volatile_State): Removed.
(Refined_State): New routine.
(Refinement_Constituents): New routine.
(Set_Refined_State): New routine.
(Set_Refinement_Constituents): New routine.
(Write_Field8_Name): Add output for Refinement_Constituents.
(Write_Field10_Name): Add output for Refined_State.
* einfo.ads: Add new synthesized attribute Is_Non_Volatile_State.
Remove synthesized attribute Is_Volatile_State. Add new
attributes Refined_State and Refinement_Constituents along with
usage in nodes.
(Get_Pragma): Update the comment on usage.
(Is_Non_Volatile_State): New routine.
(Is_Volatile_State): Removed.
(Refined_State): New routine and pragma Inline.
(Refinement_Constituents): New routine and pragma Inline.
(Set_Refined_State): New routine and pragma Inline.
(Set_Refinement_Constituents): New routine and pragma Inline.
* elists.ads, elists.adb (Clone): Removed.
(New_Copy_Elist): New routine.
(Remove): New routine.
* sem_ch3.adb (Analyze_Declarations): Use Defining_Entity
to get the entity of the subprogram [body].
(Analyze_Object_Declaration): Add initialization for
Refined_State.
* sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
for Refined_Global and Refined_Depends. Emit an error when
the body requires Refined_Global, but the aspect/pragma is
not present.
* sem_ch6.ads (Analyze_Subprogram_Body_Contract): Change
procedure signature and add comment on usage.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
for aspect Refined_Global.
* sem_prag.adb (Analyze_Abstract_State): Add initialization
of attributes Refined_State and Refinement_Constituents.
(Analyze_Depends_In_Decl_Part, Analyze_Global_In_Decl_Part,
Analyze_Contract_Cases_In_Decl_Part): Remove local
constant Arg1.
(Analyze_Pragma): Add processing for pragma
Refined_Global. The analysis of Refined_Post and Refined_Pre
has been merged. Update an error message in the processing of
pragma Refined_State.
(Analyze_Refined_Global_In_Decl_Part): Provide implementation.
(Analyze_Refined_Pragma): New routine.
(Analyze_Refined_Pre_Post_Condition): Removed.
(Analyze_Refined_State_In_Decl_Part): Update the call to Clone.
(Analyze_Refinement_Clause): Make State_Id visible to all
nested subprogram.
(Check_Matching_Constituent): Establish
a relation between a refined state and its constituent.
(Collect_Hidden_States_In_Decls): Remove ??? comment. Look at
the entity of the object declaration to establish its kind.
* sem_util.adb: Alphabetize with and use clauses.
(Contains_Refined_State): New routine.
* sem_util.ads (Contains_Refined_State): New routine.
2013-10-13 Thomas Quinot <quinot@adacore.com>
* scos.ads: Minor documentation clarification.
2013-10-13 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC when
building on AIX 5.3 or later, and to CLOCK_REALTIME on older
versions of AIX.
* init.c (pthread_condattr_setclock): Remove now useless weak symbol.
* thread.c(__gnat_pthread_condattr_setup): Remove bogus AIX 5.2
compatibility shim.
* s-osinte-aix.ads(clock_id_t): Fix C mapping (this is a 64-bit
type).
(clock_gettime): Import from C runtime library.
* s-osinte-aix.adb (clock_gettime): Remove bogus emulation body,
this routine is provided by the system in current supported
versions of AIX.
2013-10-13 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor reformatting.
2013-10-13 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Entity): For a function whose return type
is incomplete, do not replace the type with the full view if the
type is a limited view. In that case the full view appears in a
different unit, and the back-end will retrieve it at the proper
elaboration point.
2013-10-13 Yannick Moy <moy@adacore.com>
* exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for
actuals.
2013-10-13 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb: in Ada 2012 access_to_function types can have
in-out parameters.
(Derived_Type_Declaration): SPARK restriction
must be flagged on the original node, since it may have been
written as a subtype declaration.
(Analyze_Subtype_Declaration): Do not enter name of
entity in declaration if it is the current entity, because it may
have been inserted in a previous analysis and it appears in the
else_part of an if-statement that is rewritten during expansion.
2013-10-13 Yannick Moy <moy@adacore.com>
* exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove procedure.
(Expand_SPARK): Remove call to Expand_SPARK_N_Attribute_Reference and
Expand_SPARK_N_Simple_Return_Statement.
(Expand_SPARK_N_Simple_Return_Statement,
Expand_SPARK_Simple_Function_Return): Remove procedures.
2013-10-13 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Minor editing.
2013-10-13 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
operation implements an interface primitive, mark the operation
as referenced, to prevent usually spurious messages about unused
entities: such operations are called in dispatching select
statements that are not visible to the compiler.
2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
2013-10-11 Jakub Jelinek <jakub@redhat.com>
* gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
2013-10-10 Robert Dewar <dewar@adacore.com>
* par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove
junk code.
2013-10-10 Javier Miranda <miranda@adacore.com>
* sem_ch13.adb (Freeze_Entity_Checks): Avoid
loosing errors on CPP entities in -gnatc mode.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant
if from source.
2013-10-10 Robert Dewar <dewar@adacore.com>
* restrict.adb (Check_SPARK_Restriction): Refine test (don't
automatically go to the original node).
* sem_ch11.adb (Analyze_Raise_Statement): Only raise
statements that come from source violate SPARK restrictions.
(Analyze_Raise_xxx_Error): Same fix.
* sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK
initialization on original node, not on possibly rewritten
expression.
* sem_ch4.adb (Analyze_If_Expression): Only if expressions that
come from source violate SPARK mode restrictions.
2013-10-10 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Fix confusing documentation for -gnatyM.
2013-10-10 Yannick Moy <moy@adacore.com>
* errout.adb (Compilation_Errors): In formal verification mode,
always return False.
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Collect_Hidden_States_In_Decls): Only consider source
non-constant objects.
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add an entry in table Canonical_Aspect for
Refined_State.
* aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
Aspect_Names and Aspect_Delay for Refined_State.
* einfo.adb: Add with and use clauses for Elists.
Remove Refined_State from the list of node usage.
Add Refined_State_Pragma to the list of node usage.
(Has_Null_Abstract_State): New routine.
(Refined_State): Removed.
(Refined_State_Pragma): New routine.
(Set_Refined_State): Removed.
(Set_Refined_State_Pragma): New routine.
(Write_Field8_Name): Add output for Refined_State_Pragma.
(Write_Field9_Name): Remove the output for Refined_State.
* einfo.ads: Add new synthesized attribute Has_Null_Abstract_State
along with usage in nodes. Remove attribute Refined_State along
with usage in nodes. Add new attribute Refined_State_Pragma along
with usage in nodes.
(Has_Null_Abstract_State): New routine.
(Refined_State): Removed.
(Refined_State_Pragma): New routine.
(Set_Refined_State): Removed.
(Set_Refined_State_Pragma): New routine.
* elists.adb (Clone): New routine.
* elists.ads (Clone): New routine.
* par-prag.adb: Add Refined_State to the pragmas that do not
require special processing by the parser.
* sem_ch3.adb: Add with and use clause for Sem_Prag.
(Analyze_Declarations): Add local variables Body_Id, Context and
Spec_Id. Add processing for delayed aspect/pragma Refined_State.
* sem_ch13.adb (Analyze_Aspect_Specifications): Update the
handling of aspect Abstract_State. Add processing for aspect
Refined_State. Remove the bizzare insertion policy for aspect
Abstract_State.
(Check_Aspect_At_Freeze_Point): Add an entry for Refined_State.
* sem_prag.adb: Add an entry to table Sig_Flags
for pragma Refined_State.
(Add_Item): Update the
comment on usage. The inserted items need not be unique.
(Analyze_Contract_Cases_In_Decl_Part): Rename variable Restore to
Restore_Scope and update all its occurrences.
(Analyze_Pragma):
Update the handling of pragma Abstract_State. Add processing for
pragma Refined_State.
(Analyze_Pre_Post_Condition_In_Decl_Part):
Rename variable Restore to Restore_Scope and update all its
occurrences.
(Analyze_Refined_State_In_Decl_Part): New routine.
* sem_prag.ads (Analyze_Refined_State_In_Decl_Part): New routine.
* snames.ads-tmpl: Add new predefined name for Refined_State. Add
new Pragma_Id for Refined_State.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Install_Limited_Withed_Unit): handle properly the
case of a record declaration in a limited view, when the record
contains a self-referential component of an anonymous access type.
2013-10-10 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb (Process_Transient_Object): For any context other
than a simple return statement, insert the finalization action
after the context, not as an action on the context (which will
get evaluated before it).
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Write_Field19_Name): Correct the
string name of attribute Default_Aspect_Value.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_type.adb (Interface_Present_In_Ancestor): The progenitor
in a type declaration may be an interface subtype.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sinfo.ads (Do_Range_Check): Add special note on handling of
range checks for Succ and Pred.
2013-10-10 Robert Dewar <dewar@adacore.com>
* erroutc.adb (Output_Msg_Text): Remove VMS special handling.
2013-10-10 Robert Dewar <dewar@adacore.com>
* a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
(Is_Mark): New function.
(Is_Other_Format): New function.
(Is_Punctuation_Connector): New function.
(Is_Space): New function.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
choice circuit. Was not quite right in some cases, which showed
up in ACATS test B43201C.
* sem_attr.adb (Address_Checks): Make sure name is set right
for some messages issued.
* mlib-prj.adb: Minor code reorganization.
* gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs.
* exp_ch9.adb: Minor reformatting.
2013-10-10 Tristan Gingold <gingold@adacore.com>
* lib-writ.adb (Write_Unit_Information): Adjust previous patch.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb (Analyze_If_Statement): Warn on redundant if
statement.
* sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New
function.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion
for the case of a dispatching trigger: there is no need to
duplicate the code or create a subprogram to encapsulate the
triggering statements. This allows exit statements in the
triggering statements, that refer to enclosing loops.
2013-10-10 Robert Dewar <dewar@adacore.com>
* freeze.adb: Minor reformatting.
* sem_ch13.adb (Freeze_Entity_Checks): New procedure
(Analyze_Freeze_Entity): Call Freeze_Entity_Checks
(Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
* sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
* sprint.ads: Add syntax for freeze generic entity node.
2013-10-10 Robert Dewar <dewar@adacore.com>
* einfo.adb, einfo.ads: Minor comment updates.
2013-10-10 Robert Dewar <dewar@adacore.com>
* lib-writ.adb (Write_Unit_Information): Fatal error if linker
options are detected in a predefined generic unit.
2013-10-10 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using
a dummy placeholder value.
(NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore.
* thread.c: Adjust #if test accordingly.
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Consequence_Error): Generate an
implicit if statement.
(Expand_Contract_Cases): Generate an implicit if statement.
(Process_Contract_Cases): Do not expand Contract_Cases when no code
is being generated.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_attr.adb (Address_Checks): New procedure.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger
semantic actions at the proper point for entities that previously
had no explicit freeze point.
* freeze.adb (Freeze_Generic_Entities): generate new nodes to
indicate the point at which semantic checks can be performed on
entities declared in generic packages.
* sem_ch13.ads, sem_ch13.adb: New procedure
Analyze_Freeze_Generic_Entity.
* exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity.
* sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity.
* sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity.
* gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity.
* gcc-interface/Make-lang.in: Update dependencies.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
cases.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
(Analyze_Protected_Body): Aspects are illegal.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb, sem_ch13.adb: Minor reformatting.
* sem_case.adb (Check_Choices): Fix bad listing of missing
values from predicated subtype case (Check_Choices): List
duplicated values.
* errout.adb (Set_Msg_Text): Process warning tags in VMS mode
* erroutc.adb (Output_Msg_Text): Handle VMS warning tags
* gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
* ug_words: Add entries for -gnatw.d and -gnatw.D
* vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
* lib-writ.ads: Documentation fixes
2013-10-10 Robert Dewar <dewar@adacore.com>
* a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
(Is_Other_Format): New name for Is_Other.
(Is_Punctuation_Connector): New name for Is_Punctuation
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add entries in table Canonical_Aspects for aspects
Refined_Depends and Refined_Global.
* aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
aspects Refined_Depends and Refined_Global.
* einfo.adb (Contract): Subprogram bodies are now valid owners
of contracts.
(Set_Contract): Subprogram bodies are now valid
owners of contracts.
(Write_Field24_Name): Output the contract
attribute for subprogram bodies.
* exp_ch6.adb (Expand_Subprogram_Contract): New routine.
* exp_ch6.ads (Expand_Subprogram_Contract): New routine.
* par-prag.adb: Pragmas Refined_Depends and Refined_Global do
not require any special processing by the parser.
* sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
(Analyze_Declarations): Code reformatting. Analyze the contract
of a subprogram body at the end of the declarative region.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body):
Subprogram bodies can now have contracts. Use
Expand_Subprogram_Contract to handle the various contract
assertions.
(Analyze_Subprogram_Body_Contract): New null routine.
(Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
contracts. Use Expand_Subprogram_Contract to handle the various
contract assertions.
(Analyze_Subprogram_Contract): Add local
variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
the pragma name in Nam.
(Process_PPCs): Removed.
* sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
(Analyze_Subprogram_Contract): Update the comment on usage.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add null
implementations for aspects Refined_Depends and Refined_Global.
(Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
Refined_Global do not need to be checked at the freeze point.
* sem_prag.adb: Add entries in table Sig_Flags
for pragmas Refined_Depends and Refined_Global.
(Analyze_Contract_Cases_In_Decl_Part): Add local
variable Restore. Use Restore to pop the scope.
(Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
Restore to pop the scope.
(Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
to pop the scope.
(Analyze_PPC_In_Decl_Part): Renamed to
Analyze_Pre_Post_Condition_In_Decl_Part.
(Analyze_Pragma):
Add null implementations for pragmas Refined_Depends and
Refined_Global. Refined_Pre and Refined_Post are now
handled by routine Analyze_Refined_Pre_Post_Condition
exclusively.
(Analyze_Refined_Depends_In_Decl_Part): New
null routine.
(Analyze_Refined_Global_In_Decl_Part):
New null routine.
(Analyze_Refined_Pre_Post):
Renamed to Analyze_Refined_Pre_Post_Condition.
(Analyze_Refined_Pre_Post_Condition): Analyze the boolean
expression.
(Check_Precondition_Postcondition): Update the call
to Analyze_PPC_In_Decl_Part.
* sem_prag.ads: Add entries in table
Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
and Refined_Global.
(Analyze_PPC_In_Decl_Part): Renamed
to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
comment on usage.
(Analyze_Refined_Depends_In_Decl_Part): New routine.
(Analyze_Refined_Global_In_Decl_Part): New routine.
(Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
* sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
and update all occurrences. Subprogram body contracts can now
contain pragmas Refined_Depends and Refined_Global.
* sem_util.ads (Add_Contract_Item): Rename formal Item to
Prag. Update the comment on usage.
* sinfo.ads: Update the comment on structure and usage of
N_Contract.
* snames.ads-tmpl: Add new predefined names for Refined_Depends
and Refined_Global. Add entries in table Pragma_Id for
Refined_Depends and Refined_Global.
2013-10-10 Robert Dewar <dewar@adacore.com>
* types.ads: Minor reformatting.
2013-10-10 Thomas Quinot <quinot@adacore.com>
* s-taprop-posix.adb: Add missing comment.
2013-10-10 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Record_Type): Move choice checking to
Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
are properly frozen
* sem_case.adb (Check_Choices): Remove misguided attempt to
freeze choices (this is now done in Freeze_Record_Type where
it belongs).
(Check_Choices): Remove some analyze/resolve calls
that are redundant since they are done in Analyze_Choices.
* sem_ch13.adb (Analyze_Freeze_Entity): Do the error
checking for choices in variant records here (moved here from
Freeze.Freeze_Record_Type)
2013-10-10 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
possibly using a dummy placeholder value.
(Compute_Deadline): For the case of an
Absolute_Calendar deadline, if the target uses another clock
than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
different epoch.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
qualified reference to a generic child unit within itself,
in an instantiation.
2013-10-10 Pascal Obry <obry@adacore.com>
* prj-conf.adb: Minor typo fixes in comment.
2013-10-10 Thomas Quinot <quinot@adacore.com>
* s-taprop-posix.adb (Compute_Deadline): New local subprogram,
factors common code between Timed_Sleep and Timed_Delay.
2013-10-10 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Record_Type): Don't replace others if
expander inactive. This avoids clobbering the ASIS tree in
-gnatct mode.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
fixed-point case in preanalysis mode (error will be caught during
full analysis).
2013-10-10 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
assertion identifiers for pragma Assertion_Policy.
* sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
* sem_ch13.adb: Minor reformatting.
2013-10-10 Pascal Obry <obry@adacore.com>
* prj-conf.adb: Code refactoring.
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Remove Integrity_Level from the node usage list.
(Has_Option): Update the implementation to match
the new terminology.
(Has_Property): Renamed to Has_Option.
(Integrity_Level): Removed.
(Is_External_State): New routine.
(Is_Input_Only_State): Use Has_Option to determine whether a state
is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
(Is_Output_Only_State): Use Has_Option to determine whether
a state is Output_Only.
(Is_Output_State): Renamed to
Is_Output_Only_State.
(Is_Volatile_State): Use Has_Option to determine whether a state is
volatile.
(Set_Integrity_Level): Removed.
(Write_Field8): Remove the entry for Integrity_Level.
* einfo.ads: Remove Integrity_Level along with its documentation
and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
Rename Is_Output_State to Is_Output_Only_State. Update the
documentation of Is_Volatile_State. Update the node structure of
E_Abstract_Entity.
(Integrity_Level): Removed along with pragma Inline.
(Is_External_State): New routine.
(Is_Input_State): Renamed to Is_Input_Only_State.
(Is_Output_State): Renamed to Is_Output_Only_State.
(Set_Integrity_Level): Removed along with pragma Inline.
* sem_prag.adb (Analyze_Pragma): Update the checks regarding
global items and abstract state modes. Update the implementation
of pragma Abstract_State to reflect the new rules and terminology.
* snames.ads-tmpl: Remove the predefined name for Integrity
level. Add new predefined names for Input_Only, Non_Volatile,
Output_Only and Part_Of.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb (Generate_Reference): Do not generate a reference
within a _postcondition procedure: a proper source reference has
already been generated when pre- analyzing the original aspect
specification, and the use of a formal in a pre/postcondition
should not count as a proper use in a subprogram body.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
case
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add an entry for Aspect_Refined_Post in table
Canonical_Aspect.
* aspects.ads: Add an entry for Aspect_Refined_Post in tables
Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
table Aspect_On_Body_Or_Stub_OK.
* par-prag.adb: Add pragma Refined_Post to the list of pragmas
that do not require special processing by the parser.
* sem_attr.adb (Analyze_Attribute): Add special analysis for
attributes 'Old and 'Result when code generation is disabled and
they appear in aspect/pragma Refined_Post.
(In_Refined_Post): New routine.
* sem_ch6.adb (Analyze_Expression_Function): Move various
aspects and/or pragmas that apply to an expression function to the
corresponding spec or body.
(Collect_Body_Postconditions): New routine.
(Process_PPCs): Use routine Collect_Body_Postconditions
to gather all postcondition pragmas.
* sem_ch10.adb (Analyze_Proper_Body): Use routine
Relocate_Pragmas_To_Body to move all source pragmas that follow
a body stub to the proper body.
(Move_Stub_Pragmas_To_Body): Removed.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
for aspect Refined_Post.
(Check_Aspect_At_Freeze_Point): Aspect
Refined_Post does not need delayed processing at the freeze point.
* sem_prag.adb: Add an entry for pragma Refined_Post in
table Sig_Flags.
(Analyze_Pragma): Add processing for pragma
Refined_Post. Update the processing of pragma Refined_Pre
to use common routine Analyze_Refined_Pre_Post.
(Analyze_Refined_Pre_Post): New routine.
(Relocate_Pragmas_To_Body): New routine.
* sem_prag.ads: Table Pragma_On_Stub_OK is now known as
Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
table Pragma_On_Body_Or_Stub_OK.
(Relocate_Pragmas_To_Body): New routine.
* snames.ads-tmpl: Add new predefined name for Refined_Post. Add
new Pragma_Id for Refined_Post.
2013-10-10 Robert Dewar <dewar@adacore.com>
* exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
last choice to others is moved to Freeze_Record_Type.
* freeze.adb (Freeze_Record_Type): Expand last variant to others
if necessary (moved here from Expand_N_Variant_Part
2013-10-10 Robert Dewar <dewar@adacore.com>
* lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
s-atocou-builtin.adb: Minor reformatting.
2013-10-10 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
constant needs to be output to s-oscons.h, as it is tested
by init.c.
2013-10-10 Robert Dewar <dewar@adacore.com>
* exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
* exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
flag to avoid expanding choices when not necessary.
* exp_util.adb: Minor reformatting
* freeze.adb (Freeze_Record_Type): Redo expansion of variants
* sem_aggr.adb: Minor reformatting
* sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
Checking of choices.
* sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
Analyze_Choices.
* sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
and Check_Choices
* sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
and Check_Choices
* sem_util.adb: Minor reformatting
* sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
2013-10-10 Vincent Celier <celier@adacore.com>
* mlib-prj.adb (Build_Library): Do not issue link dynamic
libraries with an Rpath, if switch -R was used.
2013-10-10 Tristan Gingold <gingold@adacore.com>
* s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
Image_Index_Table_32): Remove as not used.
* s-imgint.adb (Image_Integer): Call Set_Image_Integer and
remove duplicated code.
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Provide a
more precise error message when pragma Refined_Pre applies to
an expression function that is not a completion.
2013-10-10 Thomas Quinot <quinot@adacore.com>
* sem_attr.adb (Analyse_Attribute, case
Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
reference for a generic type is permitted in GNAT runtime mode.
* a-sequio.adb (Read, Write): Use the endianness of the actual
type to encode length information written to the file.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* par-ch13.adb (Aspect_Specifications_Present)): In earlier than
Ada2012 mode, assume that a legal aspect name following "with"
keyword is an older gnat switch and not a misplaced with_clause.
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add an entry for Aspect_Refined_Pre in
table Canonical_Aspect.
(Aspects_On_Body_OK): Renamed to
Aspects_On_Body_Or_Stub_OK.
(Aspects_On_Body_Or_Stub_OK):
Update the query in table Aspect_On_Body_OK.
* aspects.ads: Add an entry for Aspect_Refined_Pre in tables
Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
that apply to body stubs.
(Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
(Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
* par-prag.adb: Add pragma Refined_Pre to the list of pragmas
that do not require special processing by the parser.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
analysis of aspect specifications that apply to a body stub
until the proper body is analyzed.
* sem_ch10.adb: Add with and use clause for Sem_Ch13.
(Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
(Analyze_Proper_Body): Relocate all pragmas that apply
to a subprogram body stub to the declarations of the proper
body. Analyze the aspect specifications of the stub when the
proper body is not present.
(Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
(Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
(Move_Stub_Pragmas_To_Body): New routine.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
for aspect Refined_Pre.
(Check_Aspect_At_Freeze_Point): Aspect
Refined_Pre does not need delayed processing at the freeze point.
* sem_prag.adb: Remove with and use clause for Snames. Add
an entry for Pragma_Refined_Pre in table Sig_Flags.
(Analyze_Pragma): Add processing for pragma Refined_Pre.
* sem_prag.ads: Add with and use clause for Snames. Add table
Pragma_On_Stub_OK.
* sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
(Set_Corresponding_Spec_Of_Stub): New routine.
* sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
along with comment on usage and occurrences in nodes.
(Corresponding_Spec_Of_Stub): New routine along with pragma
Inline.
(Set_Corresponding_Spec_Of_Stub): New routine along
with pragma Inline.
* snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
new Pragma_Id for Refined_Pre.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Package_Instantiation,
Analyze_Subprogram_Instantiation): Improve error message when
name in instantiation does not designate a generic unit of the
right kind.
2013-10-10 Robert Dewar <dewar@adacore.com>
* exp_ch3.adb (Expand_N_Variant_Part): Expand statically
predicated subtype which appears in Discrete_Choices list.
* exp_ch5.adb (Expand_N_Case_Statement): Expand statically
predicated subtype which appears in Discrete_Choices list of
case statement alternative.
* exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
procedure.
* sem_case.adb: Minor reformatting (Analyze_Choices): Don't
expand out Discrete_Choices that are names of subtypes with
static predicates. This is now done in the analyzer so that the
-gnatct tree is properly formed for ASIS.
* sem_case.ads (Generic_Choices_Processing): Does not apply
to aggregates any more, so change doc accordingly, and remove
unneeded Get_Choices argument.
* sem_ch3.adb (Analyze_Variant_Part): Remove no
longer used Get_Choices argument in instantiation of
Generic_Choices_Processing.
* sem_ch4.adb (Analyze_Case_Expression): Remove no
longer used Get_Choices argument in instantiation of
Generic_Choices_Processing.
* sem_ch5.adb (Analyze_Case_Statement): Remove no
longer used Get_Choices argument in instantiation of
Generic_Choices_Processing.
* sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
document that choices that are names of statically predicated
subtypes are expanded in the code generation tree passed to the
back end, but not in the ASIS tree generated for -gnatct.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb: Revert previous change.
2013-10-10 Gary Dismukes <dismukes@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
the Storage_Pool aspect is specified by an aspect clause and a
renaming is used to capture the evaluation of the pool name,
insert the renaming in front of the aspect's associated entity
declaration rather than in front of the corresponding attribute
definition (which hasn't been appended to the declaration
list yet).
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Is_Interface_Conformant): The controlling type
of the interface operation is obtained from the ultimate alias
of the interface primitive parameter, because that may be in
fact an implicit inherited operation whose signature involves
the type extension and not the desired interface.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
recognize an aspect specification with a misspelled name if it
is followed by a a comma or semicolon.
2013-10-10 Vadim Godunko <godunko@adacore.com>
* s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
Fix copyright notice.
2013-10-10 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
enclosing subprogram for precondition/postcondition/contract cases.
2013-10-10 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Minor fix.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
Address): Remove the Comes_From_Source test for the overlap
warning.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_util.adb: Minor code reorganization (use Nkind_In).
* sem_warn.adb: Minor code reorganization (optimization in
Check_Unset_Reference).
* exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb (Install_Parent_Private_Declarations): When
instantiating a child unit, do not install private declaration of
a non-generic ancestor of the generic that is also an ancestor
of the current unit: its private part will be installed when
private part of ancestor itself is analyzed.
2013-10-10 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Check_Component_Storage_Order): Retrieve component
aliased status from type entities directly instead of going back
to original component definition.
* sem_ch7.adb: Minor reformatting.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): For Address
attribute, consider it to be set in source, because of aliasing
considerations.
(Analyze_Attribute_Definition_Clause): For the
purpose of warning on overlays, take into account the aspect case.
2013-10-10 Robert Dewar <dewar@adacore.com>
* a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
a-cofove.ads: Minor reformatting.
2013-10-10 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Remove obsolete mention to -laddr2line.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
generated variable used as a target of the expression needs
no initialization.
2013-10-10 Jose Ruiz <ruiz@adacore.com>
* exp_util.adb (Corresponding_Runtime_Package): Remove the condition
related to No_Dynamic_Attachment which was wrong. Protected types
with interrupt handlers (when not using a restricted profile)
are always treated as protected types with entries, regardless
of the No_Dynamic_Attachment restriction.
* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
using the result of Corresponding_Runtime_Package.
(Install_Private_Data_Declarations): When having
static handlers and a non restricted profile, we use the
type Static_Interrupt_Protection always, so we removed an
extra wrong condition looking at the No_Dynamic_Attachment
restriction. Simplify the code using the result of
Corresponding_Runtime_Package.
(Make_Initialize_Protection): Simplify the code using
the result of Corresponding_Runtime_Package.
(Install_Private_Data_Declaration): The No_Dynamic_Attachment
restriction has nothing to do with static handlers. Remove the extra
erroneous condition that was creating the wrong data type.
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Is_Object_Reference): Attribute
'Old produces an object reference.
* gnat_rm.texi: Define accessibility level of
X'Update(...) result.
2013-10-10 Yannick Moy <moy@adacore.com>
* gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
conditions that apply to a subprogram body, preserve the placement
and order of the generated pragmas, which must appear before
other declarations in the body.
2013-10-10 Bob Duff <duff@adacore.com>
* gnat_ugn.texi: Add gnat2xml doc.
2013-10-10 Doug Rupp <rupp@adacore.com>
* s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
on a variable need not have a convention specified, as long as
the implicit convention of the object, obtained from its type,
is Ada or Ada-related.
2013-10-10 Robert Dewar <dewar@adacore.com>
* cstand.adb (Standard_Unsigned_64): New internal type.
* gnat_rm.texi: Update documentation on To_Address.
* sem_attr.adb (Analyze_Attribute, case To_Address): Fix
problem with out of range static values given as literals or
named numbers.
* stand.ads (Standard_Unsigned_64): New internal type.
* stand.adb: Minor reformatting.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component,
Has_Mode_Conformant_Spec): If selected component may be an
indexing of a parameterless call to a protected function, and
expansion is disabled, this is a valid candidate interpretation.
2013-10-10 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Minor editing.
2013-10-10 Robert Dewar <dewar@adacore.com>
* gnatlink.adb: Minor reformatting.
2013-10-10 Yannick Moy <moy@adacore.com>
* debug.adb: Free flag d.E and change doc for flag d.K.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Check_Precondition_Postcondition): If the
pragma comes from an aspect spec, and the subprogram is a
library unit, treat as a ppc in a declarative part in ASIS mode,
so that expression in aspect is properly analyzed. In this case
there is no later point at which the aspect specification would
be examined.
2013-10-10 Bob Duff <duff@adacore.com>
* opt.ads: Minor comment fix.
2013-10-10 Vadim Godunko <godunko@adacore.com>
* a-coinho-shared.ads, a-coinho-shared.adb: New file.
* s-atocou.ads: Add procedure to initialize counter.
* s-atocou.adb: Likewise.
* s-atocou-builtin.adb: Likewise.
* s-atocou-x86.adb: Likewise.
* gcc-interface/Makefile.in: Select special version of
Indefinite_Holders package on platforms where atomic built-ins
are supported. Update tools target pairs for PikeOS.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor reformatting.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sinput-c.adb (Load_File): Ensure Source_Align alignment.
* sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
* sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
alignment.
(Load_File): Ditto.
* sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
line) version.
* types.ads (Source_Align): New definition.
(Source_Buffer): Document new alignment requirement.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
this for types.
2013-10-10 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
2013-10-10 Vadim Godunko <godunko@adacore.com>
* s-stopoo.ads (Root_Storage_Pool): Add pragma
Preelaborable_Initialization.
2013-09-25 Tom Tromey <tromey@redhat.com>
* gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
PR ada/58264
* gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
variable and use it throughout.
<Attr_Length>: Note whether the prefix is the dereference of a pointer
to unconstrained array and, in this case, capture the result for both
Attr_First and Attr_Last.
2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gigi): Remove dead code.
2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
return variables for subprograms using the CICO mechanism.
2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
* gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
not $target_cpu.
2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
Olivier Hainque <hainque@adacore.com>
* gcc-interface/Makefile.in: Import target_cpu, target_vendor,
target_os and their host_ counterparts. Remove host_canonical and
target_cpu_default, unused. Remove local ad-hoc computations of
"host", "targ", "arch", "osys" and "manu". Replace uses of these by
uses of the now imported family, hence back to filters against
canonical values. Remove filters on e500 for target_cpu, expected to
be canonicalized into powerpc. Invert the logic filtering on 64bit
sparc for VxWorks. Simplify the filtering logic for bareboard tools
target pairs, now using straight elf/eabi filters on the target_os
part only.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
the return type is itself an access to function, recurse to emit
another anonymous type.
* gcc-interface/Make-lang.in: Update dependencies.
2013-09-10 Robert Dewar <dewar@adacore.com>
* err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
* errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
* errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
* inline.ads (Warnings): New component in Pending_Body_Info.
* sem_ch12.adb (Pending_Body_Info): Save and restore warnings
at instantiation point.
* warnsw.adb (Save_Warnings): New function (Restore_Warnings):
New procedure Remove special handling of Warning_Doc_Switch,
cleaner to handle the VMS case in errout, than to introduce
undocumented oddities here.
* warnsw.ads (Warning_Record) : New type.
(Save_Warnings): New function.
(Restore_Warnings): New procedure.
2013-09-10 Robert Dewar <dewar@adacore.com>
* sinput.adb (Check_For_BOM): Avoid reading past end of file.
2013-09-10 Robert Dewar <dewar@adacore.com>
* errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
* errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
* inline.ads: Save/Restore Ada_Version_Pragma.
* opt.adb: Save/Restore Ada_Version_Pragma.
* opt.ads (Ada_Version_Pragma): New variable.
* par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
* prj.adb: Initialize Ada_Version_Pragma.
* sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
* sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
* sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
* switch-c.adb: Initialize Ada_Version_Pragma.
* sem_ch12.adb: Minor reformatting.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Process_Subtype): Discard constraint on access
to class-wide type. Such constraints are not supported and are
considered a language pathology.
2013-09-10 Robert Dewar <dewar@adacore.com>
* gnatbind.adb: Correct starting date in --version string.
* gnatdll.adb: Use Check_Version_And_Help_G to implement --help
and --version.
* gnatkr.adb: Use Check_Version_And_Help_G to implement --help
and --version.
* gnatlink.adb: Correct starting date in --version string.
* gnatls.adb: Correct starting date in --version string.
* make.adb: Correct starting date in --version string.
2013-09-10 Robert Dewar <dewar@adacore.com>
* switch-c.adb: Minor reformatting.
* atree.ads (Original_Nodes): Add documentation on ASIS usage.
* sinfo.ads: Add section on ASIS mode (documentation only).
2013-09-10 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
REASON parameter in compiler units (bootstrap issues).
2013-09-10 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Output warning if
-gnateE specified for a target that does not support it.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
a subprogram body without previous spec.
2013-09-10 Gary Dismukes <dismukes@adacore.com>
* sem_ch4.adb: Minor typo fixes.
2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb (Aspects_On_Body_OK): New routine.
* aspects.ads: Modify type Aspect_Expression to include
the Optional_XXX variants. Update the contents of
table Aspect_Argument. Add table Aspect_On_Body_OK.
(Aspects_On_Body_OK): New routine.
* par-ch13.adb (Get_Aspect_Specifications): Account for optional
names and expressions when parsing an aspect.
* sem_ch6.adb: Add with and use clause for Aspects.
(Analyze_Subprogram_Body_Helper): Do not emit an error when
analyzing a body with aspects that can be applied simultaneously
to both spec and body.
* sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
corresponding pragma of an aspect that applies to a subprogram
body in the declarative part.
(Make_Aitem_Pragma): Do not generate a pragma with an empty argument
list.
2013-09-10 Robert Dewar <dewar@adacore.com>
* switch-c.adb: Diagnose -gnatc given after -gnatRm.
* gnat_ugn.texi: Add documentation for -gnatRm.
* usage.adb: Minor reorganization (put style entries in proper
order) Document -gnatRm switch.
* sinfo.ads: Minor comment fix.
2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
* tree_io.ads: Update ASIS_Version_Number.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
designated type can appear in a parameterless call.
* sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
in the case of an indirect call through an access function that
returns an array type.
(Analyze_One_Call): Handle properly legal parameterless calls
whose result is indexed, in constructs of the for F.all (I)
* sem_ch6.ads (May_Need_Actuals): Make public, for use on access
to subprogram types.
* sem_res.adb (Resolve_Call): If the call is indirect, there is
no entity to set on the name in the call.
2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
table for package body and body stubs.
(Move_Or_Merge_Aspects): New routine.
(Remove_Aspects): New routine.
* aspects.ads (Move_Aspects): Update comment on usage.
(Move_Or_Merge_Aspects): New routine.
(Remove_Aspects): New routine.
* par-ch3.adb: Update the grammar of private_type_declaration,
private_extension_declaration, object_renaming_declaration,
and exception_renaming_declaration.
(P_Subprogram): Parse the
aspect specifications that apply to a body stub.
* par-ch6.adb: Update the grammar of subprogram_body_stub and
generic_instantiation.
* par-ch7.adb: Update the grammar of package_declaration,
package_specification, package_body, package_renaming_declaration,
package_body_stub.
(P_Package): Parse the aspect specifications
that apply to a body, a body stub and package renaming.
* par-ch9.adb: Update the grammar of entry_declaration,
protected_body, protected_body_stub, task_body,
and task_body_stub.
(P_Protected): Add local variable
Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
specifications that apply to a protected body and a protected
body stub.
(P_Task): Add local variable Aspect_Sloc. Add local
constant Dummy_Node. Parse the aspect specifications that apply
to a task body and a task body stub.
* par-ch12.adb: Update the grammar of
generic_renaming_declaration.
(P_Generic): Parse the aspect
specifications that apply to a generic renaming.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
an error when analyzing aspects that apply to a body stub. Such
aspects are relocated to the proper body.
* sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
specifications that apply to a body.
* sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
aspects not being supported on protected bodies. Remove the
aspect specifications. (Analyze_Single_Protected_Declaration):
Analyze the aspects that apply to a single protected declaration.
(Analyze_Task_Body): Warn about user-defined aspects not being
supported on task bodies. Remove the aspect specifications.
* sem_ch10.adb: Add with and use clause for Aspects.
(Analyze_Package_Body_Stub): Propagate the aspect specifications
from the stub to the proper body.
* sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
corresponding pragma of an aspect that applies to a body in the
declarations of the body.
* sinfo.ads: Update the gramma of expression_function,
private_type_declaration, private_extension_declaration,
object_renaming_declaration, exception_renaming_declaration,
package_renaming_declaration, subprogram_renaming_declaration,
generic_renaming_declaration, entry_declaration,
subprogram_body_stub, package_body_stub, task_body_stub,
generic_subprogram_declaration.
2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Add processing
for aspect/pragma SPARK_Mode when it applies to a [library-level]
subprogram or package [body].
2013-09-10 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
given together.
* switch-c.adb (Scan_Front_End_Switches): Give error if both
-gnatR and -gnatc given.
2013-09-10 Robert Dewar <dewar@adacore.com>
* g-table.ads, g-table.adb (For_Each): New generic procedure
(Sort_Table): New generic procedure.
2013-09-10 Thomas Quinot <quinot@adacore.com>
* adaint.c (__gnat_is_executable_file_attr): Should be true
for an executable regular file only only (not for a directory
that has the executable permission).
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: Further work on operator calls in ASIS.
2013-09-10 Yannick Moy <moy@adacore.com>
* sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
update.
2013-09-10 Thomas Quinot <quinot@adacore.com>
* aspects.ads, sem_ch13.adb: Minor reformatting.
* adaint.c (__gnat_set_close_on_exec): Add comment documenting
that this routine is shared between OS_Lib and Sockets.
2013-09-10 Robert Dewar <dewar@adacore.com>
* exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
* sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
* sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
case Check): Ditto (Check_Applicable_Policy): Handle
Statement_Assertion case Throughout, set and check the Is_Checked
flag as appropriate.
* sem_prag.ads (Check_Kind): Moved to body.
* sinfo.ads, sinfo.adb (Is_Checked): New flag.
2013-09-10 Robert Dewar <dewar@adacore.com>
* aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
* einfo.adb (Has_Delayed_Rep_Aspects): New flag
(May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
(use Get_Attribute_Representation_Clause).
* einfo.ads (Has_Delayed_Rep_Aspects): New flag
(May_Inherit_Delayed_Rep_Aspects): New flag
* freeze.adb: Minor reformatting
* sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
handling of delayed evaluation, including optimizing some cases
and avoiding delays.
(Analyze_Aspects_At_Freeze_Point): Now
handled inheriting delayed rep aspects for type derivation case.
(Inherit_Delayed_Rep_Aspects): New procedure
* sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
inheriting delayed rep aspects for type derivation case.
* sem_ch3.adb (Build_Derived_Type): Set
May_Inherit_Derived_Rep_Aspects if parent type flag
Has_Delayed_Rep_Aspects is set
2013-09-10 Robert Dewar <dewar@adacore.com>
* errout.adb (Finalize): Don't delete real errors with specific
warning control.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Expand_N_Timed_Entry_Call,
Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
Handle properly a trigger that is a call to a primitive operation
of a type that implements a limited interface, if the type itself
is not limited.
2013-09-10 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
exp_ch4.adb, sprint.adb: Minor reformatting.
2013-09-10 Yannick Moy <moy@adacore.com>
* sinfo.ads: Document splitting of pre/post in N_Contract description.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
add a mod operation if the result type is a binary modular type.
2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
variable Context. Remove local variable Subp_Id. Start the
context traversal from the current subprogram rather than the
current scope. Update the scope traversal and error reporting.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
Rewrite_Triggering_Statements, to encapsulate the statements that
follow the trigger of the entry call. This procedure is needed
when the trigger is a dispatching call, because the expansion
requires several copies of those statements. The procedure is
more efficient, and preserves non-local references when the
construct is within an instance.
2013-09-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Package_Instantiation): If the
instantiation is a compilation unit, analyze aspects before
analyzing the package declaration for the instance.
* sem_ch13.adb (Analyze_Aspect_Specifications): If the
corresponding node is a package instantiation, insert generated
pragmas at the head of visible declarations.
* sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
do not ignore the pragma if it comes from an aspect specification
in the instance, and not from the generic unit.
* sprint.adb (Sprint_Node_Actual): For a package declaration that
is an instantiation, print aspects after declaration.
2013-09-10 Robert Dewar <dewar@adacore.com>
* einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Get_SPARK_Mode_Id): Handle the
case where the pragma may appear without an argument.
(Analyze_Global_List): Add expanded_name to the list of constructs
that denote a single item.
(Collect_Global_List): Add expanded_name to the list of constructs
that denote a single item.
2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Apply_Accessibility_Check): Add local constant
Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
and deallocate a heap-allocated class-wide object after it
has been determined that it violates the accessibility rules.
* rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
and entry in RE_Unit_Table for RE_Free.
2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
Iain Sandoe <iain@codesourcery.com>
PR ada/58239
* gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
(GCC_LINK): Use CXX instead of CC.
* gcc-interface/Make-lang.in (CXX_LFLAGS): New.
(ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
sets of derived types in ASIS mode.
2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
(is_cplusplus_method): Likewise, and False with false.
(components_need_strict_alignment): Likewise.
* gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
* gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
(Handled_Sequence_Of_Statements_to_gnu): Likewise.
(add_cleanup): Likewise.
(Sloc_to_locus1): Likewise.
(Sloc_to_locus): Likewise.
(set_expr_location_from_node): Likewise.
* gcc-interface/utils.c (potential_alignment_gap): Likewise.
2013-08-13 Thomas Quinot <quinot@adacore.com>
* gcc-interface/trans.c (set_end_locus_from_node): Clear column info
for the end_locus of a block if it does not come from an End_Label.
2013-08-13 Thomas Quinot <quinot@adacore.com>
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
there is no End_Label, attach cleanup actions to the sloc of the HSS
node instead.
(Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
of the handler itself.
(add_cleanup): Clear column information in sloc of cleanup actions.
(Sloc_to_locus1): New static function.
(Sloc_to_locus): Call it.
(set_expr_location_from_node1): New static function.
(set_expr_location_from_node): Call it.
2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
expressions for misaligned actual parameters.
2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
values outside of the range of the type.
2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
to the original type before converting to the result type.
(build_atomic_store): First do a conversion to the original type before
view-converting to the effective type, but deal with a padded type
specially.
2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
compiler build and use standard library variables.
(../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
(gnatmake-re): Do not depend on targext.o.
(gnatlink-re): Do not depend on link.o and targext.o.
(../../gnatmake$(exeext): Likewise.
(../../gnatlink$(exeext): Likewise.
2013-07-21 Ondřej Bílka <neleai@seznam.cz>
* gcc-interface/gigi.h: Fix typos.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils2.c: Likewise.
* gnat_rm.texi: Likewise.
* gnat_ugn.texi: Likewise.
* raise-gcc.c: Likewise.
* sigtramp-ppcvxw.c: Likewise.
* sysdep.c: Likewise.
* terminals.c: Likewise.
2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
PR ada/57934
* gcc-interface/ada.h (CAT): Fix typo.
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Get_Pragma): Handle the retrieval of delayed
pragmas stored in N_Contract nodes.
* einfo.ads (Get_Pragma): Update the comment on usage.
* sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
of the pragma when it applies to a body that acts as a spec. The
copy is preanalyzed and chained on the contract of the body.
2013-07-08 Robert Dewar <dewar@adacore.com>
* rtsfind.adb: Minor comment fix.
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
of a Ghost function call when the enclosing context is being
preanalyzed.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
expression in a return statement is a numeric literal, qualify
it with the return type for proper resolution.
2013-07-08 Robert Dewar <dewar@adacore.com>
* sem.ads: Minor comment updates.
* s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
Minor reformatting.
2013-07-08 Robert Dewar <dewar@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
for Restriction_Set.
* gnat_rm.texi: Add missing menu entry for Attribute Ref Add
documentation for attribute Restriction_Set.
* lib-writ.adb (Write_With_Lines): Generate special W lines
for Restriction_Set.
* lib-writ.ads: Document special use of W lines for
Restriction_Set.
* lib.ads (Restriction_Set_Dependences): New table.
* par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
list (Scan_Name_Extension_Apostrophe): Remove kludge test for
Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
for Restricton_Set.
* restrict.adb (Check_SPARK_Restriction): Put in Alfa order
(OK_No_Dependence_Unit_Name): New function.
* restrict.ads (OK_No_Dependence_Unit_Name): New function.
* rtsfind.adb: Minor reformatting Minor code reorganization.
* sem_attr.adb (Analyze_Attribute): Add processing for
Restriction_Set.
* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
Remove Check_Unit_Name and use new function
OK_No_Dependence_Unit_Name instead.
* sinfo.ads: Minor comment updates.
* snames.ads-tmpl: Add entry for Restriction_Set attribute.
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
object as "free" is not available on all targets/profiles.
2013-07-08 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Handle
Storage_Size aspect for task type in case discriminant is
referenced.
(Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
attribute definition clause as obsolescent if from aspect.
2013-07-08 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Add documentation for Img returning a function.
* par-prag.adb: Minor reformatting.
* restrict.adb: Minor reformatting and code reorganization.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: add guard to ASIS transform.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
of the asynchronous select is a dispatching call, transform the
abortable part into a procedure, to avoid duplication of local
loop variables that may appear within.
2013-07-08 Vincent Celier <celier@adacore.com>
* projects.texi: Update the documentation of suffixes in package
Naming.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
types are type conformant if the designated type of one is
protected and the other is not. Convention only matters when
checking subtype conformance.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
back the fully resolved operands to the original function call
so that all semantic information remains available to ASIS.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb: minor reformatting (remove obsolete comment).
* sem_ch9.adb: improve error message on illegal trigger.
2013-07-08 Robert Dewar <dewar@adacore.com>
* sem_prag.adb: Minor reformatting.
2013-07-08 Robert Dewar <dewar@adacore.com>
* gnatcmd.adb: Minor reformatting.
2013-07-08 Robert Dewar <dewar@adacore.com>
* targparm.adb (Get_Target_Parameters): Recognize pragma
Partition_Elaboration_Policy.
2013-07-08 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Minor update to mention partition elaboration policy.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Comple_Object_Operation): Revert previous change.
(Analyze_Indexed_Component_Form): In ASIS mode, if node has been
transformed but not rewritten as a function call (as is the case
in a generic), analyze it as such.
2013-07-08 Thomas Quinot <quinot@adacore.com>
* gnat_rm.texi: Minor rewording: add missing word "operators"
in documentation for restriction No_Direct_Boolean_Operator.
2013-07-08 Robert Dewar <dewar@adacore.com>
* errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
now).
* errout.ads: Insertions ! and !! no longer have to be at the
end of the message, they can be anywhere in the message.
* erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
Replaces Test_Style_Warning_Serious_Msg
* erroutc.ads (Has_Double_Exclam): New flag New comments for
existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
Replaces Test_Style_Warning_Serious_Msg
* errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
Replaces Test_Style_Warning_Serious_Msg
2013-07-08 Robert Dewar <dewar@adacore.com>
* par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
* restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
referenced there.
* scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
* snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
2013-07-08 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): Use a response file for gnatls
when possible.
2013-07-08 Gary Dismukes <dismukes@adacore.com>
* freeze.adb: Minor typo fixes.
2013-07-08 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
obsolete recognition of SPARK Document all other obsolete synonyms
for old restrictions.
* restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
for SPARK_05.
* restrict.ads: Restriction SPARK_05 replaces SPARK.
* s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
as synonym for SPARK_05.
* sem_prag.adb: Minor reformatting.
* snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
2013-07-08 Robert Dewar <dewar@adacore.com>
* sem_dim.adb: Minor error message change.
* freeze.adb (Freeze_Entity, array type case): Extend handling
of Implicit_Packing to handle multi-dimensional array case.
* gnat_rm.texi: Update doc on Implicit_Packing.
2013-07-08 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Minor reformatting.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
the parent node is a selected component and the analysis as a
call is successful, set the type of the selector in the parent
node for subsequent checks, because the rewriting of the node
does not take place during pre-analysis.
2013-07-08 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb, exp_ch3.adb: Minor reformatting.
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_N_Op_Eq): When comparing two
Bounded_Strings, use the predefined equality function of the
root Super_String type.
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Create_Alternative): Removed.
(Expand_N_If_Expression): Remove constant
In_Case_Or_If_Expression. Add local variable
Ptr_Typ. Inspect the "then" and "else" action lists
for transient controlled objects and generate code to
finalize them. (Is_Controlled_Function_Call): Removed.
(Process_Action): Update the comment on usage. Update the call
to Process_Transient_Object. There is no need to continue the
traversal of the object itself.
(Process_Actions): New routine.
(Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
a new formal and update the related comment on usage.
* exp_util.adb (Within_Case_Or_If_Expression): Start the search
from the parent of the node.
2013-07-08 Robert Dewar <dewar@adacore.com>
* a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
that can be renamed as a function.
2013-07-08 Thomas Quinot <quinot@adacore.com>
* g-socket.ads: Document target dependency: FIONBIO may or may not
be inherited from listening socket by accepted socket.
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
on targets that can't deallocate.
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Freeze_Type): Generate a
subpools-related accessibility check only on profiles that
include the corresponding library unit.
2013-07-08 Gary Dismukes <dismukes@adacore.com>
* sem_ch8.adb: Minor typo fixes.
2013-07-08 Javier Miranda <miranda@adacore.com>
* sem_ch8.adb (Save_Scope_Stack): Adding documentation.
(Restore_Scope_Stack): Remove the elements of the list when the
visibility of each entity is restored.
2013-07-08 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
2013-07-08 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb, sem_ch8.ads: Minor reformatting.
2013-07-08 Gary Dismukes <dismukes@adacore.com>
* gnat_rm.texi: Minor reformatting and rewording for consistency.
2013-07-08 Bob Duff <duff@adacore.com>
* exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
view coming from a limited-with'ed package, use the nonlimited
view in case it has tasks.
2013-07-08 Javier Miranda <miranda@adacore.com>
* sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
of entities which have been temporarily removed from immediate
visibility.
(Restore_Scope_Stack): Modified to receive an
additional parameter with the list of entities whose immediate
visibility must be restored.
* sem.adb (Do_Analyze): Use new version of
Save_Scope_Stack/Restore_Scope_Stack
* sem_ch12.adb (Inline_Instance_Body): Use new version of
Save_Scope_Stack and Restore_Scope_Stack
2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Remove
variable Unit_Prag. Remove the check on duplicate mode for the
configuration form of the pragma.
(Redefinition_Error): Removed.
2013-07-08 Robert Dewar <dewar@adacore.com>
* lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
and editing.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
pre-analyze only the original expression attached to the source
aspect, not the relocated expression of the pragma, to prevent
malformed trees in ASIS mode.
* sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
patch: the expression in the aspect for pre/post must be relocated
to the pragma for proper analysis.
2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
* aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
Aspect_Argument, Aspect_Names.
* atree.adb (Node32): New routine.
(Set_Node32): New routine.
* atree.ads (Node32): New routine.
(Set_Node32): New routine.
* einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
(Set_SPARK_Mode_Pragmas): New routine.
(SPARK_Mode_Pragmas): New routine.
(Write_Field32_Name): Add and entry for SPARK_Modes.
* einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
in various entities.
(Set_SPARK_Mode_Pragmas): New routine and
pragma Inline.
(SPARK_Mode_Pragmas): New routine and pragma Inline.
* gnat_rm.texi: Add sections explaining the syntax and semantics
of aspect/pragma SPARK_Mode.
* gnat_ugn.texi: Add pragma SPARK_Mode to the list of
configuration pragmas.
* lib.adb (Set_SPARK_Mode_Pragma): New routine.
(SPARK_Mode_Pragma): New routine.
* lib.ads: Alphabetize the comments on fields of record
Unit_Record. Add new field SPARK_Mode_Pragma along with
comment on its usage. Update the layout of record Unit_Record.
(Set_SPARK_Mode_Pragma): New routine and pragma Inline.
(SPARK_Mode_Pragma): New routine and pragma Inline.
* lib-load.adb (Create_Dummy_Package_Unit): Initialize
field SPARK_Mode_Pragma.
(Load_Main_Source): Initialize field SPARK_Mode_Pragma.
(Load_Unit): Initialize field SPARK_Mode_Pragma.
* lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
SPARK_Mode_Pragma.
(Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
* opt.ads: Alphabetize verification flags. Store the
compilation-wide SPARK mode in variable Global_SPARK_Mode.
* par-prag.adb: Pragma SPARK_Mode does not need special processing
by the parser.
* sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
SPARK_Mode into a pragma.
(Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
delayed processing.
* sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
(Analyze_Pragma): Add processing for pragma SPARK_Mode.
(Get_SPARK_Mode_Id): New routine.
(Is_Elaboration_SPARK_Mode): New routine.
(Is_Private_SPARK_Mode): New routine.
* sem_prag.ads (Get_SPARK_Mode_Id): New routine.
(Is_Elaboration_SPARK_Mode): New routine.
(Is_Private_SPARK_Mode): New routine.
* sinfo.ads: Update the comment on the usage of field Next_Pragma.
* snames.ads-tmpl: Add new predefined name for SPARK_Mode and
Auto. Add new pragma Id for SPARK_Mode.
* types.ads: Add new type SPARK_Mode_Id.
2013-07-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): For
pre/postconditions copy the expression to the generated pragma,
to avoid sharing between the original aspect and the pragma node,
because in ASIS_Mode both will be independently analyzed.
2013-07-05 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
formals for each discriminant of an unchecked union.
(Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
variants are supported. New helper function Corresponding_Formal.
* exp_ch4.adb (Build_Equality_Call): For unchecked unions,
loop through discriminants to create list of inferred values,
and modify call to equality routine accordingly.
2013-07-05 Claire Dross <dross@adacore.com>
* a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
a-cforse.ads, a-cofove.ads: Add preconditions when needed +
container types are not tagged any more.
2013-07-05 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Freeze_Entity): For an object with captured
initialization statements, do not remove Init_Stmts from the
enclosing list, as Freeze_All might rely on it to know where to
stop freezing.
2013-07-05 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
reformatting.
2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_Composite_Equality): Use the full view
when the base type is private.
2013-07-05 Claire Dross <dross@adacore.com>
* a-cfdlli.ads: Add preconditions when needed.
2013-07-05 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb: Minor reformatting.
2013-07-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Access_Subprogram_Declaration): Use
Generate_Reference_To_Formals.
* lib-xref.adb (Generate_Reference_To_Formals): In the case of
access to subprograms, the formals are found in the designated
subprogram type.
2013-07-05 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document that comments can be lined up with
previous non-blank line.
* styleg.adb (Check_Comment): Allow indentation to match previous
non-blank line (Same_Column_As_Previous_Line): New function
2013-07-05 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Update doc on missing pragmas.
* sem_ch12.adb: Minor comment additions.
2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Ensure that
Contract_Cases, Depends and Global are analyzed when they apply
to a subprogram compilation unit. The pragmas are all added
unconditionally to the construct's contract. This ensures that
proof tools can locate the pragmas.
2013-07-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Freeze_Actual_Profile): An instance within
a generic unit does not freeze a generic private type of the
enclosing generic. This rule must also apply to a type derived
from a generic private type.
2013-07-05 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi: Add missing documentation for pragmas.
2013-07-05 Yannick Moy <moy@adacore.com>
* sem_ch12.adb: Minor comment.
2013-07-05 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
together.
* switch-c.adb: Do not allow -gnatD and -gnatR to both be
specified.
2013-07-05 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Add missing documentation for pragmas.
* sem_ch8.adb: Minor reformatting.
* gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
together.
2013-07-05 Yannick Moy <moy@adacore.com>
* sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
instance of subprogram body in SPARK mode, by testing Expander_Active
(set in SPARK mode) instead of Full_Expander_Active (not set in
SPARK mode).
* sem_ch8.adb: Minor reformatting.
2013-07-05 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Entity): Remove test of obsolete flag
Propagate_Exceptions, and associated useless code that did
nothing.
* gnat_rm.texi: Add documentation for obsolete pragma
Propagate_Exceptions.
* opt.ads (Propagate_Exceptions): Obsolete flag removed.
* sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
Remove useless and obsolete setting of Propagate_Exceptions flag.
2013-07-05 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
2013-07-05 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Add missing doc for various pragmas.
2013-07-05 Robert Dewar <dewar@adacore.com>
* par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
* gnat_rm.texi: Document pragma Profile_Warnings.
* restrict.ads, sem_prag.adb: Minor reformatting.
2013-07-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
a formal subprogram that was defaulted in the formal package.
2013-07-05 Thomas Quinot <quinot@adacore.com>
* par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
N_Implicit_Label_Declaration nodes.
2013-07-05 Robert Dewar <dewar@adacore.com>
* a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
2013-07-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Copy_Generic_Node): Check that name in function
call is a valid entity name before preserving entity in generic
copy.
2013-07-05 Thomas Quinot <quinot@adacore.com>
* par-ch5.adb: Minor reformatting.
2013-07-05 Thomas Quinot <quinot@adacore.com>
* sinfo.ads: Minor clarification to documentation for
N_Implicit_Label_Declaration.
2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
values of all remaining constants.
(Rcheck_35): New routine along with pragmas Export and No_Return.
(Rcheck_PE_Aliased_Parameters): New routine along with pragmas
Export and No_Return.
(Rcheck_PE_All_Guards_Closed,
Rcheck_PE_Bad_Predicated_Generic_Type,
Rcheck_PE_Current_Task_In_Entry_Body,
Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
Rcheck_PE_Potentially_Blocking_Operation
Rcheck_PE_Stubbed_Subprogram_Called,
Rcheck_PE_Unchecked_Union_Restriction,
Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
Update the use of Rmsg_XX.
(Rcheck_17, Rcheck_18, Rcheck_19,
Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
renamed subprograms.
* checks.adb: Add with and use clause for Stringt.
(Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
variable Cond. Initialize Check at the start of the routine. Use
routine Overlap_Check to construct a simple or a detailed run-time
check. Update the creation of the simple check.
(Overlap_Check): New routine.
* exp_ch11.adb (Get_RT_Exception_Name): Add a value for
PE_Aliased_Parameters.
* types.ads: Add new enumeration literal
PE_Aliased_Parameters. Update the corresponding integer values
of all RT_Exception_Code literals.
* types.h: Add new constant PE_Aliased_Parameters. Correct the
values of all remaining constants.
2013-07-05 Yannick Moy <moy@adacore.com>
* gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
documentation.
2013-07-05 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
condition, when replacing the name of a formal by a conversion
to the class-wide type, exempt selector names that appear in
parameter associations.
2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
* gcc-interface/gigi.h (annotate_object): Adjust prototype.
(convert_vms_descriptor): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
types by double dereference.
(annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
(gnat_to_gnu_entity): Adjust calls to annotate_object.
* gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
dereference.
(Call_to_gnu): Likewise.
(build_function_stub): Adjust call to convert_vms_descriptor.
(Subprogram_Body_to_gnu): Adjust call to annotate_object.
* gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
parameter and adjust.
2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in (arm% androideabi): Robustify.
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
check that access types have a set size.
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (vinfo_t): New type and associated vector.
(components_to_record): Change return type to bool.
Lay out the variants in two passes. Do not force a specific layout for
the variant part if the variants do not have a representation clause.
Take the alignment of the variant part into account when laying out
variants without rep clause in a record type with a partial rep clause.
(create_rep_part): Do not set the position of the field.
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
to avoid generating an overflow for -1.
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (create_type_decl): Adjust prototype.
(create_label_decl): Complete prototype.
(process_attributes): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
create_type_decl throughout.
<E_Enumeration_Type>: Do the layout of the type manually and call
process_attributes on it. Reindent.
<E_Enumeration_Subtype>: Minor tweak.
<E_Floating_Point_Subtype>: Reindent.
<E_Array_Subtype>: Call process_attributes on the array type built
for a packed array type.
<E_Record_Type>: Call process_attributes on the type.
<E_Record_Subtype>: Likewise.
<E_Access_Type>: Likewise.
<E_Subprogram_Type>: Likewise.
Likewise for all types at the end of the processing.
* gcc-interface/utils.c (make_aligning_type): Adjust call to
create_type_decl.
(maybe_pad_type): Likewise.
(create_index_type): Likewise.
(create_type_decl): Remove attr_list parameter and associated code.
(create_var_decl_1): Call process_attributes on the variable.
(process_attributes): Take a pointer to the object and add in_place
and gnat_node parameters and adjust throughout.
<ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
and set the input location.
Zap the attribute list at the end.
(create_subprog_decl): Call process_attributes on the subprogram.
(build_unc_object_type): Adjust call to create_type_decl.
(handle_vector_type_attribute): Remove dead code.
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
* gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
for the position of the associated TYPE_DECL.
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
* gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
elaborate the full view of a type with a freeze node.
* gcc-interface/trans.c (process_type): Add explicit predicate.
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
UNC variable for aliased objects with unconstrained nominal subtype.
2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
* gcc-interface/trans.c (gigi): Call it.
* gcc-interface/misc.c (gnat_init_gcc_fp): New function.
2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (enum inline_status_t): New type.
(create_subprog_decl): Adjust prototype.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
calls to create_subprog_decl.
(get_minimal_subprog_decl): Likewise.
* gcc-interface/trans.c (gigi): Likewise.
(build_raise_check): Likewise.
(establish_gnat_vms_condition_handler): Likewise.
(Compilation_Unit_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
* gcc-interface/utils.c (create_subprog_decl): Change inline_flag
parameter to inline_status and implement for suppressed inlining.
2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
(LOOP_STMT_UNROLL): Likewise.
(LOOP_STMT_NO_VECTOR): Likewise.
(LOOP_STMT_VECTOR): Likewise.
* gcc-interface/trans.c (struct loop_info_d): Replace label field
with stmt field.
(Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
(Loop_Statement_to_gnu): Save the loop statement onto the stack
instead of the label.
(gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c: Include diagnostic.h and opts.h.
(Pragma_to_gnu) <Pragma_Warnings>: New case.
2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
a handful of local variables.
For a derived untagged type that renames discriminants, change the type
of the stored discriminants to a subtype with the bounds of the type
of the visible discriminants.
(build_subst_list): Rename local variable.
2013-05-16 Jason Merrill <jason@redhat.com>
* gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR ada/57188
* gcc-interface/Makefile.in: Allow for amd64 solaris2.
2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
PR ada/56474
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
int_const_binop to shift bounds by 1 when they are integer constants.
2013-04-25 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Apply_Predicate_Check): Update the comment associated
with the call to Check_Expression_Against_Static_Predicate.
* sem_ch3.adb (Analyze_Object_Declaration): Update the comment
associated with the call to Check_Expression_Against_Static_Predicate.
* sem_util.adb (Check_Expression_Against_Static_Predicate):
Broaden the check from a static expression to an expression with
a known value at compile time.
* sem_util.ads (Check_Expression_Against_Static_Predicate): Update
comment on usage.
2013-04-25 Thomas Quinot <quinot@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
First_Bit, and Last_Bit): Fix incorrect test in implementation of
RM 2005 13.5.2(3/2).
2013-04-25 Claire Dross <dross@adacore.com>
* a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
(Query_Element): Removed.
(Update_Element): Removed.
(Insert): The version with no New_Item specified is removed.
(Iterate): Removed.
(Write): Removed.
(Read): Removed.
Every check of fields Busy and Lock has been removed.
2013-04-25 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
call to S14_Pragma (Find_Related_Subprogram): Require proper
placement in subprogram body (Find_Related_Subprogram): Detect
duplicates for all cases (Find_Related_Subprogram): Handle case
of spec nested inside body.
2013-04-25 Arnaud Charlet <charlet@adacore.com>
* par-prag.adb: Fix typo.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Apply_Predicate_Check): If the type has a static
predicate and the expression is also static, check whether the
expression satisfies the predicate.
* sem_ch3.adb (Analyze_Object_Declaration): If the type has a
static predicate and the expression is also static, see if the
expression satisfies the predicate.
* sem_util.adb: Alphabetize several routines.
(Check_Expression_Against_Static_Predicate): New routine.
* sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
2013-04-25 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document Reason argument for pragma Warnings.
* par-prag.adb: Handle Reason parameter for pragma Warnings.
* sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
* snames.ads-tmpl (Name_Reason): New name entry.
2013-04-25 Yannick Moy <moy@adacore.com>
* exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
(Expand_SPARK): Remove special expansion for membership tests.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Update all places
that should use constant Base_Typ. When building an invariant
check, account for invariants coming from the base type. Prevent
the creation of a junk invariant check when the related object
is of an array type and it is initialized with an aggregate.
* exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
the base type to create an invariant call when the type of the
expression is a composite subtype.
2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
* a-cborse.adb: Fix minor typo.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Different_Generic_Profile): A spec and body
match in an instance if a subtype declaration that renames a
generic actual with the same name appears between spec and body.
2013-04-25 Robert Dewar <dewar@adacore.com>
* sem_util.adb: Minor reformatting.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
fold strings with a single others choice only if there are no
expressions in the aggregate.
2013-04-25 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Update doc on Ada 2012 default mode.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb: Add with and use clause for Stringt.
(Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
Decls and Stmts along with comments on their usage.
* exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
* sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
(Process_Contract_Cases): Update the call to Expand_Contract_Cases.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
* sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
aggregate for a packed type, which may be converted into an
unchecked conversion of an object.
2013-04-25 Robert Dewar <dewar@adacore.com>
* sem_prag.adb: Minor code reorganization (correct misspelling
Restiction).
* sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
* gnat_rm.texi: Document impl-defined aspects.
* sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
reformatting.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Set_Abstract_States): The attribute now applies
to generic packages.
* sem_ch4.adb (Referenced): Moved to sem_util.
* sem_ch7.adb (Unit_Requires_Body): A [generic] package with
a non-null abstract state needs a body.
* sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
to Collect_Subprogram_Inputs_Outputs.
(Analyze_Global_Item): Verify the proper usage of an item with mode
In_Out or Output relative to the enclosing context.
(Analyze_Pragma): Abstract_State can now be applied to a generic
package. Do not reset the Analyzed flag for pragmas Depends and Global
as this is not needed.
(Appears_In): Moved to library level.
(Check_Mode_Restiction_In_Enclosing_Context): New routine.
(Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
seen along with comments on usage.
* sem_util.ads, sem_util.adb (Referenced): New routine.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Expand_Contract_Cases): Generate
detailed error messages only when switch -gnateE is in effect.
2013-04-25 Yannick Moy <moy@adacore.com>
* sem_attr.adb (Analyze_Attribute): Do not issue
an error for a possibly misplaced 'Result or 'Old attribute when
analyzing the aspect.
2013-04-25 Robert Dewar <dewar@adacore.com>
* sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch4.adb (Analyze_Quantified_Expression):
Add local variable Loop_Id. Verify that the loop variable
is used within the condition of the quantified expression.
(Referenced): New routine.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_case.adb (Analyze_Choices): Enhance the error message
given on a bad use of subtype predicate.
* sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
the error message given on a bad use of subtype predicate.
* sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
Suggest_Static. Emit an extra error message advising how to
remedy the bad use of the predicate if the context warrants it.
* sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
Suggest_Static along with a comment explaining its usage.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_disp.adb (Check_Dispatching_Operation): Further refinement
to checks for AI05-0125: the check for a hidden primitive that
may be overridden by the new declaration only applies if the
hidden operation is never declared. This is not the case if the
operation is declared in a parent unit.
2013-04-25 Robert Dewar <dewar@adacore.com>
* debug.adb: Remove d.X and d.Y entries and documentation.
* exp_ch4.adb (Expand_N_If_Expression): Remove special code used
if expression with actions not available (now always available).
(Expand_Short_Circuit_Operator): Same change.
* gnat1drv.adb (Adjust_Global_Switches) Remove setting
Use_Expression_With_Actions flag, since this is now obsolete.
* opt.ads (Use_Expression_Actions): Removed (always True now).
* sinfo.ads: Minor comment updates.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
subtype whose base type is currently private, install full view
when compiling instance body.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_disp.adb (Check_Dispatching_Operation): Refine checks for
AI05-0125: the check for a hidden primitive that may be overridden
by the new declaration is only performed if the declaration comes
from source, and it must carry an explicit overriding indicator.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Abstract_States): The attribute now applies to
generic packages.
* sem_ch3.adb (Analyze_Object_Declaration): Check whether an
object declaration introduces an illegal hidden state.
* sem_prag.adb (Analyze_Abstract_State): Check whether a state
declaration introduces an illegal hidden state.
* sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
be to a protected function, in which case the name in the call
is a selected component.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch4.adb (Analyze_Quantified_Expression):
Warn on a suspicious use of quantifier "some" when "all" was meant.
(No_Else_Or_Trivial_True): New routine.
2013-04-25 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb: Put back with/use for Namet.
(Get_Pragma): New name (wi new spec) for Find_Pragma.
* sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
different interface.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Is_Visible_Component): In an instance all
components are visible.
2013-04-25 Matthew Heaney <heaney@adacore.com>
* a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
tampering when container empty.
* a-crbtgk.adb (Ceiling, Find, Floor): ditto.
(Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
ditto.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* par-ch12.adb: Move aspects from package specification to
generic package declaration.
* sem_ch12.adb: Analyze aspect specifications before building
and analyzing the generic copy, so that the generated pragmas
are properly taken into account.
* sem_ch13.adb: For compilation unit aspects that apply to a
generic package declaration, insert corresponding pragmas ahead
of visible declarations.
* sprint.adb: Display properly the aspects of a generic type
declaration.
2013-04-25 Robert Dewar <dewar@adacore.com>
* frontend.adb: Minor reformatting.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* einfo.ads: Extend documentation on use of Is_Private_Ancestor
for untagged types.
* sem_ch3.adb (Is_Visible_Component): Refine predicate for the
case of untagged types derived from private types, to reject
illegal selected components.
2013-04-25 Gary Dismukes <dismukes@adacore.com>
* sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
for case of selecting from an unexpanded implicit dereference
and do not make a recursive call on such a prefix.
2013-04-25 Doug Rupp <rupp@adacore.com>
* targparm.adb (VXF{_Str}): New tag for vaxfloat.
(Get_Target_Parameters): Handle VXF tag.
* targparm.ads (VAX_Float_On_Target): New boolean.
* system-vms-ia64.ads (VAX_Float): New boolean.
* frontend.adb (Frontend): Handle VAX float boolean.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.ads, einfo.adb: Remove with and use clauses for Namet.
(Find_Pragma): New routine.
* sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
predicate.
(Add_Predicates): Save the static predicate for diagnostics and error
reporting purposes.
(Process_PPCs): Remove local variables Dynamic_Predicate_Present and
Static_Predicate_Present. Add local variable Static_Pred. Ensure that
the expression of a static predicate is static.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Is_Ghost_Subprogram): Remove useless code.
2013-04-25 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Minor addition of index entry.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Check_Access_Invariants): Test whether an
invariant procedure is empty before generating a call to it.
(Has_Enabled_Predicate): New routine.
(Has_Null_Body): New routine.
(Process_PPCs): Test whether an invariant procedure is
empty before generating a call to it. Test whether predicates are
enabled for a particular type before generating a predicate call.
* sem_util.ads, sem_util.adb (Find_Pragma): New routine.
2013-04-25 Robert Dewar <dewar@adacore.com>
* sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
snames.ads-tmpl: Minor reformatting.
2013-04-25 Thomas Quinot <quinot@adacore.com>
* sem_ch7.adb: Minor reformatting.
2013-04-25 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
* s-tarest.adb: Minor reformatting.
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
tables.
* einfo.adb: Remove with and use clause for Aspects.
(Is_Ghost_Function): Removed.
(Is_Ghost_Entity): New routine.
(Is_Ghost_Subprogram): New routine.
* einfo.ads: Remove synthesized attribute Is_Ghost_Function
along with its uses in entities. Add synthesized attributes
Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
entities.
(Is_Ghost_Function): Removed.
(Is_Ghost_Entity): New routine.
(Is_Ghost_Subprogram): New routine.
* par-prag.adb: Remove pragma Ghost from the processing machinery.
* repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
* sem_attr.adb (Analyze_Access_Attribute): Update the check
for ghost subprograms.
* sem_ch4.adb (Analyze_Call): Update the check for calls
to ghost subprograms.
(Check_Ghost_Function_Call): Removed.
(Check_Ghost_Subprogram_Call): New routine.
* sem_ch6.adb (Check_Convention): Rewritten.
(Check_Overriding_Indicator): Remove the check for overriding
ghost functions.
(Convention_Of): New routine.
* sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
generic actual subprograms.
* sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
* sem_prag.adb: Remove the value for pragma Ghost from
table Sig_Flags.
(Analyze_Pragma): Remove the processing for pragma Ghost.
(Process_Convention): Emit an error when a ghost
subprogram attempts to override.
(Set_Convention_From_Pragma): Emit an error when a ghost subprogram
attempts to override.
* sinfo.ads: Clarify the usage of field Label_Construct.
* snames.adb-tmpl (Get_Convention_Id): Add an entry for
predefined name Ghost.
(Get_Convention_Name): Add an entry for convention Ghost.
* snames.ads-tmpl: Move predefined name Ghost to the sublist
denoting conventions. Add convention id Ghost. Remove pragma
id Ghost.
2013-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
units if within a generic hierarchy.
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Expand_Actuals): Add a predicate check on an
actual the related type has a predicate function.
* sem_ch3.adb (Constant_Redeclaration): Ensure that the related
type has an invariant procedure before building a call to it.
* sem_ch6.adb (Append_Enabled_Item): New routine.
(Check_Access_Invariants): Use routine
Append_Enabled_Item to chain onto the list of postconditions.
(Contains_Enabled_Pragmas): Removed.
(Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto