1 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
3 * aspects.adb, aspects.ads, sem_prag.ads: Remove all entries
4 for Refined_Pre from the various tables.
5 * par-prag.adb: Remove the entry for Refined_Pre from the list
6 of pragmas not needing special processing by the parser.
7 * sem_ch13.adb (Analyze_Aspect_Specifications):
8 Remove the processing for aspect Refined_Pre.
9 (Check_Aspect_At_Freeze_Point): Remove the entry for aspect
11 * sem_prag.adb (Analyze_Pragma): Refined_Pre is no longer a
12 valid assertion kind. Remove the analysis of pragma Refined_Pre.
13 (Analyze_Refined_Pragma): Update the comment on usage.
14 (Find_Related_Subprogram_Or_Body): Update the comment on
15 usage. Pragma Refined_Pre is no longer processed by this routine.
16 (Is_Valid_Assertion_Kind): Refined_Pre is no longer a valid
18 * snames.ads-tmpl: Remove predefined name Refined_Pre. Remove
19 the pragma id for Refined_Pre.
21 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
23 * exp_util.adb, exp_util.ads (Entity_Of): Moved to Sem_Util.
24 * sem_prag.adb (Analyze_Global_In_Decl_List): Mark a null
25 item list as being analyzed.
26 (Analyze_Global_List): Mark a
27 null global list and multiple global items as being analyzed.
28 (Analyze_Input_Item): Check the unit that defines the input
29 variable or state, not the reference to it.
30 * sem_util.ads, sem_util.adb (Entity_Of): Moved from Exp_Util. Ensure
31 that the input has an entity.
33 2013-10-17 Thomas Quinot <quinot@adacore.com>
35 * exp_util.adb (Get_Current_Value_Condition,
36 Set_Current_Value_Condition): Handle the case of expressions
37 with actions * exp_util.adb (Insert_Actions): Handle the case
38 of an expression with actions whose Actions list is empty.
39 * exp_util.adb (Remove_Side_Effects.Side_Effect_Free): An
40 expression with actions that has no Actions and whose Expression
41 is side effect free is itself side effect free.
42 * exp_util.adb (Remove_Side_Effects): Do not set an incorrect etype on
43 temporary 'R' (Def_Id), which is in general an access to Exp_Type, not
45 * sem_res.adb (Resolve): For an expression with
46 actions, resolve the expression early. * sem_res.adb
47 (Resolve_Expression_With_Actions): Rewrite an expression with
48 actions whose value is compile time known and which has no
49 actions into just its expression, so that its constant value is
51 * sem_res.adb (Resolve_Short_Circuit):
52 Wrap the left operand in an expression with actions to contain
53 any required finalization actions.
54 * exp_ch4.adb (Expand_Expression_With_Actions): For an
55 expression with actions returning a Boolean expression, ensure
56 any finalization action is kept within the Actions list.
57 * sem_warn.adb (Check_References, Check_Unset_Reference): add
58 missing circuitry to handle expressions with actions.
59 * checks.adb (Ensure_Valid): For an expression with actions,
60 insert the validity check on the Expression.
61 * sem_ch13.adb (Build_Static_Predicate.Get_RList): An expression
62 with actions that has a non-empty Actions list is not static. An
63 expression with actions that has an empty Actions list has the
64 static ranges of its Expression.
65 * sem_util.adb (Has_No_Obvious_Side_Effects): An expression with
66 actions with an empty Actions list has no obvious side effects
67 if its Expression itsekf has no obvious side effects.
69 2013-10-17 Ed Schonberg <schonberg@adacore.com>
71 * sem_aux.ads, sem_aux.adb (Is_Immutably_Limited_Type): Make
72 predicate compatible with Ada 2012 definition
73 (Is_Limited_View): New name for previous version of
74 Is_Immutably_Limited_Type. Predicate is true for an untagged
75 record type with a limited component.
76 * exp_ch7.adb, exp_ch6.adb, exp_ch4.adb, exp_ch3.adb, exp_aggr.adb,
77 sem_util.adb, sem_res.adb, sem_prag.adb, sem_attr.adb, sem_ch8.adb,
78 sem_ch6.adb, sem_ch3.adb, exp_util.adb: Use Is_Limited_View
79 * freeze.adb Use Is_Immutably_Limited_Type to check the legality
80 of references to the current instance, Is_Limited_View otherwise.
82 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
84 * sem_ch13.adb (Analyze_Aspect_Specifications): Flag aspect
85 Refined_Pre as not supported.
86 * sem_prag.adb (Analyze_Pragma): Ignore pragma Refined_Pre.
88 2013-10-17 Ed Schonberg <schonberg@adacore.com>
90 * sem_ch12.adb (Validated_Access_Subprogram_Instance): According
91 to AI05-288, actuals for access_to_subprograms must be subtype
92 conformant with the generic formal. Previous to AI05-288
93 only mode conformance was required, but the AI is a binding
94 interpretation that applies to previous versions of the language,
96 2013-10-17 Robert Dewar <dewar@adacore.com>
98 * gnat_ugn.texi: Minor text correction.
99 * ug_words: Add entry for -gnateu /IGNORE_UNRECOGNIZED.
100 * vms_data.ads: Add /IGNORE_UNRECOGNIZED for -gnateu.
102 2013-10-17 Tristan Gingold <gingold@adacore.com>
104 * impunit.adb (Non_Imp_File_Names_95): Add g-cppexc.
106 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
108 * sem_prag.adb (Analyze_Constituent): Move the check
109 concerning option Part_Of to routine Check_Matching_Constituent.
110 (Check_Matching_Constituent): Verify that an abstract state
111 that acts as a constituent has the proper Part_Of option in
112 its aspect/pragma Abstract_State. Account for the case when a
113 constituent comes from a private child or private sibling.
114 * sem_util.ads, sem_util.adb (Is_Child_Or_Sibling): New routine.
116 2013-10-17 Tristan Gingold <gingold@adacore.com>
118 * g-cppexc.adb, g-cppexc.ads: New files.
119 * gcc-interface/Makefile.in: Add g-cppexc when building zcx runtimes.
121 2013-10-17 Thomas Quinot <quinot@adacore.com>
123 * exp_ch7.adb: Minor reformatting.
125 2013-10-17 Ed Schonberg <schonberg@adacore.com>
127 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
128 expression with standard operator and type, for pretty-printing
131 2013-10-17 Bob Duff <duff@adacore.com>
133 * gnat_ugn.texi: Document --pp-new and --pp-old switches.
135 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
137 * einfo.adb: Flag 159 is now known as From_Limited_With. Replace
138 all references to attribute From_With_Type with From_Limited_With.
139 (From_With_Type): Renamed to From_Limited_With.
140 (Set_From_With_Type): Renamd to Set_From_Limited_With.
141 * einfo.ads: Remove attribute From_With_Type and occurrences in
142 nodes. Add attribute From_Limited_With along with occurrences
144 (From_With_Type): Renamed to From_Limited_With along with pragma Inline.
145 (Set_From_With_Type): Renamed to
146 Set_From_Limited_With along with pragma Inline.
147 * sem_ch7.adb, sem_ch8.adb, sem_ch12.adb, sem_ch13.adb, sem_disp.adb,
148 sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb,
149 exp_attr.adb, exp_disp.adb, freeze.adb, itypes.adb, layout.adb,
150 lib-writ.adb, rtsfind.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
151 sem_ch4.adb: Replace all references to attribute From_With_Type
152 with From_Limited_With.
153 * sem_ch6.adb: Replace all references to attribute From_With_Type
154 with From_Limited_With.
155 (Designates_From_With_Type): Renamed to Designates_From_Limited_With.
156 (Process_Formals): Update the call to Designates_From_With_Type.
157 * sem_ch10.adb: Replace all references to attribute From_With_Type
158 with From_Limited_With.
159 (Build_Limited_Views): Reimplemented.
160 * gcc-interface/decl.c Replace all references to attribute
161 From_With_Type with From_Limited_With.
162 (finalize_from_with_types): Renamed to finalize_from_limited_with.
163 * gcc-interface/gigi.h (finalize_from_with_types): Renamed to
164 finalize_from_limited_with.
165 * gcc-interface/trans.c: Replace all references to attribute
166 From_With_Type with From_Limited_With.
167 (Compilation_Unit_to_gnu): Update the call to finalize_from_with_types.
169 2013-10-17 Pascal Obry <obry@adacore.com>
171 * projects.texi: Update VCS_Kind documentation.
173 2013-10-17 Matthew Heaney <heaney@adacore.com>
175 * a-convec.adb, a-coinve.adb, a-cobove.adb (Insert, Insert_Space):
176 Inspect value range before converting type.
178 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com>
180 * sem_prag.adb (Analyze_Pragma): Flag the use of pragma Refined_Pre as
183 2013-10-17 Vincent Celier <celier@adacore.com>
185 * gnat_ugn.texi: Remove VMS conversion of -gnatet and -gnateT,
186 now that they are both in ug_words.
187 * ug_words: Update qualifier for -gnatet Add qualifier for -gnateT
188 * vms_data.ads: Update qualifier for -gnatet Add qualifier
190 * projects.texi: Continue to update the project documentation
193 2013-10-17 Robert Dewar <dewar@adacore.com>
195 * einfo.ads, einfo.adb (Has_Body_References): New flag.
196 (Body_References): New field.
197 * sem_prag.adb (Record_Possible_Body_Reference): New procedure
198 (Analyze_Input_Output): Call Record_Possible_Body_Reference
199 (Analyze_Global_Item): Call Record_Possible_Body_Reference
200 (Analyze_Refinement_Clause): Output messages if illegal global refs.
202 2013-10-17 Thomas Quinot <quinot@adacore.com>
204 * freeze.adb (Check_Component_Storage_Order): Reject a record or
205 array type that does not have an explicit Scalar_Storage_Order
206 attribute definition if a component of the record, or the
207 elements of the array, have one.
208 * gnat_rm.texi (attribute Scalar_Storage_Order): Document the above
211 2013-10-17 Vincent Celier <celier@adacore.com>
213 * gnat_ugn.texi: Add examples of switches -gnateD, including
214 one where the value is a string.
215 * projects.texi: Do not convert switches in project files to
218 2013-10-17 Robert Dewar <dewar@adacore.com>
220 * sem_prag.adb (Report_Extra_Clauses): Don't complain about
221 refinements with null input since null should be considered to
224 2013-10-17 Robert Dewar <dewar@adacore.com>
226 * gnat_ugn.texi: Document -gnatw.y/-gnatw.Y.
227 * opt.ads (List_Body_Required_Info): New flag.
228 * prep.adb: Minor reformatting.
229 * sem_ch7.adb (Unit_Requires_Body_Info): New
230 procedure (Analyze_Package_Specification): Add call to
231 Unit_Requires_Body_Info.
232 * ug_words: Add entries for -gnatw.y and -gnatw.Y.
233 * usage.adb: Add line for new warning switch -gnatw.y/.Y.
234 * vms_data.ads: Add entry for [NO_]WHY_SPEC_NEEDS_BODY warning
236 * warnsw.ads, warnsw.adb: Implement new warning switch -gnatw.y/.Y.
238 2013-10-17 Yannick Moy <moy@adacore.com>
240 * sem_ch8.adb (Find_Direct_Name): Keep track of assignments for
241 renamings in SPARK mode.
243 2013-10-17 Yannick Moy <moy@adacore.com>
245 * exp_spark.adb (Expand_SPARK): Remove special case for NOT IN
247 * sinfo.ads: Add special comment section to describe SPARK mode
249 * exp_spark.ads: Remove comments, moved to sinfo.ads.
251 2013-10-17 Yannick Moy <moy@adacore.com>
253 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type,
254 Expand_Freeze_Class_Wide_Type, Expand_Freeze_Class_Wide_Type):
255 Remove useless special cases.
256 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Allocator,
257 Expand_N_Op_Expon): Remove useless special cases.
258 * exp_ch6.adb (Is_Build_In_Place_Function_Call): Disable build-in-place
259 in SPARK mode by testing Full_Expander_Active instead of
261 (Make_Build_In_Place_Call_In_Allocator): Remove useless special case.
262 * exp_util.adb (Build_Allocate_Deallocate_Proc): Remove
263 useless special case.
264 * sem_eval.adb (Compile_Time_Known_Value): Remove special handling of
267 2013-10-17 Yannick Moy <moy@adacore.com>
269 * gnat_ugn.texi: Document -gnateT and target file format.
271 2013-10-17 Vincent Celier <celier@adacore.com>
273 * prep.adb (Check_Command_Line_Symbol_Definition): Is_A_String is
274 always False, even when the value starts and ends with double quotes.
276 2013-10-17 Tristan Gingold <gingold@adacore.com>
278 * a-exexpr-gcc.adb: Synchronize declarations of other/all others.
280 2013-10-17 Thomas Quinot <quinot@adacore.com>
282 * exp_pakd.adb: Add missing guard protecting Reverse_Storage_Order
284 * sem_res.adb: Minor code cleanup: use named parameter association
285 (not positional) for Boolean parameter Sec_Stack in calls to
286 Establish_Transient_Scope.
288 2013-10-15 Thomas Quinot <quinot@adacore.com>
290 * exp_pakd.adb (Expand_Packed_Element_Set,
291 Expand_Packed_Element_Reference): Adjust for the case of packed
292 arrays of reverse-storage-order types.
294 2013-10-15 Robert Dewar <dewar@adacore.com>
296 * sem_prag.adb: Minor reformatting.
298 2013-10-15 Ed Schonberg <schonberg@adacore.com>
300 * sem_attr.adb (Analyze_Attribute_Specification, case
301 To_Address): If the expression is an identifier, do not modify
302 its type; it will be converted when necessary, and the type of
303 the expression must remain consistent with that of the entity
304 for back-end consistency.
306 2013-10-15 Robert Dewar <dewar@adacore.com>
308 * sem_ch7.adb (Unit_Requires_Body): Add flag
309 Ignore_Abstract_State (Analyze_Package_Specification): Enforce
310 rule requiring Elaborate_Body if a non-null abstract state is
311 specified for a library-level package.
312 * sem_ch7.ads (Unit_Requires_Body): Add flag Ignore_Abstract_State.
314 2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
316 * sem_prag.adb (Analyze_Constituent): When
317 a state acts as a constituent of another state, ensure that
318 the said state has a Part_Of dependency in its corresponding
319 aspect/pragma Abstract_State.
321 2013-10-15 Robert Dewar <dewar@adacore.com>
323 * par-ch4.adb (P_If_expression): Handle redundant ELSE cleanly.
325 2013-10-15 Thomas Quinot <quinot@adacore.com>
327 * atree.ads (New_Copy, Relocate_Node): Improve documentation
328 (note that these subprograms reset Is_Overloaded).
330 2013-10-15 Thomas Quinot <quinot@adacore.com>
332 * checks.adb (Check_Needed): Handle the case where the test in
333 the left operand of the short circuit is wrapped in a qualified
334 expression, type conversion, or expression with actions.
336 2013-10-15 Thomas Quinot <quinot@adacore.com>
338 * sem_type.adb, sem_type.ads (Save_Interps): Also propagate
339 Is_Overloaded to New_N, for consistency.
341 2013-10-15 Ed Schonberg <schonberg@adacore.com>
343 * a-tienau.adb (Put): Use file parameter to query values of
344 current column and line length.
346 2013-10-15 Robert Dewar <dewar@adacore.com>
348 * sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
351 2013-10-15 Eric Botcazou <ebotcazou@adacore.com>
353 * targparm.ads: Fix minor typo in comment.
355 2013-10-15 Ed Schonberg <schonberg@adacore.com>
357 * lib-xref.adb: handle full views that are derived from private
359 * sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
360 mode: the elaboration entity is not in the source, and plays no
361 role in semantic analysis. Minor reformatting.
363 2013-10-15 Tristan Gingold <gingold@adacore.com>
365 * adaint.c (__gnat_get_executable_load_address): Remove AIX
368 2013-10-15 Ed Schonberg <schonberg@adacore.com>
370 * exp_aggr.adb (Aggr_Size_OK): Refine criteria to better handle
371 large static aggregates with static record components, to avoid
372 generating a large number of asignments. Conversely, improve
373 handling of aggregates initialized by a single association,
374 which are most efficiently implemented with a loop.
376 2013-10-15 Hristian Kirtchev <kirtchev@adacore.com>
378 * sem_prag.adb (Analyze_Input_Item): Emit an
379 error when the input item comes from the related package.
381 2013-10-15 Arnaud Charlet <charlet@adacore.com>
383 * exp_ch11.adb (Expand_Exception_Handlers): Restrict previous
386 2013-10-14 Tristan Gingold <gingold@adacore.com>
388 * gcc-interface/gigi.h (standard_datatypes): Add
389 ADT_set_exception_parameter_decl
390 (set_exception_parameter_decl): New macro.
391 * gcc-interface/trans.c (gigi): Initialize set_exception_parameter_decl.
392 (Exception_Handler_to_gnu_zcx): Initialize the choice parameter.
393 * gcc-interface/trans.c: Synchronize declarations of other/all others
394 between gigi and the runtime.
396 2013-10-14 Robert Dewar <dewar@adacore.com>
398 * exp_attr.adb (Find_Stream_Subprogram): Optimize
399 Storage_Array stream handling.
400 (Find_Stream_Subprogram): Optimize Stream_Element_Array stream handling
401 * rtsfind.ads: Add entry for Stream_Element_Array Add
402 entries for RE_Storage_Array subprograms Add entries for
403 RE_Stream_Element_Array subprograms
404 * s-ststop.ads, s-ststop.adb: Add processing for System.Storage_Array.
405 Add processing for Ada.Stream_Element_Array.
407 2013-10-14 Tristan Gingold <gingold@adacore.com>
409 * a-except-2005.ads, a-except-2005.adb:
410 (Get_Exception_Machine_Occurrence): New function.
411 * raise-gcc.c (__gnat_unwind_exception_size): New constant.
413 2013-10-14 Robert Dewar <dewar@adacore.com>
415 * sem_res.adb: Minor fix to error message text.
416 * errout.ads, erroutc.ads: Minor reformatting.
417 * s-ststop.ads, s-stratt.ads: Clean up documentation of block IO
419 * s-stratt-xdr.adb: Minor comment update.
421 2013-10-14 Robert Dewar <dewar@adacore.com>
423 * sem_aux.adb, sem_aux.ads, sem_prag.adb: Minor reformatting.
425 2013-10-14 Ed Schonberg <schonberg@adacore.com>
427 * sem_res.adb (Resolve_Actuals): Add error message for a
428 subprogram with an in-out parameter when used in a predicate,
429 to clarify subsequent error at the point of call.
431 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
433 * sem_prag.adb (Is_Matching_Input): Consume a matching null input.
435 2013-10-14 Robert Dewar <dewar@adacore.com>
437 * freeze.adb (Freeze_Record): Don't give warning about packed
438 and foreign convention.
440 2013-10-14 Ed Schonberg <schonberg@adacore.com>
442 * sem_aux.adb, sem_aux.ads (Package_Specification): New function, to
443 replace the less efficient idiom Specification.
444 (Unit_Declaration_Node (Pack_Id)), which handles library units and
446 * sem_ch3.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, sem_ch6.adb,
447 exp_disp.adb, sem_cat.adb, exp_dist.adb: Use Package_Specification.
449 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
451 * exp_attr.adb (Expand_Update_Attribute): Update the call to
452 Process_Range_Update.
453 (Process_Range_Update): Add new formal parameter Typ and associated
454 comment on usage. Add local constant Index_Typ. Add a type conversion
455 as part of the indexed component to ensure that the loop variable
456 corresponds to the index type.
458 2013-10-14 Tristan Gingold <gingold@adacore.com>
460 * a-exexpr-gcc.adb: Adjust comment.
461 (Others_Value, All_Others_Value,
462 Unhandled_Others_Value): Declare as Character to slightly reduce
465 2013-10-14 Robert Dewar <dewar@adacore.com>
467 * freeze.adb (Size_Known): Size is not known for packed record
468 with aliased components
470 2013-10-14 Robert Dewar <dewar@adacore.com>
472 * sem_ch3.adb: Minor fix to error message.
473 * a-exexpr-gcc.adb, sem_util.adb, sem_case.adb, exp_ch11.adb: Minor
476 2013-10-14 Arnaud Charlet <charlet@adacore.com>
478 * exp_ch11.adb: Fix typo.
480 2013-10-14 Thomas Quinot <quinot@adacore.com>
482 * exp_util.ads: Minor reformatting.
484 2013-10-14 Ed Schonberg <schonberg@adacore.com>
486 * sem_ch3.adb (Build_Derived_Record_Type): Reject full views
487 with no explicit discriminant constraints, when the parents of
488 the partial view and the full view are constrained subtypes with
489 different constraints.
491 2013-10-14 Robert Dewar <dewar@adacore.com>
493 * freeze.adb (Freeze_Array_Type): New procedure, abstracts out
494 this code from Freeze.
495 (Freeze_Array_Type): Detect pragma Pack overriding foreign convention
496 (Freeze_Record_Type): Ditto.
498 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
500 * sem_prag.adb (Analyze_Dependency_Clause): Add new local variable
501 Non_Null_Output_Seen. Update the call to Analyze_Input_Output.
502 (Analyze_Input_Item): Streamline the detection mechanism of null and
504 (Analyze_Input_List): Add new local variable
505 Non_Null_Input_Seen. Update all calls to Analyze_Input_Output.
506 (Analyze_Input_Output): Add new formal parameter Non_Null_Seen
507 and update the related comment on usage. Update the
508 recursive call to itself. Attribute 'Result is now treated
509 as a non-null item. Detect mixes of null and non-null items.
510 (Analyze_Initialization_Item): Streamline the detection mechanism
511 of null and non-null items.
513 2013-10-14 Vincent Celier <celier@adacore.com>
515 * projects.texi: Add documentation for the new project level
516 attribute Library_Rpath_Options.
518 2013-10-14 Tristan Gingold <gingold@adacore.com>
520 * a-exexpr-gcc.adb (Set_Exception_Parameter): New procedure.
521 (Set_Foreign_Occurrence): New procedure, extracted from
523 * exp_ch11.adb (Expand_Exception_Handlers): Do not expand choice
524 parameter in case of zcx.
525 * sem_ch11.adb (Analyze_Exception_Handlers): Need debug info
526 for the choice parameter.
527 * raise-gcc.c: Add comments.
529 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
531 * aspects.adb: Add an entry in table Canonical_Aspect for
533 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
534 Aspect_Names and Aspect_Delay for Initial_Condition.
535 * einfo.adb (Get_Pragma): Include pragma Initial_Condition to
536 categorization pragmas.
537 * einfo.ads (Get_Pragma): Update comment on usage.
538 * exp_ch7.adb (Expand_N_Package_Body): Add a runtime check to
539 verify the assertion introduced by pragma Initial_Condition.
540 (Expand_N_Package_Declaration): Add a runtime check to
541 verify the assertion introduced by pragma Initial_Condition.
542 (Expand_Pragma_Initial_Condition): New routine.
543 * par-prag: Include pragma Initial_Condition to the list of
544 pragmas that do not require special processing by the parser.
545 * sem_ch3.adb (Analyze_Declarations): Analyze pragma
546 Initial_Condition at the end of the visible declarations.
547 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
548 for aspect Initial_Condition.
549 (Check_Aspect_At_Freeze_Point):
550 Aspect Initial_Condition does not need inspection at freezing.
551 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part):
553 (Analyze_Pragma): Update all calls
554 to Check_Declaration_Order. Add processing for pragma
555 Initial_Condition. Initial_Condition is now a valid assertion
556 kind. Add an entry in table Sig_Flags for Initial_Condition.
557 (Check_Declaration_Order): Reimplemented to handle arbitrary
559 (Is_Valid_Assertion_Kind): Add an entry for
561 * sem_pag.ads (Analyze_Initial_Condition_In_Decl_Part):
563 * sem_util.adb (Add_Contract_Item): Pragma Initial_Condition
564 can now be associated with a package spec.
565 * sem_util.ads (Add_Contract_Item): Update comment on usage.
566 * sinfo.ads: Update the documentation of node N_Contract
567 * snames.ads-tmpl: Add new predefined name Initial_Condition. Add
568 new pragma id for Initial_Condition.
570 2013-10-14 Thomas Quinot <quinot@adacore.com>
572 * exp_pakd.adb: Minor reformatting.
574 2013-10-14 Robert Dewar <dewar@adacore.com>
576 * exp_prag.adb: Minor reformatting.
578 2013-10-14 Ed Schonberg <schonberg@adacore.com>
580 * sem_case.adb (Check_Against_Predicate): Handle properly an
581 others clause in various cases.
583 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
585 * sem_prag.adb (Check_Matching_Constituent): Do
586 not inspect the hidden states if there are no hidden states. This
587 case arises when the constituents are states coming from a
590 2013-10-14 Doug Rupp <rupp@adacore.com>
592 * init.c [ARMEL and VxWorks] (__gnat_map_signal): Re-arm guard
593 page by clearing VALID bit vice setting page protection.
595 2013-10-14 Arnaud Charlet <charlet@adacore.com>
597 * gnat_rm.texi, adaint.c: Fix typo.
599 2013-10-14 Ed Schonberg <schonberg@adacore.com>
601 * sem_util.adb (Is_Variable, In_Protected_Function): In the
602 body of a protected function, the protected object itself is a
603 constant (not just its components).
605 2013-10-14 Vincent Celier <celier@adacore.com>
607 * snames.ads-tmpl: Add new standard name Library_Rpath_Options.
609 2013-10-14 Tristan Gingold <gingold@adacore.com>
611 * sem_prag.adb (Process_Import_Or_Interface): Allow importing
612 of exception using convention Cpp.
613 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Expand cpp
615 * raise-gcc.c (is_handled_by): Filter C++ exception occurrences.
616 * gnat_rm.texi: Document how to import C++ exceptions.
618 2013-10-14 Jose Ruiz <ruiz@adacore.com>
620 * sem_ch13.adb (Sem_Ch13.Analyze_Aspect_Specification): For
621 Priority and CPU aspects, when checking, issue a warning only
622 if it is obviously not a main program.
624 2013-10-14 Tristan Gingold <gingold@adacore.com>
626 * adaint.c: Fix condition for AIX. Minor reformatting.
628 2013-10-14 Robert Dewar <dewar@adacore.com>
630 * sem_ch3.adb, sem_prag.adb, prj.ads: Minor reformatting.
632 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
634 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
635 Rename Outputs_Seen to All_Outputs_Seen and update all occurrences
637 (Analyze_Input_Output): Add an item to
638 All_Inputs_Seen when it is an input or a self-referential output.
639 (Check_Mode): Comment reformatting.
640 (Analyze_Abstract_State): Remove the restriction that an Export state
641 must also have mode Input_Only or Output_Only.
643 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
645 * einfo.adb: Flag 263 is now known as Has_Visible_Refinement.
646 (Has_Non_Null_Refinement): New routine.
647 (Has_Null_Refinement): The routine is now synthesized.
648 (Has_Visible_Refinement): New routine.
649 (Set_Has_Visible_Refinement): New routine.
650 (Write_Entity_Flags): Remove the output for
651 Has_Null_Refinement. Add output for Has_Visible_Refinement.
652 * einfo.ads: Update the occurrences of Has_Non_Null_Refinement,
653 Has_Null_Refinement and Has_Visible_Refinement in entities.
654 (Has_Non_Null_Refinement): New synthesized attribute.
655 (Has_Null_Refinement): This attribute is now synthesized.
656 (Has_Visible_Refinement): New routine with corresponding
658 (Set_Has_Visible_Refinement): New routine with corresponding pragma
660 * sem_ch3.adb (Analyze_Declarations): Add new local
661 variable In_Package_Body. Remove state refinements from
662 visibility at the end of the package body declarations.
663 (Remove_Visible_Refinements): New routine.
664 * sem_prag.adb (Analyze_Constituent): Collect a null
665 constituent and mark the state as having visible refinement.
666 (Analyze_Global_Item): Use attribute Has_Visible_Refinement to
667 detect a state with visible refinement.
668 (Analyze_Input_Output): Use attribute Has_Visible_Refinement to detect
669 a state with visible refinement.
670 (Check_Dependency_Clause): Use attribute Has_Non_Null_Refinement rather
671 than checking the contents of list Refinement_Constituents.
672 (Check_In_Out_States): Use attribute Has_Non_Null_Refinement rather
673 than checking the contents of list Refinement_Constituents.
674 (Check_Input_States): Use attribute Has_Non_Null_Refinement rather
675 than checking the contents of list Refinement_Constituents.
676 (Check_Matching_Constituent): Mark a state as having visible refinement.
677 (Check_Output_States): Use attribute Has_Non_Null_Refinement rather than
678 checking the contents of list Refinement_Constituents.
679 (Check_Refined_Global_Item): Use attribute Has_Visible_Refinement
680 to detect a state with visible refinement.
681 (Is_Matching_Input): Use attribute Has_Non_Null_Refinement rather than
682 checking the contents of list Refinement_Constituents.
683 * sem_util.adb (Is_Refined_State): Use attribute
684 Has_Visible_Refinement to detect a state with visible refinement.
686 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
688 * sem_prag.adb (Check_Mode): Do not emit an
689 error when inspecting a self referencial output item of an
692 2013-10-14 Tristan Gingold <gingold@adacore.com>
694 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Fix
695 target type for code of VMS imported exception.
696 * init.c: Replace Exception_Code by void *.
697 * s-vmexta.adb (Hash, Base_Code_In): Adjust code after changing
698 the type of Exception_Code.
700 2013-10-14 Vincent Celier <celier@adacore.com>
702 * prj.ads: Minor comment updates.
703 * prj-attr.adb: New attribute Library_Rpath_Options.
705 2013-10-14 Robert Dewar <dewar@adacore.com>
707 * gnat_rm.texi: Library_Level attribute now applies to an
709 * sem_attr.adb (Analyze_Attribute, case Library_Level): Prefix
710 is now an entity name.
712 2013-10-14 Jose Ruiz <ruiz@adacore.com>
714 * sem_ch13.adb (Analyze_Aspect_Specification): For
715 Priority and CPU aspects in subprograms, the expression in the
716 aspect is analyzed and exported.
718 2013-10-14 Robert Dewar <dewar@adacore.com>
720 * s-valuti.adb, prep.adb, scng.adb, errout.adb: Minor reformatting.
722 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
724 * adaint.c: Further disable __gnat_get_executable_load_address
727 2013-10-14 Vincent Celier <celier@adacore.com>
729 * gnat_ugn.texi: Add documentation for comparing symbols to
730 integers in preprocessing expressions.
732 2013-10-14 Jose Ruiz <ruiz@adacore.com>
734 * sem_prag.adb (Analyze_Aspect_Specification): For
735 Priority and CPU aspects in subprograms, the expression in the
736 aspect is analyzed and exported.
737 (Analyze_Pragma): When having a Priority pragma in the
738 main subprogram, load a unit that will force the initialization
739 of the tasking run time, which is needed for setting the required
742 2013-10-14 Vincent Celier <celier@adacore.com>
744 * prj-nmsc.adb (Check_Interfaces): Put in Other_Interfaces all
745 non Ada interface files.
746 * prj.ads (Project_Data): New component Other_Interfaces.
748 2013-10-14 Arnaud Charlet <charlet@adacore.com>
750 * gcc-interface/Makefile.in: Target pairs clean ups.
752 2013-10-14 Vincent Celier <celier@adacore.com>
754 * errout.adb (Write_Error_Summary): Do not output the number
755 of lines when Main_Source_File is unknown.
756 (Output_Messages): Do not write the header when Main_Source_File is
759 2013-10-14 Vincent Celier <celier@adacore.com>
761 * prep.adb (Expression): Accept terms of the form 'symbol <relop>
762 integer", where relop is =, <, <=, > or >=.
763 (Parse_Def_File): Accept literal integer values.
764 * gcc-interface/Make-lang.in: Add s-valint.o, s-valuns.o and
765 s-valuti.o to the compiler object files.
767 2013-10-14 Robert Dewar <dewar@adacore.com>
769 * exp_prag.adb, exp_ch11.adb, s-exctab.adb: Minor reformatting.
770 * usage.adb: Add line for -gnateu switch.
772 2013-10-14 Vincent Celier <celier@adacore.com>
774 * lib-writ.ads: Add comments to indicate that a path name in
775 D lines may be quoted if the path name includes directories
778 2013-10-14 Robert Dewar <dewar@adacore.com>
780 * debug.adb: Document -gnatd.E.
781 * gnat1drv.adb (Adjust_Global_Switches): Set Error_To_Warning
783 * opt.ads (Error_To_Warning): New switch.
784 * osint.adb: Minor reformatting.
785 * sem_warn.adb (Warn_On_Overlapping_Actuals): Overlap is error
786 in some cases in Ada 2012 mode (unless Error_To_Warning) is set.
787 * sem_warn.ads (Warn_On_Overlapping_Actuals): Document error
790 2013-10-14 Tristan Gingold <gingold@adacore.com>
792 * cstand.adb: Add a comment for Standard_Exception_Type.
794 2013-10-14 Ed Schonberg <schonberg@adacore.com>
796 * exp_ch4.adb (Process_Transient_Object): If a transient scope
797 has already been created, use the corresponding Node_To_Be_Wrapped
798 as the insertion point for the controlled actions.
800 2013-10-14 Tristan Gingold <gingold@adacore.com>
802 * cstand.adb (Create_Standard): Change Import_Code component
803 of Standard_Exception_Type to Foreign_Data. Its type is now
804 Standard_A_Char (access to character).
805 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Adjust
806 definition of Code to match the type of Foreign_Data.
807 * s-stalib.ads (Exception_Data): Replace Import_Code by Foreign_Data
808 Change the definition of standard predefined exceptions.
809 (Exception_Code): Remove.
810 * raise.h (Exception_Code): Remove (Exception_Data): Replace
811 Import_Code field by Foreign_Data.
812 * rtsfind.ads (RE_Exception_Code): Remove
813 (RE_Import_Address): Add.
814 * a-exexpr-gcc.adb (Import_Code_For): Replaced by Foreign_Data_For.
815 * exp_ch11.adb (Expand_N_Exception_Declaration): Associate null
816 to Foreign_Data component.
817 * raise-gcc.c (Import_Code_For): Replaced by Foreign_Data_For.
818 (is_handled_by): Add comments. Use replaced function. Change
819 condition so that an Ada occurrence is never handled by
821 * s-exctab.adb (Internal_Exception): Associate Null_Address to
822 Foreign_Data component.
823 * s-vmexta.adb, s-vmexta.ads (Exception_Code): Declare Replace
824 SSL.Exception_Code by Exception_Code.
826 2013-10-14 Robert Dewar <dewar@adacore.com>
828 * gnat_ugn.texi: Document -gnateu switch.
829 * opt.ads (Ignore_Unrecognized_VWY_Switches): New switch.
830 * stylesw.adb: Ignore unrecognized switch if
831 Ignore_Unrecognized_VWY_Switches set.
832 * switch-c.adb: Implement -gnateu (sets
833 Ignore_Unrecognized_VWY_Switches).
834 * validsw.adb: Ignore unrecognized switch if
835 Ignore_Unrecognized_VWY_Switches set.
836 * warnsw.adb: Ignore unrecognized switch if
837 Ignore_Unrecognized_VWY_Switches set.
839 2013-10-14 Robert Dewar <dewar@adacore.com>
841 * exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor
844 2013-10-14 Vincent Celier <celier@adacore.com>
846 * ali.adb (Get_File_Name): New Boolean parameter May_Be_Quoted,
847 defaulted to False. Calls Get_Name with May_Be_Quoted.
848 (Get_Name): New Boolean parameter May_Be_Quoted, defaulted to
849 False. If May_Be_Quoted is True and first non blank charater is
850 '"', unquote the name.
851 (Scan_ALI): For the file/path name on the D line, call Get_File_Name
852 with May_Be_Quoted = True, as it may have been quoted.
853 * lib-util.adb, lib-util.ads (Write_Info_Name_May_Be_Quoted): New
854 procedure to write file/path names that may contain spaces and if they
856 * lib-writ.adb (Write_ALI): Use new procedure
857 Write_Info_Name_May_Be_Quoted to write file/path names on D lines.
859 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
861 * sem_prag.adb (Analyze_Depends_In_Decl_Part,
862 Analyze_Global_In_Decl_Part,
863 Analyze_Pre_Post_Condition_In_Decl_Part): Install the subprogram
864 and its formals only when it is not already installed.
865 * sem_util.adb (Is_Refined_State): A state is refined when it
866 has a non-empty list of constituents.
868 2013-10-14 Tristan Gingold <gingold@adacore.com>
870 * adaint.c: Disable __gnat_get_executable_load_address for linux.
871 * exp_prag.adb: Add comment in Expand_Pragma_Import_Export_Exception.
873 2013-10-14 Tristan Gingold <gingold@adacore.com>
875 * s-vmexta.ads: Add comments.
877 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
879 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
880 for pragma Refined_State.
881 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
882 for aspect Refined_Depends.
883 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
884 Use Find_Related_Subprogram_Or_Body to find the related
885 context. Use the current scope when determining whether to
886 ensure proper visibility.
887 (Analyze_Depends_In_Decl_Part):
888 Add local variable Spec_Id. Update the comment on usage of
889 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
890 related context. Extract the corresponding spec of the body
891 (if any). Use the current scope when determining when to
892 ensure proper visibility.
893 (Analyze_Global_In_Decl_Part):
894 Add local variable Spec_Id. Update the comment on usage of
895 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
896 related context. Extract the corresponding spec of the body
897 (if any). Use the current scope when determining when to
898 ensure proper visibility.
899 (Analyze_Global_Item): Use the
900 entity of the subprogram spec when performing formal parameter
901 checks. Perform state-related checks.
902 (Analyze_Input_Output):
903 Use Is_Attribute_Result to detect 'Result. Query the
904 entity of a subprogram spec when verifying the prefix of
905 'Result. Perform state-related checks. (Analyze_Pragma):
906 Merge the analysis of Refined_Depends and Refined_Global.
907 (Analyze_Refined_Depends_In_Decl_Part): Provide implemenation.
908 (Analyze_Refined_Global_In_Decl_Part): Move state-related checks
909 to the body of Analyze_Global_In_Decl_Part. Rename local constant
910 List to Items. (Analyze_Refined_Pragma): Remove circuitry to
911 find the proper context, use Find_Related_Subprogram_Or_Body
913 (Check_Function_Return): Query the entity of
914 the subprogram spec when verifying the use of 'Result.
915 (Check_In_Out_States, Check_Input_States, Check_Output_States):
916 Avoid using Has_Null_Refinement to detect a state with
917 a non-null refinement, use the Refinement_Constituents
919 (Check_Matching_Constituent): Remove initialization code.
920 (Check_Mode_Restriction_In_Function): Use the entity of the subprogram
921 spec when verifying mode usage in functions.
922 (Collect_Global_Items): New routine.
923 (Collect_Subprogram_Inputs_Outputs): Add local
924 variable Spec_Id. Add circuitry for bodies-as-specs. Use
925 pragma Refined_Global when collecting for a body.
926 (Create_Or_Modify_Clause): Use the location of the
927 clause. Rename local variable Clause to New_Clause to avoid
928 confusion and update all occurrences. Use Is_Attribute_Result
930 (Find_Related_Subprogram): Removed.
931 (Find_Related_Subprogram_Or_Body): New routine.
932 (Is_Part_Of): Move routine to top level.
933 (Normalize_Clause): Update the
934 comment on usage. The routine can now normalize a clause with
935 multiple outputs by splitting it.
936 (Collect_Global_Items):
937 Rename local constant List to Items. Remove the check for
939 (Requires_Profile_Installation): Removed.
940 (Split_Multiple_Outputs): New routine.
941 * sem_prag.ads: Update the comments on usage of various
942 pragma-related analysis routines.
943 * sem_util.adb (Contains_Refined_State): The routine can now
944 process pragma [Refined_]Depends.
945 (Has_Refined_State): Removed.
946 (Has_State_In_Dependency): New routine.
947 (Has_State_In_Global): New routine.
948 (Is_Attribute_Result): New routine.
949 * sem_util.ads (Is_Attribute_Result): New routine.
951 2013-10-14 Emmanuel Briot <briot@adacore.com>
953 * s-regpat.adb (Compile): Fix finalization of the automaton
954 when its size was automatically computed to be exactly 1000 bytes.
956 2013-10-14 Ed Schonberg <schonberg@adacore.com>
958 * sem_ch3.adb (Complete_Private_Subtype): If the full view of
959 the base type is constrained, the full view of the subtype is
960 known to be constrained as well.
962 2013-10-14 Vincent Celier <celier@adacore.com>
964 * projects.texi: Add documentation for new attributes of package
965 Clean: Artifacts_In_Object_Dir and Artifacts_In_Exec_Dir.
967 2013-10-14 Tristan Gingold <gingold@adacore.com>
969 * adaint.c, adaint.h (__gnat_get_executable_load_address):
971 * a-exexda.adb (Append_Info_Basic_Exception_Traceback): Add
972 executable load address (Basic_Exception_Tback_Maxlength): Adjust.
974 2013-10-14 Vincent Celier <celier@adacore.com>
976 * prj-attr.adb: New attributes in package Clean:
977 Artifacts_In_Exec_Dir, Artifacts_In_Object_Dir.
978 * prj-nmsc.adb (Process_Clean (Attributes)): New
979 procedure to process attributes Artifacts_In_Exec_Dir and
980 Artifacts_In_Object_Dir in package Clean.
981 * prj.ads (Project_Configuration): New components
982 Artifacts_In_Exec_Dir and Artifacts_In_Object_Dir.
983 * snames.ads-tmpl: New standard names Artifacts_In_Exec_Dir and
984 Artifacts_In_Object_Dir used only by gprclean.
986 2013-10-14 Robert Dewar <dewar@adacore.com>
988 * exp_attr.adb (Expand_N_Attribute_Reference): Add error
989 entry for Library_Level attribute (which should not survive
991 * gnat_rm.texi: Document attribute Library_Level
992 * sem_attr.adb (Analyze_Attribute, case Library_Level): Implement
993 this new attribute (Set_Boolean_Result): Replaces Set_Result
994 (Check_Standard_Prefix): Document that Check_E0 is called
995 (Check_System_Prefix): New procedure
996 * snames.ads-tmpl: Add entry for Library_Level attribute
998 2013-10-14 Robert Dewar <dewar@adacore.com>
1000 * exp_ch6.adb, sinfo.ads: Minor reformatting.
1001 * checks.adb (Overlap_Check): Use identifier casing in messages.
1003 2013-10-14 Robert Dewar <dewar@adacore.com>
1005 * einfo.ads, einfo.adb (Default_Aspect_Component_Value): Is on base type
1007 * exp_aggr.adb (Expand_Array_Aggregate): Handle proper
1008 initialization of <> component.
1009 * exp_ch3.adb, exp_tss.adb: Minor reformatting
1010 * sem_ch13.adb (Default_Aspect_Component_Value, Default_Aspect_Value):
1011 Is on base type only.
1012 * sinfo.ads: Minor comment revision.
1014 2013-10-14 Robert Dewar <dewar@adacore.com>
1016 * g-decstr.adb (Decode_Wide_Wide_Character): Fix failure
1017 to detect invalid sequences where longer than necessary
1018 sequences are used for encoding.
1019 (Validate_Wide_Character):
1020 Call Decode_Wide_Character to get the above validations.
1021 (Validate_Wide_Wide_Character): Same fix
1022 * g-decstr.ads: Add documentation making it clear that the UTF-8
1023 implementation here recognizes all valid UTF-8 sequences, rather
1024 than the well-formed subset corresponding to characters defined
1026 (Next_Wide_Character): Remove comment about this
1027 being more efficient than Decode_Wide_Character (because this
1028 no longer the case).
1029 (Prev_Wide_Character): Add note that valid encoding is assumed.
1031 2013-10-14 Robert Dewar <dewar@adacore.com>
1033 * a-wichha.adb (Character_Set_Version): New function.
1034 * a-wichha.ads: Remove comments for pragma Pure (final RM has
1036 (Character_Set_Version): New function.
1037 * gnat_rm.texi: Update doc.
1039 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1041 * einfo.adb: Flag263 is now known as Has_Null_Refinement.
1042 (Has_Null_Refinement): New routine.
1043 (Set_Has_Null_Refinement): New routine.
1044 (Write_Entity_Flags): Output the status of flag
1045 Has_Null_Refinement.
1046 * einfo.ads: Add new flag Has_Null_Refinement along with
1047 comment on usage and update all nodes subject to the flag.
1048 (Has_Null_Refinement): New routine along with pragma Inline.
1049 (Set_Has_Null_Refinement): New rouitine along with pragma Inline.
1050 * sem_prag.adb (Analyze_Constituent): Mark a state as having
1051 a null refinement when the sole constituent is "null".
1052 (Analyze_Global_List): Handle null input/output items.
1053 (Analyze_Refined_Global_In_Decl_Part): Add local variable
1054 Has_Null_State. Add logic to handle combinations of states
1055 with null refinements and null global lists and/or items.
1056 (Check_In_Out_States, Check_Input_States, Check_Output_States):
1057 Use attribute Has_Null_Refinement to detect states with
1059 (Check_Refined_Global_List): Handle null input/output items.
1060 (Process_Global_Item): Handle states with null refinements.
1061 (Process_Global_List): Handle null input/output items.
1063 2013-10-14 Robert Dewar <dewar@adacore.com>
1065 * freeze.adb (Freeze_Entity): Reset Is_True_Constant for
1067 * gnat_ugn.texi: Update doc on aliased variables and constants.
1069 2013-10-14 Ed Schonberg <schonberg@adacore.com>
1071 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
1072 reference is an actual in a call, the prefix has not been fully
1073 expanded, to account for the additional expansion for parameter
1074 passing. the prefix itself is a packed reference as well,
1075 recurse to complete the transformation of the prefix.
1077 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
1079 * exp_dbug.adb (Debug_Renaming_Declaration): Do not
1080 materialize the entity when the renamed object contains an
1081 N_Explicit_Dereference.
1082 * sem_ch8.adb (Analyze_Object_Renaming):
1083 If the renaming comes from source and the renamed object is a
1084 dereference, mark the prefix as needing debug information.
1086 2013-10-14 Doug Rupp <rupp@adacore.com>
1088 * system-vxworks-arm.ads (Stack_Check_Probes, Stack_Check_Limits):
1089 Enable Stack Probes, Disable Stack Limit Checking.
1090 * init.c [VxWorks] (__gnat_inum_to_ivec): Caste return value.
1091 (__gnat_map_signal): Fix signature.
1092 (__gnat_error_handler): Make
1093 static, fix signature, remove prototype, fix prototype warning.
1094 [ARMEL and VxWorks6] (__gnat_map_signal): Check and re-arm guard
1095 page for storage_error.
1096 * exp_pakd.adb: Minor reformatting.
1098 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1100 * sem_prag.adb (Analyze_Global_In_Decl_Part): Remove local
1101 variable Contract_Seen. Add local variable Proof_Seen.
1102 (Analyze_Global_List): Remove the processing for mode
1103 Contract_In. Add support for mode Proof_In.
1104 (Analyze_Pragma): Update the grammar of pragmas Global and
1106 * snames.ads-tmpl: Remove predefined name Contract_In. Add
1107 predefined name Proof_In.
1109 2013-10-14 Robert Dewar <dewar@adacore.com>
1111 * exp_prag.adb (Expand_Pragma_Check): Generate proper string
1113 * gnat_rm.texi: Add documentation for pragmas
1114 Type_Invariant[_Class]
1115 * par-prag.adb: Add entries for pragmas Type_Invariant[_Class]
1116 * sem_ch13.adb: Minor reformatting
1117 * sem_prag.adb: Implement pragmas Type_Invariant[_Class]
1118 * snames.ads-tmpl: Add entries for pragmas Type_Invariant[_Class]
1120 2013-10-14 Johannes Kanig <kanig@adacore.com>
1122 * debug.adb: Release now unused debug switches that were only
1123 relevant for gnat2why backend, not the frontend
1124 * frontend.adb (Frontend) Do not stop when -gnatd.H is present,
1127 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1129 * sem_prag.adb (Analyze_Global_Item): Allow
1130 references to enclosing formal parameters.
1132 2013-10-14 Thomas Quinot <quinot@adacore.com>
1134 * einfo.adb (Equivalent_Type): Add missing case
1135 E_Access_Subprogram_Type in guard (for remote access to
1136 subprograms) * sem_ch8.adb (Find_Direct_Name, Find_Expanded_Name):
1137 Add missing guards to account for the presence of RAS types
1138 that have already been replaced with the corresponding fat
1141 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1143 * aspects.adb: Add an entry in table Canonical_Aspect for
1145 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1146 Aspect_Names and Aspect_Delay for Initializes.
1147 * atree.ads, atree.adb (Ekind_In): New seven argument versions of the
1149 * einfo.adb: Remove Refined_State_Pragma from the list of node
1150 usage. Finalizer is now at position 28.
1152 and package bodies now have a contract.
1154 the assertion and node usage.
1155 (Get_Pragma): Update the Is_CDG
1156 flag to include Abstract_State, Initializes and Refined_State.
1157 (Refined_State_Pragma): Removed.
1158 (Set_Contract): Package and
1159 package bodies now have a contract.
1160 (Set_Finalizer): Update the
1161 assertion and node usage.
1162 (Set_Refined_State_Pragma): Removed.
1163 (Write_Field8_Name): Remove the output for Refined_State_Pragma.
1164 (Write_Field24_Name): Remove the output for Finalizer. Package
1165 and package bodies now have a contract.
1166 (Write_Field28_Name):
1167 Add output for Finalizer.
1168 * einfo.ads: Update the documentation and usage in entities
1169 of attribute Contract. Update the node position and usage in
1170 entities of attribute Finalizer. Remove the documentation
1171 and usage in entities for attribute Refined_State_Pragma.
1172 (Refined_State_Pragma): Removed along with pragma Inline.
1173 (Set_Refined_State_Pragma): Removed along with pragma Inline.
1174 * par-prag.adb: Add Initializes to the pragmas that do not
1175 require special processing by the parser.
1176 * sem_ch3.adb (Analyze_Declarations): Add local variable
1177 Prag. Update the retrieval of pragma Refined_State. Analyze
1178 aspect/pragma Initializes at the end of the visible declarations
1179 of the related package.
1180 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
1181 Add local variables Ref_Depends and Ref_Global. Analyze
1182 pragmas Refined_Global and Refined_Depends in that order.
1183 (Analyze_Subprogram_Contract): Add local variables Depends and
1184 Global. Analyze pragmas Global and Depends in that order.
1185 * sem_ch7.adb (Analyze_Package_Body_Helper): Package
1186 bodies now have a contract. Move the analysis of the aspect
1187 specifications after the defining entity has been decorated.
1188 (Analyze_Package_Declaration): Packages now have a contract. Move
1189 the analysis of the aspect specifications after the defining
1190 entity has been decorated.
1191 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Packages
1193 * sem_ch13.adb (Analyze_Pragma): Code cleanup for aspect
1194 Abstract_State. Add processing for aspect Initializes.
1195 (Check_Aspect_At_Freeze_Point): Add an entry for Initializes.
1196 * sem_prag.adb: Use Get_Pragma_Arg to extract the expression
1197 of a pragma argument. Add an entry in table Sig_Flags for
1199 (Analyze_Initializes_In_Decl_Part): New routine.
1200 (Analyze_Pragma): Check the declaration order of pragmas
1201 Abstract_State and Initializes. Abstract_State is now part of
1202 the package contract. Analyze pragma Initializes. Check for
1203 duplicate Refined_State pragma. Refined_State is now part of
1204 the package contract.
1205 (Check_Declaration_Order): New routine.
1206 (Check_Test_Case): Alphabetized.
1207 * sem_prag.ads (Analyze_Initializes_In_Decl_Part): New routine.
1208 * sem_util.adb (Add_Contract_Item): Rename formal Subp_Id
1209 to Id. This routine can now support contracts on packages and
1211 * sem_util.ads (Add_Contract_Item): Rename formal Subp_Id to
1212 Id. Update comment on usage.
1213 * sinfo.ads: Update the usage of N_Contract nodes.
1214 * snames.ads-tmpl: Add predefined name Initializes. Add new
1215 pragma id for Initializes.
1217 2013-10-13 Nicolas Roche <roche@adacore.com>
1218 Eric Botcazou <ebotcazou@adacore.com>
1220 * gcc-interface/Make-lang.in (ada/%.o): Replace individual rules with
1221 generic rule and add $(POSTCOMPILE).
1223 (.adb.o): Add @$(ADA_DEPS).
1225 (ada/a-except.o): Likewise.
1226 (ada/s-excdeb.): Likewise.
1227 (ada/s-assert.o): Likewise.
1228 (ada/a-tags.o): Likewise.
1229 (ada_generated_files): New variable.
1230 Use them as dependency order for GNAT1_ADA_OBJS and GNATBIND_OBJS.
1231 (ADA_DEPFILES): New variable.
1235 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
1237 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Force all local
1238 variables with aggregate types in memory if not optimizing.
1240 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1242 * sem_prag.adb (Check_Mode): Do
1243 not emit an error when we are looking at inputs and
1244 the item is an unconstrained or tagged out parameter.
1245 (Check_Mode_Restriction_In_Enclosing_Context): Use Get_Pragma
1246 to find whether the context is subject to aspect/pragma Global.
1247 (Collect_Subprogram_Inputs_Outputs): Unconstrained or tagged
1248 out parameters are now considered inputs. Use Get_Pragma to
1249 find wheher the subprogram is subject to aspect/pragma Global.
1250 (Is_Unconstrained_Or_Tagged_Item): New routine.
1252 2013-10-13 Thomas Quinot <quinot@adacore.com>
1254 * einfo.ads: Minor reformatting.
1255 * gcc-interface/Make-lang.in: Update dependencies.
1257 2013-10-13 Robert Dewar <dewar@adacore.com>
1259 * gnat_rm.texi: Add documentation for pragmas Pre[_Class]
1261 * par-ch2.adb (Skip_Pragma_Semicolon): Handle extra semicolon nicely.
1262 * par-prag.adb: Add entries for pragmas Pre[_Class] and
1264 * sem_prag.adb: Add handling of pragmas Pre[_Class] and
1266 * sem_util.adb (Original_Aspect_Name): Moved here from
1267 Sem_Prag.Original_Name, and modified to handle pragmas
1268 Pre/Post/Pre_Class/Post_Class.
1269 * sem_util.ads (Original_Aspect_Name): Moved here from
1270 Sem_Prag.Original_Name.
1271 * snames.ads-tmpl: Add entries for pragmas Pre[_Class] and
1274 2013-10-13 Robert Dewar <dewar@adacore.com>
1276 * einfo.adb, sem_ch6.adb: Minor reformatting.
1278 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1280 * einfo.adb: Add node/list usage for Refined_State
1281 and Refinement_Constituents.
1282 (Get_Pragma): Update the
1283 initialization of Is_CDG to include Refined_Global and
1284 Refined_Depends. Rename constant Delayed to In_Contract and update
1285 all of its occurrences.
1286 (Is_Non_Volatile_State): New routine.
1287 (Is_Volatile_State): Removed.
1288 (Refined_State): New routine.
1289 (Refinement_Constituents): New routine.
1290 (Set_Refined_State): New routine.
1291 (Set_Refinement_Constituents): New routine.
1292 (Write_Field8_Name): Add output for Refinement_Constituents.
1293 (Write_Field10_Name): Add output for Refined_State.
1294 * einfo.ads: Add new synthesized attribute Is_Non_Volatile_State.
1295 Remove synthesized attribute Is_Volatile_State. Add new
1296 attributes Refined_State and Refinement_Constituents along with
1298 (Get_Pragma): Update the comment on usage.
1299 (Is_Non_Volatile_State): New routine.
1300 (Is_Volatile_State): Removed.
1301 (Refined_State): New routine and pragma Inline.
1302 (Refinement_Constituents): New routine and pragma Inline.
1303 (Set_Refined_State): New routine and pragma Inline.
1304 (Set_Refinement_Constituents): New routine and pragma Inline.
1305 * elists.ads, elists.adb (Clone): Removed.
1306 (New_Copy_Elist): New routine.
1307 (Remove): New routine.
1308 * sem_ch3.adb (Analyze_Declarations): Use Defining_Entity
1309 to get the entity of the subprogram [body].
1310 (Analyze_Object_Declaration): Add initialization for
1312 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
1313 for Refined_Global and Refined_Depends. Emit an error when
1314 the body requires Refined_Global, but the aspect/pragma is
1316 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Change
1317 procedure signature and add comment on usage.
1318 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1319 for aspect Refined_Global.
1320 * sem_prag.adb (Analyze_Abstract_State): Add initialization
1321 of attributes Refined_State and Refinement_Constituents.
1322 (Analyze_Depends_In_Decl_Part, Analyze_Global_In_Decl_Part,
1323 Analyze_Contract_Cases_In_Decl_Part): Remove local
1325 (Analyze_Pragma): Add processing for pragma
1326 Refined_Global. The analysis of Refined_Post and Refined_Pre
1327 has been merged. Update an error message in the processing of
1328 pragma Refined_State.
1329 (Analyze_Refined_Global_In_Decl_Part): Provide implementation.
1330 (Analyze_Refined_Pragma): New routine.
1331 (Analyze_Refined_Pre_Post_Condition): Removed.
1332 (Analyze_Refined_State_In_Decl_Part): Update the call to Clone.
1333 (Analyze_Refinement_Clause): Make State_Id visible to all
1335 (Check_Matching_Constituent): Establish
1336 a relation between a refined state and its constituent.
1337 (Collect_Hidden_States_In_Decls): Remove ??? comment. Look at
1338 the entity of the object declaration to establish its kind.
1339 * sem_util.adb: Alphabetize with and use clauses.
1340 (Contains_Refined_State): New routine.
1341 * sem_util.ads (Contains_Refined_State): New routine.
1343 2013-10-13 Thomas Quinot <quinot@adacore.com>
1345 * scos.ads: Minor documentation clarification.
1347 2013-10-13 Thomas Quinot <quinot@adacore.com>
1349 * s-oscons-tmplt.c (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC when
1350 building on AIX 5.3 or later, and to CLOCK_REALTIME on older
1352 * init.c (pthread_condattr_setclock): Remove now useless weak symbol.
1353 * thread.c(__gnat_pthread_condattr_setup): Remove bogus AIX 5.2
1355 * s-osinte-aix.ads(clock_id_t): Fix C mapping (this is a 64-bit
1357 (clock_gettime): Import from C runtime library.
1358 * s-osinte-aix.adb (clock_gettime): Remove bogus emulation body,
1359 this routine is provided by the system in current supported
1362 2013-10-13 Robert Dewar <dewar@adacore.com>
1364 * sem_ch3.adb: Minor reformatting.
1366 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1368 * freeze.adb (Freeze_Entity): For a function whose return type
1369 is incomplete, do not replace the type with the full view if the
1370 type is a limited view. In that case the full view appears in a
1371 different unit, and the back-end will retrieve it at the proper
1374 2013-10-13 Yannick Moy <moy@adacore.com>
1376 * exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for
1379 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1381 * sem_ch3.adb: in Ada 2012 access_to_function types can have
1383 (Derived_Type_Declaration): SPARK restriction
1384 must be flagged on the original node, since it may have been
1385 written as a subtype declaration.
1386 (Analyze_Subtype_Declaration): Do not enter name of
1387 entity in declaration if it is the current entity, because it may
1388 have been inserted in a previous analysis and it appears in the
1389 else_part of an if-statement that is rewritten during expansion.
1391 2013-10-13 Yannick Moy <moy@adacore.com>
1393 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove procedure.
1394 (Expand_SPARK): Remove call to Expand_SPARK_N_Attribute_Reference and
1395 Expand_SPARK_N_Simple_Return_Statement.
1396 (Expand_SPARK_N_Simple_Return_Statement,
1397 Expand_SPARK_Simple_Function_Return): Remove procedures.
1399 2013-10-13 Vincent Celier <celier@adacore.com>
1401 * gnat_ugn.texi: Minor editing.
1403 2013-10-13 Ed Schonberg <schonberg@adacore.com>
1405 * sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
1406 operation implements an interface primitive, mark the operation
1407 as referenced, to prevent usually spurious messages about unused
1408 entities: such operations are called in dispatching select
1409 statements that are not visible to the compiler.
1411 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
1413 * gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
1415 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1417 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
1419 2013-10-10 Robert Dewar <dewar@adacore.com>
1421 * par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove
1424 2013-10-10 Javier Miranda <miranda@adacore.com>
1426 * sem_ch13.adb (Freeze_Entity_Checks): Avoid
1427 loosing errors on CPP entities in -gnatc mode.
1429 2013-10-10 Robert Dewar <dewar@adacore.com>
1431 * sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant
1434 2013-10-10 Robert Dewar <dewar@adacore.com>
1436 * restrict.adb (Check_SPARK_Restriction): Refine test (don't
1437 automatically go to the original node).
1438 * sem_ch11.adb (Analyze_Raise_Statement): Only raise
1439 statements that come from source violate SPARK restrictions.
1440 (Analyze_Raise_xxx_Error): Same fix.
1441 * sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK
1442 initialization on original node, not on possibly rewritten
1444 * sem_ch4.adb (Analyze_If_Expression): Only if expressions that
1445 come from source violate SPARK mode restrictions.
1447 2013-10-10 Robert Dewar <dewar@adacore.com>
1449 * gnat_ugn.texi: Fix confusing documentation for -gnatyM.
1451 2013-10-10 Yannick Moy <moy@adacore.com>
1453 * errout.adb (Compilation_Errors): In formal verification mode,
1454 always return False.
1456 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1458 * sem_prag.adb (Collect_Hidden_States_In_Decls): Only consider source
1459 non-constant objects.
1461 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1463 * aspects.adb: Add an entry in table Canonical_Aspect for
1465 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1466 Aspect_Names and Aspect_Delay for Refined_State.
1467 * einfo.adb: Add with and use clauses for Elists.
1468 Remove Refined_State from the list of node usage.
1469 Add Refined_State_Pragma to the list of node usage.
1470 (Has_Null_Abstract_State): New routine.
1471 (Refined_State): Removed.
1472 (Refined_State_Pragma): New routine.
1473 (Set_Refined_State): Removed.
1474 (Set_Refined_State_Pragma): New routine.
1475 (Write_Field8_Name): Add output for Refined_State_Pragma.
1476 (Write_Field9_Name): Remove the output for Refined_State.
1477 * einfo.ads: Add new synthesized attribute Has_Null_Abstract_State
1478 along with usage in nodes. Remove attribute Refined_State along
1479 with usage in nodes. Add new attribute Refined_State_Pragma along
1480 with usage in nodes.
1481 (Has_Null_Abstract_State): New routine.
1482 (Refined_State): Removed.
1483 (Refined_State_Pragma): New routine.
1484 (Set_Refined_State): Removed.
1485 (Set_Refined_State_Pragma): New routine.
1486 * elists.adb (Clone): New routine.
1487 * elists.ads (Clone): New routine.
1488 * par-prag.adb: Add Refined_State to the pragmas that do not
1489 require special processing by the parser.
1490 * sem_ch3.adb: Add with and use clause for Sem_Prag.
1491 (Analyze_Declarations): Add local variables Body_Id, Context and
1492 Spec_Id. Add processing for delayed aspect/pragma Refined_State.
1493 * sem_ch13.adb (Analyze_Aspect_Specifications): Update the
1494 handling of aspect Abstract_State. Add processing for aspect
1495 Refined_State. Remove the bizzare insertion policy for aspect
1497 (Check_Aspect_At_Freeze_Point): Add an entry for Refined_State.
1498 * sem_prag.adb: Add an entry to table Sig_Flags
1499 for pragma Refined_State.
1500 (Add_Item): Update the
1501 comment on usage. The inserted items need not be unique.
1502 (Analyze_Contract_Cases_In_Decl_Part): Rename variable Restore to
1503 Restore_Scope and update all its occurrences.
1505 Update the handling of pragma Abstract_State. Add processing for
1506 pragma Refined_State.
1507 (Analyze_Pre_Post_Condition_In_Decl_Part):
1508 Rename variable Restore to Restore_Scope and update all its
1510 (Analyze_Refined_State_In_Decl_Part): New routine.
1511 * sem_prag.ads (Analyze_Refined_State_In_Decl_Part): New routine.
1512 * snames.ads-tmpl: Add new predefined name for Refined_State. Add
1513 new Pragma_Id for Refined_State.
1515 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1517 * sem_ch10.adb (Install_Limited_Withed_Unit): handle properly the
1518 case of a record declaration in a limited view, when the record
1519 contains a self-referential component of an anonymous access type.
1521 2013-10-10 Thomas Quinot <quinot@adacore.com>
1523 * exp_ch4.adb (Process_Transient_Object): For any context other
1524 than a simple return statement, insert the finalization action
1525 after the context, not as an action on the context (which will
1526 get evaluated before it).
1528 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1530 * einfo.adb (Write_Field19_Name): Correct the
1531 string name of attribute Default_Aspect_Value.
1533 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1535 * sem_type.adb (Interface_Present_In_Ancestor): The progenitor
1536 in a type declaration may be an interface subtype.
1538 2013-10-10 Robert Dewar <dewar@adacore.com>
1540 * sinfo.ads (Do_Range_Check): Add special note on handling of
1541 range checks for Succ and Pred.
1543 2013-10-10 Robert Dewar <dewar@adacore.com>
1545 * erroutc.adb (Output_Msg_Text): Remove VMS special handling.
1547 2013-10-10 Robert Dewar <dewar@adacore.com>
1549 * a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
1550 (Is_Mark): New function.
1551 (Is_Other_Format): New function.
1552 (Is_Punctuation_Connector): New function.
1553 (Is_Space): New function.
1555 2013-10-10 Robert Dewar <dewar@adacore.com>
1557 * sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
1558 choice circuit. Was not quite right in some cases, which showed
1559 up in ACATS test B43201C.
1560 * sem_attr.adb (Address_Checks): Make sure name is set right
1561 for some messages issued.
1562 * mlib-prj.adb: Minor code reorganization.
1563 * gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs.
1564 * exp_ch9.adb: Minor reformatting.
1566 2013-10-10 Tristan Gingold <gingold@adacore.com>
1568 * lib-writ.adb (Write_Unit_Information): Adjust previous patch.
1570 2013-10-10 Robert Dewar <dewar@adacore.com>
1572 * sem_ch5.adb (Analyze_If_Statement): Warn on redundant if
1574 * sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New
1577 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1579 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion
1580 for the case of a dispatching trigger: there is no need to
1581 duplicate the code or create a subprogram to encapsulate the
1582 triggering statements. This allows exit statements in the
1583 triggering statements, that refer to enclosing loops.
1585 2013-10-10 Robert Dewar <dewar@adacore.com>
1587 * freeze.adb: Minor reformatting.
1588 * sem_ch13.adb (Freeze_Entity_Checks): New procedure
1589 (Analyze_Freeze_Entity): Call Freeze_Entity_Checks
1590 (Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
1591 * sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
1592 * sprint.ads: Add syntax for freeze generic entity node.
1594 2013-10-10 Robert Dewar <dewar@adacore.com>
1596 * einfo.adb, einfo.ads: Minor comment updates.
1598 2013-10-10 Robert Dewar <dewar@adacore.com>
1600 * lib-writ.adb (Write_Unit_Information): Fatal error if linker
1601 options are detected in a predefined generic unit.
1603 2013-10-10 Thomas Quinot <quinot@adacore.com>
1605 * s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using
1606 a dummy placeholder value.
1607 (NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore.
1608 * thread.c: Adjust #if test accordingly.
1610 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1612 * exp_ch6.adb (Consequence_Error): Generate an
1613 implicit if statement.
1614 (Expand_Contract_Cases): Generate an implicit if statement.
1615 (Process_Contract_Cases): Do not expand Contract_Cases when no code
1618 2013-10-10 Robert Dewar <dewar@adacore.com>
1620 * sem_attr.adb (Address_Checks): New procedure.
1622 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1624 * sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger
1625 semantic actions at the proper point for entities that previously
1626 had no explicit freeze point.
1627 * freeze.adb (Freeze_Generic_Entities): generate new nodes to
1628 indicate the point at which semantic checks can be performed on
1629 entities declared in generic packages.
1630 * sem_ch13.ads, sem_ch13.adb: New procedure
1631 Analyze_Freeze_Generic_Entity.
1632 * exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity.
1633 * sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity.
1634 * sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity.
1635 * gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity.
1636 * gcc-interface/Make-lang.in: Update dependencies.
1638 2013-10-10 Robert Dewar <dewar@adacore.com>
1640 * sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
1643 2013-10-10 Robert Dewar <dewar@adacore.com>
1645 * sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
1646 (Analyze_Protected_Body): Aspects are illegal.
1648 2013-10-10 Robert Dewar <dewar@adacore.com>
1650 * sem_ch6.adb, sem_ch13.adb: Minor reformatting.
1651 * sem_case.adb (Check_Choices): Fix bad listing of missing
1652 values from predicated subtype case (Check_Choices): List
1654 * errout.adb (Set_Msg_Text): Process warning tags in VMS mode
1655 * erroutc.adb (Output_Msg_Text): Handle VMS warning tags
1656 * gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
1657 * ug_words: Add entries for -gnatw.d and -gnatw.D
1658 * vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
1659 * lib-writ.ads: Documentation fixes
1661 2013-10-10 Robert Dewar <dewar@adacore.com>
1663 * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
1664 (Is_Other_Format): New name for Is_Other.
1665 (Is_Punctuation_Connector): New name for Is_Punctuation
1667 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1669 * aspects.adb: Add entries in table Canonical_Aspects for aspects
1670 Refined_Depends and Refined_Global.
1671 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1672 Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
1673 aspects Refined_Depends and Refined_Global.
1674 * einfo.adb (Contract): Subprogram bodies are now valid owners
1676 (Set_Contract): Subprogram bodies are now valid
1677 owners of contracts.
1678 (Write_Field24_Name): Output the contract
1679 attribute for subprogram bodies.
1680 * exp_ch6.adb (Expand_Subprogram_Contract): New routine.
1681 * exp_ch6.ads (Expand_Subprogram_Contract): New routine.
1682 * par-prag.adb: Pragmas Refined_Depends and Refined_Global do
1683 not require any special processing by the parser.
1684 * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
1685 (Analyze_Declarations): Code reformatting. Analyze the contract
1686 of a subprogram body at the end of the declarative region.
1687 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1688 Subprogram bodies can now have contracts. Use
1689 Expand_Subprogram_Contract to handle the various contract
1691 (Analyze_Subprogram_Body_Contract): New null routine.
1692 (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
1693 contracts. Use Expand_Subprogram_Contract to handle the various
1694 contract assertions.
1695 (Analyze_Subprogram_Contract): Add local
1696 variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
1697 the pragma name in Nam.
1698 (Process_PPCs): Removed.
1699 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
1700 (Analyze_Subprogram_Contract): Update the comment on usage.
1701 * sem_ch13.adb (Analyze_Aspect_Specifications): Add null
1702 implementations for aspects Refined_Depends and Refined_Global.
1703 (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
1704 Refined_Global do not need to be checked at the freeze point.
1705 * sem_prag.adb: Add entries in table Sig_Flags
1706 for pragmas Refined_Depends and Refined_Global.
1707 (Analyze_Contract_Cases_In_Decl_Part): Add local
1708 variable Restore. Use Restore to pop the scope.
1709 (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
1710 Restore to pop the scope.
1711 (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
1713 (Analyze_PPC_In_Decl_Part): Renamed to
1714 Analyze_Pre_Post_Condition_In_Decl_Part.
1716 Add null implementations for pragmas Refined_Depends and
1717 Refined_Global. Refined_Pre and Refined_Post are now
1718 handled by routine Analyze_Refined_Pre_Post_Condition
1720 (Analyze_Refined_Depends_In_Decl_Part): New
1722 (Analyze_Refined_Global_In_Decl_Part):
1724 (Analyze_Refined_Pre_Post):
1725 Renamed to Analyze_Refined_Pre_Post_Condition.
1726 (Analyze_Refined_Pre_Post_Condition): Analyze the boolean
1728 (Check_Precondition_Postcondition): Update the call
1729 to Analyze_PPC_In_Decl_Part.
1730 * sem_prag.ads: Add entries in table
1731 Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
1733 (Analyze_PPC_In_Decl_Part): Renamed
1734 to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
1736 (Analyze_Refined_Depends_In_Decl_Part): New routine.
1737 (Analyze_Refined_Global_In_Decl_Part): New routine.
1738 (Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
1739 * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
1740 and update all occurrences. Subprogram body contracts can now
1741 contain pragmas Refined_Depends and Refined_Global.
1742 * sem_util.ads (Add_Contract_Item): Rename formal Item to
1743 Prag. Update the comment on usage.
1744 * sinfo.ads: Update the comment on structure and usage of
1746 * snames.ads-tmpl: Add new predefined names for Refined_Depends
1747 and Refined_Global. Add entries in table Pragma_Id for
1748 Refined_Depends and Refined_Global.
1750 2013-10-10 Robert Dewar <dewar@adacore.com>
1752 * types.ads: Minor reformatting.
1754 2013-10-10 Thomas Quinot <quinot@adacore.com>
1756 * s-taprop-posix.adb: Add missing comment.
1758 2013-10-10 Robert Dewar <dewar@adacore.com>
1760 * freeze.adb (Freeze_Record_Type): Move choice checking to
1761 Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
1763 * sem_case.adb (Check_Choices): Remove misguided attempt to
1764 freeze choices (this is now done in Freeze_Record_Type where
1766 (Check_Choices): Remove some analyze/resolve calls
1767 that are redundant since they are done in Analyze_Choices.
1768 * sem_ch13.adb (Analyze_Freeze_Entity): Do the error
1769 checking for choices in variant records here (moved here from
1770 Freeze.Freeze_Record_Type)
1772 2013-10-10 Thomas Quinot <quinot@adacore.com>
1774 * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
1775 possibly using a dummy placeholder value.
1776 (Compute_Deadline): For the case of an
1777 Absolute_Calendar deadline, if the target uses another clock
1778 than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
1781 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1783 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
1784 qualified reference to a generic child unit within itself,
1785 in an instantiation.
1787 2013-10-10 Pascal Obry <obry@adacore.com>
1789 * prj-conf.adb: Minor typo fixes in comment.
1791 2013-10-10 Thomas Quinot <quinot@adacore.com>
1793 * s-taprop-posix.adb (Compute_Deadline): New local subprogram,
1794 factors common code between Timed_Sleep and Timed_Delay.
1796 2013-10-10 Robert Dewar <dewar@adacore.com>
1798 * freeze.adb (Freeze_Record_Type): Don't replace others if
1799 expander inactive. This avoids clobbering the ASIS tree in
1802 2013-10-10 Robert Dewar <dewar@adacore.com>
1804 * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
1805 fixed-point case in preanalysis mode (error will be caught during
1808 2013-10-10 Robert Dewar <dewar@adacore.com>
1810 * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
1811 assertion identifiers for pragma Assertion_Policy.
1812 * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
1813 * sem_ch13.adb: Minor reformatting.
1815 2013-10-10 Pascal Obry <obry@adacore.com>
1817 * prj-conf.adb: Code refactoring.
1819 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1821 * einfo.adb: Remove Integrity_Level from the node usage list.
1822 (Has_Option): Update the implementation to match
1823 the new terminology.
1824 (Has_Property): Renamed to Has_Option.
1825 (Integrity_Level): Removed.
1826 (Is_External_State): New routine.
1827 (Is_Input_Only_State): Use Has_Option to determine whether a state
1828 is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
1829 (Is_Output_Only_State): Use Has_Option to determine whether
1830 a state is Output_Only.
1831 (Is_Output_State): Renamed to
1832 Is_Output_Only_State.
1833 (Is_Volatile_State): Use Has_Option to determine whether a state is
1835 (Set_Integrity_Level): Removed.
1836 (Write_Field8): Remove the entry for Integrity_Level.
1837 * einfo.ads: Remove Integrity_Level along with its documentation
1838 and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
1839 Rename Is_Output_State to Is_Output_Only_State. Update the
1840 documentation of Is_Volatile_State. Update the node structure of
1842 (Integrity_Level): Removed along with pragma Inline.
1843 (Is_External_State): New routine.
1844 (Is_Input_State): Renamed to Is_Input_Only_State.
1845 (Is_Output_State): Renamed to Is_Output_Only_State.
1846 (Set_Integrity_Level): Removed along with pragma Inline.
1847 * sem_prag.adb (Analyze_Pragma): Update the checks regarding
1848 global items and abstract state modes. Update the implementation
1849 of pragma Abstract_State to reflect the new rules and terminology.
1850 * snames.ads-tmpl: Remove the predefined name for Integrity
1851 level. Add new predefined names for Input_Only, Non_Volatile,
1852 Output_Only and Part_Of.
1854 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1856 * lib-xref.adb (Generate_Reference): Do not generate a reference
1857 within a _postcondition procedure: a proper source reference has
1858 already been generated when pre- analyzing the original aspect
1859 specification, and the use of a formal in a pre/postcondition
1860 should not count as a proper use in a subprogram body.
1862 2013-10-10 Robert Dewar <dewar@adacore.com>
1864 * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
1867 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1869 * aspects.adb: Add an entry for Aspect_Refined_Post in table
1871 * aspects.ads: Add an entry for Aspect_Refined_Post in tables
1872 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
1873 Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
1874 table Aspect_On_Body_Or_Stub_OK.
1875 * par-prag.adb: Add pragma Refined_Post to the list of pragmas
1876 that do not require special processing by the parser.
1877 * sem_attr.adb (Analyze_Attribute): Add special analysis for
1878 attributes 'Old and 'Result when code generation is disabled and
1879 they appear in aspect/pragma Refined_Post.
1880 (In_Refined_Post): New routine.
1881 * sem_ch6.adb (Analyze_Expression_Function): Move various
1882 aspects and/or pragmas that apply to an expression function to the
1883 corresponding spec or body.
1884 (Collect_Body_Postconditions): New routine.
1885 (Process_PPCs): Use routine Collect_Body_Postconditions
1886 to gather all postcondition pragmas.
1887 * sem_ch10.adb (Analyze_Proper_Body): Use routine
1888 Relocate_Pragmas_To_Body to move all source pragmas that follow
1889 a body stub to the proper body.
1890 (Move_Stub_Pragmas_To_Body): Removed.
1891 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1892 for aspect Refined_Post.
1893 (Check_Aspect_At_Freeze_Point): Aspect
1894 Refined_Post does not need delayed processing at the freeze point.
1895 * sem_prag.adb: Add an entry for pragma Refined_Post in
1897 (Analyze_Pragma): Add processing for pragma
1898 Refined_Post. Update the processing of pragma Refined_Pre
1899 to use common routine Analyze_Refined_Pre_Post.
1900 (Analyze_Refined_Pre_Post): New routine.
1901 (Relocate_Pragmas_To_Body): New routine.
1902 * sem_prag.ads: Table Pragma_On_Stub_OK is now known as
1903 Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
1904 table Pragma_On_Body_Or_Stub_OK.
1905 (Relocate_Pragmas_To_Body): New routine.
1906 * snames.ads-tmpl: Add new predefined name for Refined_Post. Add
1907 new Pragma_Id for Refined_Post.
1909 2013-10-10 Robert Dewar <dewar@adacore.com>
1911 * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
1912 last choice to others is moved to Freeze_Record_Type.
1913 * freeze.adb (Freeze_Record_Type): Expand last variant to others
1914 if necessary (moved here from Expand_N_Variant_Part
1916 2013-10-10 Robert Dewar <dewar@adacore.com>
1918 * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
1919 sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
1920 s-atocou-builtin.adb: Minor reformatting.
1922 2013-10-10 Thomas Quinot <quinot@adacore.com>
1924 * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
1925 constant needs to be output to s-oscons.h, as it is tested
1928 2013-10-10 Robert Dewar <dewar@adacore.com>
1930 * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
1931 * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
1932 flag to avoid expanding choices when not necessary.
1933 * exp_util.adb: Minor reformatting
1934 * freeze.adb (Freeze_Record_Type): Redo expansion of variants
1935 * sem_aggr.adb: Minor reformatting
1936 * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
1937 Checking of choices.
1938 * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
1940 * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
1942 * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
1944 * sem_util.adb: Minor reformatting
1945 * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
1947 2013-10-10 Vincent Celier <celier@adacore.com>
1949 * mlib-prj.adb (Build_Library): Do not issue link dynamic
1950 libraries with an Rpath, if switch -R was used.
1952 2013-10-10 Tristan Gingold <gingold@adacore.com>
1954 * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
1955 Image_Index_Table_32): Remove as not used.
1956 * s-imgint.adb (Image_Integer): Call Set_Image_Integer and
1957 remove duplicated code.
1959 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1961 * sem_prag.adb (Analyze_Pragma): Provide a
1962 more precise error message when pragma Refined_Pre applies to
1963 an expression function that is not a completion.
1965 2013-10-10 Thomas Quinot <quinot@adacore.com>
1967 * sem_attr.adb (Analyse_Attribute, case
1968 Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
1969 reference for a generic type is permitted in GNAT runtime mode.
1970 * a-sequio.adb (Read, Write): Use the endianness of the actual
1971 type to encode length information written to the file.
1973 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1975 * par-ch13.adb (Aspect_Specifications_Present)): In earlier than
1976 Ada2012 mode, assume that a legal aspect name following "with"
1977 keyword is an older gnat switch and not a misplaced with_clause.
1979 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1981 * aspects.adb: Add an entry for Aspect_Refined_Pre in
1982 table Canonical_Aspect.
1983 (Aspects_On_Body_OK): Renamed to
1984 Aspects_On_Body_Or_Stub_OK.
1985 (Aspects_On_Body_Or_Stub_OK):
1986 Update the query in table Aspect_On_Body_OK.
1987 * aspects.ads: Add an entry for Aspect_Refined_Pre in tables
1988 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
1989 Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
1990 Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
1991 that apply to body stubs.
1992 (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
1993 (Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
1994 * par-prag.adb: Add pragma Refined_Pre to the list of pragmas
1995 that do not require special processing by the parser.
1996 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
1997 analysis of aspect specifications that apply to a body stub
1998 until the proper body is analyzed.
1999 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
2000 (Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
2001 (Analyze_Proper_Body): Relocate all pragmas that apply
2002 to a subprogram body stub to the declarations of the proper
2003 body. Analyze the aspect specifications of the stub when the
2004 proper body is not present.
2005 (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
2006 (Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
2007 (Move_Stub_Pragmas_To_Body): New routine.
2008 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
2009 for aspect Refined_Pre.
2010 (Check_Aspect_At_Freeze_Point): Aspect
2011 Refined_Pre does not need delayed processing at the freeze point.
2012 * sem_prag.adb: Remove with and use clause for Snames. Add
2013 an entry for Pragma_Refined_Pre in table Sig_Flags.
2014 (Analyze_Pragma): Add processing for pragma Refined_Pre.
2015 * sem_prag.ads: Add with and use clause for Snames. Add table
2017 * sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
2018 (Set_Corresponding_Spec_Of_Stub): New routine.
2019 * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
2020 along with comment on usage and occurrences in nodes.
2021 (Corresponding_Spec_Of_Stub): New routine along with pragma
2023 (Set_Corresponding_Spec_Of_Stub): New routine along
2025 * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
2026 new Pragma_Id for Refined_Pre.
2028 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2030 * sem_ch12.adb (Analyze_Package_Instantiation,
2031 Analyze_Subprogram_Instantiation): Improve error message when
2032 name in instantiation does not designate a generic unit of the
2035 2013-10-10 Robert Dewar <dewar@adacore.com>
2037 * exp_ch3.adb (Expand_N_Variant_Part): Expand statically
2038 predicated subtype which appears in Discrete_Choices list.
2039 * exp_ch5.adb (Expand_N_Case_Statement): Expand statically
2040 predicated subtype which appears in Discrete_Choices list of
2041 case statement alternative.
2042 * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
2044 * sem_case.adb: Minor reformatting (Analyze_Choices): Don't
2045 expand out Discrete_Choices that are names of subtypes with
2046 static predicates. This is now done in the analyzer so that the
2047 -gnatct tree is properly formed for ASIS.
2048 * sem_case.ads (Generic_Choices_Processing): Does not apply
2049 to aggregates any more, so change doc accordingly, and remove
2050 unneeded Get_Choices argument.
2051 * sem_ch3.adb (Analyze_Variant_Part): Remove no
2052 longer used Get_Choices argument in instantiation of
2053 Generic_Choices_Processing.
2054 * sem_ch4.adb (Analyze_Case_Expression): Remove no
2055 longer used Get_Choices argument in instantiation of
2056 Generic_Choices_Processing.
2057 * sem_ch5.adb (Analyze_Case_Statement): Remove no
2058 longer used Get_Choices argument in instantiation of
2059 Generic_Choices_Processing.
2060 * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
2061 document that choices that are names of statically predicated
2062 subtypes are expanded in the code generation tree passed to the
2063 back end, but not in the ASIS tree generated for -gnatct.
2065 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2067 * sem_ch7.adb: Revert previous change.
2069 2013-10-10 Gary Dismukes <dismukes@adacore.com>
2071 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
2072 the Storage_Pool aspect is specified by an aspect clause and a
2073 renaming is used to capture the evaluation of the pool name,
2074 insert the renaming in front of the aspect's associated entity
2075 declaration rather than in front of the corresponding attribute
2076 definition (which hasn't been appended to the declaration
2079 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2081 * sem_ch6.adb (Is_Interface_Conformant): The controlling type
2082 of the interface operation is obtained from the ultimate alias
2083 of the interface primitive parameter, because that may be in
2084 fact an implicit inherited operation whose signature involves
2085 the type extension and not the desired interface.
2087 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2089 * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
2090 recognize an aspect specification with a misspelled name if it
2091 is followed by a a comma or semicolon.
2093 2013-10-10 Vadim Godunko <godunko@adacore.com>
2095 * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
2096 Fix copyright notice.
2098 2013-10-10 Yannick Moy <moy@adacore.com>
2100 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
2101 enclosing subprogram for precondition/postcondition/contract cases.
2103 2013-10-10 Robert Dewar <dewar@adacore.com>
2105 * gnat_rm.texi: Minor fix.
2107 2013-10-10 Robert Dewar <dewar@adacore.com>
2109 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2110 Address): Remove the Comes_From_Source test for the overlap
2113 2013-10-10 Robert Dewar <dewar@adacore.com>
2115 * sem_util.adb: Minor code reorganization (use Nkind_In).
2116 * sem_warn.adb: Minor code reorganization (optimization in
2117 Check_Unset_Reference).
2118 * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
2120 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2122 * sem_ch7.adb (Install_Parent_Private_Declarations): When
2123 instantiating a child unit, do not install private declaration of
2124 a non-generic ancestor of the generic that is also an ancestor
2125 of the current unit: its private part will be installed when
2126 private part of ancestor itself is analyzed.
2128 2013-10-10 Thomas Quinot <quinot@adacore.com>
2130 * freeze.adb (Check_Component_Storage_Order): Retrieve component
2131 aliased status from type entities directly instead of going back
2132 to original component definition.
2133 * sem_ch7.adb: Minor reformatting.
2135 2013-10-10 Robert Dewar <dewar@adacore.com>
2137 * sem_ch13.adb (Analyze_Aspect_Specifications): For Address
2138 attribute, consider it to be set in source, because of aliasing
2140 (Analyze_Attribute_Definition_Clause): For the
2141 purpose of warning on overlays, take into account the aspect case.
2143 2013-10-10 Robert Dewar <dewar@adacore.com>
2145 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
2146 a-cofove.ads: Minor reformatting.
2148 2013-10-10 Arnaud Charlet <charlet@adacore.com>
2150 * gnat_ugn.texi: Remove obsolete mention to -laddr2line.
2152 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2154 * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
2155 generated variable used as a target of the expression needs
2158 2013-10-10 Jose Ruiz <ruiz@adacore.com>
2160 * exp_util.adb (Corresponding_Runtime_Package): Remove the condition
2161 related to No_Dynamic_Attachment which was wrong. Protected types
2162 with interrupt handlers (when not using a restricted profile)
2163 are always treated as protected types with entries, regardless
2164 of the No_Dynamic_Attachment restriction.
2165 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
2166 using the result of Corresponding_Runtime_Package.
2167 (Install_Private_Data_Declarations): When having
2168 static handlers and a non restricted profile, we use the
2169 type Static_Interrupt_Protection always, so we removed an
2170 extra wrong condition looking at the No_Dynamic_Attachment
2171 restriction. Simplify the code using the result of
2172 Corresponding_Runtime_Package.
2173 (Make_Initialize_Protection): Simplify the code using
2174 the result of Corresponding_Runtime_Package.
2175 (Install_Private_Data_Declaration): The No_Dynamic_Attachment
2176 restriction has nothing to do with static handlers. Remove the extra
2177 erroneous condition that was creating the wrong data type.
2179 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
2181 * sem_util.adb (Is_Object_Reference): Attribute
2182 'Old produces an object reference.
2183 * gnat_rm.texi: Define accessibility level of
2184 X'Update(...) result.
2186 2013-10-10 Yannick Moy <moy@adacore.com>
2188 * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2189 a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
2191 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2193 * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
2194 conditions that apply to a subprogram body, preserve the placement
2195 and order of the generated pragmas, which must appear before
2196 other declarations in the body.
2198 2013-10-10 Bob Duff <duff@adacore.com>
2200 * gnat_ugn.texi: Add gnat2xml doc.
2202 2013-10-10 Doug Rupp <rupp@adacore.com>
2204 * s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
2206 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2208 * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
2209 on a variable need not have a convention specified, as long as
2210 the implicit convention of the object, obtained from its type,
2211 is Ada or Ada-related.
2213 2013-10-10 Robert Dewar <dewar@adacore.com>
2215 * cstand.adb (Standard_Unsigned_64): New internal type.
2216 * gnat_rm.texi: Update documentation on To_Address.
2217 * sem_attr.adb (Analyze_Attribute, case To_Address): Fix
2218 problem with out of range static values given as literals or
2220 * stand.ads (Standard_Unsigned_64): New internal type.
2221 * stand.adb: Minor reformatting.
2223 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2225 * sem_ch4.adb (Analyze_Selected_Component,
2226 Has_Mode_Conformant_Spec): If selected component may be an
2227 indexing of a parameterless call to a protected function, and
2228 expansion is disabled, this is a valid candidate interpretation.
2230 2013-10-10 Arnaud Charlet <charlet@adacore.com>
2232 * gnat_ugn.texi: Minor editing.
2234 2013-10-10 Robert Dewar <dewar@adacore.com>
2236 * gnatlink.adb: Minor reformatting.
2238 2013-10-10 Yannick Moy <moy@adacore.com>
2240 * debug.adb: Free flag d.E and change doc for flag d.K.
2242 2013-10-10 Ed Schonberg <schonberg@adacore.com>
2244 * sem_prag.adb (Check_Precondition_Postcondition): If the
2245 pragma comes from an aspect spec, and the subprogram is a
2246 library unit, treat as a ppc in a declarative part in ASIS mode,
2247 so that expression in aspect is properly analyzed. In this case
2248 there is no later point at which the aspect specification would
2251 2013-10-10 Bob Duff <duff@adacore.com>
2253 * opt.ads: Minor comment fix.
2255 2013-10-10 Vadim Godunko <godunko@adacore.com>
2257 * a-coinho-shared.ads, a-coinho-shared.adb: New file.
2258 * s-atocou.ads: Add procedure to initialize counter.
2259 * s-atocou.adb: Likewise.
2260 * s-atocou-builtin.adb: Likewise.
2261 * s-atocou-x86.adb: Likewise.
2262 * gcc-interface/Makefile.in: Select special version of
2263 Indefinite_Holders package on platforms where atomic built-ins
2264 are supported. Update tools target pairs for PikeOS.
2266 2013-10-10 Robert Dewar <dewar@adacore.com>
2268 * sem_ch3.adb: Minor reformatting.
2270 2013-10-10 Robert Dewar <dewar@adacore.com>
2272 * sinput-c.adb (Load_File): Ensure Source_Align alignment.
2273 * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
2274 * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
2277 * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
2279 * types.ads (Source_Align): New definition.
2280 (Source_Buffer): Document new alignment requirement.
2282 2013-10-10 Robert Dewar <dewar@adacore.com>
2284 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
2287 2013-10-10 Robert Dewar <dewar@adacore.com>
2289 * gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
2291 2013-10-10 Vadim Godunko <godunko@adacore.com>
2293 * s-stopoo.ads (Root_Storage_Pool): Add pragma
2294 Preelaborable_Initialization.
2296 2013-09-25 Tom Tromey <tromey@redhat.com>
2298 * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
2300 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2303 * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
2304 variable and use it throughout.
2305 <Attr_Length>: Note whether the prefix is the dereference of a pointer
2306 to unconstrained array and, in this case, capture the result for both
2307 Attr_First and Attr_Last.
2309 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2311 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
2313 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2315 * gcc-interface/trans.c (gigi): Remove dead code.
2317 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
2319 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
2320 return variables for subprograms using the CICO mechanism.
2322 2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
2324 * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
2327 2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
2328 Olivier Hainque <hainque@adacore.com>
2330 * gcc-interface/Makefile.in: Import target_cpu, target_vendor,
2331 target_os and their host_ counterparts. Remove host_canonical and
2332 target_cpu_default, unused. Remove local ad-hoc computations of
2333 "host", "targ", "arch", "osys" and "manu". Replace uses of these by
2334 uses of the now imported family, hence back to filters against
2335 canonical values. Remove filters on e500 for target_cpu, expected to
2336 be canonicalized into powerpc. Invert the logic filtering on 64bit
2337 sparc for VxWorks. Simplify the filtering logic for bareboard tools
2338 target pairs, now using straight elf/eabi filters on the target_os
2341 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2343 * sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
2344 the return type is itself an access to function, recurse to emit
2345 another anonymous type.
2346 * gcc-interface/Make-lang.in: Update dependencies.
2348 2013-09-10 Robert Dewar <dewar@adacore.com>
2350 * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
2351 * errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
2352 * errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
2353 * inline.ads (Warnings): New component in Pending_Body_Info.
2354 * sem_ch12.adb (Pending_Body_Info): Save and restore warnings
2355 at instantiation point.
2356 * warnsw.adb (Save_Warnings): New function (Restore_Warnings):
2357 New procedure Remove special handling of Warning_Doc_Switch,
2358 cleaner to handle the VMS case in errout, than to introduce
2359 undocumented oddities here.
2360 * warnsw.ads (Warning_Record) : New type.
2361 (Save_Warnings): New function.
2362 (Restore_Warnings): New procedure.
2364 2013-09-10 Robert Dewar <dewar@adacore.com>
2366 * sinput.adb (Check_For_BOM): Avoid reading past end of file.
2368 2013-09-10 Robert Dewar <dewar@adacore.com>
2370 * errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
2371 * errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
2372 * inline.ads: Save/Restore Ada_Version_Pragma.
2373 * opt.adb: Save/Restore Ada_Version_Pragma.
2374 * opt.ads (Ada_Version_Pragma): New variable.
2375 * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
2376 par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
2377 * prj.adb: Initialize Ada_Version_Pragma.
2378 * sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
2379 * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
2380 * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
2381 * switch-c.adb: Initialize Ada_Version_Pragma.
2382 * sem_ch12.adb: Minor reformatting.
2384 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2386 * sem_ch3.adb (Process_Subtype): Discard constraint on access
2387 to class-wide type. Such constraints are not supported and are
2388 considered a language pathology.
2390 2013-09-10 Robert Dewar <dewar@adacore.com>
2392 * gnatbind.adb: Correct starting date in --version string.
2393 * gnatdll.adb: Use Check_Version_And_Help_G to implement --help
2395 * gnatkr.adb: Use Check_Version_And_Help_G to implement --help
2397 * gnatlink.adb: Correct starting date in --version string.
2398 * gnatls.adb: Correct starting date in --version string.
2399 * make.adb: Correct starting date in --version string.
2401 2013-09-10 Robert Dewar <dewar@adacore.com>
2403 * switch-c.adb: Minor reformatting.
2404 * atree.ads (Original_Nodes): Add documentation on ASIS usage.
2405 * sinfo.ads: Add section on ASIS mode (documentation only).
2407 2013-09-10 Robert Dewar <dewar@adacore.com>
2409 * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
2410 REASON parameter in compiler units (bootstrap issues).
2412 2013-09-10 Robert Dewar <dewar@adacore.com>
2414 * gnat1drv.adb (Adjust_Global_Switches): Output warning if
2415 -gnateE specified for a target that does not support it.
2417 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2419 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
2420 a subprogram body without previous spec.
2422 2013-09-10 Gary Dismukes <dismukes@adacore.com>
2424 * sem_ch4.adb: Minor typo fixes.
2426 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2428 * aspects.adb (Aspects_On_Body_OK): New routine.
2429 * aspects.ads: Modify type Aspect_Expression to include
2430 the Optional_XXX variants. Update the contents of
2431 table Aspect_Argument. Add table Aspect_On_Body_OK.
2432 (Aspects_On_Body_OK): New routine.
2433 * par-ch13.adb (Get_Aspect_Specifications): Account for optional
2434 names and expressions when parsing an aspect.
2435 * sem_ch6.adb: Add with and use clause for Aspects.
2436 (Analyze_Subprogram_Body_Helper): Do not emit an error when
2437 analyzing a body with aspects that can be applied simultaneously
2438 to both spec and body.
2439 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2440 corresponding pragma of an aspect that applies to a subprogram
2441 body in the declarative part.
2442 (Make_Aitem_Pragma): Do not generate a pragma with an empty argument
2445 2013-09-10 Robert Dewar <dewar@adacore.com>
2447 * switch-c.adb: Diagnose -gnatc given after -gnatRm.
2448 * gnat_ugn.texi: Add documentation for -gnatRm.
2449 * usage.adb: Minor reorganization (put style entries in proper
2450 order) Document -gnatRm switch.
2451 * sinfo.ads: Minor comment fix.
2453 2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
2455 * tree_io.ads: Update ASIS_Version_Number.
2457 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2459 * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
2460 designated type can appear in a parameterless call.
2461 * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
2462 in the case of an indirect call through an access function that
2463 returns an array type.
2464 (Analyze_One_Call): Handle properly legal parameterless calls
2465 whose result is indexed, in constructs of the for F.all (I)
2466 * sem_ch6.ads (May_Need_Actuals): Make public, for use on access
2467 to subprogram types.
2468 * sem_res.adb (Resolve_Call): If the call is indirect, there is
2469 no entity to set on the name in the call.
2471 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2473 * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
2474 table for package body and body stubs.
2475 (Move_Or_Merge_Aspects): New routine.
2476 (Remove_Aspects): New routine.
2477 * aspects.ads (Move_Aspects): Update comment on usage.
2478 (Move_Or_Merge_Aspects): New routine.
2479 (Remove_Aspects): New routine.
2480 * par-ch3.adb: Update the grammar of private_type_declaration,
2481 private_extension_declaration, object_renaming_declaration,
2482 and exception_renaming_declaration.
2483 (P_Subprogram): Parse the
2484 aspect specifications that apply to a body stub.
2485 * par-ch6.adb: Update the grammar of subprogram_body_stub and
2486 generic_instantiation.
2487 * par-ch7.adb: Update the grammar of package_declaration,
2488 package_specification, package_body, package_renaming_declaration,
2490 (P_Package): Parse the aspect specifications
2491 that apply to a body, a body stub and package renaming.
2492 * par-ch9.adb: Update the grammar of entry_declaration,
2493 protected_body, protected_body_stub, task_body,
2495 (P_Protected): Add local variable
2496 Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
2497 specifications that apply to a protected body and a protected
2499 (P_Task): Add local variable Aspect_Sloc. Add local
2500 constant Dummy_Node. Parse the aspect specifications that apply
2501 to a task body and a task body stub.
2502 * par-ch12.adb: Update the grammar of
2503 generic_renaming_declaration.
2504 (P_Generic): Parse the aspect
2505 specifications that apply to a generic renaming.
2506 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
2507 an error when analyzing aspects that apply to a body stub. Such
2508 aspects are relocated to the proper body.
2509 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
2510 specifications that apply to a body.
2511 * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
2512 aspects not being supported on protected bodies. Remove the
2513 aspect specifications. (Analyze_Single_Protected_Declaration):
2514 Analyze the aspects that apply to a single protected declaration.
2515 (Analyze_Task_Body): Warn about user-defined aspects not being
2516 supported on task bodies. Remove the aspect specifications.
2517 * sem_ch10.adb: Add with and use clause for Aspects.
2518 (Analyze_Package_Body_Stub): Propagate the aspect specifications
2519 from the stub to the proper body.
2520 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2521 corresponding pragma of an aspect that applies to a body in the
2522 declarations of the body.
2523 * sinfo.ads: Update the gramma of expression_function,
2524 private_type_declaration, private_extension_declaration,
2525 object_renaming_declaration, exception_renaming_declaration,
2526 package_renaming_declaration, subprogram_renaming_declaration,
2527 generic_renaming_declaration, entry_declaration,
2528 subprogram_body_stub, package_body_stub, task_body_stub,
2529 generic_subprogram_declaration.
2531 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2533 * sem_prag.adb (Analyze_Pragma): Add processing
2534 for aspect/pragma SPARK_Mode when it applies to a [library-level]
2535 subprogram or package [body].
2537 2013-09-10 Robert Dewar <dewar@adacore.com>
2539 * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
2541 * switch-c.adb (Scan_Front_End_Switches): Give error if both
2542 -gnatR and -gnatc given.
2544 2013-09-10 Robert Dewar <dewar@adacore.com>
2546 * g-table.ads, g-table.adb (For_Each): New generic procedure
2547 (Sort_Table): New generic procedure.
2549 2013-09-10 Thomas Quinot <quinot@adacore.com>
2551 * adaint.c (__gnat_is_executable_file_attr): Should be true
2552 for an executable regular file only only (not for a directory
2553 that has the executable permission).
2555 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2557 * sem_res.adb: Further work on operator calls in ASIS.
2559 2013-09-10 Yannick Moy <moy@adacore.com>
2561 * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
2564 2013-09-10 Thomas Quinot <quinot@adacore.com>
2566 * aspects.ads, sem_ch13.adb: Minor reformatting.
2567 * adaint.c (__gnat_set_close_on_exec): Add comment documenting
2568 that this routine is shared between OS_Lib and Sockets.
2570 2013-09-10 Robert Dewar <dewar@adacore.com>
2572 * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
2573 * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
2574 * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
2575 Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
2576 case Check): Ditto (Check_Applicable_Policy): Handle
2577 Statement_Assertion case Throughout, set and check the Is_Checked
2578 flag as appropriate.
2579 * sem_prag.ads (Check_Kind): Moved to body.
2580 * sinfo.ads, sinfo.adb (Is_Checked): New flag.
2582 2013-09-10 Robert Dewar <dewar@adacore.com>
2584 * aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
2585 * einfo.adb (Has_Delayed_Rep_Aspects): New flag
2586 (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
2587 (use Get_Attribute_Representation_Clause).
2588 * einfo.ads (Has_Delayed_Rep_Aspects): New flag
2589 (May_Inherit_Delayed_Rep_Aspects): New flag
2590 * freeze.adb: Minor reformatting
2591 * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
2592 handling of delayed evaluation, including optimizing some cases
2593 and avoiding delays.
2594 (Analyze_Aspects_At_Freeze_Point): Now
2595 handled inheriting delayed rep aspects for type derivation case.
2596 (Inherit_Delayed_Rep_Aspects): New procedure
2597 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
2598 inheriting delayed rep aspects for type derivation case.
2599 * sem_ch3.adb (Build_Derived_Type): Set
2600 May_Inherit_Derived_Rep_Aspects if parent type flag
2601 Has_Delayed_Rep_Aspects is set
2603 2013-09-10 Robert Dewar <dewar@adacore.com>
2605 * errout.adb (Finalize): Don't delete real errors with specific
2608 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2610 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
2611 Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
2612 Handle properly a trigger that is a call to a primitive operation
2613 of a type that implements a limited interface, if the type itself
2616 2013-09-10 Robert Dewar <dewar@adacore.com>
2618 * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
2619 exp_ch4.adb, sprint.adb: Minor reformatting.
2621 2013-09-10 Yannick Moy <moy@adacore.com>
2623 * sinfo.ads: Document splitting of pre/post in N_Contract description.
2625 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2627 * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
2628 form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
2629 add a mod operation if the result type is a binary modular type.
2631 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2633 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
2634 variable Context. Remove local variable Subp_Id. Start the
2635 context traversal from the current subprogram rather than the
2636 current scope. Update the scope traversal and error reporting.
2638 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2640 * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
2641 Rewrite_Triggering_Statements, to encapsulate the statements that
2642 follow the trigger of the entry call. This procedure is needed
2643 when the trigger is a dispatching call, because the expansion
2644 requires several copies of those statements. The procedure is
2645 more efficient, and preserves non-local references when the
2646 construct is within an instance.
2648 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2650 * sem_ch12.adb (Analyze_Package_Instantiation): If the
2651 instantiation is a compilation unit, analyze aspects before
2652 analyzing the package declaration for the instance.
2653 * sem_ch13.adb (Analyze_Aspect_Specifications): If the
2654 corresponding node is a package instantiation, insert generated
2655 pragmas at the head of visible declarations.
2656 * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
2657 do not ignore the pragma if it comes from an aspect specification
2658 in the instance, and not from the generic unit.
2659 * sprint.adb (Sprint_Node_Actual): For a package declaration that
2660 is an instantiation, print aspects after declaration.
2662 2013-09-10 Robert Dewar <dewar@adacore.com>
2664 * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
2666 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2668 * sem_prag.adb (Get_SPARK_Mode_Id): Handle the
2669 case where the pragma may appear without an argument.
2670 (Analyze_Global_List): Add expanded_name to the list of constructs
2671 that denote a single item.
2672 (Collect_Global_List): Add expanded_name to the list of constructs
2673 that denote a single item.
2675 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2677 * exp_ch4.adb (Apply_Accessibility_Check): Add local constant
2678 Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
2679 and deallocate a heap-allocated class-wide object after it
2680 has been determined that it violates the accessibility rules.
2681 * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
2682 and entry in RE_Unit_Table for RE_Free.
2684 2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
2685 Iain Sandoe <iain@codesourcery.com>
2688 * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
2689 (GCC_LINK): Use CXX instead of CC.
2690 * gcc-interface/Make-lang.in (CXX_LFLAGS): New.
2691 (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
2693 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2695 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
2696 sets of derived types in ASIS mode.
2698 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2700 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
2701 (is_cplusplus_method): Likewise, and False with false.
2702 (components_need_strict_alignment): Likewise.
2703 * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
2704 * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
2705 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2706 (add_cleanup): Likewise.
2707 (Sloc_to_locus1): Likewise.
2708 (Sloc_to_locus): Likewise.
2709 (set_expr_location_from_node): Likewise.
2710 * gcc-interface/utils.c (potential_alignment_gap): Likewise.
2712 2013-08-13 Thomas Quinot <quinot@adacore.com>
2714 * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
2715 for the end_locus of a block if it does not come from an End_Label.
2717 2013-08-13 Thomas Quinot <quinot@adacore.com>
2719 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
2720 there is no End_Label, attach cleanup actions to the sloc of the HSS
2722 (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
2723 of the handler itself.
2724 (add_cleanup): Clear column information in sloc of cleanup actions.
2725 (Sloc_to_locus1): New static function.
2726 (Sloc_to_locus): Call it.
2727 (set_expr_location_from_node1): New static function.
2728 (set_expr_location_from_node): Call it.
2730 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2732 * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
2733 expressions for misaligned actual parameters.
2735 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2737 * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
2738 values outside of the range of the type.
2740 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2742 * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
2743 to the original type before converting to the result type.
2744 (build_atomic_store): First do a conversion to the original type before
2745 view-converting to the effective type, but deal with a padded type
2748 2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
2750 * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
2751 compiler build and use standard library variables.
2752 (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
2753 (gnatmake-re): Do not depend on targext.o.
2754 (gnatlink-re): Do not depend on link.o and targext.o.
2755 (../../gnatmake$(exeext): Likewise.
2756 (../../gnatlink$(exeext): Likewise.
2758 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
2760 * gcc-interface/gigi.h: Fix typos.
2761 * gcc-interface/trans.c: Likewise.
2762 * gcc-interface/utils2.c: Likewise.
2763 * gnat_rm.texi: Likewise.
2764 * gnat_ugn.texi: Likewise.
2765 * raise-gcc.c: Likewise.
2766 * sigtramp-ppcvxw.c: Likewise.
2767 * sysdep.c: Likewise.
2768 * terminals.c: Likewise.
2770 2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
2773 * gcc-interface/ada.h (CAT): Fix typo.
2775 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2777 * einfo.adb (Get_Pragma): Handle the retrieval of delayed
2778 pragmas stored in N_Contract nodes.
2779 * einfo.ads (Get_Pragma): Update the comment on usage.
2780 * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
2781 of the pragma when it applies to a body that acts as a spec. The
2782 copy is preanalyzed and chained on the contract of the body.
2784 2013-07-08 Robert Dewar <dewar@adacore.com>
2786 * rtsfind.adb: Minor comment fix.
2788 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2790 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
2791 of a Ghost function call when the enclosing context is being
2794 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2796 * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
2797 expression in a return statement is a numeric literal, qualify
2798 it with the return type for proper resolution.
2800 2013-07-08 Robert Dewar <dewar@adacore.com>
2802 * sem.ads: Minor comment updates.
2803 * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
2806 2013-07-08 Robert Dewar <dewar@adacore.com>
2808 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
2809 for Restriction_Set.
2810 * gnat_rm.texi: Add missing menu entry for Attribute Ref Add
2811 documentation for attribute Restriction_Set.
2812 * lib-writ.adb (Write_With_Lines): Generate special W lines
2813 for Restriction_Set.
2814 * lib-writ.ads: Document special use of W lines for
2816 * lib.ads (Restriction_Set_Dependences): New table.
2817 * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
2818 list (Scan_Name_Extension_Apostrophe): Remove kludge test for
2819 Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
2821 * restrict.adb (Check_SPARK_Restriction): Put in Alfa order
2822 (OK_No_Dependence_Unit_Name): New function.
2823 * restrict.ads (OK_No_Dependence_Unit_Name): New function.
2824 * rtsfind.adb: Minor reformatting Minor code reorganization.
2825 * sem_attr.adb (Analyze_Attribute): Add processing for
2827 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2828 Remove Check_Unit_Name and use new function
2829 OK_No_Dependence_Unit_Name instead.
2830 * sinfo.ads: Minor comment updates.
2831 * snames.ads-tmpl: Add entry for Restriction_Set attribute.
2833 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2835 * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
2836 Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
2837 object as "free" is not available on all targets/profiles.
2839 2013-07-08 Robert Dewar <dewar@adacore.com>
2841 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle
2842 Storage_Size aspect for task type in case discriminant is
2844 (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
2845 attribute definition clause as obsolescent if from aspect.
2847 2013-07-08 Robert Dewar <dewar@adacore.com>
2849 * gnat_rm.texi: Add documentation for Img returning a function.
2850 * par-prag.adb: Minor reformatting.
2851 * restrict.adb: Minor reformatting and code reorganization.
2853 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2855 * sem_res.adb: add guard to ASIS transform.
2857 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2859 * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
2860 of the asynchronous select is a dispatching call, transform the
2861 abortable part into a procedure, to avoid duplication of local
2862 loop variables that may appear within.
2864 2013-07-08 Vincent Celier <celier@adacore.com>
2866 * projects.texi: Update the documentation of suffixes in package
2869 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2871 * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
2872 types are type conformant if the designated type of one is
2873 protected and the other is not. Convention only matters when
2874 checking subtype conformance.
2876 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2878 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
2879 back the fully resolved operands to the original function call
2880 so that all semantic information remains available to ASIS.
2882 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2884 * sem_ch4.adb: minor reformatting (remove obsolete comment).
2885 * sem_ch9.adb: improve error message on illegal trigger.
2887 2013-07-08 Robert Dewar <dewar@adacore.com>
2889 * sem_prag.adb: Minor reformatting.
2891 2013-07-08 Robert Dewar <dewar@adacore.com>
2893 * gnatcmd.adb: Minor reformatting.
2895 2013-07-08 Robert Dewar <dewar@adacore.com>
2897 * targparm.adb (Get_Target_Parameters): Recognize pragma
2898 Partition_Elaboration_Policy.
2900 2013-07-08 Robert Dewar <dewar@adacore.com>
2902 * gnat_ugn.texi: Minor update to mention partition elaboration policy.
2904 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2906 * sem_ch4.adb (Comple_Object_Operation): Revert previous change.
2907 (Analyze_Indexed_Component_Form): In ASIS mode, if node has been
2908 transformed but not rewritten as a function call (as is the case
2909 in a generic), analyze it as such.
2911 2013-07-08 Thomas Quinot <quinot@adacore.com>
2913 * gnat_rm.texi: Minor rewording: add missing word "operators"
2914 in documentation for restriction No_Direct_Boolean_Operator.
2916 2013-07-08 Robert Dewar <dewar@adacore.com>
2918 * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
2919 Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
2921 * errout.ads: Insertions ! and !! no longer have to be at the
2922 end of the message, they can be anywhere in the message.
2923 * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
2924 Replaces Test_Style_Warning_Serious_Msg
2925 * erroutc.ads (Has_Double_Exclam): New flag New comments for
2926 existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
2927 Replaces Test_Style_Warning_Serious_Msg
2928 * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
2929 Replaces Test_Style_Warning_Serious_Msg
2931 2013-07-08 Robert Dewar <dewar@adacore.com>
2933 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2934 Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
2935 * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
2937 * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
2938 sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
2939 * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
2941 2013-07-08 Vincent Celier <celier@adacore.com>
2943 * gnatcmd.adb (Check_Files): Use a response file for gnatls
2946 2013-07-08 Gary Dismukes <dismukes@adacore.com>
2948 * freeze.adb: Minor typo fixes.
2950 2013-07-08 Robert Dewar <dewar@adacore.com>
2952 * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
2953 obsolete recognition of SPARK Document all other obsolete synonyms
2954 for old restrictions.
2955 * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
2956 SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
2958 * restrict.ads: Restriction SPARK_05 replaces SPARK.
2959 * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
2960 as synonym for SPARK_05.
2961 * sem_prag.adb: Minor reformatting.
2962 * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
2964 2013-07-08 Robert Dewar <dewar@adacore.com>
2966 * sem_dim.adb: Minor error message change.
2967 * freeze.adb (Freeze_Entity, array type case): Extend handling
2968 of Implicit_Packing to handle multi-dimensional array case.
2969 * gnat_rm.texi: Update doc on Implicit_Packing.
2971 2013-07-08 Robert Dewar <dewar@adacore.com>
2973 * exp_ch4.adb: Minor reformatting.
2975 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2977 * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
2978 the parent node is a selected component and the analysis as a
2979 call is successful, set the type of the selector in the parent
2980 node for subsequent checks, because the rewriting of the node
2981 does not take place during pre-analysis.
2983 2013-07-08 Robert Dewar <dewar@adacore.com>
2985 * sem_ch8.adb, exp_ch3.adb: Minor reformatting.
2987 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2989 * exp_ch4.adb (Expand_N_Op_Eq): When comparing two
2990 Bounded_Strings, use the predefined equality function of the
2991 root Super_String type.
2993 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2995 * exp_ch4.adb (Create_Alternative): Removed.
2996 (Expand_N_If_Expression): Remove constant
2997 In_Case_Or_If_Expression. Add local variable
2998 Ptr_Typ. Inspect the "then" and "else" action lists
2999 for transient controlled objects and generate code to
3000 finalize them. (Is_Controlled_Function_Call): Removed.
3001 (Process_Action): Update the comment on usage. Update the call
3002 to Process_Transient_Object. There is no need to continue the
3003 traversal of the object itself.
3004 (Process_Actions): New routine.
3005 (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
3006 a new formal and update the related comment on usage.
3007 * exp_util.adb (Within_Case_Or_If_Expression): Start the search
3008 from the parent of the node.
3010 2013-07-08 Robert Dewar <dewar@adacore.com>
3012 * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
3013 a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
3015 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3017 * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
3018 that can be renamed as a function.
3020 2013-07-08 Thomas Quinot <quinot@adacore.com>
3022 * g-socket.ads: Document target dependency: FIONBIO may or may not
3023 be inherited from listening socket by accepted socket.
3025 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3027 * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
3028 on targets that can't deallocate.
3030 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3032 * exp_ch3.adb (Freeze_Type): Generate a
3033 subpools-related accessibility check only on profiles that
3034 include the corresponding library unit.
3036 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3038 * sem_ch8.adb: Minor typo fixes.
3040 2013-07-08 Javier Miranda <miranda@adacore.com>
3042 * sem_ch8.adb (Save_Scope_Stack): Adding documentation.
3043 (Restore_Scope_Stack): Remove the elements of the list when the
3044 visibility of each entity is restored.
3046 2013-07-08 Robert Dewar <dewar@adacore.com>
3048 * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
3050 2013-07-08 Robert Dewar <dewar@adacore.com>
3052 * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
3054 2013-07-08 Gary Dismukes <dismukes@adacore.com>
3056 * gnat_rm.texi: Minor reformatting and rewording for consistency.
3058 2013-07-08 Bob Duff <duff@adacore.com>
3060 * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
3061 view coming from a limited-with'ed package, use the nonlimited
3062 view in case it has tasks.
3064 2013-07-08 Javier Miranda <miranda@adacore.com>
3066 * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
3067 of entities which have been temporarily removed from immediate
3069 (Restore_Scope_Stack): Modified to receive an
3070 additional parameter with the list of entities whose immediate
3071 visibility must be restored.
3072 * sem.adb (Do_Analyze): Use new version of
3073 Save_Scope_Stack/Restore_Scope_Stack
3074 * sem_ch12.adb (Inline_Instance_Body): Use new version of
3075 Save_Scope_Stack and Restore_Scope_Stack
3077 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
3079 * sem_prag.adb (Analyze_Pragma): Remove
3080 variable Unit_Prag. Remove the check on duplicate mode for the
3081 configuration form of the pragma.
3082 (Redefinition_Error): Removed.
3084 2013-07-08 Robert Dewar <dewar@adacore.com>
3086 * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
3089 2013-07-08 Ed Schonberg <schonberg@adacore.com>
3091 * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
3092 pre-analyze only the original expression attached to the source
3093 aspect, not the relocated expression of the pragma, to prevent
3094 malformed trees in ASIS mode.
3095 * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
3096 patch: the expression in the aspect for pre/post must be relocated
3097 to the pragma for proper analysis.
3099 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3101 * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
3102 * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
3103 Aspect_Argument, Aspect_Names.
3104 * atree.adb (Node32): New routine.
3105 (Set_Node32): New routine.
3106 * atree.ads (Node32): New routine.
3107 (Set_Node32): New routine.
3108 * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
3109 (Set_SPARK_Mode_Pragmas): New routine.
3110 (SPARK_Mode_Pragmas): New routine.
3111 (Write_Field32_Name): Add and entry for SPARK_Modes.
3112 * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
3113 in various entities.
3114 (Set_SPARK_Mode_Pragmas): New routine and
3116 (SPARK_Mode_Pragmas): New routine and pragma Inline.
3117 * gnat_rm.texi: Add sections explaining the syntax and semantics
3118 of aspect/pragma SPARK_Mode.
3119 * gnat_ugn.texi: Add pragma SPARK_Mode to the list of
3120 configuration pragmas.
3121 * lib.adb (Set_SPARK_Mode_Pragma): New routine.
3122 (SPARK_Mode_Pragma): New routine.
3123 * lib.ads: Alphabetize the comments on fields of record
3124 Unit_Record. Add new field SPARK_Mode_Pragma along with
3125 comment on its usage. Update the layout of record Unit_Record.
3126 (Set_SPARK_Mode_Pragma): New routine and pragma Inline.
3127 (SPARK_Mode_Pragma): New routine and pragma Inline.
3128 * lib-load.adb (Create_Dummy_Package_Unit): Initialize
3129 field SPARK_Mode_Pragma.
3130 (Load_Main_Source): Initialize field SPARK_Mode_Pragma.
3131 (Load_Unit): Initialize field SPARK_Mode_Pragma.
3132 * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
3134 (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
3135 * opt.ads: Alphabetize verification flags. Store the
3136 compilation-wide SPARK mode in variable Global_SPARK_Mode.
3137 * par-prag.adb: Pragma SPARK_Mode does not need special processing
3139 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
3140 SPARK_Mode into a pragma.
3141 (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
3143 * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
3144 (Analyze_Pragma): Add processing for pragma SPARK_Mode.
3145 (Get_SPARK_Mode_Id): New routine.
3146 (Is_Elaboration_SPARK_Mode): New routine.
3147 (Is_Private_SPARK_Mode): New routine.
3148 * sem_prag.ads (Get_SPARK_Mode_Id): New routine.
3149 (Is_Elaboration_SPARK_Mode): New routine.
3150 (Is_Private_SPARK_Mode): New routine.
3151 * sinfo.ads: Update the comment on the usage of field Next_Pragma.
3152 * snames.ads-tmpl: Add new predefined name for SPARK_Mode and
3153 Auto. Add new pragma Id for SPARK_Mode.
3154 * types.ads: Add new type SPARK_Mode_Id.
3156 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3158 * sem_ch13.adb (Analyze_Aspect_Specifications): For
3159 pre/postconditions copy the expression to the generated pragma,
3160 to avoid sharing between the original aspect and the pragma node,
3161 because in ASIS_Mode both will be independently analyzed.
3163 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3165 * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
3166 formals for each discriminant of an unchecked union.
3167 (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
3168 variants are supported. New helper function Corresponding_Formal.
3169 * exp_ch4.adb (Build_Equality_Call): For unchecked unions,
3170 loop through discriminants to create list of inferred values,
3171 and modify call to equality routine accordingly.
3173 2013-07-05 Claire Dross <dross@adacore.com>
3175 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
3176 a-cforse.ads, a-cofove.ads: Add preconditions when needed +
3177 container types are not tagged any more.
3179 2013-07-05 Thomas Quinot <quinot@adacore.com>
3181 * freeze.adb (Freeze_Entity): For an object with captured
3182 initialization statements, do not remove Init_Stmts from the
3183 enclosing list, as Freeze_All might rely on it to know where to
3186 2013-07-05 Robert Dewar <dewar@adacore.com>
3188 * exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
3191 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3193 * exp_ch4.adb (Expand_Composite_Equality): Use the full view
3194 when the base type is private.
3196 2013-07-05 Claire Dross <dross@adacore.com>
3198 * a-cfdlli.ads: Add preconditions when needed.
3200 2013-07-05 Robert Dewar <dewar@adacore.com>
3202 * sem_ch8.adb: Minor reformatting.
3204 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3206 * sem_ch3.adb (Access_Subprogram_Declaration): Use
3207 Generate_Reference_To_Formals.
3208 * lib-xref.adb (Generate_Reference_To_Formals): In the case of
3209 access to subprograms, the formals are found in the designated
3212 2013-07-05 Robert Dewar <dewar@adacore.com>
3214 * gnat_ugn.texi: Document that comments can be lined up with
3215 previous non-blank line.
3216 * styleg.adb (Check_Comment): Allow indentation to match previous
3217 non-blank line (Same_Column_As_Previous_Line): New function
3219 2013-07-05 Robert Dewar <dewar@adacore.com>
3221 * gnat_rm.texi: Update doc on missing pragmas.
3222 * sem_ch12.adb: Minor comment additions.
3224 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3226 * sem_prag.adb (Analyze_Pragma): Ensure that
3227 Contract_Cases, Depends and Global are analyzed when they apply
3228 to a subprogram compilation unit. The pragmas are all added
3229 unconditionally to the construct's contract. This ensures that
3230 proof tools can locate the pragmas.
3232 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3234 * sem_ch8.adb (Freeze_Actual_Profile): An instance within
3235 a generic unit does not freeze a generic private type of the
3236 enclosing generic. This rule must also apply to a type derived
3237 from a generic private type.
3239 2013-07-05 Arnaud Charlet <charlet@adacore.com>
3241 * gnat_rm.texi: Add missing documentation for pragmas.
3243 2013-07-05 Yannick Moy <moy@adacore.com>
3245 * sem_ch12.adb: Minor comment.
3247 2013-07-05 Robert Dewar <dewar@adacore.com>
3249 * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
3251 * switch-c.adb: Do not allow -gnatD and -gnatR to both be
3254 2013-07-05 Robert Dewar <dewar@adacore.com>
3256 * gnat_rm.texi: Add missing documentation for pragmas.
3257 * sem_ch8.adb: Minor reformatting.
3258 * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
3261 2013-07-05 Yannick Moy <moy@adacore.com>
3263 * sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
3264 instance of subprogram body in SPARK mode, by testing Expander_Active
3265 (set in SPARK mode) instead of Full_Expander_Active (not set in
3267 * sem_ch8.adb: Minor reformatting.
3269 2013-07-05 Robert Dewar <dewar@adacore.com>
3271 * freeze.adb (Freeze_Entity): Remove test of obsolete flag
3272 Propagate_Exceptions, and associated useless code that did
3274 * gnat_rm.texi: Add documentation for obsolete pragma
3275 Propagate_Exceptions.
3276 * opt.ads (Propagate_Exceptions): Obsolete flag removed.
3277 * sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
3278 Remove useless and obsolete setting of Propagate_Exceptions flag.
3280 2013-07-05 Robert Dewar <dewar@adacore.com>
3282 * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
3284 2013-07-05 Robert Dewar <dewar@adacore.com>
3286 * gnat_rm.texi: Add missing doc for various pragmas.
3288 2013-07-05 Robert Dewar <dewar@adacore.com>
3290 * par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
3291 * gnat_rm.texi: Document pragma Profile_Warnings.
3292 * restrict.ads, sem_prag.adb: Minor reformatting.
3294 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3296 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
3297 a formal subprogram that was defaulted in the formal package.
3299 2013-07-05 Thomas Quinot <quinot@adacore.com>
3301 * par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
3302 N_Implicit_Label_Declaration nodes.
3304 2013-07-05 Robert Dewar <dewar@adacore.com>
3306 * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
3308 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3310 * sem_ch12.adb (Copy_Generic_Node): Check that name in function
3311 call is a valid entity name before preserving entity in generic
3314 2013-07-05 Thomas Quinot <quinot@adacore.com>
3316 * par-ch5.adb: Minor reformatting.
3318 2013-07-05 Thomas Quinot <quinot@adacore.com>
3320 * sinfo.ads: Minor clarification to documentation for
3321 N_Implicit_Label_Declaration.
3323 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
3325 * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
3326 values of all remaining constants.
3327 (Rcheck_35): New routine along with pragmas Export and No_Return.
3328 (Rcheck_PE_Aliased_Parameters): New routine along with pragmas
3329 Export and No_Return.
3330 (Rcheck_PE_All_Guards_Closed,
3331 Rcheck_PE_Bad_Predicated_Generic_Type,
3332 Rcheck_PE_Current_Task_In_Entry_Body,
3333 Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
3334 Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
3335 Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
3336 Rcheck_PE_Potentially_Blocking_Operation
3337 Rcheck_PE_Stubbed_Subprogram_Called,
3338 Rcheck_PE_Unchecked_Union_Restriction,
3339 Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
3340 Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
3341 Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
3342 Update the use of Rmsg_XX.
3343 (Rcheck_17, Rcheck_18, Rcheck_19,
3344 Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
3345 Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
3346 Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
3347 renamed subprograms.
3348 * checks.adb: Add with and use clause for Stringt.
3349 (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
3350 all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
3351 variable Cond. Initialize Check at the start of the routine. Use
3352 routine Overlap_Check to construct a simple or a detailed run-time
3353 check. Update the creation of the simple check.
3354 (Overlap_Check): New routine.
3355 * exp_ch11.adb (Get_RT_Exception_Name): Add a value for
3356 PE_Aliased_Parameters.
3357 * types.ads: Add new enumeration literal
3358 PE_Aliased_Parameters. Update the corresponding integer values
3359 of all RT_Exception_Code literals.
3360 * types.h: Add new constant PE_Aliased_Parameters. Correct the
3361 values of all remaining constants.
3363 2013-07-05 Yannick Moy <moy@adacore.com>
3365 * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
3368 2013-07-05 Ed Schonberg <schonberg@adacore.com>
3370 * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
3371 condition, when replacing the name of a formal by a conversion
3372 to the class-wide type, exempt selector names that appear in
3373 parameter associations.
3375 2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
3377 * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
3378 * gcc-interface/gigi.h (annotate_object): Adjust prototype.
3379 (convert_vms_descriptor): Likewise.
3380 * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
3381 types by double dereference.
3382 (annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
3383 (gnat_to_gnu_entity): Adjust calls to annotate_object.
3384 * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
3386 (Call_to_gnu): Likewise.
3387 (build_function_stub): Adjust call to convert_vms_descriptor.
3388 (Subprogram_Body_to_gnu): Adjust call to annotate_object.
3389 * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
3390 parameter and adjust.
3392 2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
3394 * gcc-interface/Makefile.in (arm% androideabi): Robustify.
3396 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3398 * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
3399 check that access types have a set size.
3401 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3403 * gcc-interface/decl.c (vinfo_t): New type and associated vector.
3404 (components_to_record): Change return type to bool.
3405 Lay out the variants in two passes. Do not force a specific layout for
3406 the variant part if the variants do not have a representation clause.
3407 Take the alignment of the variant part into account when laying out
3408 variants without rep clause in a record type with a partial rep clause.
3409 (create_rep_part): Do not set the position of the field.
3411 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3413 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
3414 to avoid generating an overflow for -1.
3416 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3418 * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
3419 (create_label_decl): Complete prototype.
3420 (process_attributes): Declare.
3421 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
3422 create_type_decl throughout.
3423 <E_Enumeration_Type>: Do the layout of the type manually and call
3424 process_attributes on it. Reindent.
3425 <E_Enumeration_Subtype>: Minor tweak.
3426 <E_Floating_Point_Subtype>: Reindent.
3427 <E_Array_Subtype>: Call process_attributes on the array type built
3428 for a packed array type.
3429 <E_Record_Type>: Call process_attributes on the type.
3430 <E_Record_Subtype>: Likewise.
3431 <E_Access_Type>: Likewise.
3432 <E_Subprogram_Type>: Likewise.
3433 Likewise for all types at the end of the processing.
3434 * gcc-interface/utils.c (make_aligning_type): Adjust call to
3436 (maybe_pad_type): Likewise.
3437 (create_index_type): Likewise.
3438 (create_type_decl): Remove attr_list parameter and associated code.
3439 (create_var_decl_1): Call process_attributes on the variable.
3440 (process_attributes): Take a pointer to the object and add in_place
3441 and gnat_node parameters and adjust throughout.
3442 <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
3443 and set the input location.
3444 Zap the attribute list at the end.
3445 (create_subprog_decl): Call process_attributes on the subprogram.
3446 (build_unc_object_type): Adjust call to create_type_decl.
3447 (handle_vector_type_attribute): Remove dead code.
3449 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3451 * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
3452 * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
3453 for the position of the associated TYPE_DECL.
3454 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
3455 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
3457 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3459 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
3460 elaborate the full view of a type with a freeze node.
3461 * gcc-interface/trans.c (process_type): Add explicit predicate.
3463 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3465 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
3466 UNC variable for aliased objects with unconstrained nominal subtype.
3468 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3470 * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
3471 * gcc-interface/trans.c (gigi): Call it.
3472 * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
3474 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3476 * gcc-interface/gigi.h (enum inline_status_t): New type.
3477 (create_subprog_decl): Adjust prototype.
3478 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
3479 calls to create_subprog_decl.
3480 (get_minimal_subprog_decl): Likewise.
3481 * gcc-interface/trans.c (gigi): Likewise.
3482 (build_raise_check): Likewise.
3483 (establish_gnat_vms_condition_handler): Likewise.
3484 (Compilation_Unit_to_gnu): Likewise.
3485 (gnat_to_gnu): Likewise.
3486 * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
3487 parameter to inline_status and implement for suppressed inlining.
3489 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3491 * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
3492 (LOOP_STMT_UNROLL): Likewise.
3493 (LOOP_STMT_NO_VECTOR): Likewise.
3494 (LOOP_STMT_VECTOR): Likewise.
3495 * gcc-interface/trans.c (struct loop_info_d): Replace label field
3497 (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
3498 (Loop_Statement_to_gnu): Save the loop statement onto the stack
3499 instead of the label.
3500 (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
3502 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3504 * gcc-interface/trans.c: Include diagnostic.h and opts.h.
3505 (Pragma_to_gnu) <Pragma_Warnings>: New case.
3507 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3509 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
3510 a handful of local variables.
3511 For a derived untagged type that renames discriminants, change the type
3512 of the stored discriminants to a subtype with the bounds of the type
3513 of the visible discriminants.
3514 (build_subst_list): Rename local variable.
3516 2013-05-16 Jason Merrill <jason@redhat.com>
3518 * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
3520 2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3523 * gcc-interface/Makefile.in: Allow for amd64 solaris2.
3525 2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
3528 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
3529 int_const_binop to shift bounds by 1 when they are integer constants.
3531 2013-04-25 Arnaud Charlet <charlet@adacore.com>>
3533 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
3535 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3537 * checks.adb (Apply_Predicate_Check): Update the comment associated
3538 with the call to Check_Expression_Against_Static_Predicate.
3539 * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
3540 associated with the call to Check_Expression_Against_Static_Predicate.
3541 * sem_util.adb (Check_Expression_Against_Static_Predicate):
3542 Broaden the check from a static expression to an expression with
3543 a known value at compile time.
3544 * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
3547 2013-04-25 Thomas Quinot <quinot@adacore.com>
3549 * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
3550 First_Bit, and Last_Bit): Fix incorrect test in implementation of
3551 RM 2005 13.5.2(3/2).
3553 2013-04-25 Claire Dross <dross@adacore.com>
3555 * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
3556 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
3557 (Query_Element): Removed.
3558 (Update_Element): Removed.
3559 (Insert): The version with no New_Item specified is removed.
3563 Every check of fields Busy and Lock has been removed.
3565 2013-04-25 Robert Dewar <dewar@adacore.com>
3567 * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
3568 call to S14_Pragma (Find_Related_Subprogram): Require proper
3569 placement in subprogram body (Find_Related_Subprogram): Detect
3570 duplicates for all cases (Find_Related_Subprogram): Handle case
3571 of spec nested inside body.
3573 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3575 * par-prag.adb: Fix typo.
3577 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3579 * checks.adb (Apply_Predicate_Check): If the type has a static
3580 predicate and the expression is also static, check whether the
3581 expression satisfies the predicate.
3582 * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
3583 static predicate and the expression is also static, see if the
3584 expression satisfies the predicate.
3585 * sem_util.adb: Alphabetize several routines.
3586 (Check_Expression_Against_Static_Predicate): New routine.
3587 * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
3589 2013-04-25 Robert Dewar <dewar@adacore.com>
3591 * gnat_rm.texi: Document Reason argument for pragma Warnings.
3592 * par-prag.adb: Handle Reason parameter for pragma Warnings.
3593 * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
3594 * snames.ads-tmpl (Name_Reason): New name entry.
3596 2013-04-25 Yannick Moy <moy@adacore.com>
3598 * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
3599 (Expand_SPARK): Remove special expansion for membership tests.
3601 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3603 * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
3604 that should use constant Base_Typ. When building an invariant
3605 check, account for invariants coming from the base type. Prevent
3606 the creation of a junk invariant check when the related object
3607 is of an array type and it is initialized with an aggregate.
3608 * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
3609 the base type to create an invariant call when the type of the
3610 expression is a composite subtype.
3612 2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
3614 * a-cborse.adb: Fix minor typo.
3616 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3618 * sem_ch6.adb (Different_Generic_Profile): A spec and body
3619 match in an instance if a subtype declaration that renames a
3620 generic actual with the same name appears between spec and body.
3622 2013-04-25 Robert Dewar <dewar@adacore.com>
3624 * sem_util.adb: Minor reformatting.
3626 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3628 * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
3629 fold strings with a single others choice only if there are no
3630 expressions in the aggregate.
3632 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3634 * gnat_ugn.texi: Update doc on Ada 2012 default mode.
3636 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3638 * exp_ch6.adb: Add with and use clause for Stringt.
3639 (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
3640 Decls and Stmts along with comments on their usage.
3641 * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
3642 * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
3643 (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
3645 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3647 * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
3648 * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
3649 aggregate for a packed type, which may be converted into an
3650 unchecked conversion of an object.
3652 2013-04-25 Robert Dewar <dewar@adacore.com>
3654 * sem_prag.adb: Minor code reorganization (correct misspelling
3656 * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
3657 * gnat_rm.texi: Document impl-defined aspects.
3658 * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
3661 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3663 * einfo.adb (Set_Abstract_States): The attribute now applies
3664 to generic packages.
3665 * sem_ch4.adb (Referenced): Moved to sem_util.
3666 * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
3667 a non-null abstract state needs a body.
3668 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
3669 to Collect_Subprogram_Inputs_Outputs.
3670 (Analyze_Global_Item): Verify the proper usage of an item with mode
3671 In_Out or Output relative to the enclosing context.
3672 (Analyze_Pragma): Abstract_State can now be applied to a generic
3673 package. Do not reset the Analyzed flag for pragmas Depends and Global
3674 as this is not needed.
3675 (Appears_In): Moved to library level.
3676 (Check_Mode_Restiction_In_Enclosing_Context): New routine.
3677 (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
3678 formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
3679 seen along with comments on usage.
3680 * sem_util.ads, sem_util.adb (Referenced): New routine.
3682 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3684 * sem_ch6.adb (Expand_Contract_Cases): Generate
3685 detailed error messages only when switch -gnateE is in effect.
3687 2013-04-25 Yannick Moy <moy@adacore.com>
3689 * sem_attr.adb (Analyze_Attribute): Do not issue
3690 an error for a possibly misplaced 'Result or 'Old attribute when
3691 analyzing the aspect.
3693 2013-04-25 Robert Dewar <dewar@adacore.com>
3695 * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
3697 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3699 * sem_ch4.adb (Analyze_Quantified_Expression):
3700 Add local variable Loop_Id. Verify that the loop variable
3701 is used within the condition of the quantified expression.
3702 (Referenced): New routine.
3704 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3706 * sem_case.adb (Analyze_Choices): Enhance the error message
3707 given on a bad use of subtype predicate.
3708 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
3709 the error message given on a bad use of subtype predicate.
3710 * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
3711 Suggest_Static. Emit an extra error message advising how to
3712 remedy the bad use of the predicate if the context warrants it.
3713 * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
3714 Suggest_Static along with a comment explaining its usage.
3716 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3718 * sem_disp.adb (Check_Dispatching_Operation): Further refinement
3719 to checks for AI05-0125: the check for a hidden primitive that
3720 may be overridden by the new declaration only applies if the
3721 hidden operation is never declared. This is not the case if the
3722 operation is declared in a parent unit.
3724 2013-04-25 Robert Dewar <dewar@adacore.com>
3726 * debug.adb: Remove d.X and d.Y entries and documentation.
3727 * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
3728 if expression with actions not available (now always available).
3729 (Expand_Short_Circuit_Operator): Same change.
3730 * gnat1drv.adb (Adjust_Global_Switches) Remove setting
3731 Use_Expression_With_Actions flag, since this is now obsolete.
3732 * opt.ads (Use_Expression_Actions): Removed (always True now).
3733 * sinfo.ads: Minor comment updates.
3735 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3737 * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
3738 subtype whose base type is currently private, install full view
3739 when compiling instance body.
3741 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3743 * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
3744 AI05-0125: the check for a hidden primitive that may be overridden
3745 by the new declaration is only performed if the declaration comes
3746 from source, and it must carry an explicit overriding indicator.
3748 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3750 * einfo.adb (Abstract_States): The attribute now applies to
3752 * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
3753 object declaration introduces an illegal hidden state.
3754 * sem_prag.adb (Analyze_Abstract_State): Check whether a state
3755 declaration introduces an illegal hidden state.
3756 * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
3758 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3760 * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
3761 be to a protected function, in which case the name in the call
3762 is a selected component.
3764 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3766 * sem_ch4.adb (Analyze_Quantified_Expression):
3767 Warn on a suspicious use of quantifier "some" when "all" was meant.
3768 (No_Else_Or_Trivial_True): New routine.
3770 2013-04-25 Robert Dewar <dewar@adacore.com>
3772 * einfo.ads, einfo.adb: Put back with/use for Namet.
3773 (Get_Pragma): New name (wi new spec) for Find_Pragma.
3774 * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
3775 different interface.
3777 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3779 * sem_ch3.adb (Is_Visible_Component): In an instance all
3780 components are visible.
3782 2013-04-25 Matthew Heaney <heaney@adacore.com>
3784 * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
3785 tampering when container empty.
3786 * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
3787 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
3790 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3792 * par-ch12.adb: Move aspects from package specification to
3793 generic package declaration.
3794 * sem_ch12.adb: Analyze aspect specifications before building
3795 and analyzing the generic copy, so that the generated pragmas
3796 are properly taken into account.
3797 * sem_ch13.adb: For compilation unit aspects that apply to a
3798 generic package declaration, insert corresponding pragmas ahead
3799 of visible declarations.
3800 * sprint.adb: Display properly the aspects of a generic type
3803 2013-04-25 Robert Dewar <dewar@adacore.com>
3805 * frontend.adb: Minor reformatting.
3807 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3809 * einfo.ads: Extend documentation on use of Is_Private_Ancestor
3811 * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
3812 case of untagged types derived from private types, to reject
3813 illegal selected components.
3815 2013-04-25 Gary Dismukes <dismukes@adacore.com>
3817 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
3818 for case of selecting from an unexpanded implicit dereference
3819 and do not make a recursive call on such a prefix.
3821 2013-04-25 Doug Rupp <rupp@adacore.com>
3823 * targparm.adb (VXF{_Str}): New tag for vaxfloat.
3824 (Get_Target_Parameters): Handle VXF tag.
3825 * targparm.ads (VAX_Float_On_Target): New boolean.
3826 * system-vms-ia64.ads (VAX_Float): New boolean.
3827 * frontend.adb (Frontend): Handle VAX float boolean.
3829 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3831 * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
3832 (Find_Pragma): New routine.
3833 * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
3835 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3837 * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
3839 (Add_Predicates): Save the static predicate for diagnostics and error
3841 (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
3842 Static_Predicate_Present. Add local variable Static_Pred. Ensure that
3843 the expression of a static predicate is static.
3845 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3847 * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
3849 2013-04-25 Robert Dewar <dewar@adacore.com>
3851 * gnat_rm.texi: Minor addition of index entry.
3853 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3855 * sem_ch6.adb (Check_Access_Invariants): Test whether an
3856 invariant procedure is empty before generating a call to it.
3857 (Has_Enabled_Predicate): New routine.
3858 (Has_Null_Body): New routine.
3859 (Process_PPCs): Test whether an invariant procedure is
3860 empty before generating a call to it. Test whether predicates are
3861 enabled for a particular type before generating a predicate call.
3862 * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
3864 2013-04-25 Robert Dewar <dewar@adacore.com>
3866 * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
3867 snames.ads-tmpl: Minor reformatting.
3869 2013-04-25 Thomas Quinot <quinot@adacore.com>
3871 * sem_ch7.adb: Minor reformatting.
3873 2013-04-25 Robert Dewar <dewar@adacore.com>
3875 * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
3876 * s-tarest.adb: Minor reformatting.
3878 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3880 * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
3882 * einfo.adb: Remove with and use clause for Aspects.
3883 (Is_Ghost_Function): Removed.
3884 (Is_Ghost_Entity): New routine.
3885 (Is_Ghost_Subprogram): New routine.
3886 * einfo.ads: Remove synthesized attribute Is_Ghost_Function
3887 along with its uses in entities. Add synthesized attributes
3888 Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
3890 (Is_Ghost_Function): Removed.
3891 (Is_Ghost_Entity): New routine.
3892 (Is_Ghost_Subprogram): New routine.
3893 * par-prag.adb: Remove pragma Ghost from the processing machinery.
3894 * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
3895 * sem_attr.adb (Analyze_Access_Attribute): Update the check
3896 for ghost subprograms.
3897 * sem_ch4.adb (Analyze_Call): Update the check for calls
3898 to ghost subprograms.
3899 (Check_Ghost_Function_Call): Removed.
3900 (Check_Ghost_Subprogram_Call): New routine.
3901 * sem_ch6.adb (Check_Convention): Rewritten.
3902 (Check_Overriding_Indicator): Remove the check for overriding
3904 (Convention_Of): New routine.
3905 * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
3906 generic actual subprograms.
3907 * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
3908 * sem_prag.adb: Remove the value for pragma Ghost from
3910 (Analyze_Pragma): Remove the processing for pragma Ghost.
3911 (Process_Convention): Emit an error when a ghost
3912 subprogram attempts to override.
3913 (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
3914 attempts to override.
3915 * sinfo.ads: Clarify the usage of field Label_Construct.
3916 * snames.adb-tmpl (Get_Convention_Id): Add an entry for
3917 predefined name Ghost.
3918 (Get_Convention_Name): Add an entry for convention Ghost.
3919 * snames.ads-tmpl: Move predefined name Ghost to the sublist
3920 denoting conventions. Add convention id Ghost. Remove pragma
3923 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3925 * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
3926 units if within a generic hierarchy.
3928 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3930 * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
3931 actual the related type has a predicate function.
3932 * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
3933 type has an invariant procedure before building a call to it.
3934 * sem_ch6.adb (Append_Enabled_Item): New routine.
3935 (Check_Access_Invariants): Use routine
3936 Append_Enabled_Item to chain onto the list of postconditions.
3937 (Contains_Enabled_Pragmas): Removed.
3938 (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
3939 the list of postconditions.
3940 (Invariants_Or_Predicates_Present): Removed.
3941 (Process_PPCs): Partially reimplemented.
3943 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
3945 * tree_io.ads: Update ASIS_Version_Number because of changes
3946 in the way how entities are chained in a scope by means of
3949 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3951 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
3952 Storage_Size): If the clause is not from an aspect, insert
3953 assignment to size variable of task type at the point of the
3954 clause, not after the task definition, to prevent access before
3955 elaboration in the back-end.
3957 2013-04-24 Yannick Moy <moy@adacore.com>
3959 * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
3961 2013-04-24 Yannick Moy <moy@adacore.com>
3963 * gnat_rm.texi: Document 'Loop_Entry.
3965 2013-04-24 Jose Ruiz <ruiz@adacore.com>
3967 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
3968 fall-back termination handlers from the parents, because they apply
3969 only to dependent tasks.
3970 * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
3971 termination handlers because the environment task has no parent,
3972 and if it defines one of these handlers it does not apply to
3973 itself because they apply only to dependent tasks.
3975 2013-04-24 Robert Dewar <dewar@adacore.com>
3977 * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
3979 2013-04-24 Robert Dewar <dewar@adacore.com>
3981 * gnat_rm.texi: Document 'Update attribute.
3982 * sem_attr.adb (Analyze_Attribute, case Update): Remove call
3983 to S14_Attribute (S14_Attribute): removed.
3985 2013-04-24 Robert Dewar <dewar@adacore.com>
3987 * interfac.ads: Add size clauses for IEEE_Float_32/64
3989 2013-04-24 Claire Dross <dross@adacore.com>
3991 * gnat1drv.adb (Adjust_Global_Switches): Remove
3992 special assignment of Use_Expression_With_Actions for SPARK_Mode.
3994 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3996 * checks.adb (Apply_Predicate_Check): Check for the presence
3997 of the dynamic predicate aspect when trying to determine if the
3998 predicate of a type is non-static.
3999 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
4000 for the presence of the dynamic predicate aspect when trying to
4001 determine if the predicate of a type is non- static.
4002 * sem_ch13.adb (Add_Call): Capture the nature of the
4003 inherited ancestor predicate.
4004 (Build_Predicate_Functions): Update comments. Rewrite the checks on
4005 static predicate application. Complain about the form of a non-static
4006 expression only when the type is static.
4008 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4010 * sem_prag.adb: Add guard to tree traversal.
4012 2013-04-24 Vincent Celier <celier@adacore.com>
4014 * clean.adb (Clean): Remove local variable Root_Environment,
4015 use Makeutl.Root_Environment instead.
4016 * gnatcmd.adb: Remove local variable Root_Environment, use
4017 Makeutl.Root_Environment instead.
4018 * make.adb (Gnatmake): Remove local variable Root_Environment,
4019 use Makeutl.Root_Environment instead.
4020 * prj-makr.adb: Remove local variable Root_Environment, use
4021 Makeutl.Root_Environment instead.
4023 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4025 * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
4026 extraction of the declarative part of the conditional block. Move
4027 the processing of simple infinite loops to the start of the
4028 expansion logic. Correct the check which determines whether the
4029 proper scope is installed in visibility.
4030 * sem_attr.adb (Analyze_Attribute): Add local variable Attr
4031 to keep track of the attribute in case the enclosing indexed
4032 component has to be rewritten. When searching for the enclosing
4033 loop, start from the proper attribute reference in case of a
4034 rewriting. Do not allow for 'Loop_Entry to appear in pragma
4035 Assert. Replace loop variable J with Index. Set the type of the
4037 * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
4038 block that services a loop statement subject to at least one
4039 'Loop_Entry attribute.
4041 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4043 * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
4044 resolve a fixed point operation, use first subtype to determine
4045 whether type and operator are declared in the same list of
4048 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4050 * par-ch6.adb (P_Subprogram): Detect an illegal
4051 placement of the aspect specification list in the context of
4052 expression functions.
4054 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4056 * exp_ch4.adb (Expand_N_Allocator): If the designated object
4057 has tasks, and the pointer type is an itype that has no master
4058 id, create a master renaming in the current context, which can
4059 only be an init_proc.
4061 2013-04-24 Robert Dewar <dewar@adacore.com>
4063 * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
4064 * gnat_rm.texi: Document pragma Loop_Invariant.
4065 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
4066 no longer an S14_Attribute.
4067 * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
4068 processing with Assert, allow message parameter, remove call
4071 2013-04-24 Thomas Quinot <quinot@adacore.com>
4073 * exp_ch4.adb: Minor reformatting.
4075 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4077 * sem_ch7.adb (Swap_Private_Dependents): New internal routine
4078 to Install_Private_Declarations, to make the installation of
4079 private dependents recursive in the presence of child units.
4080 * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
4081 the Private_Dependents of a private subtype.
4083 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4085 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
4086 retrieval of the block declarations.
4087 * par-ch4.adb (P_Name): Let the name parsing machinery create
4088 a sequence of nested indexed components for attribute Loop_Entry.
4089 * sem_attr.adb (Analyze_Attribute): Add local constant
4090 Context. Reimplement part of the analysis of attribute Loop_Entry.
4091 (Convert_To_Indexed_Component): Removed.
4092 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
4093 an indexed component after it has been rewritten into attribute
4096 2013-04-24 Yannick Moy <moy@adacore.com>
4098 * snames.ads-tmpl: Minor change to list
4099 Loop_(In)variant not in configuration pragma.
4100 * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
4101 for analyzing the expressions in pre/postconditions.
4103 2013-04-24 Robert Dewar <dewar@adacore.com>
4105 * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
4108 2013-04-24 Yannick Moy <moy@adacore.com>
4110 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
4111 Analyze_Subprogram_Body_Helper): Reset contract node to Empty
4112 before setting entity to E_Subprogram_Body.
4113 * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
4114 Empty before setting entity to E_Subprogram_Body.
4116 2013-04-24 Vincent Celier <celier@adacore.com>
4118 * gnat_ugn.texi: Document new gnatls switch -aPdir.
4119 * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
4120 * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
4121 a warning for unknown switches.
4122 (Usage): Add line for new switch -aPdir.
4124 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4126 * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
4127 if the type comes from a limited view, so that task attributes can be
4130 2013-04-24 Yannick Moy <moy@adacore.com>
4132 * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
4133 full expansion is not enabled.
4135 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4137 * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
4138 formals if the type does not yet have a completion, and thus
4139 has no underlying view.
4141 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4143 * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
4144 specification for Address as a reference, to suppress warnings
4145 on entities that may be read by an external device.
4147 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
4149 * gnat_ugn.texi: Add description of '--help' and '--version'
4150 options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
4152 2013-04-24 Arnaud Charlet <charlet@adacore.com>
4154 * gnat_rm.texi: Minor syntax fix.
4156 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4158 * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
4159 what and why is being analyzed. Remove the decoration of renamings as
4160 this simply falls out of the general analysis mechanism.
4162 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4164 * sem_res.adb (Explain_Redundancy): New routine.
4165 (Resolve_Equality_Op): Place the error concerning a redundant
4166 comparison to True at the "=". Try to explain the nature of the
4169 2013-04-24 Javier Miranda <miranda@adacore.com>
4172 * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
4173 check in interface thunks since it is performed at the caller
4175 (Expand_Simple_Function_Return): No accessibility check
4176 needed in thunks since the check is done by the target routine.
4178 2013-04-24 Vincent Celier <celier@adacore.com>
4180 * xref_lib.adb (Add_Entity): Use the canonical file names
4181 so that source file names with capital letters are found on
4182 platforms where file names are case insensitive.
4184 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4186 * par-ch4.adb (P_Name): Continue to parse the name extension when the
4187 construct is attribute Loop_Entry. Do not convert the attribute
4188 reference into an indexed component when there is at least one
4189 expression / range following 'Loop_Entry.
4191 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4193 * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
4194 (Process_PPCs): Generate procedure _Postconditions
4195 only when the context has invariants or predicates or enabled
4198 2013-04-24 Thomas Quinot <quinot@adacore.com>
4200 * g-socket.adb (Host_Entry): Introduce intermediate copy of
4201 memory location pointed to by Hostent_H_Addr, as it might not
4202 have sufficient alignment.
4204 2013-04-24 Yannick Moy <moy@adacore.com>
4206 * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
4207 calling subprograms which may read it.
4209 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4211 * einfo.adb: Remove Loop_Entry_Attributes from the usage of
4212 nodes. Flag 260 is now used.
4213 (Has_Loop_Entry_Attributes): New routine.
4214 (Loop_Entry_Attributes): Removed.
4215 (Set_Has_Loop_Entry_Attributes): New routine.
4216 (Set_Loop_Entry_Attributes): Removed.
4217 (Write_Entity_Flags): Write out Flag 260.
4218 (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
4219 * einfo.ads: Remove attribute Loop_Entry_Attributes,
4220 its related comment and uses in nodes. Add new attribute
4221 Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
4222 (Has_Loop_Entry_Attributes): New routine and pragma Inline.
4223 (Loop_Entry_Attributes): Removed along with pragma Inline.
4224 (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
4225 (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
4226 * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
4227 (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
4228 * exp_ch5.adb: Remove with and use clause for Elists.
4229 (Expand_Loop_Entry_Attributes): Removed.
4230 (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
4231 constant Isc to Scheme. When a loop is subject to attribute
4232 'Loop_Entry, retrieve the nested loop from the conditional
4233 block. Move the processing of controlled object at the end of
4235 * sem_attr.adb (Analyze_Attribute): Do not chain attribute
4236 'Loop_Entry to its related loop.
4237 * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
4238 Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
4239 the entire loop is rewritten into a block. Retrieve the nested
4240 loop in such cases to complete the analysis.
4241 * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
4243 (Subject_To_Loop_Entry_Attributes): New routine.
4245 2013-04-24 Robert Dewar <dewar@adacore.com>
4247 * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
4248 (Loop_Variant, xxx) rather than Assert (xxx).
4249 * gnat_rm.texi: Document pragma Loop_Variant.
4250 * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
4253 2013-04-24 Yannick Moy <moy@adacore.com>
4255 * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
4256 errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
4257 exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
4258 expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
4259 lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
4260 restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
4261 sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
4262 sem_res.adb, sem_util.adb: Everything with name
4263 'Alfa' renamed in 'SPARK'. Update comments.
4264 Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
4265 * exp_alfa.adb: renamed exp_spark.adb.
4266 * exp_alfa.ads: renamed exp_spark.ads.
4267 * get_alfa.adb: renamed get_spark_xrefs.adb.
4268 * get_alfa.ads: renamed get_spark_xrefs.ads.
4269 * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
4270 * put_alfa.adb: renamed put_spark_xrefs.adb.
4271 * put_alfa.ads: renamed put_spark_xrefs.ads.
4272 * alfa.adb: renamed spark_xrefs.adb.
4273 * alfa.ads: renamed spark_xrefs.ads.
4274 * alfa_test.adb: renamed spark_xrefs_test.adb.
4275 * gcc-interface/Make-lang.in: Update dependencies.
4277 2013-04-24 Robert Dewar <dewar@adacore.com>
4279 * gnat_rm.texi: Document pragma Assume.
4280 * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
4281 part of Assert, and no longer requires -gnatd.F
4283 2013-04-24 Robert Dewar <dewar@adacore.com>
4285 * gnat_rm.texi: Document pragma Assert_And_Cut.
4286 * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
4289 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4291 * sem_aux.adb: Add guard in Available_View.
4293 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4295 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
4296 Find_Related_Subprogram to find the associated subprogram.
4297 (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
4298 to find the associated subprogram.
4299 (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
4302 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4304 * exp_ch6.adb: Remove with and use clause for Sem_Prag.
4305 (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
4306 the contract of a subprogram.
4307 * sem_ch3.adb: Remove with and use clause for Sem_Prag.
4308 (Analyze_Declarations): Call Analyze_Subprogram_Contract to
4309 analyze the contract of a subprogram.
4310 * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
4311 (Check_Subprogram_Contract): Removed.
4312 * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
4313 (Check_Subprogram_Contract): Removed.
4314 (Expand_Contract_Cases): Add a guard against malformed contract cases.
4315 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
4316 Decorate_Delayed_Aspect_And_Pragma to decorate aspects
4317 Contract_Cases, Depends and Global. Reimplement the analysis of
4318 aspect Contract_Cases.
4319 (Decorate_Delayed_Aspect_And_Pragma): New routine.
4320 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
4321 (Analyze_CTC_In_Decl_Part): Removed.
4322 (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
4323 (Analyze_Test_Case_In_Decl_Part): New routine.
4324 (Find_Related_Subprogram): New routine.
4325 (Requires_Profile_Installation): Add new formal Prag. Update
4326 the logic to take into account the origin of the pragma.
4327 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
4328 (Analyze_CTC_In_Decl_Part): Removed.
4329 (Analyze_Test_Case_In_Decl_Part): New routine.
4331 2013-04-24 Robert Dewar <dewar@adacore.com>
4333 * sem_prag.adb (Process_Convention): Move Stdcall tests to
4334 Set_Convention_From_Pragma so that they are applied to each
4335 entry of a homonym set.
4336 (Process_Convention): Don't try to set convention if already set.
4338 2013-04-24 Robert Dewar <dewar@adacore.com>
4340 * gnatbind.adb: Minor reformatting.
4342 2013-04-24 Vincent Celier <celier@adacore.com>
4344 * clean.adb (Gnatclean): Add the default project search
4345 directories in the project search path after scanning the
4346 switches on the command line.
4347 (Initialize): Do not put the default project search directories in the
4348 project search path.
4349 * gnatcmd.adb (GNATcmd): Add the default project search
4350 directories in the project search path after scanning the switches
4351 on the command line.
4352 * make.adb (Initialize): Add the default project search
4353 directories in the project search path after scanning the switches
4354 on the command line.
4356 2013-04-24 Yannick Moy <moy@adacore.com>
4358 * restrict.ads (Restriction_Warnings): Initialize with all False value.
4360 2013-04-24 Robert Dewar <dewar@adacore.com>
4362 * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
4363 * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
4365 * snames.ads-tmpl (Name_Predicate_Check): New check name.
4366 * types.ads (Predicate_Check): New definition.
4367 * gnat_rm.texi: Add documentation for Predicate_Check.
4369 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4371 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
4372 is a renaming of predefined equality for an untagged record,
4373 add generated body to the freeze actions for the subprogram, to
4374 prevent freezing issues when the record has incomplete components.
4375 * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
4376 without completion, return a predefined comparison instead of
4377 just False. This may happen when building the expression for
4378 record equality, when some component has a type whose completion
4379 has not been seen yet. The operation will be analyzed an expanded
4380 after the type has been frozen, at which point all component
4381 types will have been completed, or an error reported.
4383 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4385 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
4386 analysis of a Convention aspect.
4388 2013-04-24 Eric Botcazou <ebotcazou@adacore.com>
4390 * fe.h (Machine_Overflows_On_Target): New macro and declaration.
4391 (Signed_Zeros_On_Target): Likewise.
4393 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4395 * exp_ch6.adb: Add with and use clause for Sem_Prag.
4396 (Freeze_Subprogram): Analyze all delayed aspects for a null
4397 procedure so that they are available when analyzing the
4398 internally-generated _Postconditions routine.
4399 * exp_ch13.adb: Remove with and use clause for Sem_Prag.
4400 (Expand_N_Freeze_Entity): Move the code that analyzes delayed
4401 aspects of null procedures to exp_ch6.Freeze_Subprogram.
4402 * sem_prag.adb (Analyze_Abstract_State): Update the check on
4403 volatile requirements.
4405 2013-04-24 Bob Duff <duff@adacore.com>
4407 * ali-util.ads (Source_Record): New component Stamp_File
4408 to record from whence the Stamp came.
4409 * ali-util.adb (Set_Source_Table): Set Stamp_File component.
4410 * bcheck.adb (Check_Consistency): Print additional information in
4412 * gnatbind.adb (Gnatbind): Print additional information in
4415 2013-04-24 Robert Dewar <dewar@adacore.com>
4417 * exp_ch13.adb, sem_prag.adb: Update comments.
4418 * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
4421 2013-04-24 Doug Rupp <rupp@adacore.com>
4423 * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
4425 2013-04-24 Yannick Moy <moy@adacore.com>
4427 * sinfo.ads: Minor correction of typo.
4429 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4431 * sem_ch3.adb: Create packed array only when expander is
4434 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
4436 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
4437 when the context warrants it.
4438 (Analyze_Global_In_Decl_List): Install the formals only when
4439 the context warrants it.
4440 (Requires_Profile_Installation): New routine.
4442 2013-04-24 Ed Schonberg <schonberg@adacore.com>
4444 * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
4445 type is a discriminated private type that does not require use
4446 of the secondary stack, a constrained subtype of the underlying
4447 type is created to convey the proper object size to the backend.
4448 If the return type is originally a private type, the return
4449 expression is wrapped in an unchecked_conversion. If the return
4450 expression is used subsequently in a call to the postcondition
4451 function, this conversion must be undone to prevent a spurious
4452 error on the analysis of that call.
4454 2013-04-23 Kai Tietz <ktietz@redhat.com>
4457 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
4459 2013-04-23 Eric Botcazou <ebotcazou@adacore.com>
4460 Pascal Obry <obry@adacore.com>
4462 * gcc-interface/Makefile.in (targ): Fix target name check.
4463 (../../gnatmake$(exeext)): Add '+' for LTO.
4464 (../../gnatlink$(exeext)): Likewise.
4466 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4468 * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
4469 pre- and post-conditions.
4470 (Expand_N_Task_Type_Declaration):
4471 Use the correct attribute to check for pre- and post-conditions.
4472 * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
4473 pre- and post-conditions. Analyze delayed classification items.
4474 * freeze.adb (Freeze_Entity): Use the correct attribute to
4475 check for pre- and post- conditions.
4476 * sem_ch3.adb (Analyze_Declarations): Correct the traversal
4477 of pre- and post-conditions as well as contract- and
4478 test-cases. Analyze delayed pragmas Depends and Global.
4479 * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
4480 attribute to check for pre- and post-conditions, as well as
4481 contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects):
4482 Correct the traversal of pre- and post- conditions.
4483 (Process_Contract_Cases): Update the comment on usage. Correct
4484 the traversal of contract-cases.
4485 (Process_Post_Conditions): Update the comment on usage. Correct the
4486 traversal of pre- and post-conditions.
4487 (Process_PPCs): Correct the traversal of pre- and post-conditions.
4488 (Spec_Postconditions): Use the correct
4489 attribute to check for pre- and post- conditions, as well as
4490 contract-cases and test-cases.
4491 * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
4492 actions related to aspects Depends and Global. Code refactoring
4493 for pre- and post-conditions.
4494 (Insert_Delayed_Pragma): New routine.
4495 * sem_prag.adb (Add_Item): New routine.
4496 (Analyze_Depends_In_Decl_Part): New routine.
4497 (Analyze_Global_In_Decl_Part): New routine.
4498 (Analyze_Pragma): Reimplement the actions related to aspects Depends and
4499 Global. Verify that a body acts as a spec for pragma Contract_Cases.
4500 (Chain_PPC): Use Add_Contract_Item to chain a pragma.
4501 (Chain_CTC): Correct the traversal of contract-
4502 and test-cases. Use Add_Contract_Item to chain a pragma.
4503 (Chain_Contract_Cases): Correct the traversal of contract-
4504 and test-cases. Use Add_Contract_Item to chain a pragma.
4505 (Check_Precondition_Postcondition): Update the comment on usage.
4506 (Check_Test_Case): Update the comment on usage.
4507 * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
4508 (Analyze_Global_In_Decl_Part): New routine.
4509 * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
4510 * sinfo.adb (Classifications): New routine.
4511 (Contract_Test_Cases): New routine.
4512 (Pre_Post_Conditions): New routine.
4513 (Set_Classifications): New routine.
4514 (Set_Contract_Test_Cases): New routine.
4515 (Set_Pre_Post_Conditions): New routine.
4516 (Set_Spec_CTC_List): Removed.
4517 (Set_Spec_PPC_List): Removed.
4518 (Spec_CTC_List): Removed.
4519 (Spec_PPC_List): Removed.
4520 * sinfo.ads: Update the structure of N_Contruct along with all
4522 (Classifications): New routine and pragma Inline.
4523 (Contract_Test_Cases): New routine and pragma Inline.
4524 (Pre_Post_Conditions): New routine and pragma Inline.
4525 (Set_Classifications): New routine and pragma Inline.
4526 (Set_Contract_Test_Cases): New routine and pragma Inline.
4527 (Set_Pre_Post_Conditions): New routine and pragma Inline.
4528 (Set_Spec_CTC_List): Removed.
4529 (Set_Spec_PPC_List): Removed.
4530 (Spec_CTC_List): Removed.
4531 (Spec_PPC_List): Removed.
4533 2013-04-23 Doug Rupp <rupp@adacore.com>
4535 * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
4536 to account for LIB$STOP not having the chance to add the PC and
4539 2013-04-23 Robert Dewar <dewar@adacore.com>
4541 * sem_ch13.adb: Minor code reorganization (remove some redundant
4543 * sem_ch3.adb, sem_prag.adb: Minor reformatting.
4545 2013-04-23 Yannick Moy <moy@adacore.com>
4547 * einfo.ads: Minor typo fix.
4548 * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
4549 Static_Predicate is applied to a non-scalar or non-static type.
4550 * sem_prag.adb: Minor typo fix.
4552 2013-04-23 Doug Rupp <rupp@adacore.com>
4554 * init.c (GNAT$STOP) [VMS]: New function.
4556 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4558 * sem_ch3.adb: Add exp_pakd to context.
4559 (Constrain_Component_Type): If the component of the parent is
4560 packed, and the record subtype being built is already frozen,
4561 as is the case for an itype, the component type itself will not
4562 be frozen, and the packed array type for it must be constructed
4565 2013-04-23 Thomas Quinot <quinot@adacore.com>
4567 * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
4569 2013-04-23 Yannick Moy <moy@adacore.com>
4571 * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
4573 * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
4574 * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
4575 * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
4576 * stylesw.adb (Save_Style_Check_Options): Protect testing the
4577 value of Style_Check_Comments_Spacing by a previous test that
4578 Style_Check_Comments is True.
4580 2013-04-23 Thomas Quinot <quinot@adacore.com>
4582 * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
4583 Original_Name, and move declaration to package body as this
4584 subprogram is not used from outside. Also clarify documentation.
4586 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4588 * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
4589 initialize_scalars, disable predicate checks on the generated
4590 assignment to an out scalar parameter.
4592 2013-04-23 Gary Dismukes <dismukes@adacore.com>
4594 * sem_ch4.adb (Analyze_Allocator): Remove error
4595 check for "constrained in partial view" constraints entirely.
4597 2013-04-23 Robert Dewar <dewar@adacore.com>
4599 * einfo.ads, sem_prag.ads: Minor reformatting.
4600 * errout.ads: Comment update.
4602 2013-04-23 Yannick Moy <moy@adacore.com>
4604 * exp_ch5.adb: Minor typo.
4606 2013-04-23 Thomas Quinot <quinot@adacore.com>
4608 * gnat_ugn.texi: Fix typo.
4610 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4612 * einfo.ads: Minor documentation clarification.
4614 2013-04-23 Bob Duff <duff@adacore.com>
4616 * types.ads: Fix incorrect comment.
4618 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4620 * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
4621 Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
4622 description of purpose.
4623 * checks.adb (Apply_Discriminant_Check): Use above renaming.
4624 * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
4625 of the base type, rather than using the Object_Type predicate.
4626 * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
4627 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
4628 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
4629 * exp_ch4.adb (Expand_N_Allocator): Ditto.
4631 2013-04-23 Robert Dewar <dewar@adacore.com>
4633 * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
4635 * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
4636 (Effective_Name): New function (Analyze_Pragma, case Check):
4637 Disallow [Statement_]Assertions (Check_Kind): Implement
4638 Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
4639 (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
4640 * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
4641 (Effective_Name): New function.
4642 * sem_res.adb: Minor reformatting.
4643 * snames.ads-tmpl (Name_Statement_Assertions): New entry.
4644 * gnat_rm.texi: Add documentation of new assertion kind
4645 Statement_Assertions.
4647 2013-04-23 Robert Dewar <dewar@adacore.com>
4649 * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
4650 reformatting and code clean up.
4652 2013-04-23 Vincent Celier <celier@adacore.com>
4654 * prj-part.ads, prj-conf.ads: Minor comment updates.
4656 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4658 * einfo.adb (Predicate_Function): For a private type, retrieve
4659 predicate function from full view.
4660 * aspects.adb (Find_Aspect): Ditto.
4661 * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
4662 the actual is a definite type, apply predicate check after call.
4663 * sem_res.adb: Do not apply a predicate check before the call to
4664 a generated Init_Proc.
4666 2013-04-23 Robert Dewar <dewar@adacore.com>
4668 * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
4669 rewrite to make sure Is_Ignore is properly captured when aspect
4671 * sem_ch6.adb: Minor reformatting.
4672 * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
4673 pragma for the case of a pragma coming from an aspect (already
4674 tested when we analyzed the aspect).
4676 2013-04-23 Vincent Celier <celier@adacore.com>
4678 * prj-conf.adb (Parse_Project_And_Apply_Config): New
4679 Boolean parameter Implicit_Project, defaulted to False. Call
4680 Prj.Part.Parse with Implicit_Project.
4681 * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
4682 parameter Implicit_Project, defaulted to False.
4683 * prj-part.adb (Parse_Single_Project): New Boolean parameter
4684 Implicit_Project, defaulted to False. When Implicit_Project is
4685 True, change the Directory of the project node to the Current_Dir.
4686 * prj-part.ads (Parse): New Boolean parameter, defaulted to False
4688 2013-04-23 Robert Dewar <dewar@adacore.com>
4690 * exp_util.adb: Minor reformatting.
4692 2013-04-23 Robert Dewar <dewar@adacore.com>
4694 * xoscons.adb: Minor reformatting.
4696 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4698 * sem_prag.adb (Check_Mode): Ensure that a
4699 self-referential output appears in both input and output lists of
4700 the subprogram as categorized by aspect Global.
4701 (Check_Usage): Rename formal parameters to better illustrate their
4702 function. Update all uses of the said formals.
4704 2013-04-23 Thomas Quinot <quinot@adacore.com>
4706 * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
4707 parameter Append_NUL to make NUL-termination optional.
4708 * exp_dist.adb: Consistently use the above throughout instead of
4709 Get_Library_Unit_Name_String.
4711 2013-04-23 Robert Dewar <dewar@adacore.com>
4713 * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
4716 2013-04-23 Pascal Obry <obry@adacore.com>
4718 * xoscons.adb: Remove unused use clause, minor code clean-up.
4720 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4722 * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
4723 (can apply to any scope entity).
4724 * sem_res.adb (Resolve_Call): If the call is within another
4725 expression function it does not constitute a freeze point.
4727 2013-04-23 Yannick Moy <moy@adacore.com>
4729 * exp_ch6.adb (Expand_Actuals): Test that Subp
4730 is overloadable before testing if it's an inherited operation.
4732 2013-04-23 Robert Dewar <dewar@adacore.com>
4734 * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
4737 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4739 * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
4740 * exp_util.adb (Expand_Subtype_From_Expr): If the expression
4741 is a source entity and the declaration is for an aliased
4742 unconstrained array, create a new subtype so that the flag
4743 Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
4745 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4747 * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
4748 from the spec to the body.
4749 (Find_Aspect): Update the call to Get_Aspect_Id.
4750 (Get_Aspect_Id): New version that takes an aspect specification.
4751 * aspects.ads: Reorganize all aspect related tables.
4752 (Get_Aspect_Id): New version that takes an aspect specification.
4753 * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
4754 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
4755 the call to Get_Aspect_Id.
4756 * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
4757 call to Get_Aspect_Id. (Analyze_Aspect_Specifications): Update
4758 the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
4760 2013-04-23 Robert Dewar <dewar@adacore.com>
4762 * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
4763 of getting proper name in the case where pragma comes from
4765 * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
4767 2013-04-23 Yannick Moy <moy@adacore.com>
4769 * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
4772 2013-04-23 Thomas Quinot <quinot@adacore.com>
4774 * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
4776 2013-04-23 Doug Rupp <rupp@adacore.com>
4778 * init.c: Move facility macros outside IN_RTS.
4780 2013-04-23 Thomas Quinot <quinot@adacore.com>
4782 * freeze.adb (Freeze_Entity): For the case of a bit-packed
4783 array time that is known at compile time to have more that
4784 Integer'Last+1 elements, issue an error, since such arrays are
4787 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4789 * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
4790 Analyze_Input_Output.
4791 (Analyze_Input_List): Update all calls to Analyze_Input_Output.
4792 (Analyze_Input_Output): Add formal parameter Self_Ref along with
4793 comment on its usage. Update all calls to Analyze_Input_Output.
4794 (Analyze_Pragma): Add new local variable Self_Ref to capture
4795 the presence of a self-referential dependency clause. Update
4796 all calls to Analyze_Input_Output.
4797 (Check_Mode): Add formal parameter Self_Ref along with comment on its
4798 usage. Verify the legality of a self-referential output.
4800 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4802 * exp_ch6.adb: Add predicate checks on by-copy parameter.
4804 2013-04-23 Vincent Celier <celier@adacore.com>
4806 * a-envvar.adb, a-envvar.ads (Value): New.
4808 2013-04-22 Yannick Moy <moy@adacore.com>
4810 * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
4811 null statement if ignored.
4812 * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
4813 * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
4815 2013-04-22 Hristian Kirtchev <kirtchev@adacore.com>
4817 * sem_prag.adb (Analyze_Contract_Case): New routine.
4818 (Analyze_Pragma): Aspect/pragma Contract_Cases can
4819 now be associated with a library level subprogram.
4820 Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
4821 in a subprogram body.
4822 (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
4823 Subp_Id. Remove local constant Subp. The entity of the subprogram
4824 is now obtained via the formal paramter.
4826 2013-04-22 Ed Schonberg <schonberg@adacore.com>
4828 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
4829 Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
4830 if the expression is a source entity.
4832 2013-04-22 Yannick Moy <moy@adacore.com>
4834 * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
4836 * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
4838 2013-04-22 Thomas Quinot <quinot@adacore.com>
4840 * sem_prag.adb (Fix_Error): For a pragma rewritten from another
4841 pragma, fix up error message to include original pragma name.
4842 * par_sco.adb: Minor reformatting.
4844 2013-04-22 Robert Dewar <dewar@adacore.com>
4846 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
4847 sem_ch6.adb, opt.ads: Minor reformatting.
4849 2013-04-22 Pascal Obry <obry@adacore.com>
4851 * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
4852 Library_Standalone and Library_Kind.
4854 2013-04-22 Ed Schonberg <schonberg@adacore.com>
4856 * exp_ch6.adb (Expand_Actuals): If the call is to an
4857 inherited operation and the actual is a by-reference type with
4858 predicates, add predicate call to post-call actions.
4859 * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
4860 error: a type declaration has a defining identifier, not an Etype.
4861 * sem_res.adb: Restore code removed because of above error.
4863 2013-04-22 Doug Rupp <rupp@adacore.com>
4865 * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
4867 2013-04-22 Yannick Moy <moy@adacore.com>
4869 * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
4870 opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
4872 2013-04-22 Vincent Celier <celier@adacore.com>
4874 * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
4875 No_Path_Information only when Directories_Must_Exist_In_Projects
4877 (Get_Directories): Set Object_Directory
4878 or Exec_Directory to No_Path_Information only when
4879 Directories_Must_Exist_In_Projects is False.
4881 2013-04-22 Yannick Moy <moy@adacore.com>
4883 * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
4884 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
4885 Pragma_Contract_Case and Name_Contract_Case.
4887 2013-04-22 Yannick Moy <moy@adacore.com>
4889 * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
4891 * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
4892 description of Contract_Cases.
4894 2013-04-12 Robert Dewar <dewar@adacore.com>
4896 * makeutl.adb, prj-nmsc.adb: Minor reformatting.
4898 2013-04-12 Robert Dewar <dewar@adacore.com>
4900 * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
4902 * gnat_rm.texi (Check_Policy): Update documentation for new
4903 Check_Policy syntax.
4904 * sem_prag.adb (Check_Kind): Replaces Check_Enabled
4905 (Analyze_Pragma, case Check_Policy): Rework to accomodate new
4906 syntax (like Assertion_Policy).
4907 * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
4909 2013-04-12 Doug Rupp <rupp@adacore.com>
4911 * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
4912 (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
4913 handler if installed.
4914 * ctrl_c.c (__gnat_install_int_handler)
4915 [VMS]: Install a dummy sigaction handler to trigger the real
4916 user handler dispatch in init.c/__gnat_handle_vms_condition.
4917 (__gnat_uninstall_int_handler) [VMS]: Likewise.
4919 2013-04-12 Vincent Celier <celier@adacore.com>
4921 * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
4922 to False if switch is specified.
4923 * makeutl.adb (Initialize_Source_Record): Do not look for the
4924 object file if there is no object directory.
4925 * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
4926 variable, defaulted to True.
4927 * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
4928 directory does not exist when Directories_Must_Exist_In_Projects is
4930 (Get_Directories): Do not fail when the object or the exec directory
4931 do not exist when Directories_Must_Exist_In_Projects is False.
4933 2013-04-12 Robert Dewar <dewar@adacore.com>
4935 * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
4936 * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
4937 sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
4938 par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
4939 sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
4940 exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
4941 prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
4942 sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
4943 sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
4945 2013-04-12 Doug Rupp <rupp@adacore.com>
4947 * init.c: Don't clobber condition code on VMS.
4949 2013-04-12 Robert Dewar <dewar@adacore.com>
4951 * exp_aggr.adb: Minor reformatting.
4952 * namet.ads, namet.adb (Nam_In): New functions.
4954 2013-04-12 Robert Dewar <dewar@adacore.com>
4956 * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
4957 (Has_Static_Predicate_Aspect): New flag.
4958 * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
4959 (Has_Static_Predicate_Aspect): New flag.
4960 * exp_ch9.adb: Minor reformatting.
4961 * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
4963 * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
4964 since this switch is gone and control of Debug is done with
4966 * gnat_rm.texi: Update documentation for Assertion_Policy and
4967 Check_Policy pragmas.
4968 * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
4969 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
4970 controlled by Assertion_Enabled.
4971 * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
4972 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
4973 controlled by Assertion_Enabled.
4974 * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
4976 * sem_attr.adb: Minor reformatting.
4977 * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
4978 if DISABLE policy applies.
4979 * sem_ch6.adb (Grab_PPC): Check original name of aspect for
4980 aspect from pragma (Process_PPCs): Properly check assertion policy.
4981 * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
4982 (Check_Appicable_Policy): New procedure.
4983 (Is_Valid_Assertion_Kind): New function.
4984 (Rewrite_Assertion_Kind): New procedure.
4985 (Analyze_Pragma): Handle case of disabled assertion pragma.
4986 (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
4987 (Analyze_Pragma, case Check): Deal with 'Class possibilities.
4988 (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
4989 (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
4990 (Analyze_Pragma, case Debug): New control with Assertion_Policy.
4991 (Analyze_Pragma, case Debug_Policy): Now consistent with
4993 (Analyze_Pragma, case Loop_Invariant): New handling of ignored
4995 (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
4996 (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
4997 (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
4998 * sem_prag.ads (Check_Enabled): Rewritten for new
4999 Assertion_Policy stuff.
5000 (Check_Appicable_Policy): New procedure.
5001 * sinfo.adb (Is_Disabled): New flag.
5002 (Is_Ignored): New flag.
5003 * sinfo.ads (Is_Disabled): New flag.
5004 (Is_Ignored): New flag.
5005 (N_Pragma_Argument_Association): New 'Class forms.
5006 * snames.ads-tmpl: New names Name_uPre, Name_uPost,
5007 Name_uType_Invariant, Name_uInvariant.
5008 * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
5009 * tree_io.ads (ASIS_Version_Number): Updated (remove
5010 read write of obsolete flags Debug_Pragmas_Disabled and
5011 Debug_Pragmas_Enabled.
5013 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5015 * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
5016 of Build_Record_Aggr_Code, used to retrieve explicit values
5017 for inherited discriminants in an extension aggregate, when the
5018 ancestor type is unconstrained.
5020 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5022 * sem_attr.adb (Check_Stream_Attribute): If restriction
5023 No_Default_Stream_Attributes is active, it is illegal to use a
5024 predefined elementary type stream attribute either by itself,
5025 or more importantly as part of the attribute subprogram for a
5026 composite type. However, if the broader restriction No_Streams
5027 is active, then stream operations are not generated, and there
5030 2013-04-12 Robert Dewar <dewar@adacore.com>
5032 * gnatbind.adb: Minor reformatting.
5034 2013-04-12 Bob Duff <duff@adacore.com>
5036 * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
5037 call only in the static elaboration model.
5039 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5041 * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
5042 clause where both input and output lists are null.
5043 (Analyze_Pragma): Update the grammar of pragma Depends.
5045 2013-04-12 Vincent Celier <celier@adacore.com>
5047 * gnatbind.adb (No_Restriction_List): Exclude restrictions that
5048 take a parameter value, not a count.
5049 * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
5050 * projects.texi: Complete documentation of attribute Roots.
5052 2013-04-12 Thomas Quinot <quinot@adacore.com>
5054 * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
5055 sem_ch3.adb: Minor reformatting.
5056 * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
5057 improvement: note that the computation is pessimistic for bit
5059 * gnat_rm.texi (Range_Length): Fix minor error in description
5062 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5064 * aspects.adb (Find_Aspect): New routine.
5065 (Find_Value_Of_Aspect): New routine.
5066 (Has_Aspect): Reimplemented.
5067 * aspects.ads (Find_Aspect): New routine.
5068 (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
5069 * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
5070 * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
5071 * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
5072 * sem_ch5.adb (Analyze_Iterator_Specification): Update
5073 the call to Find_Aspect. Use function Has_Aspect for better
5075 (Preanalyze_Range): Use function Has_Aspect for better readability.
5076 * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
5077 * sem_prag.adb (Analyze_Pragma): There is no longer need to
5078 look at the parent to extract the corresponding pragma for
5081 2013-04-12 Robert Dewar <dewar@adacore.com>
5083 * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
5084 restrict.ads: Minor reformatting.
5086 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5088 * lib-xref.adb: Retrieve original name of classwide type if any.
5090 2013-04-12 Thomas Quinot <quinot@adacore.com>
5092 * exp_ch11.ads: Minor reformatting.
5094 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5096 * aspects.adb: Alphabetize subprogram bodies in this unit. Add
5097 an entry for Aspect_Ghost in the table of canonical aspects.
5098 (Has_Aspect): New routine.
5099 * aspects.ads: Add Aspect_Ghost to all relevant
5100 tables. Alphabetize subprograms in this unit.
5101 (Has_Aspect): New routine.
5102 * einfo.adb: Add with and use clauses for Aspects.
5103 (Is_Ghost_Function): New routine.
5104 * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
5105 update the structure of the related nodes.
5106 (Is_Ghost_Function): New routine.
5107 * exp_ch4.adb (Find_Enclosing_Context): Use routine
5108 Is_Body_Or_Package_Declaration to terminate a search.
5109 (Is_Body_Or_Unit): Removed.
5110 * exp_util.adb (Within_Case_Or_If_Expression): Use routine
5111 Is_Body_Or_Package_Declaration to terminate a search.
5112 * par-prag.adb: Add pragma Ghost to the list of pragmas that do
5113 not need special processing by the parser.
5114 * sem_attr.adb (Analyze_Access_Attribute): Detect an
5115 illegal use of 'Access where the prefix is a ghost function.
5116 (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
5117 to terminate a search. (Check_References_In_Prefix): Use routine
5118 Is_Body_Or_Package_Declaration to terminate a search.
5119 * sem_ch4.adb (Analyze_Call): Mark a function when it appears
5120 inside an assertion expression. Verify the legality of a call
5121 to a ghost function.
5122 (Check_Ghost_Function_Call): New routine.
5123 * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
5124 the setting of attribute In_Assertion_Expression to Analyze_Call.
5125 (Check_Overriding_Indicator): Detect an illegal attempt to
5126 override a function with a ghost function.
5127 * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
5128 a ghost function as a generic actual.
5129 * sem_elab.adb (Check_Internal_Call_Continue): Update the call
5131 * sem_prag.adb: Add an entry for pragma Ghost in the table
5132 of significant arguments.
5133 (Analyze_Pragma): Do not analyze
5134 an "others" case guard. Add processing for pragma Ghost. Use
5135 Preanalyze_Assert_Expression when analyzing the expression of
5136 pragmas Loop_Invariant and Loop_Variant.
5137 * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
5138 (Is_Body_Or_Package_Declaration): New routine.
5139 * sem_util.ads: Alphabetize subprotrams in this unit.
5140 (Is_Body_Or_Package_Declaration): New routine.
5141 * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
5142 (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
5143 * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
5144 to better reflect its use. Update all places that mention the flag.
5145 (In_Assertion): Rename to In_Assertion_Expression. Update
5146 related pragma Inline. (Set_In_Assertion): Rename to
5147 Set_In_Assertion_Expression. Update related pragma Inline.
5148 * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
5151 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5153 * sem_prag.adb (Set_Imported): Do not generate error for multiple
5154 Import in CodePeer mode.
5155 * s-rident.ads: Fix minor typo.
5157 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5159 * checks.adb (Insert_Valid_Check): Do not insert validity check
5160 in the body of the generated predicate function, to prevent
5163 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5165 * s-rident.ads: Add various missing Ada 2012 restrictions:
5166 No_Access_Parameter_Allocators, No_Coextensions,
5167 No_Use_Of_Attribute, No_Use_Of_Pragma.
5168 * snames.ads-tmpl: Add corresponding names.
5169 * restrict.ads restrict.adb: Subprograms and data structures to
5170 handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
5171 * sem_ch4.adb: Correct name of restrictions is
5172 No_Standard_Allocators_After_Elaboration.
5173 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
5174 violation of restriction No_Use_Of_Attribute.
5175 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5176 Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
5177 (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
5178 * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
5179 and No_Coextensions.
5180 * bcheck.adb: Correct name of restrictions is
5181 No_Standard_Allocators_After_Elaboration.
5182 * gnatbind.adb: Correct name of restrictions is
5183 No_Standard_Allocators_After_Elaboration.
5185 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5187 * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
5188 Correct error message format.
5190 2013-04-12 Robert Dewar <dewar@adacore.com>
5192 * sem_attr.adb: Minor reformatting.
5194 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5196 * sem_elab.adb (Within_Elaborate_All): Do not examine a context
5197 item that has not been analyzed, because the unit may have errors,
5198 or the context item may come from a proper unit inserted at the
5199 point of a stub and not analyzed yet.
5201 2013-04-12 Thomas Quinot <quinot@adacore.com>
5203 * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
5204 List_Record_Info): Also include scalar storage order information in
5207 2013-04-12 Yannick Moy <moy@adacore.com>
5209 * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
5210 Contract_Cases instead of Contract_Case pragma.
5212 2013-04-12 Robert Dewar <dewar@adacore.com>
5214 * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
5216 2013-04-12 Yannick Moy <moy@adacore.com>
5218 * sem_attr.adb (Analyze_Attribute): Update analyse of
5219 Attribute_Old and Attribute_Result so they are allowed in the
5220 right-hand-side of an association in a Contract_Cases pragma.
5221 * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
5222 the expressions in a Contract_Cases pragma.
5224 2013-04-12 Robert Dewar <dewar@adacore.com>
5226 * sem.ads, opt.ads: Minor comment edits.
5227 * sem_warn.adb, sem_ch6.adb: Minor reformatting.
5229 2013-04-12 Claire Dross <dross@adacore.com>
5231 * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
5232 Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
5233 not suitable for formal analysis.
5235 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5237 * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
5238 to locate package entity, which may be a child unit.
5240 2013-04-12 Thomas Quinot <quinot@adacore.com>
5242 * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
5243 the specified timeout is 0, do not attempt to determine whether the
5244 connection succeeded.
5246 2013-04-12 Doug Rupp <rupp@adacore.com>
5248 * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
5250 2013-04-12 Doug Rupp <rupp@adacore.com>
5252 * s-fileio.adb: Minor reformatting.
5254 2013-04-12 Ed Schonberg <schonberg@adacore.com>
5256 * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
5257 the last statement in the analyzed loop is an unconditional
5260 2013-04-12 Robert Dewar <dewar@adacore.com>
5262 * opt.ads (Style_Check_Main): New switch.
5263 * sem.adb (Semantics): Set Style_Check flag properly for new
5264 unit to be analyzed.
5265 * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
5266 the proper setting of this flag is now part of the Semantics
5268 * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
5269 for -gnatg and -gnaty
5271 2013-04-12 Doug Rupp <rupp@adacore.com>
5273 * s-crtl.ads (fopen, freopen): Add vms_form parameter
5274 * i-cstrea.ads (fopen, freopen): Likewise.
5275 * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
5276 * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
5277 [VMS]: Split out RMS keys and call CRTL function appropriately.
5278 * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
5280 (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
5282 * gnat_rm.texi: Document implemented RMS keys.
5284 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5286 * sem_ch13.adb (Analyze_Aspect_Specifications):
5287 Insert the corresponding pragma for aspect Abstract_State at
5288 the top of the visible declarations of the related package.
5289 Previously this was only done when the package is a compilation
5292 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5294 * gnat_ugn.texi: Further menu clean ups.
5295 * sem_prag.adb, opt.ads: Minor reformatting.
5296 * sem_util.ads: Minor comment fix.
5298 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
5300 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
5301 Depends is now a delayed aspect. The delay is required
5302 due to the interplay between aspects Depends and Global.
5303 (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
5304 * sem_prag.adb: Reformat various error messages.
5305 (Add_Item): New subsidiary routine.
5306 (Analyze_Pragma): Add new variables
5307 Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
5308 analysis of pragma Depends now has the capability to check
5309 the proper mode and usage of subprogram inputs and outputs.
5310 (Appears_In): New routine.
5311 (Check_Function_Return): New routine.
5312 (Check_Mode): New routine.
5313 (Check_Usage): New routine.
5314 (Collect_Subprogram_Inputs_Outputs): New routine.
5316 2013-04-12 Bob Duff <duff@adacore.com>
5318 * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
5321 2013-04-12 Robert Dewar <dewar@adacore.com>
5323 * switch-c.adb: Minor fix to wording of error message for
5326 2013-04-12 Robert Dewar <dewar@adacore.com>
5328 * impunit.adb: Add s-multip and s-mudido to list of impl defined
5330 * gnat_rm.texi: Add documentation for
5331 System.Multiprocessors[.Dispatching_Domains].
5333 2013-04-12 Ben Brosgol <brosgol@adacore.com>
5335 * gnat_ugn.texi: Completion of menu cleanups.
5337 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5339 * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
5340 in Relaxed_RM_Semantics.
5342 2013-04-12 Arnaud Charlet <charlet@adacore.com>
5344 * set_targ.adb (elab code): Add support for non gcc back-ends
5345 where save_argv is null.
5347 2013-04-12 Robert Dewar <dewar@adacore.com>
5349 * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
5350 * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
5351 type (Target_Dependent_Info_Write): Add _Name, now an access type.
5352 * set_targ.adb (Write_Target_Dependent_Values): Use name
5353 from -gnatet switch stored in Target_Dependent_Info_Write_Name
5354 (Read_Target_Dependent_Values): Use name from -gnateT switch
5355 stored in Target_Dependent_Info_Read_Name.
5356 * switch-c.adb: New form of -gnatet and -gnateT switches.
5357 * usage.adb: New form of -gnatet and -gnateT switches with
5360 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5362 * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
5363 arithmetics when looking for a read-only variable in the expression.
5365 2013-04-11 Javier Miranda <miranda@adacore.com>
5367 * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
5368 interface thunks since it is performed at the caller side.
5369 (Expand_Simple_Function_Return): No accessibility check needed in thunks
5370 since the check is done by the target routine.
5372 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5374 * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
5375 expression with type Any_Priority.
5376 * exp_ch9.adb (Initialize_Protection): Check that the value
5377 of the priority expression is within the bounds of the proper
5380 2013-04-11 Robert Dewar <dewar@adacore.com>
5382 * sem_prag.adb, prj-env.adb: Minor reformatting.
5384 2013-04-11 Ben Brosgol <brosgol@adacore.com>
5386 * gnat_ugn.texi: Clean ups.
5388 2013-04-11 Yannick Moy <moy@adacore.com>
5390 * set_targ.adb: Minor comment update.
5392 2013-04-11 Pascal Obry <obry@adacore.com>
5394 * gnat_ugn.texi: Remove obsolete comment about DLL calling
5397 2013-04-11 Javier Miranda <miranda@adacore.com>
5399 * exp_ch6.adb (Expand_Call): For the call to the target primitive
5400 of an interface thunks do not compute the extra actuals; just
5401 propagate the extra actuals received by the thunk.
5402 * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
5404 * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
5405 formals in interface thunks whose target primitive has no extra
5408 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5410 * sem_prag.adb (Analyze_Pragma): Detect
5411 a renaming by looking at the Renamed_Object attribute.
5412 (Is_Renaming): Removed.
5414 2013-04-11 Vincent Celier <celier@adacore.com>
5416 * prj-env.adb (Initialize_Default_Project_Path): Take
5417 into account a project path file, specified by environment
5418 variable GPR_PROJECT_PATH_FILE, before taking into account
5420 * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
5422 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5424 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
5425 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
5426 a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
5427 a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
5428 a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
5429 a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
5430 a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
5431 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
5432 Move Iterator operations from body to private part of spec.
5434 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5436 * ttypes.ads, get_targ.ads: More minor rewording of comments.
5438 2013-04-11 Johannes Kanig <kanig@adacore.com>
5440 * debug.adb: Document use of switch -gnatd.Z.
5442 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5444 * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
5445 support renamings of entire objects. Legal renamings are replaced by
5446 the object they rename.
5447 (Is_Renaming): New routine.
5449 2013-04-11 Yannick Moy <moy@adacore.com>
5451 * set_targ.adb, opt.ads: Minor changes in comments.
5453 2013-04-11 Ben Brosgol <brosgol@adacore.com>
5455 * gnat_ugn.texi: Minor clean ups.
5457 2013-04-11 Robert Dewar <dewar@adacore.com>
5459 * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
5460 function p from Nlists to Treepr.
5462 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5464 * sem_disp.adb (Check_Dispatching_Context): If the context is
5465 a contract for a null procedure defer error reporting until
5466 postcondition body is created.
5467 * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
5468 null procedure, complete the analysis of its contracts so that
5469 calls within classwide conditions are properly rewritten as
5472 2013-04-11 Thomas Quinot <quinot@adacore.com>
5474 * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
5476 2013-04-11 Robert Dewar <dewar@adacore.com>
5478 * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
5480 2013-04-11 Robert Dewar <dewar@adacore.com>
5482 * atree.adb, atree.ads (Node31): New function.
5483 (Set_Node31): New procedure.
5485 2013-04-11 Robert Dewar <dewar@adacore.com>
5487 * errout.ads: Minor typo correction.
5489 2013-04-11 Javier Miranda <miranda@adacore.com>
5491 * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
5493 2013-04-11 Robert Dewar <dewar@adacore.com>
5495 * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
5496 * back_end.ads (C_String): Moved to Get_Targ
5497 (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
5499 * cstand.adb (Register_Float_Type): New interface
5500 (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
5501 * get_targ.adb (Register_Back_End_Types): Moved here from
5503 * get_targ.ads (C_String): Moved here from Back_End
5504 (Register_Type_Proc): Moved here from Back_End
5505 (Register_Back_End_Types): here from Back_End.
5506 * gnat1drv.adb (GGnat11drv): Add call to
5507 Write_Target_Dependent_Values;
5508 * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
5509 obsolete target dependent info.
5510 * opt.ads (Generate_Target_Dependent_Info):
5511 Removed (Target_Dependent_Info_Read): New flag
5512 (Target_Dependent_Info_Write): New flag
5513 * output.adb: Minor comment change
5514 * s-os_lib.ads: Minor reformatting
5515 * set_targ.ads, set_targ.adb: Minor reformatting.
5516 * switch-c.adb (Scan_Switches.First_Ptr): New variable
5517 (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
5518 (Scan_Front_End_Switches): Handle -gnatet, -gnateT
5519 * ttypes.ads: Remove documentation section on target dependent
5520 info in ali file Remove four letter codes, no longer used Instead
5521 of using Get_Targ.Get_xxx, we use Set_Targ.xxx
5522 * usage.adb: Add usage lines for -gnatet/-gnateT
5523 * gcc-interface/Make-lang.in: Update dependencies.
5525 2013-04-11 Thomas Quinot <quinot@adacore.com>
5527 * sem_ch4.adb: Update documentation.
5528 * sinfo.ads (N_Expression_With_Actions): Ditto.
5530 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5532 * sem_ch13.adb (Analyze_Aspect_Specifications):
5533 Add a guard to prevent the double insertion of the same aspect
5534 into a rep item list. This previously led to a circularity.
5536 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5538 * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
5539 reference if the prefix is the dereference of an anonymous access
5541 * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
5542 properly a reference to the current instance of a protected type
5543 from within a protected subprogram.
5544 * sem_res.adb (Find_Unique_Access_Type): Treat
5545 Attribute_Access_Type like Allocator_Type when resolving an
5548 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5550 * xgnatugn.adb: Remove obsolete comments.
5552 2013-04-11 Robert Dewar <dewar@adacore.com>
5554 * back_end.ads, back_end.adb: Minor reformatting.
5555 * set_targ.ads, set_targ.adb: New files.
5557 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5559 * sem_case.adb (Check_Against_Predicate): New routine.
5560 (Check_Choices): When the type covered by the list of choices
5561 is a static subtype with a static predicate, check all choices
5562 agains the predicate.
5563 (Issue_Msg): All versions removed.
5564 (Missing_Choice): New routines.
5565 * sem_ch4.adb: Code and comment reformatting.
5566 (Analyze_Case_Expression): Do not check the choices when the case
5567 expression is being preanalyzed and the type of the expression
5568 is a subtype with a static predicate.
5569 (Has_Static_Predicate): New routine.
5570 * sem_ch13.adb: Code and comment reformatting. (Build_Range):
5571 Always build a range even if the low and hi bounds denote the
5572 same value. This is needed by the machinery in Check_Choices.
5573 (Build_Static_Predicate): Always build a range even if the low and
5574 hi bounds denote the same value. This is needed by the machinery
5577 2013-04-11 Robert Dewar <dewar@adacore.com>
5579 * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
5582 2013-04-11 Doug Rupp <rupp@adacore.com>
5584 * gnatlink.adb: Fold program basename to lower case on VMS for
5587 2013-04-11 Matthew Heaney <heaney@adacore.com>
5589 * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
5592 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5594 * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
5596 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5598 * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
5599 needed, and seems to confuse some versions of makeinfo.
5601 2013-04-11 Javier Miranda <miranda@adacore.com>
5603 * einfo.adb (Is_Thunk): Remove assertion.
5604 (Set_Is_Thunk): Add assertion.
5605 * einfo.ads (Is_Thunk): Complete documentation.
5606 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
5607 * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
5608 (Is_Variable_Size_Record): Moved to sem_util
5609 * exp_ch6.adb (Expand_Call): Code cleanup.
5610 (Expand_N_Extended_Return_Statement): Code cleanup.
5611 (Expand_Simple_Function_Return): Code cleanup.
5612 * exp_disp.adb Remove dependency on exp_ch3
5613 (Expand_Interface_Thunk): Add minimum decoration needed to set
5615 * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
5616 * sem_util.ad[sb] (Is_Constant_Bound): Moved from
5617 sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
5618 (Is_Variable_Size_Record): Moved from exp_ch3
5620 2013-04-11 Javier Miranda <miranda@adacore.com>
5622 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
5623 not add cleanup actions in thunks associated with interface types.
5624 * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
5626 * exp_ch4.adb (Tagged_Conversion): Update call to
5627 Expand_Interface_Conversion since the parameter Is_Static is no
5629 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
5630 assertion to ensure that interface thunks are never handled by
5632 (Expand_N_Simple_Function_Return): Do not rewrite this statement
5633 as an extended return statement in interface thunks, and do not
5634 perform copy in the secondary stack if the return statement is
5636 * exp_disp.adb (Expand_Dispatching_Call): No longer displace
5637 the pointer to the returned object in functions returning interface
5639 (Expand_Interface_Thunk): For functions returning interface types
5640 displace the pointer to the returned object.
5641 (Expand_Interface_Conversion): Remove formal
5642 Is_Static since this subprogram can now evaluate it locally.
5643 * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
5644 propagate the type returned by the covered interface primitive to
5645 the internal interface entity. Needed by the thunk to generate
5646 the code which displaces "this" to reference the corresponding
5647 secondary dispatch table.
5648 * sem_disp.adb (Propagate_Tag): Update call to
5649 Expand_Interface_Conversion since the parameter Is_Static is no
5651 * sem_res.adb (Resolve_Type_Conversion): Update calls to
5652 Expand_Interface_Conversion since the parameter Is_Static is no
5653 longer needed plus code cleanup.
5655 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5657 * init.c (RETURN_ADDR_OFFSET): Delete as unused.
5659 2013-04-11 Robert Dewar <dewar@adacore.com>
5661 * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
5662 a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
5664 2013-04-11 Yannick Moy <moy@adacore.com>
5666 * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
5667 discriminant check for Unchecked_Union.
5668 * sem_res.adb (Resolve_Selected_Component): Set flag
5669 Do_Discriminant_Check even when expansion is not performed.
5670 * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
5673 2013-04-11 Thomas Quinot <quinot@adacore.com>
5675 * sem_ch13.adb (Same_Representation): Two types with different scalar
5676 storage order never have the same representation.
5678 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5680 * xgnatugn.adb (Push_Conditional): Simplify handling,
5681 no longer need to keep track of "excluding" sections.
5682 (Currently_Excluding): Removed.
5683 (Process_Source_File):
5684 Set unw/vms flag so that texinfo can do the whole handling of
5685 @ifset/@ifclear sections. Fix handling of nested @ifset/@ifclear
5687 * gnat_ugn.texi: Add a section on performing unassisted install
5690 2013-04-11 Johannes Kanig <kanig@adacore.com>
5692 * debug.adb: Document usage of -gnatd.Q switch.
5694 2013-04-11 Matthew Heaney <heaney@adacore.com>
5696 * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
5697 before element comparisons.
5698 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
5700 * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
5701 element comparisons.
5702 * a-rbtgso.adb (Difference, Intersection): Adjust locks
5703 before element comparisons.
5704 (Is_Subset, Overlap): Ditto
5705 (Symmetric_Difference, Union): Ditto
5706 * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
5707 before element comparisons.
5708 (Set_Subset, Set_Overlap): Ditto
5709 (Set_Symmetric_Difference, Set_Union): Ditto
5710 * a-coorse.adb, a-ciorse.adb, a-cborse.adb
5711 (Update_Element_Preserving_Key): Adjust locks before element
5712 comparisons (Replace_Element): Ditto
5714 2013-04-11 Pascal Obry <obry@adacore.com>
5716 * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
5719 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5721 * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
5722 Expand_N_Object_Declaration, used to construct an aggregate
5723 with static components whenever possible, so that objects of a
5724 discriminated type can be initialized without calling the init.
5727 2013-04-11 Vincent Celier <celier@adacore.com>
5729 * prj-makr.adb (Process_Directory): On VMS, always delete,
5730 then recreate the temporary file with Create_Output_Text_File,
5731 otherwise the output redirection does not work properly.
5733 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5735 * urealp.ads: Fix minor typo.
5737 2013-04-11 Fabien Chouteau <chouteau@adacore.com>
5739 * cio.c (mktemp): Don't use tmpnam function from the
5740 system on VxWorks in kernel mode.
5742 2013-04-11 Vincent Celier <celier@adacore.com>
5744 * make.adb (Compile): Clarify the error message reported
5745 when gnatmake refuses to compile a runtime source.
5746 (Start_Compile_If_Possible): Ditto.
5748 2013-04-11 Vincent Celier <celier@adacore.com>
5750 * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
5752 2013-04-11 Vincent Celier <celier@adacore.com>
5754 * switch-c.adb: Document internal switches.
5755 * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
5756 -gnatez and -gnateO.
5758 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5760 * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
5761 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
5763 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
5764 pre/post pragmas at once before analyzing the proper body.
5765 * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
5766 aspect on a subprogram stub.
5767 * aspects.adb: Aspect specifications can appear on a
5768 subprogram_Body_Stub.
5770 2013-04-11 Vincent Celier <celier@adacore.com>
5772 * gnatname.adb: Minor comment fix.
5774 2013-04-11 Vincent Celier <celier@adacore.com>
5776 * prj-makr.adb (Process_Directory): Create a new temporary
5777 file for each invocation of the compiler, in directory pointed
5778 by environment variable TMPDIR if it exists.
5780 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5782 * gnat_ugn.texi: Minor editing/clean ups.
5784 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5786 * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
5787 extracted from Analyze_Subprogram_Declaration, to handle null
5788 procedure declarations that in ada 2012 can be completions of
5789 previous declarations.
5791 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5793 * sem_prag.adb (Entity_Of): Moved to Exp_Util.
5794 * exp_util.ads, exp_util.adb (Entity_Of): New routine.
5796 2013-04-11 Robert Dewar <dewar@adacore.com>
5798 * g-spipat.ads: Minor comment fix.
5800 2013-04-11 Robert Dewar <dewar@adacore.com>
5802 * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
5805 2013-04-11 Thomas Quinot <quinot@adacore.com>
5807 * exp_util.ads (Fully_Qualified_Name_String): Document that the
5808 constructed literal is the entity name in all upper case.
5810 2013-04-11 Thomas Quinot <quinot@adacore.com>
5812 * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
5813 check for implementation defined identifiers.
5815 2013-04-11 Yannick Moy <moy@adacore.com>
5817 * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
5818 of why range check and length are put on different nodes.
5819 * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
5820 when doing their expansion.
5822 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5824 * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
5825 New function to implement the notion introduced in RM 7.3.1
5826 (5.2/3): in a child unit, a derived type is within the derivation
5827 class of an ancestor declared in a parent unit, even if there
5828 is an intermediate derivation that does not see the full view
5830 * sem_res.adb (Valid_Conversion): if all else fails, examine if an
5831 incomplete view of an ancestor makes a numeric conversion legal.
5833 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5835 * sem_ch6.adb: in Ada2012 operators can only have in
5838 2013-04-11 Vincent Celier <celier@adacore.com>
5840 * makeutl.adb (Create_Binder_Mapping_File): Do not put into
5841 the mapping file ALI files of sources that have been replaced.
5843 2013-04-11 Vincent Celier <celier@adacore.com>
5845 * projects.texi: Add subsection Duplicate Sources in Projects.
5847 2013-04-11 Vincent Celier <celier@adacore.com>
5849 * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
5851 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5853 * init.c (__gnat_install_handler): Only set up an alternate
5854 stack when installing a signal handler for SIGSEGV.
5856 2013-04-11 Thomas Quinot <quinot@adacore.com>
5858 * g-socket.adb (Connect_Socket, timeout version): Call
5859 underlying connect operation directly, not through the 2-argument
5860 Connect_Socket thick binding, in order to avoid raising a junk
5861 exception for the EINPROGRESS return.
5863 2013-04-11 Robert Dewar <dewar@adacore.com>
5865 * a-cdlili.adb: Minor addition of pragma Warnings (Off).
5867 2013-04-11 Robert Dewar <dewar@adacore.com>
5869 * hostparm.ads: Minor reformatting.
5871 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5873 * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
5875 * elists.ads, elists.adb (Contains): New routine.
5876 * par-prag.adb: Pragma Depends does not need any special treatment
5878 * sem_ch13.adb (Analyze_Aspect_Specifications):
5879 Transform aspect Depends into a corresponding pragma.
5880 (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
5881 inspection at its freeze point.
5882 * sem_prag.adb (Analyze_Pragma): Perform analysis and
5883 normalization of pragma Depends. Remove the use of function
5884 Is_Duplicate_Item. Use End_Scope to uninstalle the formal
5885 parameters of a subprogram. Add a value for pragma Depends in
5887 (Is_Duplicate_Item): Removed.
5888 * snames.ads-tmpl: Add predefined name for Depends as well as
5889 a pragma identifier.
5891 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5893 * gnat1drv.adb: Minor code clean up.
5895 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5897 * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
5898 Ignore enumeration rep clauses by default in CodePeer mode, unless
5899 -gnatd.I is specified.
5901 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5903 * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
5904 an expression that has been attached to the else_actions of an
5905 if-expression, the capture is not safe.
5907 2013-04-11 Yannick Moy <moy@adacore.com>
5909 * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
5910 conversion for arrays.
5912 2013-04-11 Robert Dewar <dewar@adacore.com>
5914 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
5916 2013-04-11 Johannes Kanig <kanig@adacore.com>
5918 * adabkend.adb: Minor comment addition.
5920 2013-04-11 Matthew Heaney <heaney@adacore.com>
5922 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
5923 lock counts before entering loop.
5925 (Is_Sorted, Merge, Sort): Ditto.
5926 (Reverse_Find): Ditto.
5927 (Splice_Internal): Internal operation to refactor splicing logic.
5928 (Splice): Some logic moved into Splice_Internal.
5930 2013-04-11 Johannes Kanig <kanig@adacore.com>
5932 * adabkend.adb (Scan_Compiler_Arguments): Do not call
5933 Set_Output_Object_File_Name in Alfa_Mode
5934 * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
5935 * opt.ads: Fix documentation.
5937 2013-04-11 Robert Dewar <dewar@adacore.com>
5939 * sem_res.adb: Minor code reorganization and comment fixes.
5940 * sem_type.adb: Minor reformatting.
5942 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5944 * exp_ch4.adb (Process_Transient_Object): Add new
5945 local variable Fin_Call. Remove and explain ??? comment. Use the
5946 Actions of logical operators "and then" and "or else" to insert
5947 the generated finalization call.
5949 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5951 * gnat_rm.texi: Fix typo.
5953 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5955 * sem_res.adb: Minor reformatting.
5957 2013-04-11 Robert Dewar <dewar@adacore.com>
5959 * atree.h: Add declarations for Flag255-Flag289 Fix declaration
5960 of Field30 (was wrong, but no effect, since not yet referenced by
5961 back end) Add declarations for Field31-Field35 Add declarations
5963 * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
5965 (Has_Predicates): No longer applies to functions.
5966 (Is_Predicate_Function): New flag.
5967 (Is_Predicate_Function_M): New flag.
5968 (Is_Invariant_Procedure): New flag.
5969 (Predicate_Function_M): New function.
5970 (Set_Predicate_Function_M): New procedure.
5971 * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
5972 case of appearing in predicate used for membership test.
5973 * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
5974 Is_Invariant_Procedure flag.
5975 * exp_ch4.adb (Expand_Op_In): Call special predicate function
5976 that takes care of raise_expression nodes in the predicate.
5977 * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
5979 * sem_ch13.adb (Build_Predicate_Functions): New name for
5980 Build_Predicate_Function. Major rewrite to take care of raise
5981 expression in predicate for membership tests.
5982 * sem_res.adb (Resolve_Actuals): Include both predicate functions
5983 in defense against infinite predicate function loops.
5984 * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
5986 2013-04-11 Robert Dewar <dewar@adacore.com>
5988 * sem_prag.adb: Minor reformatting.
5990 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5992 * lib-xref.adb: Generate reference for component of anonymous
5995 2013-04-11 Robert Dewar <dewar@adacore.com>
5997 * stand.ads: Minor reformatting.
5999 2013-04-11 Matthew Heaney <heaney@adacore.com>
6001 * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
6002 counts before entering loop.
6003 (Find, Find_Index): Ditto.
6004 (Is_Sorted, Merge, Sort): Ditto.
6005 (Reverse_Find, Reverse_Find_Index): Ditto.
6007 2013-04-11 Robert Dewar <dewar@adacore.com>
6009 * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
6010 * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
6011 * expander.adb: Add call to Expand_N_Raise_Expression.
6012 * par-ch11.adb (P_Raise_Expression): New procedure.
6013 * par-ch4.adb (P_Relation): Handle Raise_Expression.
6014 * par.adb (P_Raise_Expression): New procedure.
6015 * sem.adb: Add handling for N_Raise_Expression.
6016 * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
6017 * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
6018 * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
6019 * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
6020 * stand.ads (Any_Type): Document use with N_Raise_Expression.
6022 2013-04-11 Vincent Celier <celier@adacore.com>
6024 * gnat_ugn.texi: Remove section "The Development Environments"
6025 now that all predefined attributes are documented, including
6026 those in package IDE.
6028 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6030 * sem_ch6.adb: Preserve parent link in copy of expression.
6032 2013-04-11 Vincent Celier <celier@adacore.com>
6034 * projects.texi: Complete rewrite of the subsection Attributes
6035 in section "Project file Reference".
6037 2013-04-11 Robert Dewar <dewar@adacore.com>
6039 * exp_ch4.adb: Minor reformatting.
6041 2013-04-11 Robert Dewar <dewar@adacore.com>
6043 * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
6044 expression-with-actions node. No longer needed given fix to
6045 sem_prag and caused loss of some useful warnings.
6046 * sem.ads: Minor reformatting.
6047 * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
6048 Check_Enabled. These two routines were curiously incompatible
6050 (Analyze_Pragma, case Check): Make sure we do
6051 not expand the string argument if the check is disabled. Avoid
6052 use of Check_Disabled, which resulted in missing analysis in
6054 * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
6055 Check_Enabled. These two routines were curiously incompatible
6058 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6060 * exp_ch4.adb (Process_Transient_Object): Use
6061 an unchecked conversion when associating a transient controlled
6062 object with its "hook".
6064 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6066 * sem_prag.adb (Analyze_Pragma, case
6067 Preelaborable_Initialization): The pragma is legal if it comes
6068 from an aspect on the private view of the type, even though its
6069 analysis point takes place later at the freeze point.
6071 2013-04-11 Robert Dewar <dewar@adacore.com>
6073 * sem_ch6.adb: Minor reformatting.
6075 2013-04-11 Yannick Moy <moy@adacore.com>
6077 * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
6078 read ALI files with No_Object=True in Alfa mode.
6079 * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
6080 this is during frame condition generation of translation to Why.
6082 2013-04-11 Robert Dewar <dewar@adacore.com>
6084 * exp_ch4.adb: Minor code reorganization
6085 * types.ads: Minor reformatting.
6087 2013-04-11 Johannes Kanig <kanig@adacore.com>
6089 * opt.ads New global boolean Frame_Condition_Mode to avoid
6090 referring to command line switch.
6091 * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
6092 is present, and disable Code generation in that case. Disable
6093 ALI file generation when switch is *not* present.
6095 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6097 * sem_ch6.adb (Analyze_Expression_Function): Perform the
6098 pre-analysis on a copy of the expression, to prevent downstream
6099 visbility issues involving operators and instantiations.
6101 2013-04-11 Johannes Kanig <kanig@adacore.com>
6103 * debug.adb: Reservation and documentation for -gnatd.G switch.
6104 * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
6105 switch, and set ALI file generation accordingly.
6107 2013-04-11 Robert Dewar <dewar@adacore.com>
6109 * exp_ch4.adb, exp_dist.adb: Minor reformatting.
6110 * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
6111 check names introduced with pragma Check_Name are suppressed by -gnatp.
6113 2013-04-11 Vincent Celier <celier@adacore.com>
6115 * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
6116 Files" from projects.texi to gnat_ugn.texi.
6118 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6120 * gcc-interface/Make-lang.in: Update dependencies.
6122 2013-04-11 Yannick Moy <moy@adacore.com>
6124 * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
6127 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
6129 * exp_ch4.adb (Expand_N_Allocator): Detect the
6130 allocation of an anonymous controlled object where the type of
6131 the context is named. Use the pool and finalization master of
6132 the named access type to allocate the object.
6134 2013-04-11 Vincent Celier <celier@adacore.com>
6136 * gnat_ugn.texi: Remove most mentions of gprbuild.
6137 * projects.texi: Remove all mentions of asociative array
6140 2013-04-11 Robert Dewar <dewar@adacore.com>
6142 * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
6143 opt.ads, sem_ch13.adb: Minor reformatting.
6144 * debug.adb: Minor comment fix (remove junk .I doc).
6146 2013-04-11 Thomas Quinot <quinot@adacore.com>
6148 * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
6149 PolyORB): Bump to 6.
6150 (Exp_Dist.PolyORB_Support): Replace TC_Build with
6153 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6155 * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
6156 exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
6157 Enable this flag in CodePeer mode, and also via -gnatd.M.
6158 Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
6160 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6162 * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
6163 from the renamed object in an object renaming declaration with
6164 an unconstrained nominal subtype, freeze the created subtype at
6165 once, to prevent order of elaboration issues in the backend.
6167 2013-04-11 Arnaud Charlet <charlet@adacore.com>
6169 * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
6170 in particular in CodePeer mode.
6172 2013-04-11 Vincent Celier <celier@adacore.com>
6174 * gnat_ugn.texi: Add documentation for backup copies of project
6177 2013-04-11 Tristan Gingold <gingold@adacore.com>
6179 * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
6182 2013-04-11 Vincent Celier <celier@adacore.com>
6184 * gnatname.adb (Scan_Args): Recognize new switch --no-backup
6185 (Usage): Add line for --no-backup.
6186 * opt.ads (No_Backup): New Boolean variable, initialized to False.
6187 (Ada_Version_Default): Switch to Ada 2012 by default.
6188 * prj-makr.adb (Initialize): Create a backup for an existing
6189 project file if gnatname is not invoked with --no-backup.
6191 2013-04-11 Thomas Quinot <quinot@adacore.com>
6193 * exp_ch4.adb: Minor code improvement: replace various calls to
6194 Make_If_Statement in expansion with Make_Implicit_If_Statement.
6196 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
6198 * ali.adb: Fix minor typo.
6200 2013-04-11 Thomas Quinot <quinot@adacore.com>
6202 * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
6203 N_Procedure_Call_Statement.
6205 2013-04-11 Robert Dewar <dewar@adacore.com>
6207 * debug.adb: Minor comment fix.
6209 2013-04-11 Johannes Kanig <kanig@adacore.com>
6211 * debug.adb: Remove comment for -gnatd.G.
6213 2013-04-11 Thomas Quinot <quinot@adacore.com>
6215 * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
6216 Remove recursive routine, replace with...
6217 (Expand_Record_Equality.Element_To_Compare): New subroutine,
6218 implement iterative search for next element to compare.
6219 Add explanatory comment in the tagged case.
6221 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6223 * sem_ch5.adb: remove spurious warning from non-empty loop.
6224 * sem_ch8.adb (Enclosing_Instance): Make public to other routines
6225 in the package, in order to suppress redundant semantic checks
6226 on subprogram renamings in nested instantiations.
6228 2013-04-11 Robert Dewar <dewar@adacore.com>
6230 * errout.ads: Minor reformatting.
6231 * sem_eval.adb (Why_Not_Static): Now issues continuation messages
6232 (Why_Not_Static): Test for aggregates behind string literals.
6233 * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
6235 2013-04-11 Robert Dewar <dewar@adacore.com>
6237 * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
6238 Expressions_With_Actions.
6240 2013-04-11 Ed Schonberg <schonberg@adacore.com>
6242 * sem_ch6.adb (Base_Types_Match): For an actual type in an
6243 instance, the base type may itself be a subtype, so find true
6244 base type to determine compatibility.
6246 2013-04-11 Robert Dewar <dewar@adacore.com>
6248 * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
6249 makeutl.adb, sem_ch8.adb: Minor reformatting.
6251 2013-04-11 Vincent Celier <celier@adacore.com>
6253 * gnat_ugn.texi: Minor fixes for VMS.
6254 * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
6256 2013-04-11 Robert Dewar <dewar@adacore.com>
6258 * usage.adb (Usage): Minor edit to -gnatW message
6260 2013-04-11 Robert Dewar <dewar@adacore.com>
6262 * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
6263 others for string literal case. Also add big ??? comment about
6264 this new code, which should be redundant, but is not.
6265 * sem_eval.adb (Eval_Concatenation): Handle non-static case
6266 properly (Eval_String_Literal): Handle non-static literal properly
6268 2013-03-20 Tobias Burnus <burnus@net-b.de>
6270 * i-fortra.ads: Update comment, add Ada 2012's optional
6271 Star and Kind data types for enhanced interoperability.
6273 2013-03-16 Eric Botcazou <ebotcazou@adacore.com>
6275 * gnatvsn.ads (Library_Version): Bump to 4.9.
6277 2013-03-08 Cesar Strauss <cestrauss@gmail.com>
6280 * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
6281 (__gnat_SEH_error_handler): Likewise. Remove final return.
6283 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6285 * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
6286 out for an unimplemented attribute.
6288 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6290 * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
6291 a misaligned integral type if a size is specified for the field.
6293 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6295 * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
6296 Record the unpadded type of the index type on the RCI stack.
6298 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
6300 * gcc-interface/trans.c (emit_range_check): Assert that the range type
6301 is a numerical type and remove useless local variables.
6303 2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
6305 * gcc-interface/ada-tree.h: Back out change accidentally committed.
6307 2013-02-21 Jakub Jelinek <jakub@redhat.com>
6310 * gnat-style.texi (@title): Remove @hfill.
6311 * projects.texi: Avoid line wrapping inside of @pxref or @xref.
6313 2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
6316 * tracebak.c: Cast from pointer via FARPROC.
6318 2013-02-07 Simon Wright <simon@pushface.org>
6321 * init.c (__darwin_major_version): New function for x86-64/Darwin.
6322 (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
6323 on Darwin 12 and above.
6325 2013-02-06 Rainer Emrich <rainer@emrich-ebersheim.de>
6328 * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
6329 SECURITY_DESCRIPTOR *
6330 (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
6331 (__gnat_portable_spawn): Fix cast to char* const*
6332 (add_handle): Cast from pointer via void **
6333 (add_handle): Cast from pointer via int *
6334 (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
6335 (__gnat_locate_exec_on_path): Cast from pointer via char *
6336 * initialize.c (append_arg): Cast from pointer via LPWSTR
6337 (__gnat_initialize): Cast from pointer via LPWSTR
6338 * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
6340 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6342 * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
6343 target pairs on VxWorks 5 only.
6345 2013-02-06 Arnaud Charlet <charlet@adacore.com>
6347 * gcc-interface/Make-lang.in: Update dependencies.
6349 2013-02-06 Vincent Celier <celier@adacore.com>
6351 * prj-proc.adb (Process_Aggregated_Projects): Use a new project
6352 node tree for each project tree rooted at an aggregated project.
6354 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6356 * sem_util.adb (Is_Interface_Conversion): New routine.
6357 (Object_Access_Level): Detect an interface conversion
6358 that has been rewritten into a different construct. Use the
6359 original form of the conversion to find the access level of
6362 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6364 * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
6365 (Has_Pragma_No_Inline): Declare and mark as inline.
6366 (Set_Has_Pragma_No_Inline): Likewise.
6367 * einfo.adb (Has_Pragma_No_Inline): New function.
6368 (Set_Has_Pragma_No_Inline): New procedure.
6369 (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
6370 * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
6371 (Pragma_Id): Add Pragma_No_Inline value.
6372 * par-prag.adb (Prag): Handle Pragma_Inline.
6373 * sem_prag.adb (Inline_Status): New enumeration type.
6374 (Process_Inline): Change Active parameter
6375 to Inline_Status and add support for suppressed inlining.
6376 (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
6377 <Pragma_Inline_Always>: Likewise.
6378 <Pragma_No_Inline>: Implement new pragma No_Inline.
6379 (Sig_Flags): Add Pragma_No_Inline.
6380 * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
6381 * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
6383 2013-02-06 Pascal Obry <obry@adacore.com>
6385 * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
6386 to avoid interleaved modifications that could happen from another
6387 task calling Get_Base_Data.
6388 (Get_Base_Data): Make it a critical section. Avoid updating if another
6389 task has already done it.
6391 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6393 * sem_prag.adb: Minor reformatting.
6395 2013-02-06 Pascal Obry <obry@adacore.com>
6397 * s-tasloc.ads: Set System.Task_Lock to preelaborate.
6399 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6401 * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
6402 Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
6404 (Pragma_Id): Add Pragma_Loop_Optimize value.
6405 * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
6406 * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
6407 (Check_Loop_Pragma_Placement): ...this.
6409 <Pragma_Loop_Invariant>: Adjust to above renaming.
6410 <Loop_Variant>: Likewise.
6411 <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
6412 (Sig_Flags): Add Pragma_Loop_Optimize.
6413 * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
6414 * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
6416 2013-02-06 Robert Dewar <dewar@adacore.com>
6418 * osint.ads: Minor fix of typo.
6420 2013-02-06 Sergey Rybin <rybin@adacore.com frybin>
6422 * gnat_ugn.texi: gnatmetric: update the documentation of
6423 complexity metrics for Ada 2012.
6425 2013-02-06 Javier Miranda <miranda@adacore.com>
6427 * exp_disp.adb (Make_Secondary_DT): Code cleanup:
6428 remove useless initialization.
6430 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6432 * sem_ch3.adb (Build_Discriminant_Constraints): Do not
6433 generate overflow checks on a discriminant expression if the
6434 discriminant constraint is applied to a private type that has
6435 a full view, because the check will be applied when the full
6436 view is elaborated. Removing the redundant check is not just
6437 an optimization, but it prevents spurious assembler errors,
6438 because of the way the backend generates names for expressions
6439 that require overflow checking.
6441 2013-02-06 Pascal Obry <obry@adacore.com>
6443 * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
6444 limitation on Windows.
6454 (Clock): Use variable corresponding to access.
6455 (Get_Base_Time): Likewise.
6456 (Monotonic_Clock): Likewise.
6458 2013-02-06 Vincent Celier <celier@adacore.com>
6460 * make.adb (Gnatmake): When gnatmake is called with a project
6461 file, do not invoke gnatbind with -I-.
6462 * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
6463 the infos from all the sources.
6465 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6467 * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
6468 Overriding_Renamings.
6469 * par-prag.adb: Recognize pragma Overriding_Renamings.
6470 * opt.ads (Overriding_Renamings): flag to control compatibility
6471 mode with Rational compiler, replaces Rational_Profile flag.
6472 * sem_ch8.adb (Analyze_Subprogram_Renaming): When
6473 Overriding_Renamings is enabled, accept renaming declarations
6474 where the new subprogram renames and overrides a locally inherited
6475 operation. Improve error message for some illegal renamings.
6476 * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
6477 (Set_Rational_Profile): The Rational_Profile enables
6478 Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
6480 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6482 * sem_util.adb: Set parent of copied aggregate component, to
6483 prevent infinite loop.
6485 2013-02-06 Robert Dewar <dewar@adacore.com>
6487 * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
6488 * exp_disp.adb: Minor comment update.
6489 * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
6492 2013-02-06 Thomas Quinot <quinot@adacore.com>
6494 * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
6495 parameter, defaulted to False for now, indicates targets where
6496 non-default scalar storage order may be specified.
6498 2013-02-06 Thomas Quinot <quinot@adacore.com>
6500 * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
6501 same as E_Record_Subtype. Display E_Class_Wide_Subtype as
6504 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6506 * sem_ch3.adb (Complete_Private_Subtype): Inherit the
6507 Has_Unknown_Discriminants from the full view of the base type.
6509 2013-02-06 Tristan Gingold <gingold@adacore.com>
6511 * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
6512 Enclosing debugging functions within #ifndef inhibit_libc to
6513 support builds without full C headers.
6515 2013-02-06 Thomas Quinot <quinot@adacore.com>
6517 * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
6519 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6521 * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
6522 check to detect a parent-child relationship between two units in
6523 order to correctly bypass the installation of a limited view. In
6524 other words, the comment on the intended usage of the check was
6525 correct, but the code itself did not reflect the behavior.
6527 2013-02-06 Javier Miranda <miranda@adacore.com>
6529 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
6530 runtime check on assignment to tagged types if compiling with checks
6533 2013-02-06 Robert Dewar <dewar@adacore.com>
6535 * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
6536 s-os_lib.adb: Minor reformatting
6538 2013-02-06 Vincent Celier <celier@adacore.com>
6540 * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
6542 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6544 * snames.ads-tmpl: Add Name_Rational and pragma Rational.
6545 * par-prag.adb: Recognize pragma Rational.
6546 * opt.ads (Rational_Profile): flag to control compatibility mode
6547 with Rational compiler.
6548 * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
6549 is enable, accept renaming declarations where the new subprogram
6550 and the renamed entity have the same name.
6551 * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
6552 Rational as a profile.
6554 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6556 * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
6557 dealing with a for loop that iterates over a subtype indication
6558 with a range, use the low and high bounds of the subtype.
6560 2013-02-06 Nicolas Roche <roche@adacore.com>
6562 * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
6565 2013-02-06 Vincent Celier <celier@adacore.com>
6567 * prj-conf.adb (Process_Project_And_Apply_Config): New variable
6568 Conf_Project. New recursive procedure Check_Project to find a non
6569 aggregate project and put its Project_Id in Conf_Project. Fails if
6570 no such project can be found.
6571 (Get_Or_Create_Configuration_File): New parameter Conf_Project.
6572 (Do_Autoconf): Use project directory of project Conf_Project to store
6573 the generated configuration project file.
6574 * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
6577 2013-02-06 Javier Miranda <miranda@adacore.com>
6579 * sem_res.adb (Resolve_Actuals): Generate a read
6580 reference for out-mode parameters in the cases specified by
6583 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6585 * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
6586 Loop_Entry, instead wait until the attribute has been expanded. The
6587 delay ensures that any generated checks or temporaries are inserted
6588 before the relocated prefix.
6590 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6592 * sem_ch12.adb: Code clean up.
6594 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6596 * checks.adb (Apply_Discriminant_Check): Look for discriminant
6597 constraint in full view of private type when needed.
6598 * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
6599 previous patch to components types that are private and without
6602 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6604 * exp_ch4.adb (Find_Enclosing_Context): Recognize
6605 a simple return statement as one of the cases that require special
6606 processing with respect to temporary controlled function results.
6607 (Process_Transient_Object): Do attempt to finalize a temporary
6608 controlled function result when the associated context is
6609 a simple return statement. Instead, leave this task to the
6610 general finalization mechanism.
6612 2013-02-06 Thomas Quinot <quinot@adacore.com>
6614 * einfo.ads: Minor reformatting.
6615 (Status_Flag_Or_Transient_Decl): Add ??? comment.
6617 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6619 * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
6620 routine should be able to properly detect controlled transient
6621 objects in its actions and generate the appropriate finalization
6623 * exp_ch6.adb (Enclosing_Context): Removed.
6624 (Expand_Ctrl_Function_Call): Remove local subprogram and
6625 constant. Use routine Within_Case_Or_If_Expression to determine
6626 whether the lifetime of the function result must be extended to
6627 match that of the context.
6628 * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
6631 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6633 * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
6634 for subtype matching of component type of formal array type,
6635 to avoid spurious error when component type is a separate actual
6636 in the instance, and there may be a discrepancy between private
6637 and full view of component type.
6639 2013-02-06 Robert Dewar <dewar@adacore.com>
6641 * s-dim.ads, clean.adb: Minor reformatting.
6643 2013-02-06 Javier Miranda <miranda@adacore.com>
6645 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
6646 (Can_Split_Unconstrained_Function): Only split the inlined function if
6647 the compiler generates the code of its body.
6649 2013-02-06 Robert Dewar <dewar@adacore.com>
6651 * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
6652 exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
6655 2013-02-06 Robert Dewar <dewar@adacore.com>
6657 * gnat_rm.texi: Minor text updates for pragma Warning.
6659 2013-02-06 Geert Bosch <bosch@adacore.com>
6661 * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
6664 2013-02-06 Vincent Celier <celier@adacore.com>
6666 * clean.adb (Delete): On VMS use host notation to delete all files.
6668 2013-02-06 Robert Dewar <dewar@adacore.com>
6670 * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
6673 2013-02-06 Gary Dismukes <dismukes@adacore.com>
6675 * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
6676 the special case of a user-defined equality that overrides
6677 the predefined equality of a nonderived type declared in a
6679 * sem_util.adb (Collect_Primitive_Operations): Add test for
6680 Is_Primitive when looping over the subprograms following a type,
6681 to catch the case of primitives such as a user-defined equality,
6682 which otherwise won't be found when the type is not a derived
6683 type and is declared in a declarative part.
6685 2013-02-06 Vincent Celier <celier@adacore.com>
6687 * prj-conf.adb (Check_Target): Always return True when Target
6688 is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
6689 New procedure to get the value of attribute Target in the main
6691 (Get_Or_Create_Configuration_File.Do_Autoconf): No
6692 need to get the value of attribute Target in the main project.
6693 (Get_Or_Create_Configuration_File): Call Get_Project_Target and
6694 use the target fom this call.
6696 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6698 * erroutc.adb (Validate_Specific_Warning): Do not issue the
6699 warning about an ineffective Pragma Warnings for -Wxxx warnings.
6700 * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
6701 * gnat_rm.texi (Pragma Warnings): Document coordination with
6702 warnings of the GCC back-end.
6704 2013-02-06 Javier Miranda <miranda@adacore.com>
6706 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
6707 of an inlined function if we do not generate code for the function.
6709 2013-02-06 Pascal Obry <obry@adacore.com>
6711 * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
6712 with Resolve_Links set to False.
6714 2013-02-03 Eric Botcazou <ebotcazou@adacore.com>
6716 * gcc-interface/decl.c: Include diagnostic-core.h.
6717 (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
6718 is set on the entity.
6719 <E_Record_Type>: Likewise.
6720 * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
6722 2013-01-29 Ben Brosgol <brosgol@adacore.com>
6724 * gnat_rm.texi: Fixed typos. Minor edits.
6726 2013-01-29 Bob Duff <duff@adacore.com>
6728 * a-convec.adb: Minor reformatting.
6730 2013-01-29 Pascal Obry <obry@adacore.com>
6732 * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
6735 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6737 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
6738 identifier only if it comes from source.
6739 (Expand_N_Loop_Statement): If the domain of iteration is an
6740 enumeration type with a representation clause, remove from
6741 visibility the loop identifier before rewriting the loop as a
6742 block with a declaration for said identifier.
6743 * sem_util.adb (Remove_Homonym): Handle properly the default case.
6745 2013-01-29 Vincent Celier <celier@adacore.com>
6747 * prj-proc.adb: Minor comment spelling fix.
6749 2013-01-29 Pascal Obry <obry@adacore.com>
6751 * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
6752 Project_Path to current environment.
6754 2013-01-29 Thomas Quinot <quinot@adacore.com>
6756 * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
6757 itypes even if Dump_Freeze_Null is not set.
6759 2013-01-29 Robert Dewar <dewar@adacore.com>
6761 * sem_util.adb: Minor reformatting.
6762 * s-rident.ads: Minor comment fixes.
6764 2013-01-29 Pascal Obry <obry@adacore.com>
6766 * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
6767 control if the path is prepended or appended.
6769 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6771 * sem_ch6.adb (Analyze_Expression_Function): An expression
6772 function declaration is not a subprogram declaration, and thus
6773 cannot appear in a protected definition.
6775 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6777 * exp_util.adb (Insert_Actions): When new
6778 actions come from the expression of the expression with actions,
6779 then they must be added to the list of existing actions.
6781 2013-01-29 Eric Botcazou <ebotcazou@adacore.com>
6783 * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
6784 the subtype of a constrained private type with discriminants
6785 that has got a full view, show that the completion is a clone
6788 2013-01-29 Javier Miranda <miranda@adacore.com>
6790 * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
6791 * opt.ads (Warn_On_Overlap): Update documentation.
6792 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6793 Check function writable actuals.
6794 * sem_ch3.adb (Build_Derived_Record_Type,
6795 Record_Type_Declaration): Check function writable actuals.
6796 * sem_ch4.adb (Analyze_Range): Check function writable actuals.
6797 * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
6798 implementation of AI05-0144.
6799 * sem_ch6.adb (Analyze_Function_Return,
6800 (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
6801 of the initial implementation of AI05-0144.
6802 * sem_res.adb (Resolve): Remove code of the initial implementation.
6803 (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
6804 of the initial implementation.
6805 (Resolve_Arithmetic_Op, Resolve_Logical_Op,
6806 Resolve_Membership_Op): Check function writable actuals.
6807 * sem_util.ad[sb] (Actuals_In_Call): Removed
6808 (Check_Order_Dependence): Removed (Save_Actual): Removed
6809 (Check_Function_Writable_Actuals): New subprogram.
6810 * usage.adb (Usage): Update documentation.
6811 * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
6812 setting all warnings.
6814 2013-01-29 Robert Dewar <dewar@adacore.com>
6816 * a-calend-vms.adb: Minor comment fix.
6818 2013-01-29 Robert Dewar <dewar@adacore.com>
6820 * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
6821 because of casing issues.
6822 * sem_util.ads: Minor comment fix.
6823 * style.adb (Check_Identifier): Set proper casing for entities
6825 * styleg.adb: Minor comment improvement.
6826 * stylesw.ads (Style_Check_Standard): Fix bad comments.
6828 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6830 * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
6831 (Analyze_Pragma): Push the scope of the related subprogram and install
6832 its formals once before starting the analysis of the [moded] global
6835 2013-01-29 Pascal Obry <obry@adacore.com>
6837 * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
6838 relative paths in Project_Path as relative to the aggregate
6839 project location. Note that this was what was documented.
6841 2013-01-29 Vincent Celier <celier@adacore.com>
6843 * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
6844 scheme for Ada, when Ada is not a language for the project.
6846 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6848 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
6849 Is_Generic_Actual_Type flag in a nested instance.
6850 * sem_ch12.adb (Restore_Private_Views): Preserve
6851 Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
6852 of an enclosing instance.
6853 * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
6854 which is an actual of an enclosing instance.
6855 * sem_type.adb (Real_Actual): If a generic_actual_type is the
6856 formal of an enclosing generic and thus renames the corresponding
6857 actual, use the actual of the enclosing instance to resolve
6858 spurious ambiguities in instantiations when two formals are
6859 instantiated with the same actual.
6861 2013-01-29 Robert Dewar <dewar@adacore.com>
6863 * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
6864 being available as implementation-defined pragmas in earlier
6867 2013-01-29 Vincent Celier <celier@adacore.com>
6869 * clean.adb (Delete): On VMS, delete all versions of the file.
6871 2013-01-29 Robert Dewar <dewar@adacore.com>
6873 * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
6874 * par-util.adb (No_Constraint): Undo special handling, moved
6877 2013-01-29 Robert Dewar <dewar@adacore.com>
6879 * aspects.ads: Aspect Warnings is implementation defined Add
6880 some other missing entries to impl-defined list Mark Warnings
6881 as GNAT pragma in main list.
6882 * sem_ch8.adb: Process aspects for all cases of renaming
6885 2013-01-29 Robert Dewar <dewar@adacore.com>
6887 * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
6888 * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
6889 warnings about possible elaboration error if call is within
6891 * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
6893 2013-01-29 Robert Dewar <dewar@adacore.com>
6895 * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
6896 * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
6897 s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
6899 2013-01-29 Robert Dewar <dewar@adacore.com>
6901 * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
6902 * par-prag.adb (Par, case Style_Checks): Recognize
6903 Ignore_Style_Checks_Pragmas.
6904 * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
6905 Ignore_Style_Checks_Pragmas.
6906 * switch-c.adb: Recognize -gnateY switch.
6907 * usage.adb: Add documentation for "-gnateY".
6908 * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
6910 2013-01-29 Vincent Celier <celier@adacore.com>
6912 * clean.adb (Clean_Executables): Add Sid component when calling
6914 * make.adb: When inserting in the Queue, add the Source_Id
6915 (Sid) when it is known (Start_Compile_If_Possible): When the
6916 Source_Id is known (Sid), get the path name of the ALI file
6917 (Full_Lib_File) from it, to avoid finding old ALI files in other
6919 * makeutl.ads (Source_Info): New Source_Id component Sid in
6920 Format_Gnatmake variant.
6922 2013-01-29 Robert Dewar <dewar@adacore.com>
6924 * gnat_ugn.texi: Document -gnateY.
6926 2013-01-29 Doug Rupp <rupp@adacore.com>
6928 * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
6929 system-vms-ia64.ads: Replace pragma Interface by pragma Import.
6931 2013-01-29 Robert Dewar <dewar@adacore.com>
6933 * atree.ads, atree.adb (Node30): New function.
6934 (Set_Node30): New procedure.
6935 (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
6936 * atree.h: Add macros for Field30 and Node30.
6937 * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
6938 * treepr.adb (Print_Entity_Information): Print fields 30-35.
6940 2013-01-29 Robert Dewar <dewar@adacore.com>
6942 * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
6943 be a violation of No_Obsolescent_Features even in Ada 95. Also
6944 generates a warning in -gnatwj mode.
6945 (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
6947 * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
6950 2013-01-29 Vincent Celier <celier@adacore.com>
6952 * snames.ads-tmpl: Add new standard name Trailing_Switches.
6954 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6956 * sem_disp.adb (Check_Controlling_Type): If a designated type T
6957 of an anonymous access type is a limited view of a tagged type,
6958 it can be a controlling type only if the subprogram is in the
6961 2013-01-29 Vincent Celier <celier@adacore.com>
6963 * gnatcmd.adb: Use the project where the config pragmas file is
6964 declared to get its path.
6966 2013-01-29 Vincent Celier <celier@adacore.com>
6968 * prj-attr.adb: New attribute Linker'Trailing_Switches.
6970 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
6972 * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
6973 not translate the Etype of the node before translating the Actions.
6975 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
6977 * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
6978 instead of optimize and adjust warning message.
6979 (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
6981 2013-01-22 Tristan Gingold <gingold@adacore.com>
6983 * gcc-interface/gigi.h (ADT_unhandled_except_decl,
6984 ADT_unhandled_others_decl): New.
6985 (unhandled_others_decl, unhandled_except_decl): Define.
6986 * gcc-interface/trans.c: Include common/common-target.h.
6987 (gigi): Initialize them.
6988 (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
6989 function in a try/catch clause.
6991 2013-01-11 Eric Botcazou <ebotcazou@adacore.com>
6993 * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
6994 (CHECKING_ADAFLAGS): New.
6995 (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
6997 2013-01-10 Eric Botcazou <ebotcazou@adacore.com>
6999 * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
7000 * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
7002 2013-01-07 Eric Botcazou <ebotcazou@adacore.com>
7004 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
7005 comment about type extension with discriminants.
7006 <E_Record_Subtype>: Remove useless test and reorder conditions.
7007 (elaborate_entity) <E_Record_Subtype>: Likewise.
7009 2013-01-07 Richard Biener <rguenther@suse.de>
7012 * gcc-interface/Make-lang.in (ada.install-common): Always apply
7013 program_transform_name.
7015 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7017 * gnatvsn.ads (Current_Year): Bump to 2013.
7019 2013-01-06 Olivier Hainque <hainque@adacore.com>
7021 * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
7022 diagnostic for component size mismatch wrt volatile requirements.
7023 Add a gcc_unreachable() at the end of the checks for size. Split
7024 the check on volatile for positions into one check on atomic and
7025 a subsequent one on volatile.
7027 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7029 * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
7031 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7033 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
7034 pack the field of the record type made for a misaligned type.
7036 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
7038 * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
7039 for discriminants inherited from parent record types.
7041 2013-01-04 Robert Dewar <dewar@adacore.com>
7043 * warnsw.adb: Minor fixes to -gnatw.d handling.
7045 2013-01-04 Robert Dewar <dewar@adacore.com>
7047 * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
7050 2013-01-04 Joel Brobecker <brobecker@adacore.com>
7052 * gnat_ugn.texi: Fix typo.
7054 2013-01-04 Robert Dewar <dewar@adacore.com>
7056 * gnat_rm.texi: Document alignment choice for subtypes.
7058 2013-01-04 Robert Dewar <dewar@adacore.com>
7060 * validsw.ads: Minor fix to comment.
7062 2013-01-04 Doug Rupp <rupp@adacore.com>
7064 * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
7065 GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
7066 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
7067 (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
7068 Rename leon vxworks toolchain as leon-wrs-vxworks.
7069 * gcc-interface/Make-lang.in: Update dependencies
7071 2013-01-04 Pascal Obry <obry@adacore.com>
7073 * prj.ads (For_Each_Source): Add Locally_Removed parameter.
7074 (Source_Iterator): Add Locally_Removed field.
7075 * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
7078 2013-01-04 Robert Dewar <dewar@adacore.com>
7080 * exp_attr.adb: Minor reformatting.
7082 2013-01-04 Robert Dewar <dewar@adacore.com>
7084 * checks.adb (Insert_Valid_Check): Fix handling of renamed
7085 packed array element.
7086 * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
7087 fields in generated code.
7088 * exp_util.adb (Side_Effect_Free): Improve detection of cases
7091 2013-01-04 Robert Dewar <dewar@adacore.com>
7093 * sinfo.ads: Clean up order of N_xxx subtypes
7095 2013-01-04 Vincent Celier <celier@adacore.com>
7097 * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
7099 2013-01-04 Robert Dewar <dewar@adacore.com>
7101 * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
7103 2013-01-04 Robert Dewar <dewar@adacore.com>
7105 * par-ch6.adb (P_Subprogram): Better handling of missing IS
7106 after expression function.
7107 * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
7109 2013-01-04 Robert Dewar <dewar@adacore.com>
7111 * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
7112 actions case, new actions are appended to the sequence rather than
7115 2013-01-04 Robert Dewar <dewar@adacore.com>
7117 * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
7118 * usage.adb: Add lines for -gnatw.d/w.D switches.
7119 * warnsw.adb: Minor fixes (some missing cases of setting
7120 Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
7122 2013-01-04 Robert Dewar <dewar@adacore.com>
7124 * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
7125 is restored on exit.
7127 2013-01-04 Robert Dewar <dewar@adacore.com>
7129 * usage.adb: Document -gnateF (check overflow for predefined Float).
7131 2013-01-04 Robert Dewar <dewar@adacore.com>
7133 * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
7134 prevention of call to Apply_Type_Conversion_Checks, which resulted
7135 in missing check flags in formal mode.
7137 2013-01-04 Vincent Celier <celier@adacore.com>
7139 * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
7140 * prj-conf.adb (Check_Builder_Switches): Check for switches
7141 --config= (Get_Db_Switches): New procedure to get the --db
7142 switches so that they are used when invoking gprconfig in
7144 (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
7146 2013-01-04 Pascal Obry <obry@adacore.com>
7148 * prj-nmsc.adb: Minor reformatting.
7150 2013-01-04 Vincent Celier <celier@adacore.com>
7152 * makeutl.ads (Root_Environment): New variable, moved rom
7153 gprbuild (Load_Standard_Base): New Boolean variable, moved
7155 * prj-conf.adb (Check_Builder_Switches): New procedure to check
7156 for switch --RTS in package Builder. If a runtime specified
7157 by --RTS is a relative path name, but not a base name, then
7158 find the path on the Project Search Path.
7159 (Do_Autoconf): Call Check_Builder_Switches.
7160 (Locate_Runtime): New procedure, moved from gprbuild, to get the
7161 absolute paths of runtimes when they are not specified as a base name.
7162 * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
7164 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7166 * sem_ch3.adb (Build_Private_Derived_Type): Set
7167 Has_Private_Ancestor on type derived from an untagged private
7168 type whose full view has discriminants
7169 * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
7170 aggregate for untagged record type with private ancestor.
7172 2013-01-04 Thomas Quinot <quinot@adacore.com>
7174 * sem_elab.adb, sem_ch3.adb: Minor reformatting.
7176 2013-01-04 Robert Dewar <dewar@adacore.com>
7178 * table.adb: Minor reformatting.
7180 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7182 * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
7183 not come from source does not generate a warning for redundant
7186 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
7188 * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
7189 * par-prag.adb: Add pragma Global to the list of pragmas that
7190 do not need special processing by the parser.
7191 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
7192 Global into a pragma without any form of legality checks. The
7193 work is done by Analyze_Pragma. The aspect and pragma are both
7194 marked as needing delayed processing. Insert the corresponding
7195 pragma of aspect Abstract_State in the visible declarations of the
7197 (Check_Aspect_At_Freeze_Point): Aspect Global
7198 does not need processing even though it is marked as delayed.
7199 Alphabetize the list on aspect names.
7200 * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
7201 (Analyze_Pragma): Add ??? comment about the grammar of pragma
7202 Abstract_State. Move the error location from the pragma to the
7203 state to improve the quality of error placement. Add legality
7204 checks for pragma Global.
7205 * snames.ads-tmpl Add the following specially recognized names
7207 2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
7209 * sem_ch3.adb: Fix minor typo.
7211 2013-01-04 Ed Schonberg <schonberg@adacore.com>
7213 * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
7214 accept an aspect name followed by a comma, indicating a defaulted
7217 2013-01-04 Joel Brobecker <brobecker@adacore.com brobecker>
7219 * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
7220 Update doc on gnattest --separates switch.
7222 2013-01-04 Thomas Quinot <quinot@adacore.com>
7224 * s-chepoo.ads: Minor reformatting.
7226 2013-01-04 Arnaud Charlet <charlet@adacore.com>
7228 * usage.adb: Remove mention of -gnatN in usage.
7230 2013-01-04 Robert Dewar <dewar@adacore.com>
7232 * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
7233 freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
7234 prj-conf.adb, sem_ch13.adb: Minor reformatting.
7236 2013-01-04 Thomas Quinot <quinot@adacore.com>
7238 * sinfo.ads: Minor documentation update.
7240 2013-01-04 Thomas Quinot <quinot@adacore.com>
7242 * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
7243 before resolving initialization expression.
7245 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
7247 * checks.adb (Generate_Index_Checks): Delay the generation of
7248 the check for an indexed component where the prefix mentions
7249 Loop_Entry until the attribute has been properly expanded.
7250 * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
7251 decoration of the constant that captures the value of Loop_Entry's
7252 prefix at the entry point into a loop. Generate index checks
7253 for an attribute reference that has been transformed into an
7256 2013-01-04 Thomas Quinot <quinot@adacore.com>
7258 * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
7259 sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
7260 do if Obj is already frozen.
7261 (Exp_Util.Find_Init_Call): Rename to...
7262 (Exp_Util.Remove_Init_Call): New subprogram, renamed from
7263 Find_Init_Call. Remove the initialization call from the enclosing
7264 list if found, and if it is from an Initialization_Statements
7265 attribute, reset it.
7266 (Exp_Util.Append_Freeze_Action): Minor code reorganization.
7267 (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
7268 allocated (as is already done in Append_Freeze_Action).
7269 (Freeze.Freeze_Entity): For an object with captured
7270 Initialization_Statements and non-delayed freezeing, unwrap the
7271 initialization statements and insert and them directly in the
7273 (Sem_Ch13.Check_Address_Clause): For an object
7274 with Initialization_Statements and an address clause, unwrap the
7275 initialization statements when moving them to the freeze actions.
7277 2013-01-03 Pascal Obry <obry@adacore.com>
7279 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
7280 corresponding attibutes.
7282 2013-01-03 Thomas Quinot <quinot@adacore.com>
7284 * exp_aggr.adb: Minor comment improvement.
7286 2013-01-03 Hristian Kirtchev <kirtchev@adacore.com>
7288 * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
7290 * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
7291 the description of fields (Abstract_States): New routine.
7292 (Integrity_Level): New routine.
7293 (Has_Property): New routine.
7294 (Is_Input_State): New routine.
7295 (Is_Null_State): New routine.
7296 (Is_Output_State): New routine.
7297 (Is_Volatile_State): New routine.
7298 (Refined_State): New routine.
7299 (Set_Abstract_States): New routine.
7300 (Set_Integrity_Level): New routine.
7301 (Set_Refined_State): New routine.
7302 (Write_Field8_Name): Add proper output for E_Abstract_State.
7303 (Write_Field9_Name): Add proper output for E_Abstract_State.
7304 (Write_Field25_Name): Add proper output for E_Package.
7305 * lib-xref.ads: Add new letter for an abstract state.
7306 * par-prag.adb: Add pragma Abstract_State to the list of pragma
7307 that do not need special processing by the parser.
7308 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
7309 aspect Abstract_State into a pragma without any form
7310 of legality checks. The work is done by Analyze_Pragma.
7311 (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
7312 require delayed analysis.
7313 * sem_prag.adb: Add a value for pragma Abstract_State in table
7315 (Analyze_Pragma): Add legality checks for pragma
7316 Abstract_State. Analysis of individual states introduces a state
7317 abstraction entity into the visibility chain.
7318 * snames.ads-tmpl: Add new names for abstract state and
7319 integrity. Add new pragma id for abstract state.
7321 2013-01-03 Bob Duff <duff@adacore.com>
7323 * table.adb (Reallocate): Calculate new Length in
7324 Long_Integer to avoid overflow.
7326 2013-01-03 Thomas Quinot <quinot@adacore.com>
7328 * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
7329 (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
7330 it is set properly when expanding the initialization expression.
7331 (Freeze.Check_Address_Clause): Transfer initialization expression
7332 to an assignment in the freeze actions, so that the object is
7333 initialized only after being elaborated by GIGI.
7334 (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
7335 a Null_Statement as the expression in an Expression_With_Actions.
7336 (Exp_Aggr.Collect_Initialization_Statements): New subprogram
7337 shared by expansion of record and array aggregates, used to
7338 capture statements for an aggregate used to initalize an object
7339 into an Expression_With_Actions (which acts as a container for
7341 (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
7342 capture initialization statements, instead of the previously
7343 existing loop which left freeze nodes out of the capturing
7344 construct (causing out of order elaboration crashes in GIGI).
7345 (Exp_Aggr.Expand_Array_Aggregate): Use the above to capture
7346 initialization statements (this was previously not done for
7347 arrays). Also do not unconditionally prevent in place expansion
7348 for an object with address clause.
7350 2013-01-03 Thomas Quinot <quinot@adacore.com>
7352 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
7353 a record extension has the same scalar storage order as the parent type.
7355 2013-01-03 Thomas Quinot <quinot@adacore.com>
7357 * exp_ch4.adb: Add comment.
7359 2013-01-03 Vincent Celier <celier@adacore.com>
7361 * prj.adb: Minor spelling error correction in comment.
7363 2013-01-03 Vincent Celier <celier@adacore.com>
7365 * gnatcmd.adb (GNATCmd): If a single main has been specified
7366 as an absolute path, use its simple file name to find specific
7367 switches, instead of the absolute path.
7369 2013-01-03 Javier Miranda <miranda@adacore.com>
7371 * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
7372 parameters that are record types or array types generate warnings
7373 only compiling under -gnatw.i
7374 * opt.ads (Extensions_Allowed): Restore previous documentation.
7376 2013-01-03 Vincent Celier <celier@adacore.com>
7378 * prj-conf.adb (Do_Autoconf): If Target is specified in the
7379 main project, but not on the command line, use the Target in
7380 the project to invoke gprconfig in auto-configuration.
7381 * makeutl.ads (Default_Config_Name): New constant String.
7383 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7385 * usage.adb: Minor: fix typo in usage.
7387 2013-01-03 Thomas Quinot <quinot@adacore.com>
7389 * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
7390 an illegal component clause for an inherited component in a
7393 2013-01-03 Emmanuel Briot <briot@adacore.com>
7395 * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
7396 have information in the ALI file for both the index and the component
7399 2013-01-03 Emmanuel Briot <briot@adacore.com>
7401 * projects.texi: Fix error in documenting the project path
7402 computed for an aggregate project.
7404 2013-01-03 Javier Miranda <miranda@adacore.com>
7406 * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
7407 plus restricting the functionality of this routine to cover the
7408 cases described in the Ada 2012 reference manual. The previous
7409 extended support is now available under -gnatX.
7410 * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
7411 variable to call Timed_Sleep. Required to avoid warning on
7412 overlapping out-mode actuals.
7413 * opt.ads (Extensions_Allowed): Update documentation.
7415 2013-01-03 Tristan Gingold <gingold@adacore.com>
7417 * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
7419 * gcc-interface/Makefile.in: Remove reference to arit64.c.
7421 2013-01-03 Thomas Quinot <quinot@adacore.com>
7423 * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
7424 be generated at the start of the freeze actions for the entity, not
7425 before (or after) the freeze node.
7427 2013-01-03 Thomas Quinot <quinot@adacore.com>
7429 * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
7430 Reorganize code to capture initialization statements in a block,
7431 so that freeze nodes are excluded from the captured block.
7433 2013-01-03 Thomas Quinot <quinot@adacore.com>
7435 * exp_ch11.adb: Minor reformatting.
7437 2013-01-03 Thomas Quinot <quinot@adacore.com>
7439 * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
7440 sem_ch13.adb (Einfo.Initialization_Statements,
7441 Einfo.Set_Initialization_Statements): New entity attribute
7443 (Exp_Util.Find_Init_Call): Handle case of an object initialized
7444 by an aggregate converted to a block of assignment statements.
7445 (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
7446 even for objects that require a constant address, because the
7447 address expression might involve entities that have yet to be
7448 elaborated at the point of the object declaration.
7449 (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
7450 not require a transient scope, capture the assignment statements
7451 in a block so that they can be moved down after elaboration of
7452 an address clause if needed.
7453 (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
7454 case N_Unchecked_Conversion): Do not replace operand subtype with
7455 its base type as this violates a GIGI invariant if the operand
7456 is an identifier (in which case the etype of the identifier
7457 is expected to be equal to that of the denoted entity).
7459 2013-01-03 Javier Miranda <miranda@adacore.com>
7461 * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
7462 functionality of this routine to cover cases described in the Ada 2012
7465 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7467 * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
7468 a 'Access attribute reference when the subprogram is called
7471 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7473 * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
7474 select statement may be called from a controlled (e.g. Initialize)
7475 operation and have abort always deferred.
7477 2013-01-03 Robert Dewar <dewar@adacore.com>
7479 * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
7481 2013-01-03 Javier Miranda <miranda@adacore.com>
7483 * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
7484 internal entities associated with interfaces and add minimum
7485 decoration to the defining entity of the generated wrapper to
7486 allow overriding interface primitives.
7487 * sem_disp.ads (Override_Dispatching_Operation): Addition of a
7488 new formal (Is_Wrapper).
7489 * sem_disp.adb (Override_Dispatching_Operation): When overriding
7490 interface primitives the new formal helps identifying that the
7491 new operation is not fully decorated.
7493 2013-01-03 Thomas Quinot <quinot@adacore.com>
7495 * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
7496 rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
7497 (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
7498 Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
7499 update spec accordingly (now also applies to root library units).
7500 (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
7501 on root library units, not only child units.
7502 (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
7503 (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
7504 even for root library units.
7505 (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
7506 Standard is an expanded name for a root library unit.
7508 2013-01-03 Thomas Quinot <quinot@adacore.com>
7510 * exp_ch3.adb: Minor reformatting.
7512 2013-01-03 Olivier Hainque <hainque@adacore.com>
7514 * tracebak.c: Reinstate changes to support ppc-lynx178.
7516 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7518 * atree.ads: Minor reformatting and documentation enhancement.
7520 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7522 * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
7523 a class-wide type and a renaming declaration is created for it,
7524 preserve entity chain, which already contains generated internal
7525 types. This ensures that freezing actions are properly generated
7526 for all objects declared subsequently in the same scope, and
7527 that debugging information is generated for them.
7528 * sem_util.adb, sem_util.ads (we): New debugging routine, to
7529 display entity chain of a given scope.
7531 2013-01-03 Robert Dewar <dewar@adacore.com>
7533 * exp_intr.adb: Minor reformatting.
7535 2013-01-03 Robert Dewar <dewar@adacore.com>
7537 * einfo.adb: Minor reformatting.
7539 2013-01-03 Pascal Obry <obry@adacore.com>
7541 * adaint.c, adaint.h (__gnat_get_module_name): Removed.
7542 (__gnat_is_module_name_supported): Removed.
7543 * s-win32.ads: Add some needed definitions.
7544 * g-trasym.ads: Update comments.
7546 2013-01-03 Robert Dewar <dewar@adacore.com>
7548 * layout.adb (Set_Composite_Alignment): Fix problems of
7549 interactions with Optimize_Alignment set to Space.
7551 2013-01-03 Thomas Quinot <quinot@adacore.com>
7553 * exp_disp.adb: Minor reformatting.
7555 2013-01-02 Richard Biener <rguenther@suse.de>
7558 * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
7560 2013-01-02 Thomas Quinot <quinot@adacore.com>
7562 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
7563 side effects from Tag_Arg early, doing it too late may cause a
7564 crash due to inconsistent Parent link.
7565 * sem_ch8.adb, einfo.ads: Minor reformatting.
7567 2013-01-02 Robert Dewar <dewar@adacore.com>
7569 * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
7570 * freeze.adb (Size_Known): We do not know the size of a packed
7571 record if it has atomic components, by reference type components,
7572 or independent components.
7573 * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
7574 flag Has_Independent_Components.
7576 2013-01-02 Yannick Moy <moy@adacore.com>
7578 * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
7579 * usage.adb (Usage): Update usage message.
7581 2013-01-02 Pascal Obry <obry@adacore.com>
7583 * adaint.c (__gnat_is_module_name_supported): New constant.
7585 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7587 * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
7588 array whose component type does not have a completion.
7590 2013-01-02 Geert Bosch <bosch@adacore.com>
7592 * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
7594 2013-01-02 Robert Dewar <dewar@adacore.com>
7596 * par_sco.adb: Minor reformatting.
7598 2013-01-02 Javier Miranda <miranda@adacore.com>
7600 * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
7602 2013-01-02 Olivier Hainque <hainque@adacore.com>
7604 * a-exctra.ads (Get_PC): New function.
7606 2013-01-02 Thomas Quinot <quinot@adacore.com>
7608 * sem_ch8.adb: Minor reformatting.
7610 2013-01-02 Thomas Quinot <quinot@adacore.com>
7612 * sem_ch7.adb: Minor reformatting.
7614 2013-01-02 Thomas Quinot <quinot@adacore.com>
7616 * freeze.adb (Check_Component_Storage_Order): Do not crash on
7619 2013-01-02 Robert Dewar <dewar@adacore.com>
7621 * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
7622 On_Target to Atomic_Sync_Default.
7624 2013-01-02 Robert Dewar <dewar@adacore.com>
7626 * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
7627 comparison of attribute result with constant
7628 * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
7629 Warnings (Off, "..");
7631 2013-01-02 Yannick Moy <moy@adacore.com>
7633 * sem_prag.ads: Minor correction of comment.
7635 2013-01-02 Thomas Quinot <quinot@adacore.com>
7637 * par_sco.adb (Traverse_Package_Declaration): The first
7638 declaration in a nested package is dominated by the preceding
7639 declaration in the enclosing scope.
7641 2013-01-02 Pascal Obry <obry@adacore.com>
7643 * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
7644 module containing a given address.
7646 2013-01-02 Thomas Quinot <quinot@adacore.com>
7648 * sem_ch3.adb: Minor reformatting.
7650 2013-01-02 Pascal Obry <obry@adacore.com>
7652 * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
7653 Win64 and default to ftell on other platforms.
7654 (__gnat_fsek64): Likewise.
7655 * i-cstrea.ads: Add fssek64 and ftell64 specs.
7656 * s-crtl.ads: Likewise.
7657 * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
7658 (Set_Position): Likewise.
7660 2013-01-02 Thomas Quinot <quinot@adacore.com>
7662 * par_sco.adb: Generate X SCOs for default expressions in
7663 subprogram body stubs. Do not generate any SCO for package,
7664 task, or protected body stubs.
7666 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7668 * sem_ch3.adb: Further improvement to ASIS mode for anonymous
7669 access to protected subprograms.
7671 2013-01-02 Robert Dewar <dewar@adacore.com>
7673 * par_sco.adb, vms_data.ads: Minor reformatting.
7675 2013-01-02 Thomas Quinot <quinot@adacore.com>
7677 * par_sco.adb (Traverse_Declarations_Or_Statement): Function
7678 form, returning value of Current_Dominant upon exit, for chaining
7680 (Traverse_Declarations_Or_Statement.Traverse_One, case
7681 N_Block_Statement): First statement is dominated by last declaration.
7682 (Traverse_Subprogram_Or_Task_Body): Ditto.
7683 (Traverse_Package_Declaration): First private
7684 declaration is dominated by last visible declaration.
7685 (Traverse_Sync_Definition): Ditto.
7687 2013-01-02 Thomas Quinot <quinot@adacore.com>
7689 * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
7690 matching Bit_Order to record types only, since array types do not
7693 2013-01-02 Vincent Celier <celier@adacore.com>
7695 * gnat_ugn.texi: Remove documentation of -gnateO, which is an
7697 * usage.adb: Indicate that -gnateO is an internal switch.
7699 2013-01-02 Thomas Quinot <quinot@adacore.com>
7701 * par_sco.adb: Add SCO generation for task types and single
7703 * get_scos.adb: When adding an instance table entry for a
7704 non-nested instantiation, make sure the Enclosing_Instance is
7707 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
7709 * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
7710 scope generated for subprogram inlining purposes while trying
7711 to locate the enclosing function.
7712 * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
7713 expression of pragma Postcondition when the pragma comes from
7714 source and appears inside a subprogram body.
7716 2013-01-02 Thomas Quinot <quinot@adacore.com>
7718 * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
7719 information in debug info unconditionally when using -fdump-scos,
7720 instead of relying on a separate command line switch -fdebug-instances.
7721 * gcc-interface/Make-lang.in: Update dependencies.
7723 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7725 * sem_ch12.adb: Additional refinement of predicate.
7727 2013-01-02 Vincent Celier <celier@adacore.com>
7729 * vms_data.ads: Remove incorrect spaces at end of descriptions
7730 of qualifiers for single switch.
7732 2013-01-02 Ben Brosgol <brosgol@adacore.com>
7734 * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
7735 Check_Float_Overflow.
7737 2013-01-02 Thomas Quinot <quinot@adacore.com>
7739 * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
7740 a conditional expression (CASE or IF expression) that already
7741 has parens. Also omit ELSE keyword for an IF expression without
7744 2013-01-02 Thomas Quinot <quinot@adacore.com>
7746 * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
7747 flag_debug_instances here, after front-end switches have been
7750 2013-01-02 Vincent Celier <celier@adacore.com>
7752 * usage.adb: Minor reformatting.
7754 2013-01-02 Arnaud Charlet <charlet@adacore.com>
7756 * opt.ads: Fix typo.
7758 2013-01-02 Thomas Quinot <quinot@adacore.com>
7760 * par_sco.adb: Generate P decision SCOs for SPARK pragmas
7761 Assume and Loop_Invariant.
7763 2013-01-02 Robert Dewar <dewar@adacore.com>
7765 * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
7766 * ug_words: Add entry for Float_Check_Overflow.
7767 * usage.adb: Minor reformatting.
7768 * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
7770 2013-01-02 Vincent Celier <celier@adacore.com>
7772 * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
7773 -gnateO=, -gnatet and -gnateV.
7774 * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
7775 -gnatet and -gnateV.
7776 * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
7777 * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
7778 (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
7779 /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
7782 2013-01-02 Robert Dewar <dewar@adacore.com>
7784 * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
7785 * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
7786 * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
7787 * sem_prag.adb: Implement pragma Check_Float_Overflow.
7788 * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
7789 * switch-c.adb: Recognize -gnateF switch.
7790 * tree_io.ads: Update ASIS version number.
7791 * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
7793 2013-01-02 Robert Dewar <dewar@adacore.com>
7795 * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
7796 exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
7797 freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
7798 par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
7799 sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
7800 sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
7801 * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
7803 2013-01-02 Robert Dewar <dewar@adacore.com>
7805 * err_vars.ads: Minor comment fix.
7807 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7809 * sem_ch12.adb: Refine predicate.
7811 2013-01-02 Robert Dewar <dewar@adacore.com>
7813 * errout.ads: Minor comment fixes.
7814 * opt.ads: Minor comment additions.
7815 * exp_aggr.adb: Add tags to warning messages
7816 * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
7817 sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
7818 sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
7819 sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
7820 sem_warn.adb: Add tags to warning messages
7822 2013-01-02 Doug Rupp <rupp@adacore.com>
7824 * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
7826 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7828 * sem_ch12.adb: Recover source name for renamed packagea.
7830 2013-01-02 Robert Dewar <dewar@adacore.com>
7832 * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
7833 tests to fail if insertion sequence is at end of message string.
7834 * opt.ads: Minor comment fixes and additions.
7835 * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
7836 sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
7837 * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
7838 tags. Add tags to warning messages.
7840 2013-01-02 Robert Dewar <dewar@adacore.com>
7842 * err_vars.ads (Warning_Doc_Switch): New flag.
7843 * errout.adb (Error_Msg_Internal): Implement new warning flag
7844 doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
7845 * errout.ads: Document new insertion sequences ?? ?x? ?.x?
7846 * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
7848 * erroutc.ads (Warning_Msg_Char): New variable.
7849 (Warn_Chr): New field in error message object.
7850 * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
7851 * sem_ch13.adb: Minor reformatting.
7852 * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
7853 (Warning_Doc_Switch).
7854 * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
7857 2013-01-02 Robert Dewar <dewar@adacore.com>
7859 * opt.ads: Minor reformatting.
7861 2013-01-02 Doug Rupp <rupp@adacore.com>
7863 * init.c: Reorganize VMS section.
7864 (scan_condtions): New function for scanning condition tables.
7865 (__gnat_handle_vms_condtion): Use actual exception name for imported
7866 exceptions vice IMPORTED_EXCEPTION.
7867 Move condition table scanning into separate function. Move formerly
7868 special handled conditions to system condition table. Use SYS$PUTMSG
7869 output to fill exception message field for formally special handled
7870 condtions, in particular HPARITH to provide more clues about cause and
7871 location then raised from the translated image.
7873 2013-01-02 Thomas Quinot <quinot@adacore.com>
7875 * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
7876 aspect that applies to a library subprogram, prepend corresponding
7877 pragma to the Pragmas_After list, in order for split AND THEN
7878 sections to be processed in the expected order.
7880 2013-01-02 Thomas Quinot <quinot@adacore.com>
7882 * exp_prag.adb (Expand_Pragma_Check): The statements generated
7883 for the pragma must have the sloc of the pragma, not the
7884 sloc of the condition, otherwise this creates anomalies in the
7885 generated debug information that confuse coverage analysis tools.
7887 2013-01-02 Thomas Quinot <quinot@adacore.com>
7889 * sem_ch13.adb: Minor reformatting.
7891 2013-01-02 Arnaud Charlet <charlet@adacore.com>
7893 * g-excact.ads (Core_Dump): Clarify that this subprogram does
7894 not dump cores under Windows.
7896 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7898 * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
7899 view of a subprogram has convention Intrnnsic, and a renaming
7900 of a prefixed view cannot be the prefix of an Access attribute.
7902 2013-01-02 Robert Dewar <dewar@adacore.com>
7904 * restrict.adb: Minor reformatting.
7906 2013-01-02 Thomas Quinot <quinot@adacore.com>
7908 * exp_prag.adb: Minor reformatting.
7910 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7912 * sem_ch12.adb (Get_Associated_Node): If the node is an
7913 identifier that denotes an unconstrained array in an object
7914 declaration, it is rewritten as the name of an anonymous
7915 subtype whose bounds are given by the initial expression in the
7916 declaration. When checking whether that identifier is global
7917 reference, use the original node, not the local generated subtype.
7919 2013-01-02 Olivier Hainque <hainque@adacore.com>
7921 * tracebak.c: Revert previous change, incomplete.
7923 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7925 * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
7926 appears on a subprogram body that acts as a spec, place the
7927 corresponding pragma in the declarations of the body, so that
7928 e.g. pre/postcondition checks can be generated appropriately.
7930 2013-01-02 Robert Dewar <dewar@adacore.com>
7932 * sem_ch3.adb: Minor reformatting and code reorganization.
7934 2013-01-02 Vincent Celier <celier@adacore.com>
7936 * switch-m.adb (Normalize_Compiler_Switches): Record the
7937 complete switch -fstack-check=specific instead of its shorter
7938 alias -fstack-check.
7940 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7942 * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
7943 if the derived type is a tagged generic formal type with
7944 unknown discriminants, the inherited operation has convention
7945 Intrinsic. As such, the 'Access attribute cannot be applied to it.
7947 2013-01-02 Thomas Quinot <quinot@adacore.com>
7949 * sem_attr.adb: Minor reformatting.
7951 2013-01-02 Thomas Quinot <quinot@adacore.com>
7953 * par_sco.adb: Add SCO generation for S of protected types and
7954 single protected object declarations.
7956 2013-01-02 Robert Dewar <dewar@adacore.com>
7958 * sem_eval.adb, osint.ads: Minor reformatting.
7960 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
7962 * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
7964 2013-01-02 Thomas Quinot <quinot@adacore.com>
7966 * sem_eval.adb (Compile_Time_Compare): For static operands, we
7967 can perform a compile time comparison even if in preanalysis mode.
7969 2013-01-02 Thomas Quinot <quinot@adacore.com>
7971 * par_sco.adb (SCO_Record): Always use
7972 Traverse_Declarations_Or_Statements to process the library level
7973 declaration, so that SCOs are properly generated for its aspects.
7975 2013-01-02 Thomas Quinot <quinot@adacore.com>
7977 * scos.ads (In_Decision): Add missing entry for 'a'.
7978 * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
7979 call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
7980 * sem_ch13.adb: Minor comment update.
7982 Copyright (C) 2013 Free Software Foundation, Inc.
7984 Copying and distribution of this file, with or without modification,
7985 are permitted in any medium without royalty provided the copyright
7986 notice and this notice are preserved.