1 2011-08-29 Yannick Moy <moy@adacore.com>
3 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4 types and dispatching calls in Alfa mode.
5 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
6 correspondance between body and spec scopes, to reuse utility functions
7 (Traverse_Declarations_Or_Statements): Protect access to body for stub
8 by testing the presence of the library unit for the body
9 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
10 mode the expansion of accept statements is skipped
11 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
12 the unique entity corresponding to the one returned by
13 Unique_Defining_Entity applied to the enclosing declaration of the
16 2011-08-29 Bob Duff <duff@adacore.com>
18 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
19 gdb when x is not a node (it can be a node list, name_id, etc). pp is
20 an alias for pn. ppp is an alias for pt.
22 2011-08-29 Javier Miranda <miranda@adacore.com>
24 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
25 aggregate to take a consistent decision on the need to convert into
26 assignments aggregates that initialize constant objects.
28 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
30 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
31 Build_Allocate_Deallocate_Proc in order to handle allocation of
32 non-controlled objects on subpools.
33 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
34 to be end-user visible.
35 * s-finmas.adb: Add with and use clause for System.HTable.
36 Add an instantiation of Simple_HTable which provides a mapping between
37 the address of a controlled object and the corresponding
38 Finalize_Address used to clean up the object. The table is used when a
39 master is operating in heterogeneous mode.
40 (Attach): Explain why the input node is not verified on being already
42 (Delete_Finalize_Address): New routine.
43 (Detach): Add pragma Assert which ensures that a node is already
45 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
46 since nodes are no longer removed on traversal. Explain why node
47 detachment is undesirable in this case.
48 (Get_Finalize_Address): New routine.
50 (Is_Empty_List): Removed.
51 (pm): Renamed to Print_Master. Add output for discriminant
54 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
55 * s-finmas.ads: Various comments additions / improvements.
56 Type Finalization_Master has a discriminant which determines the mode of
58 (Delete_Finalize_Address): New routine.
59 (Get_Finalize_Address): New routine.
60 (pm): Renamed to Print_Master.
61 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
62 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
63 use clause for System.IO.
64 (Allocate_Any_Controlled): Add machinery to set TSS primitive
65 Finalize_Address depending on the mode of allocation and the mode of
67 (Deallocate_Any_Controlled): Remove the relation pair object -
68 Finalize_Address regardless of the master mode. Add comment explaining
70 (Detach): Ensure that fields Prev and Next are null after detachment.
71 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
72 scheme to check whether the list of subpools is empty. There is no
73 longer need to store the next subpool or advance the current pointer.
74 (Is_Empty_List): New routine.
75 (Print_Pool): New routine.
76 (Print_Subpool): New routine.
77 * s-stposu.ads: Various comments additions / improvements.
78 Field Master of type Root_Subpool is now a heterogeneous collection.
79 (Print_Pool): New routine.
80 (Print_Subpool): New routine.
82 2011-08-29 Ed Schonberg <schonberg@adacore.com>
84 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
85 forms, using aspects of container types.
86 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
87 Has_Implicit_Dereference flags, that may be set on the partial view.
88 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
89 container type with an indexing aspect.
90 (Analyze_Quantified_Expression): Analyze construct with expansion
91 disabled, because it will be rewritten as a loop during expansion.
92 (Try_Container_Indexing): The prefix itself may be a container type
93 with an indexing aspect, as with a vector of vectors.
94 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
95 the original doamin of iteration, for name capture.
96 (Analyze_Iterator_Specification): If the domain is an expression that
97 needs finalization, create a separate declaration for it.
98 For an iterator with "of" retrieve default iterator info from aspect of
99 container type. For "in" iterator, retrieve type of Iterate function.
100 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
101 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
102 analysis, to prevent spurious errors about late attributes.
103 * sprint.adb: Handle quantified expression with either loop or iterator
105 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
108 2011-08-29 Vincent Celier <celier@adacore.com>
110 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
111 Binder or Linker of the main project file.
113 2011-08-29 Ed Schonberg <schonberg@adacore.com>
115 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
118 2011-08-29 Yannick Moy <moy@adacore.com>
120 * exp_ch9.adb: Partial revert of previous change for Alfa mode
122 2011-08-29 Yannick Moy <moy@adacore.com>
124 * exp_ch11.adb: Minor expansion of comment.
126 2011-08-29 Yannick Moy <moy@adacore.com>
128 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
130 2011-08-29 Ed Schonberg <schonberg@adacore.com>
132 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
133 interpretation, set the type before resolving the operands, because
134 legality checks on an exponention operand need to know the type of the
137 2011-08-29 Ed Schonberg <schonberg@adacore.com>
139 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
140 cleanups on a master if the instance is within a generic unit.
141 Complement to the corresponding fix to inline.adb for K520-030.
143 2011-08-29 Tristan Gingold <gingold@adacore.com>
145 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
147 * exp_intr.adb: Minor comment fix.
149 2011-08-29 Bob Duff <duff@adacore.com>
151 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
152 Delay_Required was used as an uninitialized variable.
154 2011-08-29 Robert Dewar <dewar@adacore.com>
156 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
157 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
158 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
160 2011-08-29 Thomas Quinot <quinot@adacore.com>
162 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
163 Remove unused variables.
165 2011-08-29 Ed Schonberg <schonberg@adacore.com>
167 * sem_res.adb: Remove Build_Explicit_Dereference.
168 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
169 from sem_res.adb, used in analysis of additional constructs.
170 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
171 expansion of iterators.
172 (Is_Object_Reference): Recognize variables rewritten as explicit
173 dereferences in Ada2012.
174 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
175 Reversible_Iterator names, for expansion of Ada2012 iterators.
176 * aspects.ads, aspects.adb (Find_Aspect): Utility.
177 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
178 linked list container.
179 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
180 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
182 2011-08-29 Ed Schonberg <schonberg@adacore.com>
184 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
187 2011-08-29 Vincent Celier <celier@adacore.com>
189 * make.adb (Gnatmake): Get the maximum number of simultaneous
190 compilation processes after the Builder switches has been scanned, as
191 there may include -jnn.
193 2011-08-29 Matthew Heaney <heaney@adacore.com>
195 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
197 2011-08-29 Tristan Gingold <gingold@adacore.com>
199 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
200 GNAT_DRIVER_COMMAND_LINE to 255.
202 2011-08-29 Pascal Obry <obry@adacore.com>
204 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
205 reformatting and style fix (class attribute casing).
207 2011-08-29 Yannick Moy <moy@adacore.com>
209 * exp_ch11.adb: Yet another case where expansion should be common
210 between CodePeer and Alfa.
212 2011-08-29 Yannick Moy <moy@adacore.com>
214 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
216 2011-08-29 Ed Schonberg <schonberg@adacore.com>
218 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
219 incomplete type and its completion match.
221 2011-08-29 Yannick Moy <moy@adacore.com>
223 * exp_ch13.adb: Adjust previous change.
225 2011-08-29 Robert Dewar <dewar@adacore.com>
227 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
228 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
231 2011-08-29 Emmanuel Briot <briot@adacore.com>
233 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
234 initialize aggregated projects.
236 2011-08-29 Ed Schonberg <schonberg@adacore.com>
238 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
239 depth of candidates to resolve a potentially spurious ambiguity between
240 two visible subprograms.
242 2011-08-29 Yannick Moy <moy@adacore.com>
244 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
246 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
247 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
250 2011-08-29 Arnaud Charlet <charlet@adacore.com>
252 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
255 2011-08-29 Thomas Quinot <quinot@adacore.com>
257 * sem_res.adb: Minor reformatting.
259 2011-08-29 Johannes Kanig <kanig@adacore.com>
261 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
263 * gnat1drv.adb (Adjust_Global_Switches): Set
264 Use_Expressions_With_Actions to False in ALFA mode.
265 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
268 2011-08-29 Yannick Moy <moy@adacore.com>
270 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
271 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
272 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
273 tagged types and dispatching calls in Alfa mode.
275 2011-08-29 Javier Miranda <miranda@adacore.com>
277 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
278 we do not report an error on an Empty node.
280 2011-08-29 Geert Bosch <bosch@adacore.com>
282 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
283 a-nlrear.o and a-nurear.o.
285 2011-08-29 Robert Dewar <dewar@adacore.com>
287 * freeze.adb: Minor code reorganization.
289 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
290 sem_ch6.adb: Minor reformatting
292 2011-08-29 Tristan Gingold <gingold@adacore.com>
294 * s-except.ads, s-except.adb: Provide dummy body.
296 2011-08-29 Yannick Moy <moy@adacore.com>
298 * sem_warn.adb (Within_Postcondition): Take into account the case of
299 an Ensures component in a Test_Case.
301 2011-08-29 Tristan Gingold <gingold@adacore.com>
303 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
304 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
305 System_Exceptions_Debug
306 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
307 * a-except.adb: With and use System.Exceptions_Debug instead of
309 * a-except-2005.adb: Likewise.
310 * s-assert.adb: Likewise.
311 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
312 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
313 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
314 s-excdeb. Update dependencies.
315 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
316 as these no longer need external libraries.
318 2011-08-29 Ed Schonberg <schonberg@adacore.com>
320 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
321 exponentiation operator on universal values in a context that requires
324 2011-08-29 Tristan Gingold <gingold@adacore.com>
326 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
327 before calling notify_handled_exception.
328 * a-exextr.adb: Fix comment.
330 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
332 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
333 Finalize_Address of the access type's finalization master.
334 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
335 access type's finalization master. Add a guard to prevent
336 Associated_Storage_Pool from being set on .NET/JVM.
337 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
338 attribute Finalize_Address of the access type's finalization master.
339 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
340 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
341 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
343 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
344 use clause for System.IO
345 (Detach): Relax the assertion, to be reinstated later.
346 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
347 Relax the assertion on Finalize_Address, to be reinstated later.
348 (Is_Empty_List): New routine.
349 (pm): New debug routine.
350 (Set_Finalize_Address): New routine.
351 * s-finmas.ads (pm): New debug routine.
352 (Set_Finalize_Address): New routine.
353 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
355 2011-08-29 Tristan Gingold <gingold@adacore.com>
357 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
360 2011-08-29 Tristan Gingold <gingold@adacore.com>
362 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
363 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
364 (Finalize_TCB): Remove its finalization.
365 (Initialize): Remove assignment of GET_Exc_Stack_Addr
366 * s-soflin.adb (NT_Exc_Stack): Remove
367 (Get_Exc_Stack_Addr_NT): Likewise.
368 (Get_Exc_Stack_Addr_Soft): Likewise.
369 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
370 (Get_Exc_Stack_Addr): Likewise.
371 (Get_Exc_Stack_Addr_Soft): Likewise
372 * s-taspri-vms.ads (Exc_Stack_T): Remove.
373 (Exc_Stack_Ptr_T): Likewise.
374 (Private_Data): Remove Exc_Stack_Ptr component.
376 2011-08-29 Tristan Gingold <gingold@adacore.com>
378 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
380 2011-08-29 Tristan Gingold <gingold@adacore.com>
382 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
384 2011-08-29 Geert Bosch <bosch@adacore.com>
386 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
387 L2_Norm, Swap_Column): New generic subprograms
388 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
389 L2_Norm, Swap_Column): Implement new subprograms in order to
390 eliminate dependency on BLAS and LAPACK libraries in
391 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
392 version. Forward_Eliminate/Back_Substitute can be used to put a
393 matrix in row echelon or reduced row echelon form using partial
395 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
396 Swap_Column): Instantiate from System.Generic_Array_Operations.
397 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
398 (Sqrt): Local function for simple computation of square root without
399 adding dependencies on Generic_Elementary_Functions.
400 (Swap): New subprogram to exchange floating point numbers.
401 (Inverse): Reimplement using Jordan-Gauss elimination.
402 (Jacobi): New procedure implementing Jacobi's method for computation
403 of eigensystems, based on Rutishauser's implementation.
404 (L2_Norm): Implement directly using the inner product.
405 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
406 decreasing eigenvalue as required by the Ada RM.
407 (Swap_Column): New helper procedure for Sort_Eigensystem.
408 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
409 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
412 2011-08-29 Thomas Quinot <quinot@adacore.com>
414 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
417 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
419 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
420 than the current node.
421 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
422 Finalization_Master. The list headers have two fields instead of three.
423 This should fix alignment issue but subpool allocations are now
424 unusable. Alphabetize subprograms.
425 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
426 the size of the header when converting the beginning of the object to
427 a FM_Node. Set the master's Finalize_Address attribute if not already
429 (Deallocate_Any_Controlled): Use the offset rather than the size of the
430 header when converting the beginning of the object to a FM_Node.
432 2011-08-29 Gary Dismukes <dismukes@adacore.com>
434 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
435 reraise when compiling for CodePeer.
437 2011-08-29 Arnaud Charlet <charlet@adacore.com>
439 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
440 now needed by a-convec.adb. Fix warning.
442 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
444 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
445 processing of TSS routine Finalize_Address when compiling in
448 2011-08-29 Thomas Quinot <quinot@adacore.com>
450 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
451 sem_warn.adb: Minor reformatting.
453 2011-08-29 Emmanuel Briot <briot@adacore.com>
455 * prj-conf.adb (Get_Config_Switches): Also collect the list of
456 languages from aggregated projects.
458 2011-08-29 Yannick Moy <moy@adacore.com>
460 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
461 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
462 Traverse_Package_Declaration, Traverse_Subprogram_Body,
463 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
464 for stubs are traversed too when parameter is set
465 (Traverse_All_Compilation_Units): Traverse without going inside stubs
466 (Traverse_Declarations_Or_Statements): Do the special traversing for
468 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
469 return subprogram or package body from stub.
470 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
471 stubs without prior subprogram decl.
473 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
475 * gnat_ugn.texi: Fix typo.
477 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
479 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
480 which accounts for size vs alignment issues and calculates the size of
482 (Deallocate_Any_Controlled): Ditto.
483 (Nearest_Multiple_Rounded_Up): New routine.
485 2011-08-29 Tristan Gingold <gingold@adacore.com>
487 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
488 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
489 (Set_Exception_Msg): Ditto.
490 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
492 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
493 Use Save_Occurrence instead of Save_Occurrence_No_Private.
494 (Raise_With_Msg): Remove Cleanup_Flag.
495 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
496 Clean_Flag and Private_Data components.
498 2011-08-29 Yannick Moy <moy@adacore.com>
500 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
502 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
503 of an explicitly declared type, so that the base types of the original
504 type and this generated type are the same, and a "type" (not a subtype
506 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
507 small" in Alfa mode, like in CodePeer mode.
508 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
509 clauses in Alfa mode.
511 2011-08-29 Javier Miranda <miranda@adacore.com>
513 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
514 function to the package spec.
515 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
516 internally generated bodies of null procedures locate the internally
517 generated spec enforcing mode conformance.
518 (Is_Interface_Conformant): Ensure that the controlling formal of the
521 2011-08-29 Ed Schonberg <schonberg@adacore.com>
523 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
524 reject the pragma if it appears to apply to a formal subprogram.
526 2011-08-29 Ed Schonberg <schonberg@adacore.com>
528 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
529 inner expression, to prevent double evaluation.
531 2011-08-29 Tristan Gingold <gingold@adacore.com>
533 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
535 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
536 * a-except-2005.adb (Propagate_Exception): Adjust spec.
537 (Raise_Current_Excep): Adjust call.
538 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
540 2011-08-29 Thomas Quinot <quinot@adacore.com>
542 * exp_disp.adb: Minor reformatting.
544 2011-08-29 Tristan Gingold <gingold@adacore.com>
546 * a-exexpr.adb (Setup_Exception): Removed.
547 * a-exexpr-gcc.adb (Setup_Exception): Removed.
548 * a-except.adb (Exception_Propagation): Removed.
549 * a-except-2005.adb (Setup_Exception): Removed.
550 (Reraise): Remove call to Setup_Exception.
551 (Reraise_Occurrence): Ditto.
552 (Reraise_Occurrence_Always): Ditto.
553 (Reraise_Occurrence_No_Defer): Ditto.
554 (Transfer_Occurrence): Ditto.
555 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
556 (Set_Exception_Msg): Ditto.
558 2011-08-29 Robert Dewar <dewar@adacore.com>
560 * a-convec.adb, exp_disp.adb: Minor reformatting.
562 2011-08-29 Tristan Gingold <gingold@adacore.com>
564 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
566 2011-08-29 Gary Dismukes <dismukes@adacore.com>
568 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
569 Exception_Handlers to No_List instead of Empty_List in the case where
570 there are no handlers.
572 2011-08-29 Tristan Gingold <gingold@adacore.com>
574 * gcc-interface/gigi.h (enum standard_datatypes): Add
576 (reraise_zcx_decl): New macro.
577 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
578 (gigi): Set reraise_zcx_decl.
579 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
580 (gnat_to_gnu): Handle N_Raise_Statement.
582 2011-08-29 Robert Dewar <dewar@adacore.com>
584 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
585 a-undesu.adb: Minor reformatting.
587 2011-08-29 Ed Schonberg <schonberg@adacore.com>
589 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
590 table, accept an unfrozen untagged component if it is an actual for a
591 formal incomplete type.
592 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
593 provide new iterator forms over vectors.
594 Introduce type Iterator in package body to implement operations of
595 Reversible_Iterator interface.
596 * a-iteint.ads: Make package pure so it is usable with new container
597 packages, that are categorized Remote_Types.
599 2011-08-29 Robert Dewar <dewar@adacore.com>
601 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
603 2011-08-29 Bob Duff <duff@adacore.com>
605 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
606 of <>, because this is the routine that checks for dimensionality
607 errors (for example, for a two-dimensional array, (others => <>) should
608 be (others => (others => <>)).
610 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
612 * impunit.adb: Add new run-time units.
613 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
614 s-stposu.ads, s-stposu.adb: Code clean up.
615 Handle protected class-wide or task class-wide types
616 Handle C/C++/CIL/Java types.
617 * s-spsufi.adb, s-spsufi.ads: New files.
619 2011-08-29 Yannick Moy <moy@adacore.com>
621 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
622 library-level subprogram.
623 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
625 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
627 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
629 * gnat_rm.texi: Update doc for Test_Case pragma.
631 2011-08-29 Tristan Gingold <gingold@adacore.com>
633 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
635 (GCC_Exception_Access): New type.
636 (Unwind_DeleteException): New imported procedure
637 (Foreign_Exception): Import it.
638 (GNAT_GCC_Exception): Simply have the occurrence inside.
639 (To_GCC_Exception): New function.
640 (To_GNAT_GCC_Exception): New function.
641 (GNAT_GCC_Exception_Cleanup): New procedure..
642 (Propagate_GCC_Exception): New procedure.
643 (Reraise_GCC_Exception): New procedure.
644 (Setup_Current_Excep): New procedure.
645 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
646 (Unwind_RaiseException): Ditto.
647 (Unwind_ForcedUnwind): Ditto.
649 (Begin_Handler): Change type of parameter.
650 (End_Handler): Ditto. Now delete the exception if still present.
651 (Setup_Key): Removed.
652 (Is_Setup_And_Not_Propagated): Removed.
653 (Set_Setup_And_Not_Propagated): Ditto.
654 (Clear_Setup_And_Not_Propagated): Ditto.
655 (Save_Occurrence_And_Private): Ditto.
656 (EID_For): Add 'not null' constraint on parameter.
657 (Setup_Exception): Does nothing.
658 (Propagate_Exception): Simplified.
659 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
660 re-raise is not expanded anymore.
661 * s-except.ads (Foreign_Exception): New exception - placeholder for
663 * raise-gcc.c (__gnat_setup_current_excep): Declare
664 (CXX_EXCEPTION_CLASS): Define (not yet used)
665 (GNAT_EXCEPTION_CLASS): Define.
666 (is_handled_by): Handle foreign exceptions.
667 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
669 2011-08-29 Jose Ruiz <ruiz@adacore.com>
671 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
673 2011-08-29 Thomas Quinot <quinot@adacore.com>
675 * a-synbar-posix.adb: Minor reformatting.
677 2011-08-29 Jose Ruiz <ruiz@adacore.com>
679 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
680 a-exetim-default.ads (Interrupt_Clocks_Supported,
681 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
682 definitions to be compliant with AI-0171. The target systems do not
683 support separate account for the execution time of interrupt handlers.
685 2011-08-29 Jose Ruiz <ruiz@adacore.com>
687 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
688 in the barrier to put first the easiest to evaluate (and the one which
689 will be True more often). More efficient.
691 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
693 * s-atocou-x86.adb: Fix constraint in machine code insertion.
695 2011-08-29 Bob Duff <duff@adacore.com>
697 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
698 attributes that are now aspects, as specified by AI05-0229-1.
699 * sem_ch13.adb (Analyze_Aspect_Specifications,
700 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
701 pragmas or attribute references, as appropriate.
703 2011-08-29 Robert Dewar <dewar@adacore.com>
705 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
706 a-synbar-posix.ads: Minor reformatting.
708 2011-08-29 Yannick Moy <moy@adacore.com>
710 * snames.ads-tmpl: Add name Force.
712 2011-08-29 Pascal Obry <obry@adacore.com>
714 * prj-nmsc.adb: Minor reformatting.
716 2011-08-29 Jose Ruiz <ruiz@adacore.com>
718 * a-exetim.ads (Interrupt_Clocks_Supported,
719 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
720 definitions to be compliant with AI-0171.
722 2011-08-29 Robert Dewar <dewar@adacore.com>
724 * a-ngelfu.adb: Add comments.
726 2011-08-29 Geert Bosch <bosch@adacore.com>
728 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
729 the closest machine number to Pi / 2.0.
731 2011-08-29 Jose Ruiz <ruiz@adacore.com>
733 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
734 package Ada.Synchronous_Barriers.
735 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
736 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
737 default implementation using protected objects and another one
738 a-synbar-posix using POSIX barriers as the underlying support.
739 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
740 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
741 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
742 Clean up dependencies.
743 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
745 2011-08-29 Robert Dewar <dewar@adacore.com>
747 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
748 exp_dist.adb: Minor code reorganization.
751 2011-08-29 Thomas Quinot <quinot@adacore.com>
753 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
754 primitive operation must support external streaming if it is not a
755 controlling access result.
757 2011-08-29 Thomas Quinot <quinot@adacore.com>
759 * sinfo.ads, sem_ch7.adb: Minor reformatting.
761 2011-08-29 Bob Duff <duff@adacore.com>
763 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
764 restriction on allocators, as required by AI05-0013-1.
765 * restrict.ads: Minor comment fix.
767 2011-08-29 Tristan Gingold <gingold@adacore.com>
769 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
770 (To_Jmpbuf_Address): Ditto
771 (builtin_longjmp): Ditto
773 2011-08-29 Thomas Quinot <quinot@adacore.com>
775 * sem_res.adb: Minor reformatting.
777 2011-08-29 Vincent Celier <celier@adacore.com>
779 * make.adb (Gnatmake): Move special processing for VM targets after the
780 call to Get_Target_Parameters.
782 2011-08-29 Thomas Quinot <quinot@adacore.com>
784 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
786 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
788 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
789 where an anonymous access discriminant of a limited designated type
790 appears in a non-immutably limited discriminated type and issue an
791 error message. Add local variable Desig_T and replace all occurrences
794 2011-08-29 Jose Ruiz <ruiz@adacore.com>
796 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
797 implementation is compliant to RM D.15(15/2) after the modification
798 imposed by AI05-0094-1 (binding interpretation).
800 2011-08-29 Robert Dewar <dewar@adacore.com>
802 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
803 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
805 2011-08-29 Thomas Quinot <quinot@adacore.com>
807 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
808 the scope name, do not report a missing label as a style violation (it
809 will be diagnosed as an illegality).
810 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
811 variant records: Get_Enum_Lit_From_Pos already returns a usage
812 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
813 on Expr in Integer_Literal case so that it can be used by
816 2011-08-29 Tristan Gingold <gingold@adacore.com>
818 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
820 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
821 (Build_Abort_Block_Handler): New function to build an Abort_Signal
823 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
824 Build_Abort_Block_Handler to build the exception handler. Do not
825 undefer aborts for the Abort_Signal exception handler if back-end
827 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
828 back_end exceptions for all others and abort_signal.
829 * s-except.ads (ZCX_By_Default): New constant.
830 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
831 (Raise_Exception_Always): Ditto.
832 (Raise_From_Signal_Handler): Ditto.
833 (Raise_With_Location_And_Msg): Ditto.
834 (Raise_With_Msg): Ditto.
836 (Reraise_Occurence): Ditto.
837 (Reraise_Occurrence_Always): Ditto.
838 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
839 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
841 2011-08-29 Thomas Quinot <quinot@adacore.com>
843 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
845 2011-08-29 Robert Dewar <dewar@adacore.com>
847 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
848 Minor code reorganization.
850 2011-08-29 Bob Duff <duff@adacore.com>
852 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
853 2012, not just Ada 2005.
855 2011-08-29 Vincent Celier <celier@adacore.com>
857 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
858 with a project file or with gprbuid, if -gnatep= is specified, the
859 builder may need to be invoked with -x.
861 2011-08-29 Tristan Gingold <gingold@adacore.com>
863 * a-exexpr-gcc.adb: Minor comment fix.
865 2011-08-29 Robert Dewar <dewar@adacore.com>
867 * sem_ch8.adb: Minor reformatting.
869 2011-08-29 Bob Duff <duff@adacore.com>
871 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
872 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
873 treating "some" as unreserved in earlier Ada versions. This is now
874 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
875 rather than Name_Some, since Tok_Some is now recognized as reserved.
876 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
878 * scans.ads: Minor comment fixes.
879 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
880 for other language versions.
881 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
882 treating "some" as unreserved in earlier Ada versions. This is now
883 handled in Snames.Is_Keyword_Name.
884 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
886 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
887 unreserved in earlier Ada versions. This is now handled in
888 Snames.Is_Keyword_Name.
889 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
890 words as for other language versions.
891 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
892 Ada 2012, not just Ada 2005.
894 2011-08-29 Ed Schonberg <schonberg@adacore.com>
896 * sem_ch13.adb: Additional semantic checks for aspects involved in
899 2011-08-29 Matthew Heaney <heaney@adacore.com>
901 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
902 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
904 (Ancestor_Find): ditto.
906 2011-08-29 Thomas Quinot <quinot@adacore.com>
908 * par-endh.adb: Minor reformatting.
910 2011-08-29 Tristan Gingold <gingold@adacore.com>
912 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
913 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
914 (Adjust_N_CLeanups_For): Remove.
915 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
917 (Propgate_Exception): Adjust.
918 * raise-gcc.c: Add a few static/const.
919 (Adjust_N_Cleanups_For): Remove declaration.
920 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
922 2011-08-29 Ed Schonberg <schonberg@adacore.com>
924 * sem_ch8.adb: Use type of function return when rewriting as object
927 2011-08-29 Gary Dismukes <dismukes@adacore.com>
929 * sem_type.adb: Minor reformatting.
931 2011-08-29 Robert Dewar <dewar@adacore.com>
933 * makeutl.adb: Minor reformatting.
935 2011-08-29 Ed Schonberg <schonberg@adacore.com>
937 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
938 function call of a limited type, the expansion of the renaming is
939 complicated by the presence of various temporaries and subtypes that
940 capture constraints of the renamed object.
941 Rewrite node as an object declaration, whose expansion is simpler.
942 Given that the object is limited there is no copy involved and no
945 2011-08-29 Robert Dewar <dewar@adacore.com>
947 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
948 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
950 2011-08-29 Tristan Gingold <gingold@adacore.com>
952 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
953 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
954 system-linux-hppa.ads, system-linux-s390.ads,
955 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
956 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
957 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
958 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
959 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
960 system-solaris-sparc.ads, system-lynxos-x86.ads,
961 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
962 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
963 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
964 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
965 system-vxworks-x86.ads: Remove GCC_ZCX_Support
966 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
967 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
968 * opt.ads: Adjust comment.
969 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
970 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
971 * system.ads: Move GCC_ZCX_Support to obsolete entries.
973 2011-08-29 Emmanuel Briot <briot@adacore.com>
975 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
976 file name is specified on the gnatmake or gprbuild command line, and
977 before we search for that file in the project.
979 2011-08-29 Ed Schonberg <schonberg@adacore.com>
981 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
982 used to determine whether a possible interpretation for an overloadable
983 entity is declared within the current instantiation and should be
984 included in the candidate set.
986 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
988 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
990 2011-08-29 Ed Schonberg <schonberg@adacore.com>
992 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
993 access subtype is access_to_subprogram, when applying checks for
996 2011-08-29 Matthew Heaney <heaney@adacore.com>
998 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
999 for sibling when common parent.
1001 2011-08-29 Thomas Quinot <quinot@adacore.com>
1003 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1006 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1008 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1009 for the return type when in ASIS mode.
1011 2011-08-29 Vincent Celier <celier@adacore.com>
1013 * make.adb (Gnatmake): Get the default search dirs, then the target
1014 parameters after getting the Builder switches, as the Builder switches
1015 may include --RTS= and that could change the default search dirs.
1017 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1019 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1020 Make_Final_Call. Move the processing for class-wide types before the
1021 processing for derivations from [Limited_]Controlled.
1022 (Make_Final_Call): Move the processing for class-wide types before the
1023 processing for derivations from [Limited_]Controlled.
1024 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1025 Add code to account for alignments larger than the list header. Add a
1026 comment illustrating the structure of the allocated object + padding +
1028 (Deallocate_Any_Controlled): Add code to account for alignments larger
1029 than the list header.
1031 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1033 * sinfo.ads, sinfo.adb: New node kind
1034 N_Formal_Incomplete_Type_Definition, related flags.
1035 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1036 Parse formal incomplete types.
1037 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1039 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1040 Formal incomplete types do not need completion.
1041 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1042 Validate_Incomplete_Type_Instance): New procedures to handle formal
1044 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1045 that corresponds to a formal incomplete type.
1046 * sprint.adb: Handle formal incomplete type declarations.
1047 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1050 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1052 * a-fihema.ads, a-fihema.adb: Unit removed.
1053 * a-undesu.ads, a-undesu.adb: New unit implementing
1054 Ada.Unchecked_Deallocate_Subpool.
1055 * einfo.adb: Remove Associated_Collection from the node usage.
1056 Add Finalization_Master to the node usage.
1057 (Associated_Collection): Removed.
1058 (Finalization_Master): New routine.
1059 (Set_Associated_Collection): Removed.
1060 (Set_Finalization_Master): New routine.
1061 (Write_Field23_Name): Remove Associated_Collection from the output. Add
1062 Finalization_Master to the output.
1063 * einfo.ads: Remove attribute Associated_Collection and its uses in
1065 Add new attribute Finalization_Master along with its uses in entitites.
1066 (Associated_Collection): Removed along with its pragma import.
1067 (Finalization_Master): New routine along with a pragma import.
1068 (Set_Associated_Collection): Removed along with its pragma import.
1069 (Set_Finalization_Master): New routine along with a pragma import.
1070 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1071 Build_Finalization_Collection with Build_Finalization_Master.
1072 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1073 before the bodies of the predefined routines. Add comment explaining
1074 this. Replace call to Build_Finalization_Collection with
1075 Build_Finalization_Master.
1076 (Freeze_Type): Replace call to Build_Finalization_Collection with
1077 Build_Finalization_Master.
1078 (Make_Finalize_Address_Body): Comment reformatting.
1079 (Make_Predefined_Primitive_Specs): Code reformatting.
1080 (Stream_Operation_OK): Update comment mentioning finalization
1081 collections. Replace RE_Finalization_Collection with
1082 RE_Finalization_Master.
1083 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1084 Associated_Collection with Finalization_Master. Replace call to
1085 Build_Finalization_Collection with Build_Finalization_Master.
1086 (Expand_Allocator_Expression): Replace call to Associated_Collection
1087 with Finalization_Master. Replace call to Set_Associated_Collection with
1088 Set_Finalization_Master. Remove the generation of
1089 Set_Finalize_Address_Ptr.
1090 (Expand_N_Allocator): Replace call to Associated_Collection with
1091 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1092 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1093 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1094 comment on usage. Replace call to Needs_BIP_Collection with
1095 Needs_BIP_Finalization_Master Remplace BIP_Collection with
1096 BIP_Finalization_Master. Update all comments which mention finalization
1097 collections. Replace Associated_Collection with
1098 Finalization_Master. Replace Build_Finalization_Collection with
1099 Build_Finalization_Master.
1100 (BIP_Formal_Suffix): Update BIP_Collection's case.
1101 (Build_Heap_Allocator): Update the related comment. Rename local
1102 variable Collect to Fin_Mas_Id and update its occurrences. Update
1103 comments which mention finalization collections. Replace
1104 Set_Associated_Collection with Set_Finalization_Master.
1105 (Expand_Call): Update the code which detects a special piece of library
1107 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1108 Add_Collection_Actual_To_Build_In_Place_Call with
1109 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1110 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1111 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1112 Add_Collection_Actual_To_Build_In_Place_Call with
1113 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1114 (Make_Build_In_Place_Call_In_Assignment): Replace call to
1115 Add_Collection_Actual_To_Build_In_Place_Call with
1116 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1117 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1118 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1119 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1120 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1121 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1122 Replace call to Set_Associated_Collection with Set_Finalization_Master.
1123 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1124 Replace the call to Associated_Collection with Finalization_Master.
1125 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1126 Update the way finalization master names are generated. Update the
1127 retrieval of the correct access type which will carry the pool and
1129 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1130 (Make_Finalize_Address_Body): Abstract types do not need
1131 Finalize_Address. Code reformatting.
1132 (Make_Finalize_Address_Stmts): Update comment on usage.
1133 (Make_Set_Finalize_Address_Ptr_Call): Removed.
1134 (Process_Declarations): Update comments.
1135 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1136 Build_Finalization_Master. Update associated comment.
1137 (Make_Set_Finalize_Address_Ptr_Call): Removed.
1138 * exp_ch13.adb: Update comments which mention finalization collections.
1139 (Expand_N_Free_Statement): Replace the call to Associated_Collection
1140 with Finalization_Master.
1141 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1142 create calls to routines Allocate_Any_Controlled and
1143 Deallocate_Any_Controlled.
1144 (Find_Finalize_Address): New routine.
1145 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1147 (Requires_Cleanup_Actions): Update the comment on freeze node
1149 * exp_util.ads: Remove comment on generated code for
1150 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1151 is better to simply look in the body.
1152 * freeze.adb (Freeze_All): Update the comment of finalization
1153 collections. Replace the call to Associated_Collection with
1154 Finalization_Master. Replace the call to Build_Finalization_Collection
1155 with Build_Finalization_Master.
1156 * impunit.adb: Add a-undesu and s-stposu to the list of units.
1157 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1159 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1160 Ada.Finalization. Add processing for children of System.Storage_Pools.
1161 * rtsfind.ads: Remove the naming of second level children of
1163 Remove Ada_Finalization_Heap_Management from the list of units.
1164 Remove subtype Ada_Finalization_Child.
1165 Remove the following subprogram entities:
1169 RE_Finalization_Collection
1170 RE_Finalization_Collection_Ptr
1171 RE_Set_Finalize_Address_Ptr
1173 Add the naming of second level children of System.Storage_Pools.
1174 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1176 Add subtype System_Storage_Pools_Child.
1177 Add the following subprogram entities to System.Finalization_Masters:
1179 RE_Finalization_Master
1180 RE_Finalization_Master_Ptr
1182 Add the following subprogram entities to System.Storage_Pools.Subpools:
1184 RE_Allocate_Any_Controlled
1185 RE_Deallocate_Any_Controlled
1186 RE_Root_Storage_Pool_With_Subpools
1190 Move the following subprogram entities from
1191 Ada.Finalization.Heap_Management to System.Finalization_Masters:
1193 RE_Add_Offset_To_Address
1198 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1199 Set_Associated_Collection with Set_Finalization_Master.
1200 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1201 BIP_Finalization_Master is created.
1202 * s-finmas.adb: New unit System.Finalization_Masters.
1203 * s-finmas.ads: New unit System.Finalization_Masters.
1204 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1205 * s-stposu.ads, s-stposu.adb: New unit implementing
1206 System.Storage_Pools.Subpools.
1208 2011-08-29 Bob Duff <duff@adacore.com>
1210 * tbuild.adb: Add assertion.
1212 2011-08-29 Thomas Quinot <quinot@adacore.com>
1214 * s-pooglo.adb: Minor reformatting.
1216 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1218 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1219 an indexed component of a packed array whose element type is a record
1220 with a representation clause different from that of the right-hand
1221 side, generate a temporary to minimuze the number of bit-field
1222 operations generated.
1224 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1226 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1227 declarations, and thus are likely insertion points for actions.
1229 2011-08-29 Bob Duff <duff@adacore.com>
1231 * einfo.ads: Minor comment fix.
1233 2011-08-29 Robert Dewar <dewar@adacore.com>
1235 * frontend.adb, gnat1drv.adb: Minor reformatting.
1237 2011-08-29 Tristan Gingold <gingold@adacore.com>
1239 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1240 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
1241 space in front of the header.
1243 2011-08-29 Johannes Kanig <kanig@adacore.com>
1245 * frontend.adb (Frontend): Exit after creating Standard package when
1246 -gnatd.H is present.
1247 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1250 2011-08-29 Robert Dewar <dewar@adacore.com>
1252 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1253 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1254 snames.ads-tmpl: Minor reformatting.
1256 2011-08-29 Philippe Gil <gil@adacore.com>
1258 * prj.adb (Reset_Units_In_Table): New procedure.
1259 Reset units to avoid access to freed memory.
1261 2011-08-29 Thomas Quinot <quinot@adacore.com>
1263 * get_scos.adb: When reading a P statement SCO without a pragma name
1264 (from an older ALI file), ensure that the Pragma_Name component is set
1265 to Unknown_Pragma (not left uninitialized).
1267 2011-08-29 Vincent Celier <celier@adacore.com>
1269 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1270 modified to compute correctly the object path of a SAL project that is
1271 extending another library project.
1272 (Write_Path_File): New procedure.
1273 * makeutl.ads (Directories): New table moved from Buildgpr
1274 (Get_Directories): New procedure moved from Buildgpr
1275 (Write_Path_File): New procedure
1276 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1277 paths before binding SALs, instead of Set_Ada_Paths.
1278 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1280 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1281 (Current_Source_Path_File_Of): New function
1282 (Set_Current_Object_Path_File_Of): New procedure
1283 (Current_Source_Object_File_Of): New function
1284 (Set_Current_Object_Path_File_Of): New procedure
1285 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1286 (Current_Source_Path_File_Of): New function
1287 (Set_Current_Object_Path_File_Of): New procedure
1288 (Current_Source_Object_File_Of): New function
1289 (Set_Current_Object_Path_File_Of): New procedure
1291 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1293 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1294 packed entity, use a bit-field assignment only if there is no change of
1297 2011-08-29 Thomas Quinot <quinot@adacore.com>
1299 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1300 Is_RTU instead of using Chars comparisons.
1302 2011-08-29 Thomas Quinot <quinot@adacore.com>
1304 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1305 temporary object if the actual is constrained, and the discriminants
1306 read from the stream don't match.
1308 2011-08-29 Tristan Gingold <gingold@adacore.com>
1310 * sem_attr.adb, exp_attr.adb: Add handling of
1311 Attribute_System_Allocator_Alignment
1312 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1313 Attribute_System_Allocator_Alignment.
1314 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1315 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1316 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1317 get_target_system_allocator_alignment.
1319 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1321 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1324 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1326 * exp_ch3.adb (In_Runtime): Fix typo.
1328 2011-08-29 Bob Duff <duff@adacore.com>
1330 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1332 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1334 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1335 and a separate tag assignment is generated, ensure that the tag
1336 assignment is analyzed.
1338 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1340 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1341 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1342 of statement lists that may contain local declarations.
1343 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1344 duplicate the triggering statements needed for the expansion of this
1345 construct, when the trigger is a dispatching call to a synchronized
1348 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1350 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1351 * bindgen.adb: Add comments.
1352 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1355 2011-08-29 Robert Dewar <dewar@adacore.com>
1357 * exp_attr.adb: Minor reformatting.
1358 Minor code reorganization and commenting.
1359 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1362 2011-08-29 Thomas Quinot <quinot@adacore.com>
1364 * get_scos.adb: Ignore chaining indicators not currently supported
1367 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1369 * system.ads: Minor editing.
1371 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1373 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1375 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1376 Attribute_Elab_Subp_Body.
1377 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1378 * sem_util.adb: Update comments.
1380 2011-08-29 Thomas Quinot <quinot@adacore.com>
1382 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1383 pragma name for each SCO statement corresponding to a pragma.
1385 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1387 * opt.ads: Minor editing.
1389 2011-08-29 Yannick Moy <moy@adacore.com>
1391 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1392 that only made sense for CodePeer mode.
1394 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1396 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1397 which is no longer used.
1398 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1399 handling of the 64-bit division check.
1400 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1402 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1405 2011-08-29 Thomas Quinot <quinot@adacore.com>
1407 * get_scos.adb: Minor reformatting.
1409 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1411 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
1412 statement list is wrapped in a block, the block is explicitly analyzed
1413 in order to properly redecorate the entities and create a servicing
1416 2011-08-29 Tristan Gingold <gingold@adacore.com>
1418 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1419 (Set_Zero_Cost_Handling): Remove.
1421 2011-08-29 Thomas Quinot <quinot@adacore.com>
1423 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1425 2011-08-29 Geert Bosch <bosch@adacore.com>
1427 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1428 instruction, as the latter may produce -0.0, which is not a valid VAX
1430 (Neg_G): Likewise for VAX F float.
1432 2011-08-29 Robert Dewar <dewar@adacore.com>
1434 * exp_util.adb: Minor reformatting.
1436 2011-08-29 Yannick Moy <moy@adacore.com>
1438 * sem_ch3.adb: Minor comment update.
1440 2011-08-29 Thomas Quinot <quinot@adacore.com>
1442 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1445 2011-08-29 Thomas Quinot <quinot@adacore.com>
1447 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1448 current statement sequence on a generic instantiation or a subprogram
1451 2011-08-29 Robert Dewar <dewar@adacore.com>
1453 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1456 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1458 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1459 Correct the check which involves the freeze node of a controlled or
1460 access-to-controlled type.
1462 2011-08-29 Geert Bosch <bosch@adacore.com>
1464 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1466 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1469 2011-08-29 Yannick Moy <moy@adacore.com>
1471 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1472 for every index type and component type that is not a subtype_mark.
1473 (Process_Subtype): Set Etype of subtype.
1475 2011-08-29 Robert Dewar <dewar@adacore.com>
1477 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1478 reorganization. Minor reformatting.
1480 2011-08-29 Steve Baird <baird@adacore.com>
1482 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1483 for CodePeer and ALFA modes.
1485 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1487 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1488 that comes from an enclosing scope if it is not the renaming of an
1489 actual, to handle properly a spurious ambiguity in an instance.
1491 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
1493 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1494 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
1495 use it instead of the Esize of the first parameter.
1496 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1498 <Size>: Likewise. Call it for composite types on the RM size.
1500 2011-08-29 Yannick Moy <moy@adacore.com>
1502 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1503 * sem_util.adb (Unique_Name): Correct behaviour for names of
1506 2011-08-29 Yannick Moy <moy@adacore.com>
1508 * sem_prag.adb (Check_Precondition_Postcondition): In formal
1509 verification mode, analyze pragma expression for correctness, for
1510 pre/post on library-level subprogram, as it is not expanded later.
1512 2011-08-29 Yannick Moy <moy@adacore.com>
1514 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1515 in formal verification.
1517 2011-08-29 Thomas Quinot <quinot@adacore.com>
1519 * sem_util.adb: Minor reformatting.
1520 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1522 * par_sco.ads, par_sco.adb: Update comments.
1524 2011-08-29 Yannick Moy <moy@adacore.com>
1526 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1527 associated getter/setter.
1528 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1530 2011-08-29 Vincent Celier <celier@adacore.com>
1532 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1533 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1534 with declarations for Language_Kind and Dependency_Kind for Ada.
1535 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1536 (Process_Compiler): Take into account the new attributes Dependency_Kind
1538 (Check_Configuration): Check if language kind is unit based, not if the
1539 language name is Ada.
1540 (Process_Exceptions_Unit_Based): Ditto
1541 (Add_Language): Remove default additions of language and dependency kind
1542 * prj.ads: Minor comment change
1543 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1545 2011-08-29 Johannes Kanig <kanig@adacore.com>
1547 * debug.adb: Update comments.
1549 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1551 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1552 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1553 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1554 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1555 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1557 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1559 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1560 (GNATLIBCFLAGS_FOR_C): Replace
1561 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1562 (gnatlib-shared-default, gnatlib-shared-dual-win32)
1563 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1564 (gnatlib-sjlj, gnatlib-zcx): Likewise.
1566 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
1568 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1570 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1572 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1574 2011-08-05 Nicolas Roche <roche@adacore.com>
1576 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1577 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1579 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1581 2011-08-05 Matthew Heaney <heaney@adacore.com>
1583 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1584 subprogram bodies declared out-of-order.
1586 2011-08-05 Yannick Moy <moy@adacore.com>
1588 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1589 entities directly in package Standard, otherwise skip the standard
1592 2011-08-05 Robert Dewar <dewar@adacore.com>
1594 * a-cbmutr.adb: Minor reformatting
1595 (Allocate_Node): refactor node allocation algorithm
1597 2011-08-05 Robert Dewar <dewar@adacore.com>
1599 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1600 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1602 (Analyze_Pragma, case Check_Policy): Ditto.
1603 * sem_prag.ads (Check_Disabled): New function
1604 * snames.ads-tmpl: Add Name_Disable.
1606 2011-08-05 Robert Dewar <dewar@adacore.com>
1608 * gnat_rm.texi: Document implementation-defined policy DISABLE for
1609 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1611 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1613 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1614 that appears in a generic formal part and applies to a formal
1617 2011-08-05 Robert Dewar <dewar@adacore.com>
1619 * a-cbmutr.ads: Minor reformatting.
1621 2011-08-05 Matthew Heaney <heaney@adacore.com>
1623 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1624 to check count, check sign of value instead.
1625 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1626 (Copy_Subtree): allocate copy of source element
1627 (Equal_Subtree): compare elements, not access objects
1629 2011-08-05 Vincent Celier <celier@adacore.com>
1631 * gnat_ugn.texi: Fix VMS alternative.
1633 2011-08-05 Thomas Quinot <quinot@adacore.com>
1635 * sem_ch11.adb: Add comment.
1637 2011-08-05 Robert Dewar <dewar@adacore.com>
1639 * exp_util.adb: Minor comment fix.
1641 2011-08-05 Robert Dewar <dewar@adacore.com>
1643 * scng.adb (Error_Unterminated_String): Improve flag position when
1646 2011-08-05 Matthew Heaney <heaney@adacore.com>
1648 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1650 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1651 multiway tree containers.
1653 2011-08-05 Robert Dewar <dewar@adacore.com>
1655 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1656 * stylesw.adb: Implement -gnatyC to control comment spacing
1657 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1659 * usage.adb: Add line for -gnatyC.
1661 2011-08-05 Robert Dewar <dewar@adacore.com>
1663 * gnat_ugn.texi: Document -gnatyC.
1664 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1665 synonym for COMMENTS2).
1667 2011-08-05 Robert Dewar <dewar@adacore.com>
1669 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1670 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1671 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1672 a-comutr.ads, lib-xref.adb: Minor reformatting.
1674 2011-08-05 Robert Dewar <dewar@adacore.com>
1676 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1677 warning if there is an exception handler present.
1679 2011-08-05 Pascal Obry <obry@adacore.com>
1681 * a-iteint.ads: Fix copyright year.
1683 2011-08-05 Thomas Quinot <quinot@adacore.com>
1685 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1686 statement SCO for a USE clause or a representation clause.
1688 2011-08-05 Yannick Moy <moy@adacore.com>
1690 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1691 between body and spec for stub.
1692 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1693 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1694 pragma precondition or postcondition, for which the enclosing
1695 subprogram or package in the AST is not the desired one, return empty.
1697 2011-08-05 Thomas Quinot <quinot@adacore.com>
1699 * g-expect.adb: Minor reformatting.
1701 2011-08-05 Bob Duff <duff@adacore.com>
1703 * a-fihema.adb: Comment out OS_Lib.
1705 2011-08-05 Matthew Heaney <heaney@adacore.com>
1707 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1708 (unbounded multiway tree containers) and a-iteint.ads.
1709 * a-comutr.ads, a-comutr.adb:
1710 This is the new Ada 2012 unit for unbounded multiway tree containers
1711 * a-cimutr.ads, a-cimutr.adb
1712 This is the new Ada 2012 unit for indefinite multiway tree containers
1713 * a-iteint.ads: New file.
1715 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1717 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1719 2011-08-05 Bob Duff <duff@adacore.com>
1721 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1723 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1725 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1727 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1728 general indexing aspects of Ada2012. Called when analyzing indexed
1729 components when other interpretations fail.
1730 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1731 in an expression context where overloading is meaningful. This excludes
1732 the occurrence in an aspect specification (efficiency only).
1733 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1734 related to iterators can be set by an attribute specification, but
1736 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1737 Constant_Indexing and Variable_Indexing.
1738 (Check_Indexing_Functions): New procedure to perform legality checks.
1739 Additional semantic checks at end of declarations.
1741 2011-08-05 Sergey Rybin <rybin@adacore.com>
1743 * tree_io.ads: Update ASIS_Version_Number because of the change of the
1744 order of calling Tree_Write/Tree_Read routines made for aspects.
1746 2011-08-05 Bob Duff <duff@adacore.com>
1748 * a-fihema.adb (Finalize): Fix race condition.
1750 2011-08-05 Yannick Moy <moy@adacore.com>
1752 * sem_ch12.adb (Analyze_Package_Instantiation,
1753 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1756 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1758 * sem_type.adb (Specific_Type): in an instance, the type-specific
1759 operand of an equality check that involves null may have a private
1760 type. Use full view to determine legality of construct.
1762 2011-08-05 Vincent Celier <celier@adacore.com>
1764 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1765 delete or close the file when the call to gnatmake was successful.
1767 2011-08-05 Yannick Moy <moy@adacore.com>
1769 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1770 Global_Discard_Names.
1772 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1774 * sinfo.ads: comments on use of entity field for aspect specifications.
1776 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1778 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1779 node is not itself an entity but a selected component, it is a
1780 rewritten parameterless call to an en enclosing synchronized operation,
1781 and this expansion will be performed again in the instance, so there is
1782 no global information to preserve.
1784 2011-08-05 Javier Miranda <miranda@adacore.com>
1786 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1787 for renamings of predefined primitives.
1788 (In_Predef_Prims_DT): New subprogram.
1790 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1792 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1793 possible interpretation of name is a reference type, add an
1794 interpretation that is the designated type of the reference
1795 discriminant of that type.
1796 * sem_res.adb (resolve): If the interpretation imposed by context is an
1797 implicit dereference, rewrite the node as the deference of the
1798 reference discriminant.
1799 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1800 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1801 parent type or base type.
1802 * sem_ch4.adb (Process_Indexed_Component,
1803 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1804 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1805 Check for implicit dereference.
1806 (List_Operand_Interps): Indicate when an implicit dereference is
1808 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1810 2011-08-05 Thomas Quinot <quinot@adacore.com>
1812 * scos.ads: Update documentation of SCO table. Pragma statements can now
1813 be marked as disabled (using 'p' instead of 'P' as the statement kind).
1814 * par_sco.ads, par_sco.adb: Implement the above change.
1815 (Process_Decisions_Defer): Generate a P decision for the first parameter
1816 of a dyadic pragma Debug.
1817 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1819 * put_scos.adb: Code simplification based on above change.
1821 2011-08-05 Robert Dewar <dewar@adacore.com>
1823 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1824 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1825 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1826 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1828 2011-08-05 Bob Duff <duff@adacore.com>
1830 * a-stunau.ads, g-spipat.adb: Update comments.
1832 2011-08-05 Bob Duff <duff@adacore.com>
1834 * a-fihema.ads: Minor comment fix.
1835 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1837 (Attach, Detach): Remove some unnecessary code.
1838 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1840 2011-08-05 Bob Duff <duff@adacore.com>
1842 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1843 allocation for Objects component. This simplifies the code somewhat. It
1844 is also a little more efficient in the not-so-unusual case where there
1845 are no controlled objects allocated.
1846 Make Finalization_Started flag atomic.
1847 (Finalize): Avoid unnecessary detachment of items from the list.
1848 (pcol): Minor cleanup.
1850 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1852 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1853 package whose name is the same as that of the generic unit, or its
1856 2011-08-05 Bob Duff <duff@adacore.com>
1858 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1859 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1860 Minor comment fixes.
1862 2011-08-05 Arnaud Charlet <charlet@adacore.com>
1864 * make.adb (Linking_Phase): No longer need to set source search path
1865 before calling gnatlink in CodePeer mode.
1866 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1867 gcc in CodePeer mode, since the binder generated file no longer has a
1869 * switch.ads, switch.adb (Is_Language_Switch): Removed.
1870 * switch-c.adb: Update comment.
1872 2011-08-05 Thomas Quinot <quinot@adacore.com>
1874 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1876 2011-08-05 Nicolas Roche <roche@adacore.com>
1878 * gnat_ugn.texi: Fix minor syntax error issue.
1880 2011-08-05 Vincent Celier <celier@adacore.com>
1882 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1883 delete or close the file when the call to gnatmake returns a non
1884 successful return code.
1886 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1888 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1889 check, indicate that the copy of the original node does not come from
1890 source, to prevent an infinite recursion of the expansion.
1892 2011-08-05 Johannes Kanig <kanig@adacore.com>
1894 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1895 VC generation for subprogram bodies.
1897 2011-08-05 Yannick Moy <moy@adacore.com>
1900 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1901 the base type with the smallest allowed base type.
1903 2011-08-05 Sergey Rybin <rybin@adacore.com>
1905 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1908 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1910 * sem_ch12.ads: minor comment updates.
1912 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1914 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1915 instantiation and a formal package the compiler generates a package
1916 renaming declaration so that the generic name within the declaration
1917 is interpreted as a renaming of the instance. At the end of a formal
1918 package declaration, this renaming must become invisible.
1920 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1922 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1923 comparison and rely on concrete entities instead.
1925 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1927 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1928 and discriminants, to indicate that the type has an access discriminant
1929 that supports implicit dereference.
1930 * snames.ads-tmpl: Add names of aspects and attributes related to
1931 Ada2012 iterators: constant_indexing, default_iterator,
1932 iterator_element, implicit_dereference, variable_indexing.
1933 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1934 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1935 iterator-related aspects.
1936 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1938 2011-08-05 Sergey Rybin <rybin@adacore.com>
1940 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1941 metrics in gnatmetric to cover new kinds of coupling mentrics.
1943 2011-08-05 Steve Baird <baird@adacore.com>
1945 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1946 of calling the user-defined main subprogram.
1947 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1948 is set) Call_Main_Subprogram ahead of, as opposed to
1950 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1951 generation of a "with" of the user-defined main subprogram.
1952 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1953 (which is now called from Gen_Main instead).
1955 2011-08-05 Emmanuel Briot <briot@adacore.com>
1957 * projects.texi: Added reference to the Makefile package.
1959 2011-08-05 Thomas Quinot <quinot@adacore.com>
1961 * exp_ch7.adb: Minor comment rewording.
1963 2011-08-05 Ed Falis <falis@adacore.com>
1965 * env.c: Fix comment.
1967 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1969 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1970 character comparison and rely on concrete entities instead.
1972 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1974 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1975 suggested by AI95-0068.
1977 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1979 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1980 the two potential initialization calls. This accounts for any
1981 access-before-elaboration checks which may precede the initialization
1983 (Next_Suitable_Statement): New routine. Returns the next real statement
1984 after the input node while skipping generated checks.
1985 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1986 with comment on usage.
1987 Do not generate Elaborate_All when the trigger is a finalization call
1988 coming from a type init proc.
1989 (Check_Elab_Call): Propagate the initialization procedure context to
1990 subsequent calls to Check_A_Call.
1991 (Check_Internal_Call_Continue): Propagate the initialization procedure
1992 context to subsequent calls to Check_Elab_Call.
1993 (Is_Finalization_Procedure): New routine. Returns True if the input
1994 entity denotes a [Deep_]Finalize routine.
1995 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1996 along with comment on usage.
1998 2011-08-05 Vadim Godunko <godunko@adacore.com>
2000 * s-atocou.ads: Add list of supported platforms.
2002 2011-08-05 Yannick Moy <moy@adacore.com>
2004 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2006 * opt.ads (Disable_ALI_File): new Boolean flag
2007 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2009 2011-08-05 Ed Falis <falis@adacore.com>
2011 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2012 environ is properly defined.
2014 2011-08-05 Vincent Celier <celier@adacore.com>
2016 * make.adb (Compilation_Phase): Exit immediately when all objects have
2017 been found up to date, to avoid multiple exit messages.
2018 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2019 same project for languages with no compiler.
2020 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2022 2011-08-05 Robert Dewar <dewar@adacore.com>
2024 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2025 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2026 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2027 s-atocou-builtin.adb: Minor reformatting.
2029 2011-08-05 Yannick Moy <moy@adacore.com>
2031 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2032 if the node to wrap is a pragma check, this node and enclosed
2033 expression are not expanded, so do not apply any transformations here.
2034 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2035 introducing transient scopes.
2037 2011-08-05 Jose Ruiz <ruiz@adacore.com>
2039 * adaint.c (__gnat_set_writable, __gnat_set_readable,
2040 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2041 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2042 routine is available, so we use the default implementation of these
2044 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2045 support for copying attributes on VxWorks 6.
2047 2011-08-05 Yannick Moy <moy@adacore.com>
2049 * debug.adb: Remove use of -gnatd.D.
2050 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2051 * opt.ads: Simplify variables for ALFA mode, to keep one only
2052 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2055 2011-08-05 Vincent Celier <celier@adacore.com>
2057 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2058 Builder'Default_Switches.
2060 2011-08-05 Vincent Celier <celier@adacore.com>
2062 * makeusg.adb: Add lines for --create-map-file switches.
2064 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2066 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2067 profile is incomplete and the full view is available, replace it with
2069 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2070 incomplete, freezing the subprogram is delayed until the full view is
2072 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2073 fixed-point multiplication operator and the predefined operator is
2074 resolved in favor of the user-defined one.
2076 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2078 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2081 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2083 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2084 whether a type lacks user-defined Read or Write operations, or has a
2085 component that lacks them.
2086 * sem_attr.adb (Check_Stream_Attribute): if restriction
2087 No_Default_Stream_Attributes is active, verify that all subcomponent
2088 types of the target have user-defined stream operations, and report
2090 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2091 * exp_strm.adb: Build_Elementary_Input_Call,
2092 Build_Elementary_Write_Call): remove checks for restriction
2093 No_Default_Stream_Attributes, now checked in semantics.
2095 2011-08-04 Vincent Celier <celier@adacore.com>
2097 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2098 switches on the command line, look for all valid --RTS switches in the
2099 Builder switches and for each language use the first runtime name found
2100 to invoke gprconfig.
2101 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2102 command line and there is no auto-configuration.
2103 (Runtime_Name_Set_For): New function.
2105 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2107 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2108 elaborate initialization expression for variable Abort when processing
2109 a package body or a declaration.
2110 (Create_Finalizer): Propagate the package context when creating the
2111 exception-related variables.
2112 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2113 For_Package along with usage comment.
2115 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2117 * gcc-interface/Makefile.in: Clean up targets.
2118 Enable new package for atomic counters and copy-on-write implementation
2119 of unbounded strings on x86 platforms.
2120 * gcc-interface/Make-lang.in: Update dependencies.
2122 2011-08-04 Robert Dewar <dewar@adacore.com>
2124 * exp_ch7.adb: Minor reformatting.
2126 2011-08-04 Robert Dewar <dewar@adacore.com>
2128 * exp_strm.adb: Minor reformatting.
2130 2011-08-04 Vadim Godunko <godunko@adacore.com>
2132 * s-atocou.adb: Replace by dummy version and use on targets where atomic
2133 operations are not supported.
2134 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2135 * s-atocou-x86.adb: New file.
2136 * Makefile.rtl: Add s-atocou.o file
2138 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2140 * make.adb (Compile): Move setting of CodePeer_Mode to ...
2141 (Compilation_Phase): ... here.
2142 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2144 2011-08-04 Thomas Quinot <quinot@adacore.com>
2146 * Make-generated.in: Fix minor typo in comment.
2148 2011-08-04 Thomas Quinot <quinot@adacore.com>
2150 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2153 2011-08-04 Robert Dewar <dewar@adacore.com>
2155 * a-coinho.adb: Minor reformatting.
2157 2011-08-04 Robert Dewar <dewar@adacore.com>
2159 * a-coinho.ads: Minor reformatting.
2161 2011-08-04 Vadim Godunko <godunko@adacore.com>
2163 * s-atocou.ads, s-atocou.adb: New files.
2164 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2165 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2166 direct use of GCC's atomic builtins and replace them by use of new
2167 atomic counter package.
2169 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2171 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2173 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2175 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2176 with a call to Get_External_Tag.
2177 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2178 subprogram usage. Remove the guard against package declarations and
2179 bodies since Build_Cleanup_Statements is no longer invoked in that
2181 (Build_Components): Initialize Tagged_Type_Stmts when the context
2182 contains at least one library-level tagged type.
2183 (Build_Finalizer): New local variables Has_Tagged_Types and
2184 Tagged_Type_Stmts along with associated comments on usage. Update the
2185 logic to include tagged type processing.
2186 (Create_Finalizer): Insert all library-level tagged type unregistration
2187 code before the jump block circuitry.
2188 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2189 (Expand_N_Package_Declaration): Remove the call to
2190 Build_Cleanup_Statements.
2191 (Process_Tagged_Type_Declaration): New routine. Generate a call to
2192 unregister the external tag of a tagged type.
2193 (Processing_Actions): Reimplemented to handle tagged types.
2194 (Process_Declarations): Detect the declaration of a library-level
2195 tagged type and carry out the appropriate actions.
2196 (Unregister_Tagged_Types): Removed. The machinery has been directly
2197 merged with Build_Finalizer.
2199 2011-08-04 Robert Dewar <dewar@adacore.com>
2201 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2202 gnatls.adb, exp_ch3.adb: Minor reformatting.
2204 2011-08-04 Marc Sango <sango@adacore.com>
2206 * sem_attr.adb (Analyze_Attribute): Replace the message
2207 "invisible attribute of}" of the spark restriction violation in
2208 attribute reference by the simple message "invisible attribute of type".
2209 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2210 two insertion characters: '&' and '}'.
2212 2011-08-04 Vadim Godunko <godunko@adacore.com>
2214 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2215 * a-coinho.ads, a-coinho.adb: New file.
2216 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2218 2011-08-04 Nicolas Roche <roche@adacore.com>
2220 * alfa_test.adb: Not all ali files are containing alfa information even
2221 if compiled with -gnatd.F. So suppress warning about missing ALFA
2224 2011-08-04 Yannick Moy <moy@adacore.com>
2226 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2228 * put_alfa.adb: Check that scope name is not empty.
2230 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2232 * exp_ch3.adb (Stream_Operation_Ok): new predicate
2233 Needs_Elementary_Stream_Operation, to determine whether user-defined
2234 Read and Write attributes are available for the elementary components
2235 of the given type. If only the predefined attributes are available,
2236 then when restriction No_Default_Stream_Attributes is active the
2237 predefined stream attributes for the composite type cannot be created.
2239 2011-08-04 Robert Dewar <dewar@adacore.com>
2241 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2242 Put routines in alpha order
2244 2011-08-04 Jose Ruiz <ruiz@adacore.com>
2246 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2247 * gcc-interface/Make-lang.in: Update dependencies.
2249 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2251 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2252 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2255 2011-08-04 Robert Dewar <dewar@adacore.com>
2257 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2258 lib-xref-alfa.adb: Minor reformatting.
2260 2011-08-04 Marc Sango <sango@adacore.com>
2262 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2263 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2264 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2267 2011-08-04 Tristan Gingold <gingold@adacore.com>
2269 * bindgen.adb (Gen_Adainit_C): Remove.
2270 (Gen_Adafinal_C): Ditto.
2271 (Gen_Elab_Externals_C): Ditto.
2272 (Gen_Elab_Calls_C): Ditto.
2273 (Gen_Elab_Order_C): Ditto.
2274 (Gen_Elab_Defs_C): Ditto.
2275 (Gen_Finalize_Library_C): Ditto.
2276 (Gen_Finalize_Library_Defs_C): Ditto.
2277 (Gen_Main_C): Ditto.
2278 (Gen_Output_File_C): Ditto.
2279 (Gen_Restrictions_C): Ditto.
2280 (Gen_Versions_C): Ditto.
2281 (Write_Info_Ada_C): Ditto.
2282 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2283 (Gen_Output_File): Do not force Ada_Bind_File anymore.
2284 Always call Gen_Output_File_Ada.
2285 * gnatlink.adb (Begin_Info): Now a constant.
2287 (Ada_Bind_File): Remove
2288 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
2289 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2290 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2291 * opt.ads (Ada_Bind_File): Remove.
2293 2011-08-04 Thomas Quinot <quinot@adacore.com>
2295 * projects.texi: Document target-specific directory in default project
2298 2011-08-04 Thomas Quinot <quinot@adacore.com>
2300 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2303 2011-08-04 Yannick Moy <moy@adacore.com>
2305 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2306 opt.ads, lib-xref.ads: Code clean up.
2308 2011-08-04 Yannick Moy <moy@adacore.com>
2310 * gnat_rm.texi: Update description of Test_Case
2311 * gnat_ugn.texi: Typo.
2313 2011-08-04 Ed Falis <falis@adacore.com>
2315 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2317 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2319 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2320 it is of type Root_Controlled. This action eliminates fields Prev and
2321 Next from type equality.
2323 2011-08-04 Yannick Moy <moy@adacore.com>
2325 * lib-xref-alfa.adb: Correct typo.
2327 2011-08-04 Matthew Heaney <heaney@adacore.com>
2329 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2332 2011-08-04 Yannick Moy <moy@adacore.com>
2334 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2335 (Analyze_Pragma): allow static string expression for name of Test_Case,
2336 instead of simply string literals.
2337 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2340 2011-08-04 Vincent Celier <celier@adacore.com>
2342 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2343 case suffixes to find truncated main sources.
2345 2011-08-04 Tristan Gingold <gingold@adacore.com>
2347 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2348 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2349 (Compute_Current_Task): Ditto.
2351 2011-08-04 Tristan Gingold <gingold@adacore.com>
2353 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2355 2011-08-04 Yannick Moy <moy@adacore.com>
2357 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2358 library-level constant.
2359 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2360 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2361 used as selector of parameter association, in ALFA mode.
2363 2011-08-04 Robert Dewar <dewar@adacore.com>
2365 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2366 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2369 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2371 * make.adb (Linking_Phase): Set source search path before calling
2372 gnatlink in CodePeer mode.
2374 2011-08-04 Javier Miranda <miranda@adacore.com>
2376 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2377 Remove code which takes care of building TSDs.
2378 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2379 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2380 the accessibility check in VM targets.
2381 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2382 (Building_Static_DT): Now returns false for VM targets.
2383 (Build_VM_TSDs): Removed.
2384 (Expand_Interface_Conversion): Generate missing runtime check for
2385 conversions to interface types whose target type is unknown at compile
2387 (Make_VM_TSD): Add missing code to disable the generation of calls to
2388 Check_TSD if the tagged type is not defined at library level, or not
2389 has a representation clause specifying its external tag, or -gnatdQ is
2391 * exp_disp.ads (Build_VM_TSDs): Removed.
2392 (Make_VM_TSDs): Spec relocated from exp_disp.adb
2393 * sem_disp.adb (Check_Dispatching_Operation): No code required to
2394 register primitives in the dispatch tables in VM targets.
2395 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2396 initialization of class-wide interface objects in VM targets.
2397 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2400 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2402 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2403 when dotnet-ld cannot be found.
2405 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2407 * bindgen.adb: Simplify significantly generation of binder body file in
2409 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2410 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
2413 2011-08-04 Yannick Moy <moy@adacore.com>
2415 * sem_prag.adb, sem.ads: Code cleanup.
2417 2011-08-04 Tristan Gingold <gingold@adacore.com>
2419 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2420 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2421 results if possible.
2422 * s-stusta.adb (Print): Adjust after changes in s-stausa.
2423 * gnat_ugn.texi: Update dynamic stack usage section.
2425 2011-08-04 Steve Baird <baird@adacore.com>
2427 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2428 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2429 contains only a call to the user-defined main subprogram.
2430 (Gen_Main_Ada) - If CodePeer_Mode is set, then
2431 call the "wrapper" subprogram instead of directly
2432 calling the user-defined main subprogram.
2434 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2436 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2437 alternatives of a case statement for controlled objects. Rename local
2438 variable A to Dead_Alt.
2439 (Expand_N_If_Statement): Check the then and else statements of an if
2440 statement for controlled objects. Check the then statements of all
2441 elsif parts of an if statement for controlled objects.
2442 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2444 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2445 detects a loop associated with the expansion of an array object.
2446 Augment the processing of the loop statements to account for a possible
2447 wrap done by Process_Statements_For_Controlled_Objects.
2448 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2449 statements and abortable part of an asynchronous select for controlled
2451 (Expand_N_Conditional_Entry_Call): Check the else statements of a
2452 conditional entry call for controlled objects.
2453 (Expand_N_Selective_Accept): Check the alternatives of a selective
2454 accept for controlled objects.
2455 (Expand_N_Timed_Entry_Call): Check the entry call and delay
2456 alternatives of a timed entry call for controlled objects.
2457 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2458 exception handler for controlled objects.
2459 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2460 Add formal parameter Nested_Constructs along with its associated
2462 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2463 Requires_Cleanup_Actions.
2464 (Process_Statements_For_Controlled_Objects): New routine.
2465 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2466 routine. Inspect a node which contains a non-handled sequence of
2467 statements for controlled objects. If such an object is found, the
2468 statements are wrapped in a block.
2470 2011-08-04 Bob Duff <duff@adacore.com>
2472 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2473 need to compare with Class_Wide_Type (T2), in order to get at the
2474 original class-wide type node.
2475 * sem_type.ads (Covers): Improve the comment.
2476 * einfo.ads (Class_Wide_Type): Improve the comment.
2477 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2478 the type of the Deref.
2480 2011-08-04 Yannick Moy <moy@adacore.com>
2482 * gnat_rm.texi: Document that Test_Case pragma can only appear on
2483 separate declarations.
2484 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2485 check identifier of pragma argument.
2486 (Chain_TC): check that no other test case associated to the same entity
2487 share the same name.
2488 (Check_Test_Case): disallow test case inside subprogram body
2489 (Analyze_Pragma): correct call to check identifier and not argument
2490 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2491 function gets name from test case pragma.
2493 2011-08-04 Yannick Moy <moy@adacore.com>
2495 * gnat_rm.texi: Document new pragma and aspect.
2496 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2497 (No_Duplicates_Allowed): new constant array defining whether duplicates
2498 aspects of each kind can appear on the same declaration.
2499 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2500 field, which points to a node holding the previous Spec_PPC_List.
2501 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2502 through the indirection with Contract.
2503 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2504 * par-prag.adb (Prag): do nothing on Test_Case pragma
2505 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2507 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2508 component Ensures of Test_Case.
2509 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2510 (Analyze_Generic_Subprogram_Declaration,
2511 Analyze_Subprogram_Instantiation,
2512 Analyze_Abstract_Subprogram_Declaration,
2513 Analyze_Subprogram_Body_Helper,
2514 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2515 insert contract in subprogram node at point of definition
2517 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2518 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2519 corresponding pragma
2520 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2521 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2522 similar to the analysis of pre/post
2523 (Derive_Subprogram): insert contract in subprogram node at point of
2525 * sem_prag.adb, sem_prag.ads
2526 (Check_Arg_Is_String_Literal, Check_Identifier):
2527 new checking procedures to be called in treatment of pragmas
2528 (Check_Test_Case): new procedure to check that a Test_Case aspect or
2529 pragma is well-formed. This does not check currently that 'Result is
2530 used only in the Ensures component of a Test_Case.
2531 (Analyze_Pragma): add case for Test_Case
2532 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2533 components of a Test_Case.
2534 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2535 expressions in the 3rd (and 4th if present) arguments of a Test_Case
2536 pragma, treated as spec expressions.
2537 (Sig_Flags): add value -1 for Test_Case.
2538 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2539 Get_Requires_From_Test_Case_Pragma): getters for both expression
2540 components of a Test_Case.
2541 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2542 indirection between an entry or [generic] subprogram entity and its
2543 pre/post + test-cases.
2544 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2545 get/set for fields of an N_Contract node.
2546 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2547 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2548 names and pragma for Test_Case.
2549 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2551 2011-08-04 Vincent Celier <celier@adacore.com>
2553 * gnat_ugn.texi: Improve documentation of gnatmake switch
2554 --source-info-file=.
2556 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2558 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2559 type). Initialize Atyp to the appropriate type which is later checked
2560 for completion. Rewrite the assertion associated with private type
2563 2011-08-04 Ed Falis <falis@adacore.com>
2565 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2566 initialize the number of CPUs.
2568 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2570 * sem_type.adb (Disambiguate): New subsidiary routine
2571 In_Same_Declaration_List, to implement AI05-0020: a user-defined
2572 equality on an anonymous access type whose designated type is private
2573 does not lead to an ambiguity with the universal access equality
2574 operator in the body or child units of the defining package. The same
2575 is true for a multiplication operator on a private type completed with
2578 2011-08-04 Javier Miranda <miranda@adacore.com>
2580 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2581 (Normalize_Scalars_Config): Removed.
2583 (Register_Opt_Config_Switches): Remove registering config values of
2584 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2585 (Restore_Opt_Config_Switches): Remove code which restores the values of
2586 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2587 Init_Or_Norm_Scalars.
2588 (Save_Opt_Config_Switches): Remove code which saves values of
2589 Init_Or_Norm_Scalars and Normalize_Scalars.
2590 (Set_Opt_Config_Switches): Remove code which restores config values of
2591 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2592 Init_Or_Norm_Scalars.
2594 2011-08-04 Yannick Moy <moy@adacore.com>
2596 * frontend.adb (Frontend): remove previous patch to avoid full
2597 qualification in ALFA mode.
2598 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2599 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2600 unique name for an entity, which could be used to identify the entity
2601 across compilation units.
2603 2011-08-04 Thomas Quinot <quinot@adacore.com>
2606 (Initialize_Default_Project_Path): Add target specific directory
2607 ($prefix/$target/lib/gnat) in front of project path in all cases
2608 (making gnatmake's behaviour consistent with gprbuild).
2609 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2610 Pass target name from Sdefault to project subsystem.
2611 * gnatls.adb: Show new target specific default project directory.
2613 2011-08-04 Johannes Kanig <kanig@adacore.com>
2615 * cstand.adb: Add Information to Identifier in Standard
2616 (Identifer_For): Set Entity to the corresponding entity
2618 2011-08-04 Sergey Rybin <rybin@adacore.com>
2620 * gnat_ugn.texi: Update doc on gnatcheck.
2622 2011-08-04 Yannick Moy <moy@adacore.com>
2624 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2627 2011-08-04 Yannick Moy <moy@adacore.com>
2629 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2630 performing expansion.
2631 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2632 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2633 it is not called in ALFA mode.
2635 2011-08-04 Emmanuel Briot <briot@adacore.com>
2637 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2638 after all, so removed.
2640 2011-08-04 Sergey Rybin <rybin@adacore.com>
2642 * vms_data.ads: Add missing VMS qualifiers.
2644 2011-08-04 Emmanuel Briot <briot@adacore.com>
2646 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2647 the list of files on the command line after processing it through
2650 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2652 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2653 processing for .NET/JVM. These targets can now benefit from
2654 Raise_From_Controlled_Operation and they share the same processing with
2656 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2657 These targets need transient scopes in order to properly finalize short
2658 lived controlled objects.
2659 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2660 NET/JVM. These targets can now benefit from
2661 Raise_From_Controlled_Operation and they share the same processing with
2664 2011-08-04 Geert Bosch <bosch@adacore.com>
2666 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2668 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2670 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2671 Expand_Record_Aggregate, to determine whether aggregate must be
2672 expanded into assignments. This is the case if the ancestor part is
2673 private, regarless of the setting of the flag Has_Private_Ancestor.
2675 2011-08-04 Ed Falis <falis@adacore.com>
2677 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2679 2011-08-04 Bob Duff <duff@adacore.com>
2681 * sinfo.ads: Fix comment.
2683 2011-08-04 Steve Baird <baird@adacore.com>
2685 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2686 choose a package name in much the same way as is
2687 done for JGNAT when VM_Target /= No_VM, except that
2688 a slightly more distinctive prefix string is used.
2690 2011-08-04 Emmanuel Briot <briot@adacore.com>
2692 * makeutl.adb (Complete_Mains): no longer accept unit names on the
2693 gnatmake command line.
2694 This behavior was never documented (and was supported only because of
2695 an early bug in the code). This case might lead to ambiguous cases
2696 (between unit names and truncated base names without suffixes).
2698 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2700 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2701 Remove the external tag of a tagged type from the internal hash table.
2702 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2703 expanded usage of the routine. Strenghten the check for Is_Master. Add
2704 processing for tagged types.
2705 (Build_Finalizer): Create all the necessary lists used in finalizer
2706 creation when the processed context is a package that may contain
2708 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2709 Requires_Cleanup_Actions.
2710 (Expand_N_Package_Body): Package bodies may need clean up code
2711 depending on whether they contain tagged types.
2712 (Expand_N_Package_Declaration): Package declarations may need clean up
2713 code depending on whether they contain tagged types.
2714 (Unregister_Tagged_Types): New routine. Search through a list of
2715 declarations or statements, looking for non-abstract Ada tagged types.
2716 For each such type, generate code to unregister the external tag.
2717 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2718 Requires_Cleanup_Actions.
2719 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2720 through a list of declarations or statements looking for non-abstract
2721 Ada tagged types or controlled objects.
2722 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2723 Requires_Cleanup_Actions.
2724 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2725 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2728 2011-08-04 Vincent Celier <celier@adacore.com>
2730 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2731 has Ada sources, not project Project, because if the root project
2732 Project has no sources of its own, all projects will be deemed without
2735 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2737 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2738 of the No_Param_Proc acc-to-subp type used for initialization of
2739 __gnat_finalize_library_objects so that it's declared at library level
2740 rather than nested inside of the adainit routine.
2742 2011-08-04 Javier Miranda <miranda@adacore.com>
2744 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2745 if the tagged type has a representation clause which specifies its
2748 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2750 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2751 Remove previous procedure with that name.
2752 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2754 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2755 subtype mark, the ancestor cannot have unknown discriminants.
2756 (Resolve_Record_Aggregate): if the type has invisible components
2757 because of a private ancestor, the aggregate is illegal.
2759 2011-08-04 Vincent Celier <celier@adacore.com>
2761 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2762 account switches -gnat2005, -gnat12 and -gnat2012.
2764 2011-08-04 Bob Duff <duff@adacore.com>
2766 * s-tasdeb.ads: Minor comment fix.
2768 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2770 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2772 * switch.ads, switch.adb (Is_Language_Switch): New function.
2774 2011-08-04 Vincent Celier <celier@adacore.com>
2776 * switch-c.adb: Minor comment addition.
2778 2011-08-04 Vincent Celier <celier@adacore.com>
2780 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2781 ending with '=' is followed by a space (missing file name).
2783 2011-08-04 Pascal Obry <obry@adacore.com>
2785 * g-regist.ads: Fix size of HKEY on x86_64-windows.
2787 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2789 * sem_ch12.adb (Analyze_Associations): New routine
2790 Check_Overloaded_Formal_Subprogram to reject a formal package when
2791 there is a named association or a box initialisation for an overloaded
2792 formal subprogram of the corresponding generic.
2794 2011-08-04 Yannick Moy <moy@adacore.com>
2796 * alfa.ads (ALFA_Xref_Record): add component for type of entity
2797 * get_alfa.adb, put_alfa.adb: Read and write new component of
2799 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2801 2011-08-04 Pascal Obry <obry@adacore.com>
2803 * urealp.adb: Minor reformatting.
2805 2011-08-04 Tristan Gingold <gingold@adacore.com>
2807 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2808 Handle the case when Cleanup_Protected_Object returns Empty.
2810 2011-08-04 Yannick Moy <moy@adacore.com>
2812 * frontend.adb (Frontend): only qualify names in non-ALFA mode
2814 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2816 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2817 call, ignore functions.
2819 2011-08-04 Geert Bosch <bosch@adacore.com>
2821 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2824 2011-08-04 Emmanuel Briot <briot@adacore.com>
2826 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2827 as an index for Builder'Switches. This conforms to the documentation.
2828 * make.adb (Insert_Project_Sources): avoid duplicate code
2830 2011-08-04 Emmanuel Briot <briot@adacore.com>
2832 * makeutl.adb (Complete_Mains): if the user has passed a relative file
2833 name on the command line (for instance "../dummy"), never assume it can
2836 2011-08-04 Tristan Gingold <gingold@adacore.com>
2838 * bindgen.adb: Remove code the reference or create the
2839 Break_Start/__gnat_break_start procedure.
2840 * s-stalib.adb (Break_Start): Removed.
2842 2011-08-04 Emmanuel Briot <briot@adacore.com>
2844 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2845 shared with gprbuild.
2847 2011-08-04 Yannick Moy <moy@adacore.com>
2849 * par-ch4.adb (P_Primary): preferentially issue an error message about
2850 a missing parenthesis arount a conditional or case expression in Ada
2851 2012 mode, if we detect that the alignment is not correct for a
2854 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2856 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2857 tag-to-class-wide conversion as needing finalization actions.
2858 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2859 a tag-to-class-wide conversion as needing finalization actions.
2860 (Is_Finalizable_Transient): The result of a tag-to-class-wide
2861 conversion does not need finalization actions.
2862 (Is_Tag_To_CW_Conversion): New routine.
2863 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2864 whether an object is the result of a tag-to-class-wide conversion.
2866 2011-08-04 Yannick Moy <moy@adacore.com>
2868 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2869 the left-hand-side and right-hand-side of a conjunct are inserted when
2870 translating a pre- or postcondition
2871 * sem_ch6.adb: Correct typo in comment
2873 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2875 * gnat_rm.texi: Ravenscar does not prohibit dependence on
2876 Unchecked_Conversion and Unchecked_Deallocation.
2878 2011-08-04 Thomas Quinot <quinot@adacore.com>
2880 * make.adb: Minor reformatting.
2882 2011-08-04 Emmanuel Briot <briot@adacore.com>
2884 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2885 sources in the project and its imported projects, but not in the whole
2888 2011-08-04 Emmanuel Briot <briot@adacore.com>
2890 * make.adb: Remove debug trace.
2892 2011-08-04 Vincent Celier <celier@adacore.com>
2894 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2895 path in canonical form, to be able to compare path names on platforms
2896 such as Windows or Darwin.
2898 2011-08-04 Thomas Quinot <quinot@adacore.com>
2900 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2901 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2902 * scos.ads: Update documentation accordingly.
2903 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2906 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2908 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2909 attribute only if prefix type is scalar.
2911 2011-08-04 Emmanuel Briot <briot@adacore.com>
2913 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2914 in gnatmake for specifying mains on the command line that do not belong
2915 to the main project. These mains must currently all belong to the same
2917 (Ultimate_Extension_Of): removed, since duplicated
2918 Ultimate_Extending_Project.
2920 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2922 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2924 (CodePeer_Mode_String): New.
2925 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2927 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2928 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2929 mode, since no useful elaboration subprogram is needed by CodePeer.
2930 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2931 In this mode, compile binder file with -gnatC and do stop after this
2934 2011-08-04 Vincent Celier <celier@adacore.com>
2936 * exp_ch7.adb: Minor comment fix.
2938 2011-08-04 Robert Dewar <dewar@adacore.com>
2940 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2941 exp_ch4.adb, makeutl.adb: Minor reformatting.
2943 2011-08-04 Emmanuel Briot <briot@adacore.com>
2945 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2946 Create several new subprograms to move code out of Make. This makes the
2947 code more readable, removes code duplication, and is a preparation work
2948 for adding support for aggregate projects.
2950 2011-08-04 Tristan Gingold <gingold@adacore.com>
2952 * s-po32gl.ads, s-po32gl.adb: New files.
2953 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2954 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2955 (Build_Finalization_Collection): Use it.
2956 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2957 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2959 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2960 * gcc-interface/Make-lang.in: Update dependencies.
2962 2011-08-04 Emmanuel Briot <briot@adacore.com>
2964 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2967 2011-08-04 Emmanuel Briot <briot@adacore.com>
2969 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2970 command line is not a file name, also check whether it could be a unit
2973 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2975 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2976 the header of the finalization routine.
2977 If the unit has no finalizer but is a body whose spec has one, then
2978 generate the decrement of the elaboration entity only.
2979 If the unit has a finalizer and is a spec, then do not generate the
2980 decrement of the elaboration entity.
2981 (Gen_Finalize_Library_C): Likewise.
2983 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2985 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2986 (Bounds_Size_Expression): Removed.
2987 (Double_Alignment_Of): New subsidiary routine.
2988 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2989 for a hole in the dope vector of unconstrained arrays due to different
2990 index and element alignments.
2992 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2994 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2995 raise program_error because body has not been seen yet.
2997 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2999 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3002 2011-08-04 Vincent Celier <celier@adacore.com>
3004 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3006 2011-08-04 Yannick Moy <moy@adacore.com>
3008 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3009 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3011 2011-08-04 Thomas Quinot <quinot@adacore.com>
3013 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3014 instantiation in RCI.
3016 2011-08-04 Emmanuel Briot <briot@adacore.com>
3018 * make.adb: Share more code with gprbuild
3020 2011-08-04 Emmanuel Briot <briot@adacore.com>
3022 * projects.texi: Added documentation for the IDE'Gnat project file
3025 2011-08-04 Nicolas Roche <roche@adacore.com>
3027 * gnat_rm.texi: Minor editing.
3029 2011-08-04 Javier Miranda <miranda@adacore.com>
3031 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3032 and the library case for VM targets.
3033 (Gen_Adainit_Ada): Likewise.
3035 2011-08-04 Robert Dewar <dewar@adacore.com>
3037 * g-altive.ads: Minor comment updates.
3038 * prj-nmsc.adb: Minor reformatting.
3040 2011-08-04 Javier Miranda <miranda@adacore.com>
3043 (Normalize_Scalars_Config): Value of the configuration switch set by
3044 pragma Normalize_Scalars when it appears in the gnat.adc file.
3045 (Normalize_Scalars): New field for record Config_Switches_Type. Used
3046 to save and restore settings of this pragma.
3048 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3049 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3051 2011-08-04 Vincent Celier <celier@adacore.com>
3053 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3055 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3057 * makeutl.adb: Minor reformatting.
3059 2011-08-04 Olivier Hainque <hainque@adacore.com>
3061 * g-altive.ads: Update comments to reflect that only the soft
3062 binding is available today.
3064 2011-08-04 Robert Dewar <dewar@adacore.com>
3066 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3067 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3068 * gcc-interface/Make-lang.in: Update dependencies.
3070 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3072 * prj-env.adb: Remove local debug traces.
3074 2011-08-04 Yannick Moy <moy@adacore.com>
3076 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3077 was used instead of Hi_OK, which could cause a read of an uninitialized
3078 value later on. Detected while working on the new warning.
3079 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3081 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3082 in more cases, in order to detect more unreferenced values.
3083 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3084 object for expression, if any.
3086 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3088 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3089 the operand types instead of the Esize.
3091 2011-08-04 Steve Baird <baird@adacore.com>
3093 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3094 enable CodePeer_Mode.
3095 * bindusg.adb (Display): Add help message describing -P binder switch.
3096 * gnat_ugn.texi: Document -P binder switch.
3097 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3098 user-defined main program directly.
3099 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3100 user-defined main program in the context clause of the package body.
3102 2011-08-04 Yannick Moy <moy@adacore.com>
3104 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3105 duplicate of Defining_Entity
3106 (Get_Unique_Entity_For_Decl): rename function into
3107 Unique_Defining_Entity
3108 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3109 (Formal_Proof_On): remove synthesized flag
3110 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3111 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3112 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3113 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3114 Annotate (Formal_Proof)
3116 2011-08-04 Emmanuel Briot <briot@adacore.com>
3118 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3119 source files with non-standard naming schemes, in imported projects
3121 2011-08-04 Emmanuel Briot <briot@adacore.com>
3123 * makeutl.adb (Complete_Mains): when a multi-unit source file is
3124 specified on the gprbuild command line, we need to compile all units
3125 within that file, not just the first one we find
3126 Fix error message for mains that are not found.
3128 2011-08-04 Thomas Quinot <quinot@adacore.com>
3130 * sem_ch6.adb: Update comment.
3131 * sem_ch12.adb: Minor reformatting.
3133 2011-08-04 Bob Duff <duff@adacore.com>
3135 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3136 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3137 race condition whose symptom is to fail to lock Parent. That, in turn,
3138 causes Parent.Awake_Count to be accessed without locking Parent, which
3139 causes another race condition whose symptom is that Parent.Awake_Count
3140 can be off by 1 (either too high or too low). The solution is to lock
3141 Parent unconditionally, and then lock Acceptor, before reading
3142 Acceptor.Terminate_Alternative.
3144 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3146 * debug.adb: Update comment.
3148 2011-08-04 Robert Dewar <dewar@adacore.com>
3150 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3151 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3152 exp_ch6.adb: Minor reformatting.
3154 2011-08-04 Gary Dismukes <dismukes@adacore.com>
3156 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3159 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3161 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3163 2011-08-04 Thomas Quinot <quinot@adacore.com>
3165 * sinfo.ads: Minor reformatting.
3167 2011-08-04 Emmanuel Briot <briot@adacore.com>
3169 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3170 even if there is no location.
3172 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3174 * sem_res.adb, sem_ch4.adb: move check for restriction
3175 No_Task_Hierarchy to resolve_allocator.
3177 2011-08-04 Thomas Quinot <quinot@adacore.com>
3179 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3180 This flag of N_Pragma nodes is not used, remove it as well as all of
3181 the associated circuitry.
3183 2011-08-04 Javier Miranda <miranda@adacore.com>
3185 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3186 runtime check on duplicated externa tags
3187 * debug.adb Document switch -gnatdQ.
3189 2011-08-04 Gary Dismukes <dismukes@adacore.com>
3191 * a-fihema.ads: Minor typo fix.
3193 2011-08-04 Yannick Moy <moy@adacore.com>
3195 * sem_ch10.adb: Minor comment update.
3197 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3199 * einfo.adb: Update the node field usage to reflect the renaming of
3200 Return_Flag to Return_ Flag_Or_Transient_Decl.
3201 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3202 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3203 (Write_Field15_Name): Change Return_Flag to
3204 Return_Flag_Or_Transient_Decl.
3205 * einfo.ads: Rename node field Return_Flag to
3206 Return_Flag_Or_Transient_Decl. Update the associated comment and all
3207 occurrences in entities.
3208 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3209 associated Inline pragma.
3210 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3211 associated Inline pragma.
3212 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3214 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3215 Return_Flag and Set_Return_Flag.
3216 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3217 objects generated for controlled transients declared inside an
3218 Exception_With_Actions. Update the calls to Return_Flag.
3219 (Process_Object_Declaration): Add code to add a null guard for hook
3220 objects generated for controlled transients declared inside an
3221 Exception_With_Actions. Update related comment.
3222 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3223 objects generated for controlled transients declared inside an
3224 Exception_With_Actions. Update the calls to Return_Flag.
3225 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3227 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3229 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3230 positional aggregate.
3232 2011-08-04 Vincent Celier <celier@adacore.com>
3234 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3235 SLOC only for pragmas.
3237 2011-08-04 Emmanuel Briot <briot@adacore.com>
3239 * projects.texi: Minor typo fix.
3241 2011-08-04 Emmanuel Briot <briot@adacore.com>
3243 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3244 on case-sensitive file systems.
3246 2011-08-04 Thomas Quinot <quinot@adacore.com>
3248 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3249 nested in a disabled pragma.
3250 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3251 enclosing pragma, if any, for X decisions.
3253 2011-08-04 Thomas Quinot <quinot@adacore.com>
3255 * sem_prag.adb: Minor reformatting.
3257 2011-08-04 Vincent Celier <celier@adacore.com>
3259 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3260 allowed in no run time mode.
3262 2011-08-04 Vincent Celier <celier@adacore.com>
3264 * make.adb (Check): When -gnatc is used, check for the source file
3265 inside the ALI file with a canonical case file name.
3267 2011-08-04 Emmanuel Briot <briot@adacore.com>
3269 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3270 overriding the separator.
3272 2011-08-04 Robert Dewar <dewar@adacore.com>
3274 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3275 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3277 2011-08-04 Robert Dewar <dewar@adacore.com>
3279 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3281 2011-08-04 Yannick Moy <moy@adacore.com>
3283 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3284 'Result only appears in postcondition of function.
3286 2011-08-04 Thomas Quinot <quinot@adacore.com>
3288 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3289 external tag, include the value of the external tag in the exception
3292 2011-08-04 Yannick Moy <moy@adacore.com>
3294 * sem_attr.adb (Result): modify error message for misplaced 'Result
3296 2011-08-04 Sergey Rybin <rybin@adacore.com>
3298 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3299 clear that the second argument must be an identifier.
3301 2011-08-04 Thomas Quinot <quinot@adacore.com>
3303 * exp_ch9.adb (Build_Barrier_Function): When compiling with
3304 -fpreserve-control-flow, insert an IF statement on the barrier
3305 condition to ensure that a conditional branch instruction is generated.
3307 2011-08-04 Emmanuel Briot <briot@adacore.com>
3309 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3310 (Processing_Flags.Ignore_Missing_With): new flag.
3312 2011-08-04 Emmanuel Briot <briot@adacore.com>
3314 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3315 Source_List_File on case-insensitive systems where the file is actually
3316 on a case-sensitive file system (NFS,...).
3318 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3320 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3321 function return contains a controlled [extension] aggregate and the
3322 return statement is not part of a handled sequence of statements, wrap
3323 the return in a block. This ensures that all controlled temporaries
3324 generated during aggregate resolution will be picked up by the
3325 finalization machinery.
3327 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3329 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3330 components, freeze type before resolution, to ensure that default
3331 initializations are present for all components.
3332 * sem_res.adb (Resolve_Actuals): the designated object of an
3333 accces-to-constant type is a legal actual in a call to an
3334 initialization procedure.
3336 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3338 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3339 N_Unchecked_Type_Conversion to the possible containers of a renamed
3342 2011-08-04 Yannick Moy <moy@adacore.com>
3344 * par-ch13.adb (Aspect_Specifications_Present): recognize
3345 "with Identifier'Class =>" as an aspect, so that a meaningful warning
3346 is issued in Strict mode.
3347 * par.adb: Fix typos in comments.
3349 2011-08-04 Yannick Moy <moy@adacore.com>
3351 * sem_attr.adb (Result): modify error message to take into account Post
3352 aspect when compiling Ada 2012 (or newer) code.
3354 2011-08-04 Nicolas Roche <roche@adacore.com>
3356 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3357 remove need for GCC exceptions.
3359 2011-08-04 Vincent Celier <celier@adacore.com>
3361 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3362 project, not the source file name.
3363 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3364 excluded, continue looking. This excluded source will only be returned
3365 if there is no other source with the same base name that is not locally
3368 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3370 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3371 private and one of the operands is a real literal, use a qualified
3372 expression rather than a conversion which is not meaningful to the
3375 2011-08-04 Yannick Moy <moy@adacore.com>
3377 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3378 corresponding aspect X'Class are allowed, proceed with analysis of the
3379 aspect instead of skipping it.
3381 2011-08-04 Tristan Gingold <gingold@adacore.com>
3383 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3384 This will allow to have an Ada implementation for the subprogram.
3386 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3388 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3389 completion and aspects are present, apply them to the entity for the
3390 type which is currently the partial view, but which is the one that
3392 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3393 applies to a partial view, indicate that the full view has predicates
3394 and delayed aspects.
3395 (Replace_Type_Reference): Handle properly predicates that apply to the
3396 full view of a private completion.
3398 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3400 * layout.adb (Layout_Type): For composite types, do not set Esize.
3401 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3403 (Size_Known): Look at the RM size of components instead of the Esize.
3404 (Freeze_Record_Type): Look at the RM size instead of the Esize to
3405 issue warning and activate Implicit_Packing.
3406 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
3407 if the Esize is not known.
3408 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3409 for elementary types only.
3410 (Analyze_Record_Representation_Clause): Look at the RM size instead
3411 of the Esize to issue errors.
3412 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
3414 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
3416 Look at the RM size instead of the Esize for types if the latter is
3418 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3420 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3422 * sem_type.adb: proper handling of equality not involving anonymous
3425 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3427 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3428 Vis_Decls. When creating a library-level finalizer for a package spec,
3429 both the declaration and body of the finalizer are inserted either in
3430 the visible or private declarations of the package spec.
3432 2011-08-04 Javier Miranda <miranda@adacore.com>
3434 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3435 use of the full-view of a type when invoking Is_Ancestor.
3436 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3437 the full-view of private parents is requested, then use also the
3438 full-view of the parent of the first derivation.
3440 2011-08-04 Tristan Gingold <gingold@adacore.com>
3442 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3443 instead of the locally imported procedure.
3444 * s-taprop-mingw.adb (Enter_Task): Ditto.
3445 * s-valrea.adb (Scan_Real): Ditto.
3446 * s-imgrea.adb (Set_Image_Real): Ditto.
3447 * s-flocon.ads: Make the package pure.
3449 2011-08-04 Thomas Quinot <quinot@adacore.com>
3451 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3452 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3453 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3454 New subprogram, moved here from...
3455 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3456 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3457 rewriting of the last argument into a procedure call statement here...
3458 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3461 2011-08-04 Thomas Quinot <quinot@adacore.com>
3463 * par_sco.adb: Minor reformatting.
3465 2011-08-04 Robert Dewar <dewar@adacore.com>
3467 * erroutc.adb: Minor reformatting.
3469 2011-08-04 Thomas Quinot <quinot@adacore.com>
3471 * par_sco.adb: Comment update.
3473 2011-08-04 Tristan Gingold <gingold@adacore.com>
3475 * s-flocon.ads: New file.
3476 * g-flocon.ads: Now a renaming of s-flocon.
3477 * Makefile.rtl: Add s-flocon.o
3479 2011-08-04 Javier Miranda <miranda@adacore.com>
3481 * exp_strm.adb (Build_Array_Input_Function): if the array type is
3482 constrained, do not attempt to build a subtype of it.
3484 2011-08-04 Yannick Moy <moy@adacore.com>
3486 * errout.ads Change comments: remove 'R'M as an example where quotes
3487 are needed; add ALFA as another case where quotes are not needed
3488 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3489 case where quotes are not needed.
3490 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3491 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3492 Remove all occurrences of 'A'L'F'A
3494 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3496 * sem_ch13.adb: check legality of invariant pragma.
3498 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3500 * bindgen.adb: Add comments.
3502 2011-08-04 Yannick Moy <moy@adacore.com>
3504 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3506 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3507 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3509 2011-08-04 Robert Dewar <dewar@adacore.com>
3511 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3512 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3513 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3515 2011-08-04 Thomas Quinot <quinot@adacore.com>
3517 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3519 2011-08-04 Thomas Quinot <quinot@adacore.com>
3522 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3525 2011-08-04 Robert Dewar <dewar@adacore.com>
3527 * einfo.ads, exp_ch4.adb: Minor reformatting.
3529 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3531 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3533 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3535 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3536 type in all cases to compute list of primitive operations, because full
3537 view may be an itype that is not attached to the list of declarations.
3539 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3541 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3542 library has already been finalized.
3543 (Gen_Adafinal_C): Likewise.
3544 (Gen_Adainit_Ada): Generate an early return if the library has
3545 already been elaborated.
3546 (Gen_Adainit_C): Likewise.
3547 (Gen_Output_File_Ada): Generate an elaboration flag.
3548 (Gen_Output_File_C): Likewise.
3550 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3552 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3553 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3554 built in the first place.
3555 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3556 for CodePeer because Finalize_Address was not built to begin with.
3557 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3559 2011-08-04 Pascal Obry <obry@adacore.com>
3561 * adaint.c (__gnat_tmp_name): Use current process id to create temp
3562 filenames, this ensures unicity of filenames across processes.
3564 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3566 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3567 Raise_Controlled to Raise_From_Controlled_Operation. Update the
3568 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3569 Add False as the actual to From_Abort in the generated call to
3570 Raise_From_Controlled_Operation.
3572 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3574 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3575 so that the ali file name can be retrieved from outside of this package.
3576 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3577 doing nothing in the general case, but used to update the object file
3578 timestamp if directly generated by the backend.
3579 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3580 to a later time than the ali file one.
3582 2011-08-04 Yannick Moy <moy@adacore.com>
3584 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3585 entities whose body contains an Annotate pragma which forces formal
3587 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3588 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3589 Mark_Non_ALFA_Subprogram to pass in a message and node.
3590 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3591 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3592 surrounding subprogram.
3593 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3594 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3595 as not in ALFA is annotated with Formal_Proof being On, then an error
3596 is issued based on the additional parameters for message and node.
3597 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3598 * gcc-interface/Make-lang.in: Update dependencies.
3600 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3602 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3603 Finalize_Address when CodePeer is enabled.
3605 2011-08-04 Pascal Obry <obry@adacore.com>
3607 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3608 the latter returns a pointer to a static buffer which is deallocated
3609 at the end of the routine.
3611 2011-08-04 Yannick Moy <moy@adacore.com>
3613 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3614 after index creation; mark unconstrained base array type generated as
3615 being in/not in ALFA as well
3616 (Make_Index): mark subtype created as in/not in ALFA
3617 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3618 over a loop as in/not in ALFA, depending on its type and form of loop
3621 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3623 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3624 directly to False on .NET and JVM.
3626 2011-08-04 Yannick Moy <moy@adacore.com>
3628 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3629 constraint that subtype must come from source code to be in ALFA, so
3630 that anonymous subtypes can be in ALFA too.
3632 2011-08-04 Yannick Moy <moy@adacore.com>
3634 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3635 reference for ALFA mode.
3636 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3637 procedure public so as to use it from formal verification back-end.
3639 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3641 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3642 invalid checks of the Parameter, making Remove_Switch not working
3645 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3647 * targparm.ads: Update header: no run-time exception is needed on this
3650 2011-08-04 Vincent Celier <celier@adacore.com>
3652 * a-fihema.adb: Use System.IO instead of GNAT.IO
3654 2011-08-04 Thomas Quinot <quinot@adacore.com>
3656 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3657 are forbidden in Compiler_Unit mode.
3659 2011-08-04 Robert Dewar <dewar@adacore.com>
3661 * sem_util.adb: Minor reformatting.
3663 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3665 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3666 library-level finalizers.
3667 (Gen_Finalize_Library_C): Update the import string for library-level
3669 (Gen_Finalize_Library_Defs_C): Update the definition name of a
3670 library-level finalizer.
3671 * exp_ch7.adb: Remove with and use clauses for Stringt.
3672 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3673 Spec_Decl. Add local variable Body_Id. The names of library-level
3674 finalizers are now manually fully qualified and are no longer external.
3675 A single name is now capable of servicing .NET, JVM and non-VM targets.
3676 Pragma Export is no longer required to provide visibility for the name.
3677 (Create_Finalizer_String): Removed.
3678 (New_Finalizer_Name): New routine which mimics New_..._Name.
3680 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3682 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3683 elaboration counter to Standard_Short_Integer.
3684 * sem_util.adb (Build_Elaboration_Entity): Likewise.
3685 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3686 (Gen_Elab_Externals_C): Likewise.
3688 2011-08-04 Ed Falis <falis@adacore.com>
3690 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3691 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3692 system-vxworks-mips.ads, system-vxworks-x86.ads
3693 (Always_Compatible_Rep): set to False for all VxWorks targets.
3695 2011-08-04 Robert Dewar <dewar@adacore.com>
3697 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3698 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3699 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3700 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3701 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3702 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3703 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3704 Minor reformatting and code reorganization.
3706 2011-08-04 Emmanuel Briot <briot@adacore.com>
3708 * projects.texi: Added doc for aggregate projects.
3710 2011-08-04 Emmanuel Briot <briot@adacore.com>
3712 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3713 Add support for overriding the Project_Path in aggregate projects.
3715 2011-08-04 Robert Dewar <dewar@adacore.com>
3717 * a-cofove.ads: Minor reformatting.
3719 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3721 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3722 on the generated code.
3723 (Build_Finalize_Statements): Update the comment on the generated code.
3724 (Build_Initialize_Statements): Update the comment on the generated code.
3725 (Build_Object_Declarations): Add local variable Result. The object
3726 declarations are now built in sequence.
3727 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3730 2011-08-04 Robert Dewar <dewar@adacore.com>
3732 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3734 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3736 * einfo.ads (Elaboration_Entity): Document new definition and use.
3737 (Elaboration_Entity_Required): Adjust to above change.
3738 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3739 * exp_ch12.adb: And with and use for Snames.
3740 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3741 * exp_util.adb (Set_Elaboration_Flag): Likewise.
3742 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3743 <Check_Unit_Name>: Deal with N_Expanded_Name.
3744 <Attribute_Elaborated>: Extend to all unit names.
3745 * sem_elab.adb: And with and use for Uintp.
3746 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3747 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3748 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3749 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3750 from Gen_Adainit_Ada.
3751 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3752 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
3753 case, do not call System.Standard_Library.Adafinal; instead call
3754 finalize_library if needed.
3755 (Gen_Adafinal_C): Likewise.
3756 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3757 non-main program case.
3758 (Gen_Adainit_C): Generate a couple of external declarations here.
3759 In the main program case, set SSL.Finalize_Library_Objects.
3760 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3761 (Gen_Elab_Calls_C): Likewise.
3762 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
3763 (Gen_Finalize_Library_C): Likewise. Generate a full function.
3764 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3766 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3767 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
3769 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3770 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
3771 of external declarations. Call Gen_Finalize_Library_C.
3773 2011-08-04 Emmanuel Briot <briot@adacore.com>
3775 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3776 Compute_Compilation_Phases): new subprogram.
3777 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3778 The number of mains as well as the various compilation phases that
3779 need to be run are now project tree specific, since various
3780 aggregated trees might have different requirements. In particular,
3781 they do not all require bind or link phases.
3783 2011-08-04 Emmanuel Briot <briot@adacore.com>
3785 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3786 (Project_Tree_Appdata): New type.
3787 It is now possible to associate application-specific data to a project
3788 tree. In particular, this is used in the gprbuild builder to avoid a
3789 number of global tables and htables, especially now that there can be
3790 several project trees loaded at once because of aggregate projects.
3791 (Debug_Name): new procedure.
3792 * projects.texi: Clarify syntax of "**" for Source_Dirs
3794 2011-08-03 Emmanuel Briot <briot@adacore.com>
3796 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3797 the "roots" for a main.
3798 (Fill_From_Project): add support for aggregate projects. Main units
3799 in aggregated projects are now automatically added in the list of
3800 files to build (although this fails later on in gprbuild, because
3801 these files are not using the root proejct tree, so this needs
3803 * gcc-interface/Make-lang.in: Update dependencies.
3805 2011-08-03 Yannick Moy <moy@adacore.com>
3807 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3808 conditional expression in ALFA.
3809 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3810 expressions as not in ALFA.
3812 2011-08-03 Robert Dewar <dewar@adacore.com>
3814 * a-cofove.adb: Minor reformatting.
3816 2011-08-03 Emmanuel Briot <briot@adacore.com>
3818 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3819 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3821 These packages are more logically placed in the Queue package, since
3822 they manipulate the queue. It is also likely that they can be adapted
3823 for gnatmake, thus sharing more code.
3824 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3825 that we could move the above.
3827 2011-08-03 Emmanuel Briot <briot@adacore.com>
3829 * errutil.adb (Finalize): clean up the list of error messages on exit.
3830 Calling this subprogram multiple times will no longer show duplicate
3831 error messages on stderr.
3833 2011-08-03 Emmanuel Briot <briot@adacore.com>
3835 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3836 Getopt_Switches when we have already define a command line
3839 2011-08-03 Yannick Moy <moy@adacore.com>
3841 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3842 in ALFA. Instead, they are considered as assertions to prove.
3843 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3844 nodes as not in ALFA. Instead, include conditional expressions in ALFA
3845 if they have no ELSE part, or if they occur in pre- and postconditions,
3846 where the Condition cannot have side-effects in ALFA
3847 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3848 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3849 Instead, include type conversion between scalar types in ALFA.
3850 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3851 if-and-only-if its type is in ALFA.
3853 2011-08-03 Thomas Quinot <quinot@adacore.com>
3855 * scos.adb, get_scos.adb, put_scos.adb
3856 New code letter for decisions: G (entry guard)
3858 (Traverse_Subprogram_Body): Rename to...
3859 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3860 (Traverse_Protected_Body): New subprogram
3861 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3862 protected bodies and entry bodies.
3864 2011-08-03 Yannick Moy <moy@adacore.com>
3866 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3867 entities with get/set subprograms, which is set on procedure entities
3868 generated by the compiler for a postcondition.
3869 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3870 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3871 entity for a declaration
3872 (Get_Unique_Entity_For_Decl): new function returning an entity which
3873 represents a declaration, so that matching spec and body have the same
3876 2011-08-03 Robert Dewar <dewar@adacore.com>
3878 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3879 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3881 2011-08-03 Yannick Moy <moy@adacore.com>
3883 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3884 library-level because retriction No_Implicit_Dynamic_Code in the
3885 front-end prevents its definition as a local subprogram
3886 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3887 for reuse in other contexts
3888 (Traverse_Declarations_Or_Statements,
3889 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3890 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3891 procedures take a callback parameter to be called on all declarations
3893 (Traverse_All_Compilation_Units): new generic function to traverse a
3894 compilation unit and call a callback parameter on all declarations
3896 2011-08-03 Javier Miranda <miranda@adacore.com>
3898 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3899 in Java since they are always enclosed in a namespace that
3900 differentiates them, and overloaded entities are supported by the VM.
3902 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3904 * checks.adb (Determine_Range): If a computed bound of an operation is
3905 outside the range of the base type of the expression, and overflow
3906 checks are enabled, the result is unknown and cannot be used for any
3907 subsequent constant folding.
3908 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3909 unknown, so is the result of the comparison.
3911 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3913 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3914 From_Abort. When finalization was triggered by an abort, propagate
3915 Standard'Abort_Signal rather than Program_Error.
3916 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3918 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3919 From_Abort. When finalization was triggered by an abort, propagate
3920 Standard'Abort_Signal rather than Program_Error.
3921 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3923 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3924 Abort_Id. Update the calls to Build_Object_Declarations and
3925 Build_Raise_Statement to include Abort_Id.
3926 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3927 calls to Build_Object_Declarations and Build_Raise_Statement to include
3929 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3930 calls to Build_Object_Declarations and Build_Raise_Statement to include
3932 (Build_Components): Create an entity for Abort_Id when exceptions are
3933 allowed on the target.
3934 (Build_Finalizer): New local variable Abort_Id.
3935 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3936 calls to Build_Object_Declarations and Build_Raise_Statement to include
3938 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3939 declaration of flag Abort_Id to preserve the original abort status
3940 before finalization code is executed.
3941 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3942 runtime routine Raise_From_Controlled_Operation.
3943 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3944 Abort_Id. Update the call to Build_Object_Declarations to include
3945 Abort_Id. Update the layout of the finalizer body.
3946 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3947 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3948 clunky code to create all flags and objects related to
3949 exception propagation and replace it with a call to
3950 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3952 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3953 Add new formal Abort_Id and associated comment on its use.
3954 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3956 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3957 Remove the clunky code to create all flags and objects related to
3958 exception propagation and replace it with a call to
3959 Build_Object_Declarations. Update the call to Build_Raise_Statement.
3961 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3963 * s-tassta.adb: Fix minor typos.
3965 2011-08-03 Robert Dewar <dewar@adacore.com>
3967 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3968 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3970 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3972 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3973 to packages. This ensures that the finalizer body will not end up
3974 inside the freeze node.
3975 (Process_Declarations): Add code to detect whether a freeze node has a
3976 nested finalization collection.
3978 2011-08-03 Pascal Obry <obry@adacore.com>
3980 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3981 (Current_Session): Return a not null access to Session_Type.
3982 (Default_Session): Likewise.
3984 2011-08-03 Robert Dewar <dewar@adacore.com>
3986 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3987 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3989 2011-08-03 Pascal Obry <obry@adacore.com>
3991 * g-awk.ads: Minor comment fix.
3993 2011-08-03 Sergey Rybin <rybin@adacore.com>
3995 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3996 the tree structure related to discriminant constraints.
3997 Original_Discriminant cannot be used any more for computing the
3998 defining name for the reference to a discriminant.
4000 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4002 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4003 function is not visibly tagged, this is not a dispatching call and
4004 therfore is not Tag_Indeterminate, even if the function is marked as
4005 dispatching on result.
4007 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4009 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4010 (Expand_N_Free_Statement): Add a guard to protect against run-times
4011 which do not support controlled types.
4012 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4013 against run-times which do not support controlled types.
4014 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4015 against run-times which do not support controlled types.
4016 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4017 against run-times which do not support controlled types.
4018 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4019 protect against run-times which do not support controlled types.
4021 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4023 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4024 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4026 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4028 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4029 modified in the source, to prevent spurious warnings when compiling
4032 2011-08-03 Thomas Quinot <quinot@adacore.com>
4034 * a-except-2005.adb: Minor reformatting.
4036 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4038 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4039 is a renaming declaration in the private part of a package, do not emit
4040 a warning that the with_clause could be moved because the renaming may
4041 be used in the body or in a child unit.
4043 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4045 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4046 Propagate the Comes_From_Source attribute from the original return
4047 object to the renaming.
4049 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4051 * exp_ch7.adb (Build_Raise_Statement): Do not call
4052 Raise_From_Controlled_Operation when this routine is not present in
4053 the run-time library.
4054 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4055 libraries (Ravenscar), tasks are non-terminating, and protected objects
4056 and tasks can only appear at library level, so we do not want
4057 finalization of protected objects nor tasks.
4058 * exp_intr.adb: Minor clarification in comment.
4059 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4060 Gen_Output_File_C): Remove references to finalization of library-level
4061 objects when using restricted run-time libraries.
4063 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4065 * sem_ch3.adb (Build_Discriminant_Constraints): Set
4066 Original_Discriminant only if the parent type is a generic formal.
4068 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4070 * exp_ch13.adb: Add with and use clause for Targparm;
4071 (Expand_N_Free_Statement): Prevent the generation of a custom
4072 Deallocate on .NET/JVM targets since this requires pools and address
4074 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4075 .NET/JVM targets, attach the newly allocated object to the access
4076 type's finalization collection. Do not generate a call to
4077 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4078 exist in the runtime.
4079 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4080 create a custom Allocate for object that do not require initialization.
4081 Attach a newly allocated object to the access type's finalization
4082 collection on .NET/JVM.
4083 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4084 assignment of controlled types on .NET/JVM. The two hidden pointers
4085 Prev and Next and stored and later restored after the assignment takes
4087 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4088 kludge for .NET/JVM to recognize a particular piece of code coming from
4089 Heap_Management and change the call to Finalize into Deep_Finalize.
4090 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4091 finalization collections on .NET/JVM only for types derived from
4092 Controlled. Separate the association of storage pools with a collection
4093 and only allow it on non-.NET/JVM targets.
4094 (Make_Attach_Call): New routine.
4095 (Make_Detach_Call): New routine.
4096 (Process_Object_Declarations): Suppress the generation of
4097 build-in-place return object clean up code on .NET/JVM since it uses
4099 * exp_ch7.ads (Make_Attach_Call): New routine.
4100 (Make_Detach_Call): New routine.
4101 * exp_intr.adb Add with and use clause for Targparm.
4102 (Expand_Unc_Deallocation): Detach a controlled object from a collection
4103 on .NET/JVM targets.
4104 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4105 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4106 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4107 names used in finalization.
4109 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4111 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4112 (Attach, Detach): Lock the current task when chaining an object onto a
4115 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4117 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4118 Rewritten to create the message strings when the exception is not
4119 raised by an abort during finalization.
4120 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4121 Raise_From_Controlled_Operation and update its associated comment.
4122 * a-fihema.ads, a-fihema.adb: New GNAT unit.
4123 Ada.Finalization.Heap_Management provides key functionality
4124 associated with controlled objects on the heap, their creation,
4125 finalization and reclamation. Type Finalization_Collection is
4126 effectively a wrapper which sits ontop of a storage pool and performs
4127 all necessary bookkeeping for all the objects it contains. Each
4128 access-to-controlled or access-to-class-wide type receives a collection
4129 as part of its expansion. The compiler generates buffer code and
4130 invokes Allocate / Deallocate to create and destroy allocated
4132 * a-finali.adb ("="): Removed.
4133 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4134 fields Prev and Next.
4135 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4136 A library unit with at least one controlled object on the library level
4137 has a special finalizer which is invoked by the binder. To signal this,
4138 ali files carry field PF.
4139 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4140 associated comment on field usage.
4141 * a-tags.adb (Get_RC_Offset): Removed.
4142 (Needs_Finalization): New routine.
4143 * a-tags.ads: Update the structure of the GNAT dispatch tables.
4144 Dispatch tables now carry field Needs_Finalization which provides
4145 runtime indication whether a type is controlled or has controlled
4146 components or both. Remove field RC_Offset.
4147 (Get_RC_Offset): Removed along with its associated pragma Export.
4148 Since tagged types with controlled components no longer carry hidden
4149 field _controller, the special mechanism to retrieve its location is no
4151 (Needs_Finalization): New routine.
4152 * atree.ads, atree.adb (Elist24): New routine.
4153 (Set_Elist24): New routine.
4154 * atree.h: Add a define clause for Elist24.
4155 * bindgen.adb New library-level variable Lib_Final_Built.
4156 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4157 presence of a VM target, the routine generates calls to the proper
4158 library finalization routine.
4159 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4160 targets. Set the correct library finalization routine depending on
4161 whether the library has controlled objects or this is a VM compilation.
4162 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4163 to library-level finalizers of compiled units in reverse order of
4164 elaboration. It also produces exception management code and reraises a
4165 potential exception after all units have been finalized.
4166 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4167 library-level finalizers of compiled units in reverse order of
4169 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4170 definitions of all library-level finalizers available to the compilation
4171 (Gen_Main_Ada): Directly call Adafinal which now contails all target
4173 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4174 System.Standard_Library.Adafinal directly. If the library needs
4175 finalization actions, create the sequence of finalization calls.
4176 (Gen_Output_File_Ada): Alphabetize local variables and constants.
4177 Generate a with clause for System.Soft_Links when compiling for a VM.
4178 Remove the code which imports System.Standard_Library.Adafinal as
4179 Do_Finalize. Generate the library finalization routine.
4180 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4181 If the library needs finalization actions, create all the definitions
4182 of library- level finalizers.
4183 (Has_Finalizer): New routine. Determines whether at least one compiled
4184 unit has a library-level finalizer.
4185 Add type Qualification_Mode.
4186 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4187 * einfo.adb: New usage of field 15 as Return_Flag.
4188 Remove Finalization_Chain_Entity from the usages of field 19.
4189 Remove Associated_Final_Chain from the usages of field 23.
4190 New usage of field 23 as Associated_Collection.
4191 New usage of field 24 as Finalizer.
4192 New usage of flag 252 as Is_Processed_Transient.
4193 (Associated_Final_Chain): Removed.
4194 (Associated_Collection): New routine.
4195 (Finalization_Chain_Entity): Removed.
4196 (Finalizer): New routine.
4197 (Is_Finalizer): New routine.
4198 (Is_Processed_Transient): New routine.
4199 (Return_Flag): New routine.
4200 (Set_Associated_Final_Chain): Removed.
4201 (Set_Associated_Collection): New routine.
4202 (Set_Finalization_Chain_Entity): Removed.
4203 (Set_Finalizer): New routine.
4204 (Set_Is_Processed_Transient): New routine.
4205 (Set_Return_Flag): New routine.
4206 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4208 (Write_Field8_Name): Alphabetize the output.
4209 (Write_Field11_Name): Alphabetize the output.
4210 (Write_Field12_Name): Alphabetize the output.
4211 (Write_Field13_Name): Alphabetize the output.
4212 (Write_Field14_Name): Alphabetize the output.
4213 (Write_Field15_Name): Alphabetize the output.
4214 (Write_Field16_Name): Alphabetize the output.
4215 (Write_Field17_Name): Alphabetize the output.
4216 (Write_Field18_Name): Alphabetize the output.
4217 (Write_Field19_Name): Alphabetize the output. Remove the output of
4218 Finalization_Chain_Entity.
4219 (Write_Field20_Name): Alphabetize the output.
4220 (Write_Field21_Name): Alphabetize the output.
4221 (Write_Field22_Name): Alphabetize the output.
4222 (Write_Field23_Name): Alphabetize the output. Remove the output of
4223 Associated_Final_Chain. Add output for Associated_Collection.
4224 (Write_Field24_Name): Alphabetize the output.
4225 (Write_Field25_Name): Add output for Finalizer.
4226 (Write_Field26_Name): Alphabetize the output.
4227 (Write_Field27_Name): Alphabetize the output.
4228 (Write_Field28_Name): Alphabetize the output.
4229 * einfo.ads: Add new field description for Associated_Collection and
4231 Remove Associated_Final_Chain and its uses in nodes.
4232 Remove Finalization_Chain_Entity and its uses in nodes.
4233 Add new field description for Finalizer and its uses in nodes.
4234 Add new synthesized attribute Is_Finalizer.
4235 Add new flag description for Is_Processed_Transient and its uses in
4237 Add new field description for Return_Flag and its uses in nodes.
4238 (Associated_Final_Chain): Removed along with its pragma Inline.
4239 (Associated_Collection): New routine and pragma Inline.
4240 (Finalization_Chain_Entity): Removed along with its pragma Inline.
4241 (Finalizer): New routine and pragma Inline.
4242 (Is_Finalizer): New routine and pragma Inline.
4243 (Is_Processed_Transient): New routine and pragma Inline.
4244 (Return_Flag): New routine and pragma Inline.
4245 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4246 (Set_Associated_Collection): New routine and pragma Inline.
4247 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4248 (Set_Finalizer): New routine and pragma Inline.
4249 (Set_Is_Processed_Transient): New routine and pragma Inline.
4250 (Set_Return_Flag): New routine and pragma Inline.
4251 * exp_aggr.adb: Alphabetize subprograms.
4252 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4253 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4254 associated comments. Remove local variables External_Final_List and
4256 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4257 Ancestor. Remove the retrieval of finalization lists. Update the call to
4259 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4260 lists. Update the call to Late_Expansion.
4261 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4262 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4263 (Gen_Assign): Remove the retrieval of the finalization list used to
4264 build the assignment. Update the calls to Make_Init_Call and
4266 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4267 Remove the mechanism to determine attachment levels and finalization
4268 list retrieval. Remove the processing for coextensions.
4269 (Init_Controller): Removed. Controllers no longer exist.
4270 (Late_Expansion): Remove formals Flist and Obj along with their
4271 associated comments. Update the calls to Build_Record_Aggr_Code and
4272 Build_Array_Aggr_Code.
4273 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4274 (Expand_N_Freeze_Entity): Add special processing for finalizers which
4275 appear in entry bodies, protected subprograms and task bodies.
4276 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4277 * exp_ch3.adb (Add_Final_Chain): Removed.
4278 (Build_Array_Init_Proc): Alphabetize local variables.
4279 (Build_Assignment): Alphabetize local variables. Update the call to
4281 (Build_Class_Wide_Master): Rename local variables to better reflect
4283 (Build_Discriminant_Assignments): Code reformatting.
4284 (Build_Init_Call_Thru): Code reformatting.
4285 (Build_Init_Procedure): Code reformatting. Generate a special version
4286 of Deep_Finalize which is capable of finalizing all initialized
4287 components and ignore the rest.
4288 (Build_Init_Statements): Rename local variables to better reflect their
4290 Reimplement the mechanism to include the creation and update of an index
4291 variable called a "counter". It is used as a bookmark for tracing
4292 initialized and non-initialized components.
4293 (Build_Initialization_Call): Remove local variable Controller_Typ.
4294 Alphabetize all local variables. Remove the initialization of the
4295 record controller and update the call to Make_Init_Call.
4296 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4297 New local variable Counter.
4298 (Constrain_Array): Alphabetize.
4299 (Expand_Freeze_Array_Type): Create a collection instead of a
4301 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4302 Finalize_Address which is used in conjunction with allocated controlled
4304 (Expand_N_Object_Declaration): Remove the creation of a finalization
4305 list for anonymous access types. Update the calls to Make_Init_Call and
4307 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4308 retrieval of finalization lists. Remove the expansion of the record
4309 controller. Create TSS primitive Finalize_Address used in conjunction
4310 with controlled objects on the heap. Create finalization collections
4311 for access-to-controlled record components.
4312 (Expand_Record_Controller): Removed.
4313 (Freeze_Type): Remove the freezing of record controllers. Freezing of
4314 class-wide types now requires additional processing. Create
4315 finalization collections for access-to-controlled types.
4316 (Increment_Counter): New routine.
4317 (Make_Counter): New routine.
4318 (Make_Eq_If): Remove the mention of Name_uController.
4319 (Make_Predefined_Primitive_Specs): There is no longer need to skip
4320 types coming from System.Finalization_Root.
4321 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4322 (Predefined_Primitive_Bodies): There is no longer need to skip types
4323 coming from System.Finalization_Root.
4324 (Stream_Operation_OK): Do not generate stream routines for
4325 type Ada.Finalization.Heap_Management.Finalization_Collection.
4326 * exp_ch3.ads: Alphabetize subprograms.
4327 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4328 Add with and use clause for Lib.
4329 (Complete_Coextension_Finalization): Removed.
4330 (Complete_Controlled_Allocation): New routine. Create a finalization
4331 collection for anonymous access-to-controlled types. Create a custom
4332 Allocate which interfaces with the back end and the machinery in
4334 (Expand_Allocator_Expression): Add necessary calls to
4335 Complete_Controlled_Allocation. Remove the retrieval of finalization
4336 lists. Update the calls to Make_Adjust_Call. Generate a call to
4337 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4338 the associated collection.
4339 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4340 Code clean up. Remove the retrieval of finalization lists and
4342 Update the call to Make_Init_Call. Generate a call to
4343 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4344 the associated collection.
4345 (Get_Allocator_Final_List): Removed. Finalization lists are not
4347 (Suitable_Element): Remove the mention of Name_uController.
4348 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4349 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4350 the left hand side, carry out the assignment and adjust the left hand
4352 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4353 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4354 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4355 BIP_Collection and BIPcollection.
4356 (Build_Heap_Allocator): New routine used to allocate the return object
4357 of a build-in-place function onto a collection.
4358 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4359 (Expand_Call): Do not replace direct calls to Deep routines with their
4361 (Expand_N_Extended_Return_Statement): Give all variables shorter names
4362 and update their occurrences. Add a special return flag to monitor the
4363 [ab]normal execution of the function. The flag is set right before the
4365 Rewrite the mechanism used to allocate a build-in-place return object
4366 on the heap or on a storage pool.
4367 (Is_Direct_Deep_Call): New routine.
4368 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4369 build-in-place function call instead of a final list. Build a call to
4370 Set_Finalize_Address_Ptr to decorate the associated collection.
4371 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4372 order to name the build-in-place function call's result for later
4373 finalization. Add a collection to a build-in-place function call
4374 instead of a final list.
4375 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4376 build-in-place function call instead of a final list. Remove the code
4377 which moves one final list and transforms it into the actual in a
4378 nested build-in-place call.
4379 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4380 build-in-place function call instead of a final list.
4381 (Move_Final_List): Removed.
4382 (Needs_BIP_Collection): New routine.
4383 (Needs_BIP_Final_List): Removed.
4384 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4385 enumeration type BIP_Formal_Kind.
4386 Update the related comment.
4387 (Needs_BIP_Collection): New routine.
4388 (Needs_BIP_Final_List): Removed.
4389 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4390 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4391 majority of subprograms in this unit. Add Name_Finalize_Address to
4392 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4393 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4394 statements for an array type.
4395 (Build_Adjust_Statements): Create the adjust statements for a record
4397 (Build_Cleanup_Statements): New routine. A procedure which given any
4398 construct containing asynchronous calls, references to _master, or is a
4399 task body, a task allocation or a protected body produces the necessary
4400 runtime calls to clean up these constructs.
4401 (Build_Exception_Handler): New routine.
4402 (Build_Final_List): Removed.
4403 (Build_Finalization_Collection): New routine. A core procedure which
4404 creates a collection to service heap allocated controlled objects
4405 associated with an access-to-controlled type.
4406 (Build_Finalize_Statements): Create the finalization statements for a
4408 (Build_Finalizer): New routine. A core procedure which given any
4409 construct with declarations and/or statements detects all objects which
4410 need any type of clean up (controlled objects, protected objects) and
4411 generates all necessary code to clean up the said objects in the proper
4413 (Build_Finalizer_Call): New routine.
4414 (Build_Initialize_Statements): Create the initialization statements for
4415 an array type. The generated routine contains code to finalize partially
4417 (Build_Object_Declarations): New routine.
4418 (Build_Raise_Statement): New routine.
4419 (Clean_Simple_Protected_Objects): Removed.
4420 (Controller_Component): Removed.
4421 (Enclosing_Function): New routine.
4422 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4423 either declarations or statements or both.
4424 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4425 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4427 (Find_Final_List): Removed.
4428 (Global_Flist_Ref): Removed.
4429 (In_Finalization_Root): Removed.
4430 (Insert_Actions_In_Scope_Around): Determine the range of the transient
4431 scope in terms of tree nodes. Process all transient variables within
4433 (Make_Adjust_Call): Rewritten. There is no longer an attach call
4434 generated after the adjust.
4435 (Make_Attach_Call): Removed.
4436 (Make_Call): New routine.
4437 (Make_Clean): Removed.
4438 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4440 (Make_Deep_Proc): Rewritten to generate the new profile signature used
4442 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4444 (Make_Final_Call): Modified to simply create a call to either
4445 Deep_Finalize or Finalize.
4446 (Make_Finalize_Address_Body): New routine.
4447 (Make_Finalize_Address_Stmts): New routine. A function which produces
4448 TSS primitive Finalize_Address used in conjunction with heap allocated
4450 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4451 (Make_Init_Call): Rewritten. There is no longer an attach call
4452 generated after initialization.
4453 (Make_Local_Deep_Finalize): New routine.
4454 (Make_Set_Finalize_Address_Ptr_Call): New routine.
4455 (Make_Transient_Block): Remove the finalization list retrieval and
4457 (Needs_Finalization): Moved to Exp_Util.
4458 (Parent_Field_Type): New routine.
4459 (Preprocess_Components): New routine.
4460 (Process_Transient_Objects): New routine.
4461 (Wrap_HSS_In_Block): New routine.
4462 (Wrap_Transient_Declaration): Remove finalization list management and
4463 controller insertion.
4464 (Wrap_Transient_Expression): Code reformatting.
4465 (Wrap_Transient_Statement): Code reformatting.
4466 * exp_ch7.ads (Build_Final_List): Removed.
4467 (Build_Finalization_Collection): New routine.
4468 (Build_Raise_Statement): New routine.
4469 (Controller_Component): Removed.
4470 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4471 (Find_Final_List): Removed.
4472 (In_Finalization_Root): Removed.
4473 (Is_Simple_Protected_Type): Update related comment.
4474 (Make_Adjust_Call): New parameter profile and associated comments.
4475 (Make_Attach_Call): Removed.
4476 (Make_Final_Call): New parameter profile and associated comments.
4477 (Make_Finalize_Address_Body): New routine.
4478 (Make_Init_Call): New parameter profile and associated comments.
4479 (Make_Local_Deep_Finalize): New routine.
4480 (Make_Set_Finalize_Address_Ptr_Call): New routine.
4481 (Needs_Finalization): Moved to Exp_Util.
4482 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4483 (Expand_N_Protected_Body): Remove the handling of finalization lists.
4484 (Find_Protection_Type): Moved to Exp_Util.
4485 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4486 (Make_DT): Update sequence of dispatch table initialization. Remove the
4487 initialization of field RC_Offset. Add initialization of field Needs_
4489 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4490 Reimplement how an object is first finalized, then deallocated.
4491 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4493 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4494 Register TSS_Finalize_Address with type TSS_Names.
4495 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4496 procedure provides the interface between an allocation / deallocation
4497 and the support machinery in Ada.Finalization.Heap_Management.
4498 (Find_Init_Call): Code reformatting.
4499 (Find_Init_Call_In_List): Code reformatting.
4500 (Find_Protection_Type): Moved from Exp_Ch9.
4501 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4502 (Has_Controlled_Coextensions): Removed.
4503 (Has_Controlled_Objects): New routine.
4504 (In_Library_Level_Package_Body): New routine.
4505 (Insert_Action_After): New routine.
4506 (Is_Finalizable_Transient): New routine. This predicate determines
4507 whether an object declaration is one of the many variants of controlled
4509 (Is_Null_Access_BIP_Func_Call): New routine.
4510 (Is_Non_BIP_Func_Call): New routine.
4511 (Is_Related_To_Func_Return): New routine.
4512 (Needs_Finalization): Moved from Exp_Ch7.
4513 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4514 (Find_Protection_Type): Moved from Exp_Ch9.
4515 (Has_Controlled_Coextensions): Removed.
4516 (Has_Controlled_Objects): New routine.
4517 (In_Library_Level_Package_Body): New routine.
4518 (Insert_Action_After): New routine.
4519 (Is_Finalizable_Transient): New routine.
4520 (Is_Null_Access_BIP_Func_Call): New routine.
4521 (Is_Non_BIP_Func_Call): New routine.
4522 (Is_Related_To_Func_Return): New routine.
4523 (Needs_Finalization): Moved from Exp_ch7.
4524 * expander.adb (Expand): Add a case for N_Free_Statement.
4525 * freeze.adb (Freeze_All): Replace the generation of a finalization
4526 list with a collection for access-to-controlled types.
4527 (Freeze_Entity): Code reformatting.
4528 (Freeze_Record_Type): Remove the freezing of a record controller
4530 (Freeze_Subprogram): Code reformatting.
4531 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4533 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4534 has a library-level finalizer.
4535 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4536 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4537 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4538 files. Add a-fihema to the list of object files.
4540 Alphabetize the associations in type Is_Parameterless_Attribute.
4541 * rtsfind.ads: Ada.Finalization_List.Controller and
4542 System.Finalization_Implementation are no longer a GNAT unit.
4543 Update the range of type Ada_Finalization_Child. Remove the following
4544 recoverable entities:
4546 RE_Attach_To_Final_List
4550 RE_Finalizable_Ptr_Ptr
4551 RE_Global_Final_List
4552 RE_Limited_Record_Controller
4555 RE_Record_Controller
4556 RE_Simple_List_Controller
4558 Add the following recoverable entities:
4560 RE_Add_Offset_To_Address
4564 RE_Exception_Identity
4565 RE_Finalization_Collection
4566 RE_Finalization_Collection_Ptr
4567 RE_Needs_Finalization
4568 RE_Save_Library_Occurrence
4569 RE_Set_Finalize_Address_Ptr
4570 RE_Set_Storage_Pool_Ptr
4572 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4574 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4575 (First_Stored_Discriminant): Remove the mention of Name_uController.
4576 * sem_aux.ads: Comment reformatting.
4577 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4578 to redecorate an already existing class-wide type.
4579 (Decorate_Tagged_Type): New parameter profile and associated comment.
4580 Create a "shadow class-wide type" for a shadow entity.
4581 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4582 of the final chain along with the associated comment.
4583 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4584 Full_Desig and set it to the full view of the designated type.
4585 Initialize the finalization collection to empty.
4586 (Build_Derived_Record_Type): Alphabetize local variables. Code
4588 (Collect_Fixed_Components): Remove the mention of Name_uController.
4589 (Create_Constrained_Components): Remove the mention of Name_uController.
4590 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4591 class-wide type of a shadow entity.
4592 (Process_Full_View): Update the machinery which marks type
4593 Limited_Controlled's entity as limited.
4594 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4595 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4596 list, instead make a collection build-in-place formal.
4597 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4598 a designated type in order to establish a match between the renaming
4599 and the renamed entity.
4600 (Find_Selected_Component): Add guard to prevent spurious exceptions
4601 from being raised on .NET/JVM.
4602 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4603 to the list of primitive that need special processing. Update arrays
4604 C_Names and D_Names.
4605 (Replace_Types): Handle class-wide types.
4606 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4607 different parameter profile, look at the first formal.
4608 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4609 use clauses for Exp_Util.
4610 * sem_res.adb: Remove with and use clauses for Elists.
4611 (Propagate_Coextensions): Removed.
4612 (Resolve_Allocator): Do not propagate the list of coextensions from one
4613 allocator to another.
4614 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4615 Deaccessed_T to Desig_Typ.
4616 (Enter_Name): Remove the mention of Name_uController.
4617 (Gather_Components): Remove the mention of Name_uController.
4618 (Incomplete_Or_Private_View): New routine.
4619 (Is_Coextension_Root): Removed.
4620 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4621 * sem_util.ads (Incomplete_Or_Private_View): New routine.
4622 (Is_Coextension_Root): Removed.
4623 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4624 Controlled types are now derived from a null tagged record. Remove
4625 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4626 * sinfo.adb (Coextensions): Removed.
4627 (Set_Coextensions): Removed.
4628 * sinfo.ads: Remove Coextensions from the explanation of node fields
4629 and its uses in nodes.
4630 Update the field usage of N_Allocator.
4631 (Coextensions): Removed along with its pragma Inline.
4632 (Set_Coextensions): Removed along with its pragma Inline.
4633 * snames.ads-tmpl: Remove names
4638 Name_uLocal_Final_List
4639 Name_Finalization_Root
4646 Name_Finalize_Address
4647 * s-pooglo.adb (Allocate): Add overriding indicator.
4648 (Deallocate): Add overriding indicator.
4649 (Storage_Size): Add overriding indicator.
4650 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4651 than Finalize_Global_List.
4652 (Null_Finalize_Global_List): Removed.
4653 (Save_Library_Occurrence): New routine.
4654 * s-soflin.ads: Remove variable Finalize_Global_List along with its
4655 initialization. Add variable Finalize_Library_Objects along with its
4656 pragma Export. Add variables Library_Exception and
4657 Library_Exception_Set along with their pragma Export.
4658 (Null_Finalize_Global_List): Removed.
4659 (Save_Library_Occurrence): New routine.
4660 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4661 rather than Finalize_Global_List.
4662 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4663 of the constructed node.
4665 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4667 * link.c: Include "auto-host.h" before system headers.
4669 2011-08-03 Vincent Celier <celier@adacore.com>
4671 * make.adb (Gnatmake): Add to table Library_Projs only library projects
4672 that are not extended. Do not check if a library project that is
4673 extended should be regenerated. Do not add to table Library_Paths the
4674 libraries that are in extended projects. Link only with libraries that
4675 are in libray projects that are not extended.
4676 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4677 for a library project that is extended.
4679 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4681 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4682 conforming subprogram renamings that appear to be completions if they
4683 are not fully conformant.
4684 Such renamings are homographs but not completions.
4685 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4686 names in a subprogram renaming that appears in an instance.
4688 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4690 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4691 not immutably limited, build actual subtype from expression to provide
4692 proper bounds to caller.
4694 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4696 * sem_ch8.adb: Minor comment correction.
4698 2011-08-03 Thomas Quinot <quinot@adacore.com>
4700 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4701 returning a limited array, use an extended return statement.
4703 2011-08-03 Vincent Celier <celier@adacore.com>
4705 * make.adb (Initialize): If --subdirs= is used, but no project file is
4706 specified, attempt to create the specify subdir if it does not already
4707 exist and use it as the object directory as if -D had been specified.
4709 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4711 * s-tpopsp-vms.adb: New file.
4712 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4713 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4715 2011-08-03 Emmanuel Briot <briot@adacore.com>
4717 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4720 2011-08-03 Yannick Moy <moy@adacore.com>
4722 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4723 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4724 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4725 detect that an array has static bounds.
4727 2011-08-03 Thomas Quinot <quinot@adacore.com>
4729 * exp_dist.adb: Minor reformatting.
4731 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4733 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4734 (ATCB_Key): Removed, not always used.
4736 2011-08-03 Emmanuel Briot <briot@adacore.com>
4738 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4739 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4740 most remaining global variables.
4742 2011-08-03 Robert Dewar <dewar@adacore.com>
4744 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4745 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4748 2011-08-03 Javier Miranda <miranda@adacore.com>
4750 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4751 that must be passed by copy in VM targets.
4753 2011-08-03 Emmanuel Briot <briot@adacore.com>
4755 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4756 duplicates a similar htable now in the project tree.
4758 2011-08-03 Claire Dross <dross@adacore.com>
4760 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4761 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4762 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4763 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4764 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4765 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4766 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4769 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4771 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4772 (ATCB_Key): Removed, not always used.
4773 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4775 * s-tpopsp-tls.adb: New file.
4776 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4777 x86/x64/ia64/powerpc/sparc Linux.
4779 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4781 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4782 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4784 2011-08-03 Thomas Quinot <quinot@adacore.com>
4786 * rtsfind.ads, exp_dist.adb, exp_dist.ads
4787 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4788 Fix type selection for mapping integer types to PolyORB types.
4790 2011-08-03 Bob Duff <duff@adacore.com>
4792 * sem_ch7.adb: Minor comment clarification.
4794 2011-08-03 Bob Duff <duff@adacore.com>
4796 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4797 an error analyzing a choice, skip further processing. Further
4798 processing could cause a crash or cascade errors.
4800 2011-08-03 Emmanuel Briot <briot@adacore.com>
4802 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4803 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4804 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4805 prj-env.ads (Shared_Project_Tree_Data): new type
4806 An aggregate project and its aggregated trees need to share the common
4807 data structures used for lists of strings, packages,... This makes the
4808 code simpler since otherwise we have to pass the root tree (also used
4809 for the configuration file data) in addition to the current project
4810 tree. This also avoids ambiguities as to which tree should be used.
4811 And finally this saves a bit of memory.
4812 (For_Every_Project_Imported): new parameter Tree.
4813 Since aggregated projects are using a different tree, we need to let
4814 the caller know which tree to use to manipulate the returned project.
4816 2011-08-03 Robert Dewar <dewar@adacore.com>
4818 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4819 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4820 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4821 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4823 2011-08-03 Javier Miranda <miranda@adacore.com>
4825 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4826 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4828 2011-08-03 Bob Duff <duff@adacore.com>
4830 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4833 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
4835 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4836 g-sehash.ads: Fix typo. Update header.
4838 2011-08-03 Thomas Quinot <quinot@adacore.com>
4840 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4843 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4845 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4846 prefixes of private types along with records, since the selector may be
4848 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4849 private types along with records, since the selector may be a
4852 2011-08-03 Emmanuel Briot <briot@adacore.com>
4854 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4856 2011-08-03 Javier Miranda <miranda@adacore.com>
4858 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4859 Tagged_Type_Expansion.
4861 2011-08-03 Yannick Moy <moy@adacore.com>
4863 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4864 violation when the argument of concatenation is the name of a
4867 2011-08-03 Emmanuel Briot <briot@adacore.com>
4869 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4870 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4871 (Process_Declarative_Items): new parameter Child_Env.
4873 2011-08-03 Yannick Moy <moy@adacore.com>
4875 * alfa.ads: Update format of ALFA section in ALI file in order to
4876 add a mapping from bodies to specs when both are present.
4877 (ALFA_Scope_Record): Add components for spec file/scope.
4878 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4880 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4881 collected, fill in the spec information when relevant.
4882 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4885 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4887 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4888 code unit to decide whether to add internally generated subprograms.
4890 2011-08-03 Javier Miranda <miranda@adacore.com>
4892 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4893 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4894 be handled by copy in VM targets.
4896 2011-08-03 Emmanuel Briot <briot@adacore.com>
4898 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4899 code with Makeutl.Get_Switches.
4900 * prj-tree.adb: Update comment.
4902 2011-08-03 Thomas Quinot <quinot@adacore.com>
4904 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4905 subprogram with a limited formal that does not support external
4908 2011-08-03 Yannick Moy <moy@adacore.com>
4910 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4912 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4913 not from current unit in two phases, because it is not possible to
4914 change the table while iterating over its content.
4915 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4917 2011-08-03 Sergey Rybin <rybin@adacore.com>
4919 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4920 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4922 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4924 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4925 and the component type is composite, this is ambiguous for predefined
4926 concatenation, but if the node is not overloaded and the entity is a use
4927 -defined function its profile can be used to resolve that aggregate.
4929 2011-08-03 Robert Dewar <dewar@adacore.com>
4931 * exp_ch4.adb: Minor code cleanup.
4933 2011-08-03 Thomas Quinot <quinot@adacore.com>
4935 * exp_dist.adb: Do not generate distribution stubs if serious errors
4936 have been diagnosed.
4938 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4940 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4941 the first formal of a primitive operation, go to the base type to
4942 handle properly an access to a derived type with constrained
4944 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4945 user-defined function that is only use-visible.
4947 2011-08-03 Robert Dewar <dewar@adacore.com>
4949 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4950 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4951 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4952 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4953 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4954 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4955 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4956 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4958 2011-08-03 Robert Dewar <dewar@adacore.com>
4960 * repinfo.adb (List_Mechanism): Add handling of
4961 Convention_Ada_Pass_By_XXX.
4962 * sem_mech.adb (Set_Mechanism): Ditto.
4963 * sem_prag.adb (Process_Convention): Add entries for
4964 Convention_Ada_Pass_By_XXX.
4965 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4967 2011-08-03 Pascal Obry <obry@adacore.com>
4969 * makeutl.adb: Minor reformatting.
4971 2011-08-03 Vincent Celier <celier@adacore.com>
4974 (Get_File_Name) If the file cannot be found when there are no config
4975 pragmas file and May_Fail is True, return No_File instead of the file
4976 name, to be consistent.
4978 2011-08-03 Pascal Obry <obry@adacore.com>
4980 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4983 2011-08-03 Javier Miranda <miranda@adacore.com>
4986 (Same_Representation): In VM targets the representation of arrays with
4987 aliased components differs from arrays with non-aliased components.
4989 2011-08-03 Emmanuel Briot <briot@adacore.com>
4991 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4992 not systematically lower case attribute indexes that contain no "."
4993 Fix definition of several Naming attributes, which take
4994 a unit name as index and therefore should be case insensitive.
4995 Minor refactoring (reduce length of variable names).
4997 2011-08-03 Emmanuel Briot <briot@adacore.com>
4999 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5001 2011-08-03 Emmanuel Briot <briot@adacore.com>
5003 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5004 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5005 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5006 prj-tree.ads (Prj.Tree.Environment): new type.
5008 2011-08-03 Emmanuel Briot <briot@adacore.com>
5010 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5011 prj-tree.adb, prj-tree.ads (Environment): new type.
5013 2011-08-03 Emmanuel Briot <briot@adacore.com>
5015 * prj-tree.ads: Remove unused variable.
5017 2011-08-03 Yannick Moy <moy@adacore.com>
5019 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5020 issuing messages related to SPARK restriction violation.
5022 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5024 * sem_ch6.adb: guard against error nodes in return statements.
5026 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5028 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5029 a warning can only appear on a configuration file, so emit warning
5030 without further checks.
5032 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5034 * s-interr.ads: add overriding keyword.
5036 2011-08-03 Geert Bosch <bosch@adacore.com>
5038 * exp_attr.adb: Fix minor typo.
5040 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5042 * par-ch4.adb: improve error recovery.
5044 2011-08-03 Emmanuel Briot <briot@adacore.com>
5046 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5047 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5050 2011-08-03 Emmanuel Briot <briot@adacore.com>
5052 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5053 "external" as an attribute name in aggregate projects.
5055 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5057 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5058 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5059 from 0, so we need to adjust.
5061 2011-08-03 Emmanuel Briot <briot@adacore.com>
5063 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5064 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5066 2011-08-03 Yannick Moy <moy@adacore.com>
5068 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5069 restriction on overloaded entity if the entity is not an operator.
5071 2011-08-03 Yannick Moy <moy@adacore.com>
5073 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5074 restrict.ads: Rename remaining Check_Formal_Restriction* into
5075 Check_SPARK_Restriction*.
5077 2011-08-03 Emmanuel Briot <briot@adacore.com>
5079 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5080 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5082 (Project_Empty): removed
5083 (Empty_Project): new parameter Qualifier
5084 This is used to have fields specific to aggregate projects, cleaner
5085 New field to store the list of aggregated projects.
5086 (Check_Aggregate_Project): removed
5087 (Process_Aggregated_Projects, Free): new subprograms.
5089 2011-08-03 Olivier Hainque <hainque@adacore.com>
5091 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5093 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5095 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5096 explicit dereference of an unconstrained type, create a constrained
5097 subtype for it, as is done for function calls that return an
5100 2011-08-03 Thomas Quinot <quinot@adacore.com>
5102 * g-pehage.adb (Finalize): Avoid possible double-free.
5104 2011-08-03 Steve Baird <baird@adacore.com>
5106 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5107 Elab_Spec/Body attrs in CodePeer_Mode.
5109 2011-08-03 Javier Miranda <miranda@adacore.com>
5111 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5112 low bound is not known at compile time but they have no others choice.
5113 Done because in this case the bounds can be obtained directly from the
5116 2011-08-03 Ed Falis <falis@adacore.com>
5118 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5119 on VxWorks SMP. Remove unusable constant ANY_CPU.
5121 2011-08-03 Emmanuel Briot <briot@adacore.com>
5123 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5124 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5125 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5126 Prj.Env.Initialize_Empty): new subprograms
5127 (Get_Env, Find_Project): remove parameter Target_Name.
5129 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5131 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5132 as a condition for the delayed call to Derived_Subprograms done for the
5133 case of the rewriting of a derived type that constrains the
5134 discriminants of its parent type.
5135 Avoids redundant subprogram derivations for private subtype derivations.
5137 2011-08-03 Javier Miranda <miranda@adacore.com>
5139 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5140 Build_Record_Aggr_Code.
5141 (Build_Record_Aggr_Code): Add missing support to initialize hidden
5142 discriminants in extension aggregates.
5144 2011-08-03 Emmanuel Briot <briot@adacore.com>
5146 * prj-pp.adb (Print): also output project qualifiers, since in
5147 particular "aggregate" is mandatory in an aggregate project.
5149 2011-08-03 Emmanuel Briot <briot@adacore.com>
5151 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5152 (Debug_Output): new function.
5154 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5156 * gnat_ugn.texi: Document -Wstack-usage.
5157 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5159 2011-08-03 Thomas Quinot <quinot@adacore.com>
5161 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5162 have keyword LIMITED.
5164 2011-08-03 Yannick Moy <moy@adacore.com>
5166 * alfa.adb, alfa.ads, alfa_test.adb: New files.
5167 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5168 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5169 section (does not happen in compiler, only if code directly calls
5171 * get_alfa.adb, get_alfa.ads: New files.
5172 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5174 * lib-xref-alfa.adb: New file.
5175 * lib-xref.adb, lib-xref.ads
5176 (Xref_Entry): redefine information needed in cross-references for ALFA.
5177 Push ALFA treatments in separated local package.
5178 (Enclosing_Subpragram_Or_Package): treat specially subprogram
5179 identifiers. Return entity of package body instead of spec. Return
5180 Empty for a scope with no location.
5181 (Generate_Reference): adapt to new components for ALFA information.
5182 Remove the need for D references on definitions.
5183 (Is_Local_Reference): moved to ALFA local package
5184 (Output_References): extract subfunction as Extract_Source_Name
5185 (Output_Local_References): remove procedure, replaced by filtering of
5186 cross-references in package ALFA and printing in Put_ALFA.
5187 (Write_Entity_Name): remove procedure
5188 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5189 print exact name of entity as it appears in source file
5190 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5191 * put_alfa.adb, put_alfa.ads: New files.
5192 * xref_lib.adb (Search_Xref): protect read of cross-references against
5193 reading other sections of the ALI file, in gnatxref
5194 (Search): protect read of cross-references against reading other
5195 sections of the ALI file, in gnatfind.
5196 * gcc-interface/Make-lang.in: Update dependencies.
5198 2011-08-03 Thomas Quinot <quinot@adacore.com>
5200 * sem_ch3.adb: Minor reformatting.
5202 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5204 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5205 raising an exception.
5207 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5209 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5210 type, always use 1 as the lower bound or string, even if lower bound of
5211 context is not static, to handle properly null strings in a non-static
5214 2011-08-03 Bob Duff <duff@adacore.com>
5216 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5217 always legal on the right-hand side of an assignment statement; there
5218 is always an applicable index constraint in this case. Therefore, the
5219 check for Pkind = N_Assignment_Statement is now unconditional -- it
5220 doesn't depend on whether Is_Constrained (Typ).
5222 2011-08-03 Robert Dewar <dewar@adacore.com>
5224 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5226 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5228 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5229 for an itype created within a generic unit.
5231 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5233 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5234 suppresses all inlining.
5236 2011-08-03 Robert Dewar <dewar@adacore.com>
5238 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5239 exp_aggr.adb: Minor reformatting.
5241 2011-08-03 Thomas Quinot <quinot@adacore.com>
5243 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5244 tagged assignment when discriminant checks are suppressed. This is
5245 useless and extremely costly in terms of static stack usage.
5247 2011-08-03 Bob Duff <duff@adacore.com>
5249 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5250 of generics, because this leads to the wrong entity in the wrong scope,
5251 causing (e.g.) pragma Export_Procedure to get an error if the entity is
5253 (Process_Interface_Name): Follow Alias for instances of generics, to
5254 correct for the above change.
5256 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5258 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5259 is an integer literal it is always safe to replace the reference. In
5260 addition, if the reference appears in the generated code for an object
5261 declaration it is necessary to copy because otherwise the reference
5262 might be to the uninitilized value of the discriminant of the object
5265 2011-08-03 Pascal Obry <obry@adacore.com>
5267 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5268 ACL used, in this case we want to check for ending .exe, not .exe
5269 anywhere in the path.
5271 2011-08-03 Sergey Rybin <rybin@adacore.com>
5273 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5274 the tree structure (semantic decoration of references to record
5277 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5279 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5280 choices of a named array aggregate, bail out when any choices are
5281 marked as Errors_Posted.
5283 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5285 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5286 in which entity is frozen, to handle properly loop variables in
5289 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5291 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5292 subtype is not static, compute the upper bound using attributes, to
5293 handle properly index types that are not integer types.
5295 2011-08-03 Bob Duff <duff@adacore.com>
5297 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5298 Update copyright notice.
5300 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5302 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5303 Original_Discriminant if within an instance.
5304 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5306 2011-08-03 Thomas Quinot <quinot@adacore.com>
5308 * einfo.ads: Minor reformatting.
5310 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5312 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5313 composite type with an unfrozen subcomponent, in the profile of a
5314 primitive operation.
5316 2011-08-03 Robert Dewar <dewar@adacore.com>
5318 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5320 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5322 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5323 unconstrained type with discriminants is initialized with an aggregate,
5324 use the constrained subtype of the aggregate as the type of the object,
5325 because it is immutable, and this allows the back-end to generate no
5326 code for the object declaration.
5328 2011-08-03 Robert Dewar <dewar@adacore.com>
5330 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5331 comparison operand is variable, and turns out to be zero or negative.
5333 2011-08-03 Javier Miranda <miranda@adacore.com>
5336 (Expand_Dispatching_Constructor_Call): Disable expansion of
5337 code required for native targets. Done to avoid generating
5338 references to unavailable runtime entities in VM targets.
5340 (Expand_N_Object_Declaration): Add missing support to handle
5341 the explicit initialization of class-wide interface objects.
5344 2011-08-03 Matthew Heaney <heaney@adacore.com>
5346 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5348 2011-08-03 Matthew Heaney <heaney@adacore.com>
5350 * a-cbdlli.adb (Splice): move source items from first to last
5352 2011-08-03 Yannick Moy <moy@adacore.com>
5354 * sem_util.ads: comment added.
5356 2011-08-03 Javier Miranda <miranda@adacore.com>
5359 (Expand_Record_Aggregate): In VM targets disable the expansion into
5360 assignments of aggregates whose type is not known at compile time.
5362 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5364 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5365 protected entries and task entries, to build the proper renaming
5366 declaration for entry formals, used in debugging.
5367 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5368 parameters in the same way.
5370 2011-08-02 Robert Dewar <dewar@adacore.com>
5372 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5373 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5374 code reorganization.
5376 2011-08-02 Robert Dewar <dewar@adacore.com>
5378 * debug.adb: Debug flag d.P to suppress length comparison optimization
5379 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5380 comparison of Length by comparing First/Last instead.
5382 2011-08-02 Matthew Heaney <heaney@adacore.com>
5384 * a-cobove.ads: Code clean up.
5386 2011-08-02 Vincent Celier <celier@adacore.com>
5388 * adaint.c (file_names_case_sensitive_cache): New static int.
5389 (__gnat_get_file_names_case_sensitive): Cache the return value in
5390 file_names_case_sensitive_cache at the first invocation, to avoid
5391 multiple calls to getenv.
5393 2011-08-02 Bob Duff <duff@adacore.com>
5395 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5397 2011-08-02 Yannick Moy <moy@adacore.com>
5399 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5400 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5401 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5402 indicate that we are in a precondition or postcondition. This is used in
5403 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5404 decide whether to flag the spec or body of the current subprogram as
5407 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
5409 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
5411 * a-extiin.ads: New file.
5413 2011-08-02 Bob Duff <duff@adacore.com>
5415 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5416 now raises Name_Error instead of Use_Error in certain cases. The other
5417 parts of this AI were already implemented properly.
5419 2011-08-02 Vincent Celier <celier@adacore.com>
5421 * link.c: Only import "auto-host.h" when building the gnattools.
5423 2011-08-02 Yannick Moy <moy@adacore.com>
5425 * sem_util.adb: Inter-unit inlining does not work for a subprogram
5426 which calls a local subprogram, so extract subprogram
5427 from Mark_Non_ALFA_Subprogram_Body.
5429 2011-08-02 Javier Miranda <miranda@adacore.com>
5432 (Extract_Dispatching_Call): If the type of the dispatching object is an
5433 access type then return an explicit dereference in the Object out-mode
5436 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5438 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5439 compatibility checks for all indexes of an array subtype, not just the
5440 first. Reset Has_Dynamic_Range_Check on the subtype before each
5441 potential check to ensure that Insert_Range_Checks will not elide any
5442 of the dynamic checks.
5444 2011-08-02 Yannick Moy <moy@adacore.com>
5446 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5447 SPARK restriction at parsing time.
5448 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5449 directive only if the SPARK restriction is set for this unit.
5451 2011-08-02 Yannick Moy <moy@adacore.com>
5453 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5454 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5455 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5456 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5457 Mark_Non_ALFA_Subprogram_Body.
5458 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5461 2011-08-02 Yannick Moy <moy@adacore.com>
5463 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5466 2011-08-02 Robert Dewar <dewar@adacore.com>
5468 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5469 exp_ch3.adb: Minor reformatting.
5471 2011-08-02 Emmanuel Briot <briot@adacore.com>
5473 * adaint.c (__gnat_locate_exec_on_path): only returns executable
5474 files, not any regular file.
5475 (__gnat_locate_file_with_predicate): new subprogram.
5477 2011-08-02 Yannick Moy <moy@adacore.com>
5479 * sinfo.adb, sinfo.ads: Restrict the use of flags
5480 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5481 nodes, plus N_Subtype_Declaration for the 2nd one.
5483 2011-08-02 Sergey Rybin <rybin@adacore.com>
5485 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5486 - fix bugs in the description of Source_Trace;
5487 - get rid of UNIT_NAME;
5489 2011-08-02 Javier Miranda <miranda@adacore.com>
5492 (Build_Dispatching_Requeue): Adding support for VM targets
5493 since we cannot directly reference the Tag entity.
5494 * exp_sel.adb (Build_K): Adding support for VM targets.
5495 (Build_S_Assignment): Adding support for VM targets.
5497 (Default_Prim_Op_Position): In VM targets do not restrict availability
5498 of predefined interface primitives to compiling in Ada 2005 mode.
5499 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5500 restricted to compiling in Ada 2005 mode.
5501 (Make_VM_TSD): Generate code that declares and initializes the OSD
5502 record. Needed to support dispatching calls through synchronized
5505 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5506 primitives associated with synchronized interfaces.
5507 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5508 primitives associated with synchronized interfaces.
5510 2011-08-02 Yannick Moy <moy@adacore.com>
5512 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5513 statements hidden in SPARK if preceded by the HIDE directive
5514 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5515 exception handlers as hidden in SPARK if preceded by the HIDE directive
5516 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5517 if starting with the HIDE directive
5518 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5519 starting with the HIDE directive; mark the declarations in a private
5520 part as hidden in SPARK if the private part starts with the HIDE
5522 * restrict.adb, restrict.ads
5523 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5524 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5525 argument node belongs to a part which is hidden in SPARK
5526 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5527 parts in SPARK; protect the possibly costly call to
5528 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5529 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5530 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5531 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5533 (Scan): recognize special comment starting with '#' and followed by
5534 SPARK keyword "hide" as a HIDE directive.
5536 2011-08-02 Yannick Moy <moy@adacore.com>
5538 * types.ads, erroutc.ads: Minor reformatting.
5540 2011-08-02 Vincent Celier <celier@adacore.com>
5542 * link.c: Add response file support for cross platforms.
5544 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5546 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5547 in an association, set parent field of copy before partial analysis.
5548 * sem_res.adb (Resolve_Slice): create reference to itype only when
5549 expansion is enabled.
5551 2011-08-02 Yannick Moy <moy@adacore.com>
5553 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5554 for new flag denoting which subprogram bodies are in ALFA
5555 * restrict.adb, sem_ch7.adb: Update comment
5556 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5557 sem_ch9.adb, sem_res.adb: Add calls to
5558 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5559 * sem_ch6.adb (Analyze_Function_Return): add calls to
5560 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5561 middle of the body, and extended return.
5562 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5563 False when missing return.
5564 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5565 to True for subprograms whose spec is in ALFA. Remove later on the flag
5566 on the entity used for a subprogram body when there exists a separate
5568 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5569 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5570 False, otherwise do nothing.
5572 2011-08-02 Robert Dewar <dewar@adacore.com>
5574 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5576 2011-08-02 Yannick Moy <moy@adacore.com>
5578 * sem_ch4.ads: minor formatting.
5580 2011-08-02 Yannick Moy <moy@adacore.com>
5582 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5583 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5584 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5585 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5586 opt.ads: cleanup of SPARK mode
5588 2011-08-02 Yannick Moy <moy@adacore.com>
5590 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5592 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5593 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5595 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5596 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5597 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5598 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5600 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5602 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5603 functions whose return type is not in ALFA.
5604 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5606 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5607 parameter's type is not in ALFA.
5608 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5611 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5613 * sem_ch6 (Analyze_Expression_Function): treat the function as
5614 Inline_Always, and introduce a subprogram declaration for it when it is
5616 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5617 expression functions, so that the back-end can determine whether they
5618 can in fact be inlined.
5619 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5620 a function body comes from an expression function.
5622 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5624 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5625 null exclusions to test Can_Never_Be_Null on the anonymous access types
5626 of the formals rather than testing the formals themselves. Exclude this
5627 check in cases where the Old_Formal is marked as a controlling formal,
5628 to avoid issuing spurious errors for bodies completing dispatching
5629 operations (due to the flag not getting set on controlling access
5630 formals in body specs).
5631 (Find_Corresponding_Spec): When checking full and subtype conformance of
5632 subprogram bodies in instances, pass Designated and E in that order, for
5633 consistency with the expected order of the formals (New_Id followed by
5636 2011-08-02 Robert Dewar <dewar@adacore.com>
5638 * sem_ch8.adb: Minor reformatting.
5640 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5642 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5643 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5644 primitive operations of class-wide actuals.
5646 2011-08-02 Javier Miranda <miranda@adacore.com>
5648 * exp_atag.ads, exp_atag.adb
5649 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5650 since its value is implicitly passed in argument Typ.
5651 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5652 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5653 Build_Common_Dispatching_Select_Statements.
5655 2011-08-02 Robert Dewar <dewar@adacore.com>
5657 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5658 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5661 2011-08-02 Robert Dewar <dewar@adacore.com>
5663 * sem_res.adb: Minor reformatting.
5664 * sem_prag.adb: Minor reformatting.
5666 2011-08-02 Javier Miranda <miranda@adacore.com>
5668 * exp_atag.adb, exp_atags.ads
5669 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5670 by the tagged type Entity. Required to use this routine in the VM
5671 targets since we do not have available the Tag entity in the VM
5674 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5675 Ada.Tags has not been previously loaded.
5677 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5678 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5680 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5681 view of enclosing scopes. Required to handle enclosing scopes that
5682 are synchronized types whose full view is a task type.
5684 (Build_VM_TSDs): Minor code improvement to avoid generating and
5685 analyzing lists with empty nodes.
5686 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5687 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5688 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5689 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5690 (Make_Select_Specific_Data_Table): Add support for VM targets.
5691 (Make_VM_TSD): Generate code to initialize the SSD structure of
5694 2011-08-02 Yannick Moy <moy@adacore.com>
5696 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5697 cross-references section in ALI.
5698 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5699 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5701 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5702 subprogram or package entity of a node
5703 (Is_Local_Reference_Type): new function returns True for references
5704 selected in local cross-references.
5705 (Lt): function extracted from Lt in Output_References
5706 (Write_Entity_Name): function extracted from Output_References
5707 (Generate_Definition): generate reference with type 'D' for definition
5708 of objects (object declaration and parameter specification), with
5709 appropriate locations and units, for use in local cross-references.
5710 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5711 references of type 'I' for initialization in object definition.
5712 (Output_References): move part of function Lt and procedure
5713 Write_Entity_Name outside of the body. Ignore references of types 'D'
5714 and 'I' introduced for local cross-references.
5715 (Output_Local_References): new procedure to output the local
5716 cross-references sections.
5717 (Lref_Entity_Status): new array defining whether an entity is a local
5718 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5719 with 'I' type when initialization expression is present.
5720 * get_scos.adb, get_scos.ads: Correct comments and typos
5722 2011-08-02 Javier Miranda <miranda@adacore.com>
5724 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5726 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5728 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5731 2011-08-02 Vincent Celier <celier@adacore.com>
5733 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5734 (No_Space_Img): New function
5735 (Find_Excluded_Sources): When reading from a file, record the file name
5736 and the line number for each excluded source.
5737 (Mark_Excluded_Sources): When reporting an error, if the excluded
5738 sources were read from a file, include file name and line number in
5741 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5743 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5745 2011-08-02 Robert Dewar <dewar@adacore.com>
5747 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5749 2011-08-02 Javier Miranda <miranda@adacore.com>
5751 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5752 generation of TSDs to the DOTNET compiler.
5753 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5754 generation of TSDs to the DOTNET compiler.
5756 2011-08-02 Javier Miranda <miranda@adacore.com>
5758 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5759 record of all the tagged types declared inside library level package
5760 declarations, library level package bodies or library level subprograms.
5761 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5762 associated with a given tagged type.
5763 (Build_VM_TSDs): New subprogram.
5764 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5765 compilation units that are subprograms.
5766 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5767 compilation units that are package bodies.
5768 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5769 units that are a package declaration or a package instantiation.
5770 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5771 reorganization to improve the error generated by the frontend when the
5772 function Ada.Tags.Secondary_Tag is not available.
5773 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5774 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5776 2011-08-02 Javier Miranda <miranda@adacore.com>
5778 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5780 2011-08-02 Robert Dewar <dewar@adacore.com>
5782 * s-imenne.ads: Minor reformatting.
5784 2011-08-02 Robert Dewar <dewar@adacore.com>
5786 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5787 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5788 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5790 2011-08-02 Robert Dewar <dewar@adacore.com>
5792 * einfo.ads (Materialize_Entity): Document this is only for renamings
5793 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5794 required debug information in the case where we transform the object
5795 declaration into a renaming declaration.
5796 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5798 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5801 2011-08-02 Robert Dewar <dewar@adacore.com>
5803 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5804 Suppress_Init_Procs.
5805 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5806 Suppress_Initialization/Initialization_Suppressed.
5807 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5808 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5809 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5810 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5812 2011-08-02 Robert Dewar <dewar@adacore.com>
5814 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5819 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5820 only have inheritable classwide pre/postconditions.
5822 2011-08-02 Javier Miranda <miranda@adacore.com>
5824 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5825 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5826 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5827 checks if the external tag of a type is the same as the external tag
5828 of some other declaration.
5830 2011-08-02 Thomas Quinot <quinot@adacore.com>
5832 * s-taskin.ads: Minor reformatting.
5834 2011-08-02 Emmanuel Briot <briot@adacore.com>
5836 * g-comlin.adb (Display_Help): swap the order in which it prints the
5837 short help and the general usage.
5839 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5841 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5842 the aspect declarations and attach them to the generic copy for
5843 subsequent analysis.
5844 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5845 declarations of the generic tree to the new subprogram declarations.
5846 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5847 conditions that apply to a subprogram instance.
5849 2011-08-02 Robert Dewar <dewar@adacore.com>
5851 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5853 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5855 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5856 private type with a tagged full view is not derived in the immediate
5857 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5859 2011-08-02 Robert Dewar <dewar@adacore.com>
5861 * exp_ch4.adb: Minor reformatting.
5863 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5865 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5866 Ada2012 iterator, the loop will be rewritten during expansion into a
5867 while loop with a cursor and an element declaration. Do not analyze the
5868 body in this case, because if the container is for indefinite types the
5869 actual subtype of the elements will only be determined when the cursor
5870 declaration is analyzed.
5872 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5874 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5875 size/alignment related attributes in CodePeer_Mode.
5877 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5879 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5880 Prepend_Element, since this can result in the operation getting the
5881 wrong slot in the full type's dispatch table if the full type has
5882 inherited operations. The incomplete type's operation will get added
5883 to the proper position in the full type's primitives
5884 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5885 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5886 dispatching operations, since there are cases where nonprimitive
5887 subprograms can get added to the list of incomplete dependents (such
5888 as subprograms in nested packages).
5889 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5890 private part when determining whether to add a primitive with a
5891 parameter of a tagged incomplete type to the Private_Dependents list.
5892 Such primitives can also occur in the visible part, and should not have
5893 been excluded from being private dependents.
5894 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5895 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5896 list of a Taft-amendment incomplete type is a primitive before issuing
5897 an error that the full type must appear in the same unit. There are
5898 cases where nonprimitives can be in the list (such as subprograms in
5900 * sem_disp.adb (Derives_From): Use correct condition for checking that
5901 a formal's type is derived from the type of the corresponding formal in
5902 the parent subprogram (the condition was completely wrong). Add
5903 checking that was missing for controlling result types being derived
5904 from the result type of the parent operation.
5906 2011-08-02 Yannick Moy <moy@adacore.com>
5908 * errout.adb (First_Node): minor renaming
5909 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5912 2011-08-02 Yannick Moy <moy@adacore.com>
5914 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5915 before accessing operands.
5916 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5917 decide whether an initialization expression respects SPARK rules, as
5918 the plain node is the expanded one. This allows for more valid warnings
5920 * gnat_rm.texi: Minor update.
5922 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5924 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5927 2011-08-02 Robert Dewar <dewar@adacore.com>
5929 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5931 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5933 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5934 loop statements and the element renaming declaration with a block when
5935 the element type is controlled.
5937 2011-08-02 Yannick Moy <moy@adacore.com>
5939 * sinfo.ads: Minor formatting.
5941 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5943 * sem_aggr.adb (Add_Association): if the association has a box and no
5944 expression, use the Sloc of the aggregate itself for the new
5946 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5949 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5951 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5952 When a container is provided via a function call, generate a renaming
5953 of the function result. This avoids the creation of a transient scope
5954 and the premature finalization of the container.
5955 * exp_ch7.adb (Is_Container_Cursor): Removed.
5956 (Wrap_Transient_Declaration): Remove the supression of the finalization
5957 of the list controller when the declaration denotes a container cursor,
5960 2011-08-02 Yannick Moy <moy@adacore.com>
5962 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5963 node is from source, instead of the original node being from source.
5965 (Resolve_Array_Aggregate): refine the check for a static expression, to
5966 recognize also static ranges
5967 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5968 Array_Type_Declaration): postpone the test for the type being a subtype
5969 mark after the type has been resolved, so that component-selection and
5970 expanded-name are discriminated.
5971 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5972 to distinguish the case of an iteration scheme, so that an error is
5973 issed on a non-static range in SPARK except in an iteration scheme.
5974 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5975 In_Iter_Schm = True.
5976 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5977 user-defined operators so that they are allowed in renaming
5979 (Find_Selected_Component): refine the check for prefixing of operators
5980 so that they are allowed in renaming. Move the checks for restrictions
5981 on selector name after analysis discriminated between
5982 component-selection and expanded-name.
5983 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5984 concatenation argument of string type if it is static.
5985 * sem_util.adb, sem_util.ads
5986 (Check_Later_Vs_Basic_Declarations): add a new function
5987 Is_Later_Declarative_Item to decice which declarations are allowed as
5988 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5989 mode, add that renamings are considered as later items.
5990 (Enclosing_Package): new function to return the enclosing package
5991 (Enter_Name): correct the rule for homonyms in SPARK
5992 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5993 from source (result of expansion) to avoid issuing wrong warnings.
5995 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5997 * errout.adb: On anything but an expression First_Node returns its
6000 2011-08-02 Pascal Obry <obry@adacore.com>
6002 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6004 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6006 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6007 Set the associated loop as the related expression of internally
6009 * exp_ch7.adb (Is_Container_Cursor): New routine.
6010 (Wrap_Transient_Declaration): Supress the finalization of the list
6011 controller when the declaration denotes a container cursor.
6013 2011-08-02 Yannick Moy <moy@adacore.com>
6015 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6017 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6018 expression is a simple expression. This check cannot be performed in
6019 the semantics, so just drop it.
6020 (P_Index_Or_Discriminant_Constraint): move check that the index or
6021 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6022 semantics. Other cases were previously checked in the semantics.
6023 * par-ch4.adb (P_Name): move checks that a selector name is not
6024 character literal or an operator symbol to Find_Selected_Component in
6026 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6027 declarations are not placed after later declarations in a separate
6028 procedure in Sem_Util (possibly not the best choice?), to be used both
6029 during parsing, for Ada 83 mode, and during semantic analysis, for
6031 * par-endh.adb (Check_End): move check that end label is not missing
6032 to Process_End_Label in the semantics
6033 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6034 the special case for SPARK restriction
6035 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6036 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6037 parameter Force to issue the error message even on internal node (used
6038 for generated end label). Call Check_Restriction to check when an error
6039 must be issued. In SPARK mode, issue an error message even if the
6040 restriction is not set.
6041 (Check_Restriction): new procedure with an additional out parameter to
6042 inform the caller that a message has been issued
6043 * sem_aggr.adb: Minor modification of message
6044 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6045 instead of issuing an error message directly
6046 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6047 declarations are not placed after later declarations, by calling
6048 Check_Later_Vs_Basic_Declarations
6049 (Analyze_Subtype_Declaration): move here the check that an index or
6050 discriminant constraint must be a subtype mark. Change the check that
6051 a subtype of String must start at one so that it works on subtype marks.
6052 * sem_ch4.adb (Analyze_Call): move here the check that a named
6053 association cannot follow a positional one in a call
6054 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6055 instead of issuing an error message directly
6056 * sem_ch8.adb (Find_Selected_Component): move here the check that a
6057 selector name is not a character literal or an operator symbol. Move
6058 here the check that the prefix of an expanded name cannot be a
6059 subprogram or a loop statement.
6060 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6061 procedure called from parsing and semantics to check that basic
6062 declarations are not placed after later declarations
6063 (Process_End_Label): move here the check that end label is not missing
6065 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6067 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6068 representation clause in codepeer mode, since it confuses CodePeer and
6069 does not bring useful info.
6071 2011-08-02 Ed Falis <falis@adacore.com>
6073 * init.c: initialize fp hw on MILS.
6075 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6077 * errout.adb (First_Node): for bodies, return the node itself (small
6078 optimization). For other nodes, do not check source_unit if the node
6079 comes from Standard.
6081 2011-08-02 Robert Dewar <dewar@adacore.com>
6083 * exp_ch3.adb: Minor comment additions.
6084 * sem_ch13.adb: Minor reformatting.
6086 2011-08-02 Pascal Obry <obry@adacore.com>
6088 * make.adb, makeutl.adb: Removes some superfluous directory separator.
6090 2011-08-02 Robert Dewar <dewar@adacore.com>
6092 * sem_attr.adb: Minor reformatting.
6094 2011-08-02 Robert Dewar <dewar@adacore.com>
6096 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6097 (Has_Default_Component_Value): Removed
6098 * einfo.ads Comment updates
6099 (Has_Default_Aspect): Replaces Has_Default_Value
6100 (Has_Default_Component_Value): Removed
6102 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6104 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6105 (Get_Simple_Init_Val): Handle Default_Value aspect
6106 (Needs_Simple_Initialization): Handle Default_Value aspect
6107 * exp_ch3.ads: Needs_Simple_Initialization
6108 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6109 * par-prag.adb (Pragma_Default[_Component]Value) Removed
6111 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6112 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6113 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6115 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6117 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6118 package containing iteration primitives.
6119 exp_ch5.adb (Expand_Iterator_Loop): ditto.
6121 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6123 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6124 "of", pre-analyze expression in case it is a function call with
6125 finalization actions that must be placed ahead of the loop.
6126 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6127 on an Ada2012 iterator, insert them ahead of the rewritten loop.
6129 2011-08-02 Geert Bosch <bosch@adacore.com>
6131 * cstand.adb (Create_Float_Types): Only consider C's long double for
6132 Long_Long_Float, in addition to double.
6134 2011-08-02 Robert Dewar <dewar@adacore.com>
6136 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6137 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6138 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6141 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6143 * sem_attr.adb: handle properly 'Result when it is a prefix of an
6146 2011-08-02 Javier Miranda <miranda@adacore.com>
6148 * einfo.ads, einfo.adb
6149 (Original_Access_Type): Move this attribute to Node26 since there was
6150 an undocumented use of Node21 in E_Access_Subprogram_Type entities
6151 which causes conflicts and breaks the generation of the .NET compiler.
6152 (Interface_Name): Add missing documentation on JGNAT only uses of
6155 2011-08-02 Geert Bosch <bosch@adacore.com>
6157 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6158 (Find_Back_End_Float_Type): Likewise
6159 (Create_Back_End_Float_Types): Likewise
6160 (Create_Float_Types): Likewise
6161 (Register_Float_Type): Likewise
6162 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6163 Nlist and split out type selection in new local Find_Base_Type function.
6164 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6166 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6168 2011-08-02 Robert Dewar <dewar@adacore.com>
6170 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6172 * opt.ads: Minor comment change.
6173 * sem_ch12.adb: Minor code reorganization.
6175 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6177 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6178 subtype's list of rep items to the list on the full subtype in the case
6179 where the lists are the same.
6181 2011-08-02 Geert Bosch <bosch@adacore.com>
6183 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6184 using the one from System.Strings, which also deallocates all strings.
6186 2011-08-02 Geert Bosch <bosch@adacore.com>
6188 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6190 * gcc-interface/Make-lang.in: Update dependencies.
6192 2011-08-02 Olivier Hainque <hainque@adacore.com>
6194 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6197 2011-08-02 Javier Miranda <miranda@adacore.com>
6199 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6200 associated with anonymous access to subprograms.
6202 2011-08-02 Geert Bosch <bosch@adacore.com>
6205 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6206 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6207 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6208 (Add_Symbol_Definition): Move to switch-c.adb
6209 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6210 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6211 (Add_Symbol_Definition): Move to switch-c.adb.
6212 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6214 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6216 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6217 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6219 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6220 (Add_Symbol_Definition): Moved from Prepcomp.
6221 * switch-c.ads: Update copyright notice. Use String_List instead of
6222 Argument_List, removing dependency on System.OS_Lib.
6224 2011-08-02 Yannick Moy <moy@adacore.com>
6226 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6227 mode on initialization expression which does not respect SPARK
6229 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6230 if the tree referenced by its argument represents an initialization
6231 expression in SPARK, suitable for initializing an object in an object
6234 2011-08-02 Javier Miranda <miranda@adacore.com>
6236 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6237 internally generated access to subprogram with its associated protected
6239 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6241 2011-08-02 Geert Bosch <bosch@adacore.com>
6243 * cstand.adb (Register_Float_Type): Print information about type to
6244 register, if the Debug_Flag_Dot_B is set.
6245 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6246 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6247 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6248 with a requested precision of more than Max_Digits digits and no more
6249 than Max_Base_Digits digits, if a range specification is present and the
6250 Predefined_Float_Types list has a suitable type to derive from.
6251 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6252 case of type completion with pragma Import
6254 (Process_Import_Predefined_Type): Processing to complete a type
6255 with pragma Import. Currently supports floating point types only.
6256 (Set_Convention_From_Pragma): Do nothing without underlying type.
6257 (Process_Convention): Guard against absence of underlying type,
6258 which may happen when importing incomplete types.
6259 (Process_Import_Or_Interface): Handle case of importing predefined
6260 types. Tweak error message.
6262 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6264 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6265 functions to previous change. Reorganize code slightly.
6267 2011-08-02 Geert Bosch <bosch@adacore.com>
6269 * back_end.ads (Register_Type_Proc): New call back procedure type for
6270 allowing the back end to provide information about available types.
6271 (Register_Back_End_Types): New procedure to register back end types.
6272 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6274 * cstand.adb (Back_End_Float_Types): New list for floating point types
6275 supported by the back end.
6276 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6277 (Copy_Float_Type): New procedure to make new copies of predefined types.
6278 (Register_Float_Type): New call back procedure to populate the BEFT list
6279 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6280 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6281 (Create_Float_Types): New procedure to create entities for floating
6282 point types predefined in Standard, and put these and any remaining
6283 BEFTs on the Predefined_Float_Types list.
6284 * stand.ads (Predefined_Float_Types): New list for predefined floating
6285 point types that do not have declarations in package Standard.
6287 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6289 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6290 entity node for the unit containing the parameter.
6291 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6292 (Add_Inlined_Subprogram): Likewise.
6293 * gcc-interface/Make-lang.in: Update dependencies.
6295 2011-08-02 Thomas Quinot <quinot@adacore.com>
6297 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6300 2011-08-02 Geert Bosch <bosch@adacore.com>
6302 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6304 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6306 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6307 computed value of Base_Type.
6309 2011-08-02 Yannick Moy <moy@adacore.com>
6311 * restrict.adb (Check_Restriction): issue an error for any use of
6312 class-wide, even if the No_Dispatch restriction is not set.
6313 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6314 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6315 when completing a private extension, the type named in the private part
6316 is not the same as that named in the visible part.
6317 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6318 of an inherited primitive operations of a tagged type or type extension
6319 that returns the tagged type.
6320 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6321 function which returns True for an implicit operation inherited by the
6322 derived type declaration for the argument type.
6323 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6326 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6328 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6329 Process_Bounds, to perform analysis with expansion of a range or an
6330 expression that is the iteration scheme for a loop.
6331 (Analyze_Iterator_Specification): If domain of iteration is given by a
6332 function call with a controlled result, as is the case if call returns
6333 a predefined container, ensure that finalization actions are properly
6335 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6337 2011-08-02 Javier Miranda <miranda@adacore.com>
6339 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6340 * gcc-interface/Make-lang.in: Update dependencies.
6342 2011-08-02 Javier Miranda <miranda@adacore.com>
6344 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6345 determine if the analysis is performed using N or Original_Node (N).
6346 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6347 functionality of routine Is_Variable avoids code duplication.
6348 * checks.adb (Determine_Range): Handle temporaries generated by
6349 Remove_Side_Effects.
6351 2011-08-02 Javier Miranda <miranda@adacore.com>
6353 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6354 expansion of the condition. Required since the previous analysis was
6355 done with expansion disabled (see Resolve_Quantified_Expression) and
6356 hence checks were not inserted and record comparisons have not been
6359 2011-08-02 Ed Falis <falis@adacore.com>
6361 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6364 2011-08-02 Bob Duff <duff@adacore.com>
6366 * opt.ads: Minor comment fix.
6368 2011-08-02 Bob Duff <duff@adacore.com>
6370 * sem_ch12.adb (Analyze_Package_Instantiation,
6371 Analyze_Subprogram_Instantiation): Turn off style checking while
6372 analyzing an instance. Whatever style checks that apply to the generic
6373 unit should apply, so it makes no sense to apply them in an instance.
6374 This was causing trouble when compiling an instance of a runtime
6375 unit that violates the -gnatyO switch.
6376 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6377 one of the two case statements, causing spurious errors.
6379 2011-08-02 Robert Dewar <dewar@adacore.com>
6381 * uname.adb: Minor reformatting.
6382 * gnatcmd.adb: Minor reformatting.
6383 * exp_attr.adb: Minor reformatting.
6385 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6387 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6388 No_Dispatching_Calls, do not look for the Assign primitive, because
6389 predefined primitives are not created in this case.
6391 2011-08-02 Bob Duff <duff@adacore.com>
6393 * stylesw.ads: Minor comment fixes.
6395 2011-08-02 Robert Dewar <dewar@adacore.com>
6397 * freeze.adb (Add_To_Result): New procedure.
6399 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6401 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6402 time, if the specific run-time routines for handling streams of strings
6403 are not available, use the default mechanism.
6405 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6407 * s-regpat.ads: Fix typo.
6409 2011-08-02 Vincent Celier <celier@adacore.com>
6411 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6412 not null, call it to create the in memory config project file without
6413 parsing an existing default config project file.
6415 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6417 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6421 * sem_elim.adb: an abstract subprogram does not need an eliminate
6422 pragma for its descendant to be eliminable.
6424 2011-08-02 Ed Falis <falis@adacore.com>
6426 * init.c: revert to handling before previous checkin for VxWorks
6427 * s-intman-vxworks.adb: delete unnecessary declarations related to
6428 using Ada interrupt facilities for handling signals.
6429 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6430 * s-intman-vxworks.ads: Import __gnat_install_handler as
6431 Initialize_Interrupts.
6432 * s-taprop-vxworks.adb: Delete Signal_Mask.
6433 (Abort_Handler): change construction of mask to unblock exception
6436 2011-08-02 Jerome Guitton <guitton@adacore.com>
6438 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6439 Debug_Raise_Exception before propagation starts.
6441 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6443 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6444 to Restriction_Check_Required.
6445 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6446 * sem_res.adb (Resolve_Call): Likewise.
6447 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6449 2011-08-02 Bob Duff <duff@adacore.com>
6451 * stylesw.ads: Update comment.
6452 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6453 * errout.ads: Remove obsolete comment.
6455 2011-08-02 Javier Miranda <miranda@adacore.com>
6457 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6458 (Set_Is_Safe_To_Reevaluate): new procedure.
6459 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6460 assignment is allowed on safe-to-reevaluate variables.
6461 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6462 temporary created to remove side effects in expressions that use
6463 the secondary stack as safe-to-reevaluate.
6464 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6465 variables that are not true constants.
6467 2011-08-02 Robert Dewar <dewar@adacore.com>
6469 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6470 sem_res.adb, sem_ch6.adb: Minor reformatting.
6472 2011-08-02 Jerome Guitton <guitton@adacore.com>
6474 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6476 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6478 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6479 not set Overridden_Operation if subprogram is an initialization
6482 2011-08-02 Yannick Moy <moy@adacore.com>
6484 * par-ch6.adb: Correct obsolete name in comments
6485 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6486 which takes two message arguments (existing function takes one), with
6487 second message used for continuation.
6488 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6489 block statements that originate from a source block statement, not
6490 generated block statements
6491 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6492 symmetry with procedure case
6493 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6494 function to issue an error in formal mode if a package specification
6495 contains more than one tagged type or type extension.
6496 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6497 parameters matching formals of tagged types are objects (or ancestor
6498 type conversions of objects), not general expressions. Issue an error
6499 on view conversions that are not involving ancestor conversion of an
6501 (Resolve_Type_Conversion): in formal mode, issue an error on the
6502 operand of an ancestor type conversion which is not an object
6503 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6504 procedure so that it works also for actuals of function calls
6505 (Is_Actual_Tagged_Parameter): new function which determines if its
6506 argument is an actual parameter of a formal of tagged type in a
6508 (Is_SPARK_Object_Reference): new function which determines if the tree
6509 referenced by its argument represents an object in SPARK
6511 2011-08-02 Robert Dewar <dewar@adacore.com>
6513 * sem_ch3.adb: Minor reformatting
6514 Minor comment addition
6515 Minor error msg text change
6517 2011-08-02 Javier Miranda <miranda@adacore.com>
6519 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6520 function. Used to be more precise when we generate a variable plus one
6521 assignment to remove side effects in the evaluation of the Bound
6523 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6524 of the bound expression to force its re-analysis and thus expand the
6525 associated transient scope (if required). Code cleanup replacing the
6526 previous code that declared the constant entity by an invocation to
6527 routine Force_Evaluation which centralizes this work in the frontend.
6529 2011-08-02 Robert Dewar <dewar@adacore.com>
6531 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6532 (Base_Type): Now uses improved Is_Base_Type function
6533 * einfo.ads (Base_Type): Inline this function
6535 2011-08-02 Robert Dewar <dewar@adacore.com>
6537 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6538 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6540 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6542 * gcc-interface/Make-lang.in: Update dependencies.
6543 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6546 2011-08-02 Yannick Moy <moy@adacore.com>
6548 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6549 non-simple expression used in delta constraint
6550 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6551 index constraint which is not a subtype mark
6552 * par.adb: With and use Restrict
6553 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6554 mode on component type which is not a subtype mark and default
6555 expression on component
6556 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6557 of string which does not have a lower index bound equal to 1
6558 (Array_Type_Declaration): issue an error in formal mode on index or
6559 component type which is not a subtype mark, and on aliased keyword on
6561 (Derived_Type_Declaration): issue an error in formal mode on interface,
6562 limited or abstract type
6563 (Record_Type_Declaration): issue an error in formal mode on interface
6564 (Record_Type_Definition): issue an error in formal mode on tagged types
6565 and type extensions not declared in the specification of a library unit
6566 package; on null non-tagged record; on variant part
6568 2011-08-02 Vincent Celier <celier@adacore.com>
6570 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6571 not declared for qualified library project when Library_Name is not
6572 declared, but Library_Dir is.
6574 2011-08-02 Robert Dewar <dewar@adacore.com>
6576 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6577 pragmas (affects aspects [Component_]Default_Value
6578 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6579 component type for the resolution
6581 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6583 * einfo.adb (Base_Type): Tune implementation for speed.
6585 2011-08-02 Robert Dewar <dewar@adacore.com>
6587 * freeze.adb: Minor reformatting.
6589 2011-08-02 Thomas Quinot <quinot@adacore.com>
6591 * scos.ads: Update comments.
6593 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6595 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6596 base type, because the parent may be a subtype of a private type whose
6597 convention is established in a private part.
6599 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6601 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6602 statement in a block when the expansion of the return expression has
6603 created a finalization chain.
6604 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6605 with the parent node.
6606 Add N_Extended_Return_Statement to handle the case where a transient
6607 object declaration appears in the Return_Object_Declarations list of
6608 an extended return statement.
6610 2011-08-02 Matthew Gingell <gingell@adacore.com>
6612 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6613 unused parameter 'name'.
6615 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6617 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6618 inherited operation, check whether its alias, which is the source
6619 operastion that it renames, has been marked eliminated.
6621 2011-08-02 Javier Miranda <miranda@adacore.com>
6623 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6624 in-mode parameter whose type is an access type since it can be used to
6625 modify its designated object. Enforce code that handles as safe an
6626 access type that is not access-to-constant but it is the result of a
6627 previous removal of side-effects.
6628 (Remove_Side_Effects): Minor code reorganization of cases which require
6629 no action. Done to incorporate documentation on new cases uncovered
6630 working in this ticket: no action needed if this routine was invoked
6631 too early and the nodes are not yet decorated.
6632 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6633 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6634 were issued with actuals that are implicitly provided by
6637 2011-08-02 Robert Dewar <dewar@adacore.com>
6639 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6641 2011-08-02 Yannick Moy <moy@adacore.com>
6643 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6644 to issue an error in formal mode on attribute not supported in this mode
6645 (Analyze_Attribute): issue errors on standard attributes not supported
6647 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6648 comment, and issue error in formal mode on modulus which is not a power
6650 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6652 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6654 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6655 operator on modular type (except 'not').
6657 2011-08-02 Robert Dewar <dewar@adacore.com>
6659 * gnat_rm.texi: Minor reformatting.
6661 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6663 * s-osinte-linux.ads: Minor comment update and reformatting.
6664 * i-cexten.ads: Make this unit pure, as for its parent.
6665 Will allow its usage in more contexts if needed.
6667 2011-08-02 Robert Dewar <dewar@adacore.com>
6669 * s-utf_32.ads: Minor comment fix.
6671 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6673 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6674 operation of a tagged synchronized type, handle the case where the
6675 controlling argument is overloaded.
6677 2011-08-02 Yannick Moy <moy@adacore.com>
6679 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6680 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6681 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6682 SPARK mode and formal verification mode on processing SPARK restriction
6683 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6684 requiring consistency checking.
6686 2011-08-02 Robert Dewar <dewar@adacore.com>
6688 * sem_res.adb: Minor reformatting.
6690 2011-08-02 Robert Dewar <dewar@adacore.com>
6692 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6693 a-cforse.ads: Remove unneeded with of Ada.Containers
6694 Remove commented out pragma Inline's
6695 Move specifications of new subprograms to the actual specs
6697 2011-08-02 Yannick Moy <moy@adacore.com>
6699 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6700 a-cforse.ads: Update comments.
6702 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6704 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6706 2011-08-02 Robert Dewar <dewar@adacore.com>
6708 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6709 a-cforse.ads, a-cofove.ads: Minor reformatting.
6711 2011-08-02 Claire Dross <dross@adacore.com>
6713 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6714 a-cofove.ads: Add comments.
6716 2011-08-02 Yannick Moy <moy@adacore.com>
6718 * gnat_rm.texi: Document formal containers.
6720 2011-08-02 Emmanuel Briot <briot@adacore.com>
6722 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6725 2011-08-02 Robert Dewar <dewar@adacore.com>
6727 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6730 2011-08-02 Robert Dewar <dewar@adacore.com>
6732 * aspects.adb: New aspects Default_Value and Default_Component_Value
6733 New format of Aspect_Names table checks for omitted entries
6734 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6735 handling of boolean aspects for derived types.
6736 New aspects Default_Value and Default_Component_Value
6737 New format of Aspect_Names table checks for omitted entries
6738 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6739 (Has_Default_Value): New flag
6740 (Has_Default_Component_Value): New flag
6741 (Has_Default_Value): New flag
6742 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6744 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6745 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6746 Default_Value and Default_Component_Value
6747 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6748 New aspects Default_Value and Default_Component_Value
6749 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6750 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6752 2011-08-02 Vincent Celier <celier@adacore.com>
6754 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6755 inherit library kind.
6757 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6759 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6762 2011-08-02 Robert Dewar <dewar@adacore.com>
6764 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6766 2011-08-02 Yannick Moy <moy@adacore.com>
6768 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6770 2011-08-02 Robert Dewar <dewar@adacore.com>
6772 * impunit.adb: Add comment.
6774 2011-08-02 Yannick Moy <moy@adacore.com>
6776 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6777 qualification of aggregates in formal mode
6778 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6780 (Resolve_Aggregate): complete the test that an aggregate is adequately
6781 qualified in formal mode
6783 2011-08-02 Pascal Obry <obry@adacore.com>
6785 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6786 * mlib-prj.adb: Supress warning when compiling binder generated file.
6787 (Build_Library): Supress all warnings when compiling the binder
6790 2011-08-02 Yannick Moy <moy@adacore.com>
6792 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6794 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6795 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6796 Add with/use clauses to make Check_Formal_Restriction visible
6798 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6800 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6801 in-parameters when type of the generic formal is private in the generic
6802 spec and non-private in the body.
6804 2011-08-02 Claire Dross <dross@adacore.com>
6806 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6807 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6808 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6809 * impunit.adb, Makefile.rtl: Take new files into account.
6811 2011-08-02 Robert Dewar <dewar@adacore.com>
6813 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6814 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6816 2011-08-02 Yannick Moy <moy@adacore.com>
6818 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6820 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6821 matching static array bounds, taking into account the special case of
6823 * sem_ch3.adb: Typo in comment.
6825 2011-08-02 Yannick Moy <moy@adacore.com>
6827 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6828 which issues an error in formal mode if its argument node is originally
6830 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6831 has a discriminant specification so that it does not include the case
6833 (Derived_Type_Declaration): move here the test that a derived type has a
6834 discriminant specification
6835 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6836 first element of a component association before accessing its choices
6837 (presence of component association is not enough)
6838 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6839 declaration is a library item before accessing the next element in a
6840 list, as library items are not member of lists
6841 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6842 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6843 Check_Formal_Restriction whenever possible.
6845 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6847 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6848 reference when needed.
6850 2011-08-02 Bob Duff <duff@adacore.com>
6852 * gnat_ugn.texi: Fix typo.
6854 2011-08-02 Vincent Celier <celier@adacore.com>
6856 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6857 archive file name. Do not use the full path name of archives for Open
6860 2011-08-02 Robert Dewar <dewar@adacore.com>
6862 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6863 Analyze_Aspect_Specifications
6865 (Analyze_Aspect_Specifications): New handling for boolean aspects
6866 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6867 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6868 sequence for Analyze_Aspect_Specifications
6869 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6870 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6872 2011-08-02 Robert Dewar <dewar@adacore.com>
6874 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6875 aspects, since these no longer exist.
6877 2011-08-02 Robert Dewar <dewar@adacore.com>
6879 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6880 semicolon, do not try to see if there are aspects following it.
6881 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6884 2011-08-02 Robert Dewar <dewar@adacore.com>
6886 * sem_ch8.adb, aspects.ads: Minor reformatting.
6888 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6890 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6891 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6893 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6895 2011-08-02 Yannick Moy <moy@adacore.com>
6897 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6898 mode on subprogram declaration outside of package specification, unless
6899 it is followed by a pragma Import
6900 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6901 Access_Type_Declaration): issue error in formal mode on access type
6902 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6904 (Analyze_Object_Declaration): issue error in formal mode on object
6905 declaration which does not respect SPARK restrictions
6906 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6907 declaration which does not respect SPARK restrictions
6908 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6909 error in formal mode on digits or delta constraint
6910 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6911 decimal fixed point type
6912 (Derived_Type_Declaration): issue error in formal mode on derived type
6913 other than type extensions of tagged record types
6914 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6915 with check on access definition
6916 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6917 mode on protected definition.
6918 (Analyze_Task_Definition): issue error in formal mode on task definition
6920 2011-08-02 Robert Dewar <dewar@adacore.com>
6922 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6924 2011-08-02 Javier Miranda <miranda@adacore.com>
6926 * sem_ch6.adb (Can_Override_Operator): New function.
6927 (Verify_Overriding_Indicator): Add missing code to check overriding
6928 indicator in operators. Fixes regression.
6929 (Check_Overriding_Indicator): Minor reformating after replacing the
6930 code that evaluates if the subprogram can override an operator by
6931 invocations to the above new function.
6933 (Write_Field26_Name): Add missing code to ensure that, following
6934 the documentation in einfo.ads, this field is not shown as attribute
6935 "Static_Initialization" on non-dispatching functions.
6937 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6939 * sem_res.adb (Resolve_Call): A call to
6940 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6941 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6942 i.e., when the second parameter is of type Time_Span.
6944 2011-08-02 Vincent Celier <celier@adacore.com>
6946 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6947 with an archive instead of -L<library dir> -l<library name>.
6949 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6951 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6952 mark the base types In_Use in addition to making the operations
6955 2011-08-02 Ed Falis <falis@adacore.com>
6957 * init.c: add and setup __gnat_signal_mask for the exception signals
6958 * s-inmaop-vxworks.adb: new file.
6959 * s-intman-vxworks.adb: remove unnecessary initializations and
6961 * s-intman-vxworks.ads: remove unnecessary variable
6962 * s-taprop-vxworks.adb: simplify signal initialization
6964 2011-08-02 Robert Dewar <dewar@adacore.com>
6966 * sem_ch8.adb: Minor code reorganization, comment updates.
6968 2011-08-02 Robert Dewar <dewar@adacore.com>
6970 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6971 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6973 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6974 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6976 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6978 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6979 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6980 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6981 use_type_clauses, to handle more efficiently use_type and use_all_type
6983 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6984 Ada2012 Use_All_Type clause.
6985 (Use_Class_Wide_Operations): new procedure.
6987 2011-08-02 Robert Dewar <dewar@adacore.com>
6989 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6990 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6991 expression to expression function.
6993 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6995 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6996 if types are compatible.
6998 2011-08-02 Yannick Moy <moy@adacore.com>
7000 * sem_res.adb (Matching_Static_Array_Bounds): new function which
7001 returns True if its argument array types have same dimension and same
7002 static bounds at each index.
7003 (Resolve_Actuals): issue an error in formal mode on actuals passed as
7004 OUT or IN OUT paramaters which are not view conversions in SPARK.
7005 (Resolve_Arithmetic_Op): issue an error in formal mode on
7006 multiplication or division with operands of fixed point types which are
7007 not qualified or explicitly converted.
7008 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7009 Boolean or array type (except String) operands.
7010 (Resolve_Equality_Op): issue an error in formal mode on equality
7011 operators for array types other than String with non-matching static
7013 (Resolve_Logical_Op): issue an error in formal mode on logical operators
7014 for array types with non-matching static bounds. Factorize the code in
7015 Matching_Static_Array_Bounds.
7016 (Resolve_Qualified_Expression): issue an error in formal mode on
7017 qualified expressions for array types with non-matching static bounds.
7018 (Resolve_Type_Conversion): issue an error in formal mode on type
7019 conversion for array types with non-matching static bounds
7021 2011-08-02 Robert Dewar <dewar@adacore.com>
7023 * par-ch10.adb: Minor code reorganization (use Nkind_In).
7025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7027 * par-ch9.adb: save location of entry for proper error message.
7029 2011-08-02 Javier Miranda <miranda@adacore.com>
7031 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7032 (Use_Full_View) which permits this routine to climb through the
7033 ancestors using the full-view of private parents.
7034 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7035 Use_Full_View to true in calls to Is_Ancestor.
7036 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7037 true in call to Is_Ancestor.
7038 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7039 Use_Full_View to true in call to Is_Ancestor.
7040 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7041 call to Is_Ancestor.
7042 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7043 Use_Full_View to true in calls to Is_Ancestor.
7044 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7045 Make_Select_Specific_Data_Table, Register_Primitive,
7046 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7047 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7048 to true in call to Is_Ancestor.
7049 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7050 Use_Full_View to true in calls to Is_Ancestor.
7052 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7053 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7055 2011-08-02 Robert Dewar <dewar@adacore.com>
7057 * gnat_rm.texi: Minor reformatting.
7058 * sem_prag.adb: Minor reformatting.
7060 2011-08-02 Tristan Gingold <gingold@adacore.com>
7062 * vms_data.ads: Add VMS qualifier for -gnateP.
7064 2011-08-02 Robert Dewar <dewar@adacore.com>
7066 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7067 * par-ch7.adb (P_Package): Proper placement of aspects for package
7069 * par-endh.adb (Check_End): Ad Is_Sloc parameter
7070 (End_Statements): Add Is_Sloc parameterr
7071 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7072 (Check_End): Ad Is_Sloc parameter
7073 (End_Statements): Add Is_Sloc parameterr
7075 2011-08-02 Vincent Celier <celier@adacore.com>
7077 * ug_words: Add VMS qualifier equivalent to -gnateP:
7078 /SYMBOL_PREPROCESSING.
7080 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7082 * gnat-style.texi: For hexadecimal numeric literals the typical
7083 grouping of digits is 4 to represent 2 bytes.
7084 A procedure spec which is split into several lines is indented two
7087 2011-08-02 Yannick Moy <moy@adacore.com>
7089 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7090 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7091 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7093 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7094 choice in array aggregate
7095 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7097 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7098 positional and named aggregate for record, or others in record
7099 aggregate, or multiple choice in record aggregate
7100 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7101 array operands to logical operations AND, OR and XOR do not have the
7102 same static lower and higher bounds
7103 * sem_ch5.adb, sinfo.ads: Correct typos in comments
7105 2011-08-01 Robert Dewar <dewar@adacore.com>
7107 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7108 Replaces Last_Source_Node_In_Sequence.
7109 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7110 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7111 parens and blank in string (this was inconsistently implemented).
7113 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7114 blank in string (this was inconsistently implemented).
7116 (Set_Global_Switches): Set formal mode switches appropriately
7117 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7119 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7120 call Set_Error_Msg_Lang to set "spark" as language name.
7121 * par.adb: Remove unnecessary call to set formal language for errout
7122 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7123 appropriately and call Set_Error_Msg_Lang to set "spark" as language
7125 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7126 calls to it, moved after resolution so that types are known
7127 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7128 result of concatenation is not of type String
7129 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7130 concatenation is not properly restricted
7131 * gnat_rm.texi: Add doc on pragma Spark_95.
7132 * gcc-interface/Makefile.in: Remove obsolete target pairs for
7133 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7134 * gcc-interface/Make-lang.in: Update dependencies.
7136 2011-08-01 Javier Miranda <miranda@adacore.com>
7138 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7139 condition that detects if the overridden operation must replace an
7142 2011-08-01 Javier Miranda <miranda@adacore.com>
7144 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7145 code declarations inserted by Insert_Actions in each alternative of the
7146 N_Case_Expression node.
7148 2011-08-01 Robert Dewar <dewar@adacore.com>
7150 * sem_ch6.adb: Minor code reorganization.
7151 * sem_util.adb: Minor reformatting.
7153 2011-08-01 Pascal Obry <obry@adacore.com>
7155 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7156 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7158 2011-08-01 Yannick Moy <moy@adacore.com>
7160 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7161 literal or operator symbol which is prefixed
7162 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7163 mode on access attributes.
7164 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7165 that concatenation operands are properly restricted in formal mode
7166 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7167 Analyze_Concatenation_Operand. Issue an error in formal mode if the
7168 result of the concatenation has a type different from String.
7169 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7170 Analyze_Quantified_Expression, Analyze_Slice,
7171 Analyze_Null): issue an error in formal mode on unsupported constructs
7173 (Analyze_Block_Statement): only issue error on source block statement
7174 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7175 function which returns the last node in a list of nodes for which
7176 Comes_From_Source returns True, if any
7177 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7178 Last_Source_Node_In_Sequence
7179 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7180 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7181 mode on unsupported constructs
7182 * sem_ch9.adb Do not return after issuing error in formal mode, as the
7183 rest of the actions may be needed later on since the error is marked as
7185 * sinfo.ads: Typos in comments.
7187 2011-08-01 Pascal Obry <obry@adacore.com>
7189 * projects.texi: Minor editing.
7191 2011-08-01 Yannick Moy <moy@adacore.com>
7193 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7194 insertion character ~~
7195 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7196 (Set_Error_Msg_Lang): new procedure which fixes the language for use
7197 with insertion character ~~
7198 (Set_Msg_Text): treat insertion character ~~
7199 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7200 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7201 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7202 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7203 errors related to the formal language restriction not serious
7204 (insertion character |).
7205 * par.adb (Par): set formal language for error messages if needed
7206 * sem_ch6.adb (Check_Missing_Return): take into account possible
7207 generated statements at the end of the function
7208 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7209 enumeration value to define a new pragma SPARK_95
7210 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7211 SPARK_Version): new type and variables to store the SPARK version
7213 (SPARK_Mode): return True when SPARK_Version is set
7214 * par-prag.adb: Correct indentation
7215 (Prag): take Pragma_SPARK_95 into account
7216 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7219 2011-08-01 Robert Dewar <dewar@adacore.com>
7221 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7222 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7223 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7225 2011-08-01 Pascal Obry <obry@adacore.com>
7227 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7228 Target_Name to Get_Path call.
7229 (Parse_Single_Project): Likewise.
7230 (Post_Parse_Context_Clause): Likewise.
7231 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7232 Call Initialise_Project_Path with the proper Target_Name.
7233 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7235 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7236 with the proper Target_Name.
7237 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7239 (Parse_Project_And_Apply_Config): Likewise.
7240 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7241 This is fine as this part of the code is supporting only native
7243 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7244 is fine as this part of the code is supporting only native compilation.
7246 2011-08-01 Yannick Moy <moy@adacore.com>
7248 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7249 of homonym, unless the homonym is one of the cases allowed in SPARK
7250 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7251 package declaration occurring after a body.
7253 2011-08-01 Robert Dewar <dewar@adacore.com>
7255 * checks.adb, exp_ch4.adb: Minor reformatting.
7257 2011-08-01 Javier Miranda <miranda@adacore.com>
7259 * einfo.ads (Access_Disp_Table): Fix documentation.
7260 (Dispatch_Table_Wrappers): Fix documentation.
7262 2011-08-01 Pascal Obry <obry@adacore.com>
7264 * prj-env.adb, prj-env.ads: Minor reformatting.
7266 2011-08-01 Yannick Moy <moy@adacore.com>
7268 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7269 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7270 procedures out of these packages.
7271 * errout.ads, errout.adb
7272 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7273 procedures in of this package
7274 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7275 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7276 on misplaced later vs initial declarations, like in Ada 83
7277 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7278 formal mode on attribute of private type whose full type declaration
7280 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7281 package declaration inside a package specification
7282 (Analyze_Full_Type_Declaration): issue error in formal mode on
7283 controlled type or discriminant type
7284 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7285 user-defined operator means that it should come from the source
7286 (New_Overloaded_Entity): issue error in formal mode on overloaded
7288 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7290 2011-08-01 Thomas Quinot <quinot@adacore.com>
7292 * atree.adb: Minor reformatting.
7293 * checks.adb: Minor reformatting.
7295 2011-08-01 Vincent Celier <celier@adacore.com>
7297 * s-parame-vms-ia64.ads: Fix typo in comment
7299 * s-parame-vms-restrict.ads: Removed, unused.
7301 2011-08-01 Javier Miranda <miranda@adacore.com>
7304 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7306 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7307 * sem_ch3.ads, sem_ch3.adb
7308 (Is_Constant_Bound): New extended version of the subprogram that was
7309 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7310 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7311 * sem_aux.ads (Constant_Value): Fix typo in comment.
7312 * checks.adb (Generate_Index_Checks): New implementation which, for
7313 array objects with constant bounds, generates the runtime check
7314 referencing the bounds of the array type. For other cases this routine
7315 provides its previous behavior obtaining such values from the array
7317 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7319 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7320 we cannot have semantic interpretations of the new node.
7322 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7324 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7327 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7329 * sem_ch8.adb: Minor code editing.
7330 * s-vxwext.adb: Remove trailing space.
7331 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7332 consistency with other files.
7334 2011-08-01 Thomas Quinot <quinot@adacore.com>
7336 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7338 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7340 * par-ch10.adb: reject parameterized expressions as compilation unit.
7341 * sem_ch4.adb: handle properly conditional expression with overloaded
7342 then_clause and no else_clause.
7344 2011-08-01 Tristan Gingold <gingold@adacore.com>
7346 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7347 like done by System.Aux_DEC.
7348 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7350 2011-08-01 Yannick Moy <moy@adacore.com>
7352 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7353 missing label at end of declaration (subprogram or package)
7354 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7355 of positional and named parameter association
7356 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7357 Error_Msg_SP which adds a prefix to the error message giving the name
7358 of the formal language analyzed
7359 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7360 access result type in subprogram, unconstrained array as result type,.
7361 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7363 * sem_ch8.adb: Code clean up.
7365 2011-08-01 Javier Miranda <miranda@adacore.com>
7367 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7368 * einfo.ads (Access_Disp_Table): Fix documentation.
7369 (Dispatch_Table_Wrappers): Fix documentation.
7370 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7371 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7372 to enforce the documentation of this attribute.
7373 (Set_Is_Interface): Cleanup the assertion.
7374 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7375 the Underlying_Type entity before reading attribute Access_Disp_Table.
7376 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7377 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7378 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7379 the Underlying_Type entity before reading attribute Access_Disp_Table.
7380 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7381 Locate the Underlying_Type entity before reading attribute
7384 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7386 * s-poosiz.ads: Additional overriding indicators.
7388 2011-08-01 Yannick Moy <moy@adacore.com>
7390 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7392 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7393 parameter specification does not include a subtype mark.
7394 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7395 formal mode on abstract subprogram.
7396 (Analyze_Subprogram_Specification): issue error in formal mode on
7397 user-defined operator.
7398 (Process_Formals): issue error in formal mode on access parameter and
7400 * sem_ch9.adb (Analyze_Abort_Statement,
7401 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7402 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7403 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7404 Analyze_Requeue, Analyze_Selective_Accept,
7405 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7406 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7407 issue error in formal mode on user-defined raise statement.
7409 2011-08-01 Thomas Quinot <quinot@adacore.com>
7411 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7412 declaration being hidden when overriding an implicit inherited
7414 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7415 (-gnats), do not complain about a source file that contains only a
7418 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7420 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7421 variable if already set.
7423 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7425 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7426 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7427 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7428 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7429 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7430 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7431 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7432 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7433 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7434 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7435 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7436 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7437 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7438 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7439 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7440 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7441 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7442 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7443 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7444 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7445 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7446 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7447 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7448 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7449 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7450 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7451 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7452 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7453 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7454 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7455 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7456 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7457 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7458 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7459 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7460 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7461 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7462 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7463 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7464 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7465 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7466 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7467 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7468 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7469 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7470 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7471 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7472 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7473 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7474 Use GNAT instead of GNARL.
7476 2011-08-01 Bob Duff <duff@adacore.com>
7478 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7479 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7480 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7483 2011-08-01 Yannick Moy <moy@adacore.com>
7485 * debug.adb (d.D) reverve flag for the SPARK mode
7486 (d.E) reverve flag for SPARK generation mode
7487 (d.F) reverve flag for Why generation mode
7488 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7489 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7490 functions which return True when the corresponding modes are set
7491 (Formal_Language): return "spark" or "alfa" when in formal verification
7493 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7494 Error_Msg to prefix the error message with a tag giving the formal
7496 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7497 message with a tag giving the formal language
7498 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7500 (Analyze_Case_Statement): issue error in formal mode on case statement
7501 with a single "others" case alternative
7502 (Analyze_Exit_Statement): issue errors in formal mode on exit
7503 statements which do not respect SPARK restrictions
7504 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7505 (Check_Unreachable_Code): always issue an error (not a warning) in
7506 formal mode on unreachable code (concerns both code after an infinite
7507 loop and after an unconditional jump, both not allowed in SPARK)
7508 * sem_ch6.adb (Analyze_Return_Statement): add call to
7509 Set_Return_Present for a procedure containing a return statement
7510 (already done for functions in Analyze_Function_Return)
7511 (Analyze_Function_Return): issue error in formal mode on extended
7512 return or if return is not last statement in function
7513 (Check_Missing_Return): issue error in formal mode if function does
7514 not end with return or if procedure contains a return
7515 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7516 function to detect if there is an inner scope of its parameter S which
7519 2011-08-01 Thomas Quinot <quinot@adacore.com>
7521 * sem_ch6.ads: Minor reformatting.
7523 2011-08-01 Javier Miranda <miranda@adacore.com>
7525 * sem_util.adb (Abstract_Interface_List): Complete condition when
7526 processing private type declarations to avoid reading unavailable
7528 (Is_Synchronized_Tagged_Type): Complete condition when processing
7529 private extension declaration nodes to avoid reading unavailable
7532 2011-08-01 Thomas Quinot <quinot@adacore.com>
7534 * sem_ch3.adb: Minor reformatting.
7536 2011-08-01 Thomas Quinot <quinot@adacore.com>
7538 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7539 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7540 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7541 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7542 for VMS, instead parametrize the common implementation with
7543 System.Parameters declarations.
7545 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7547 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7549 2011-08-01 Tristan Gingold <gingold@adacore.com>
7551 * seh_init.c: Fix SEH handler installation on win64.
7553 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7555 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7556 double analysis of an anonymous access to subprogram, because it can
7557 lead to improper sharing of profiles and a back-end crash.
7559 2011-08-01 Robert Dewar <dewar@adacore.com>
7561 * make.adb, sem_ch4.adb: Minor reformatting.
7562 * gcc-interface/Make-lang.in: Update dependencies.
7563 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7565 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7567 * gnat_rm.texi: Fix definition of Long_Integer.
7569 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7571 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7572 to prevent storage exhaustion.
7573 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7574 finalized is a function body, insert the cleanup code before the final
7575 return statement, to prevent spurious warnings.
7576 * s-pooglo.ads: add overriding indicator.
7578 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7580 * sem_ch4.adb (Operator_Check): improve error message when both a
7581 with_clause and a use_clause are needed to make operator usage legal.
7582 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7583 determine whether a compilation unit is visible within an other,
7584 either through a with_clause in the current unit, or a with_clause in
7585 its library unit or one one of its parents.
7587 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7589 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7590 over an arbitrary expression of an array or container type.
7591 * lib-xref.adb: clarify comment.
7593 2011-08-01 Bob Duff <duff@adacore.com>
7595 * einfo.ads: Minor reformatting.
7596 * debug.adb: Minor comment improvement.
7598 2011-08-01 Javier Miranda <miranda@adacore.com>
7600 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7601 consider hidden subprograms as valid candidates.
7603 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7605 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7607 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7609 * gnat_ugn.texi: Fix typo.
7611 2011-08-01 Robert Dewar <dewar@adacore.com>
7613 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7614 lib-xref.adb: Minor reformatting
7616 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7618 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7619 when to generate a call to Move_Final_List.
7620 (Has_Controlled_Parts): Remove this function.
7622 2011-08-01 Geert Bosch <bosch@adacore.com>
7624 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7627 2011-08-01 Thomas Quinot <quinot@adacore.com>
7629 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7630 explicit raise of a predefined exception as Comes_From_Source if the
7631 original N_Raise_Statement comes from source.
7633 2011-08-01 Robert Dewar <dewar@adacore.com>
7635 * sinfo.ads: Add comment.
7636 * sem_ch6.adb: Minor reformatting.
7638 2011-08-01 Robert Dewar <dewar@adacore.com>
7640 * freeze.adb (Freeze_Entity): Refine check for bad component size
7641 clause to avoid rejecting confirming clause when atomic/aliased present.
7643 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7645 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7646 better determine whether an entity reference is a write.
7647 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7649 * lib-xref.adb (Output_References): Do no suppress a read reference at
7650 the same location as an immediately preceeding modify-reference, to
7651 handle properly in-out actuals.
7653 2011-08-01 Tristan Gingold <gingold@adacore.com>
7655 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7657 2011-08-01 Quentin Ochem <ochem@adacore.com>
7659 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7660 heap to compute the result.
7662 2011-08-01 Robert Dewar <dewar@adacore.com>
7664 * atree.ads: Minor reformatting.
7666 2011-08-01 Emmanuel Briot <briot@adacore.com>
7668 * g-expect.adb (Get_Command_Output): Fix memory leak.
7670 2011-08-01 Geert Bosch <bosch@adacore.com>
7672 * cstand.adb (P_Float_Type): New procedure to print the definition of
7673 predefined fpt types.
7674 (P_Mixed_Name): New procedure to print a name using mixed case
7675 (Print_Standard): Use P_Float_Type for printing floating point types
7676 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7677 precision IEEE float.
7679 2011-08-01 Thomas Quinot <quinot@adacore.com>
7681 * sem_ch3.adb: Minor reformatting.
7683 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7685 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7686 the completion of a generic function, insert the new body rather than
7687 rewriting the original.
7689 2011-08-01 Yannick Moy <moy@adacore.com>
7691 * sinfo.ads, errout.ads: Typos in comments.
7693 2011-08-01 Robert Dewar <dewar@adacore.com>
7695 * par-endh.adb: Minor reformatting.
7697 2011-08-01 Robert Dewar <dewar@adacore.com>
7699 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7700 (Pre_Post_Aspects): New subtype.
7701 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7702 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7703 * par-ch7.adb (P_Package): Remove Decl parameter
7704 (P_Package): Handle new syntax for aspects (before IS)
7705 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7707 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7708 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7709 (P_Package): Remove Decl parameter
7710 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7712 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7714 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7715 * sinfo.ads: Document new syntax for aspects in packages etc.
7716 * sprint.adb: Handle new syntax of aspects before IS in package
7718 2011-08-01 Thomas Quinot <quinot@adacore.com>
7720 * atree.ads: Minor reformatting.
7721 * sem_prag.adb: Minor reformatting.
7723 2011-08-01 Robert Dewar <dewar@adacore.com>
7725 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7726 case expr alternative.
7728 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7730 * sem_ch12.adb: Fix typo.
7732 2011-08-01 Geert Bosch <bosch@adacore.com>
7734 * sem_prag.adb (Check_No_Link_Name): New procedure.
7735 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7736 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7737 instead of Standard_Long_Long_Float_Size global. Preparation for
7738 eventual removal of per type constants.
7739 * exp_util.ads (Get_Stream_Size): New function returning the stream
7740 size value of subtype E.
7741 * exp_util.adb (Get_Stream_Size): Implement new function.
7742 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7744 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7746 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7748 2011-08-01 Geert Bosch <bosch@adacore.com>
7750 * cstand.adb: Fix comments.
7751 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7754 2011-08-01 Robert Dewar <dewar@adacore.com>
7756 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7758 2011-08-01 Geert Bosch <bosch@adacore.com>
7760 * atree.ads: Fix comment.
7762 2011-08-01 Robert Dewar <dewar@adacore.com>
7764 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7765 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7766 * par.adb: Add with for Namet.Sp.
7767 * par-tchk.adb: Minor reformatting.
7769 2011-08-01 Vincent Celier <celier@adacore.com>
7771 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7772 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7773 of the init procedure of a SAL.
7774 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7777 2011-08-01 Thomas Quinot <quinot@adacore.com>
7779 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7782 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7784 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7786 2011-08-01 Thomas Quinot <quinot@adacore.com>
7788 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7789 conformant with its spec (return True only for types that have
7790 an overriding Initialize primitive operation that prevents them from
7791 having preelaborable initialization).
7792 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7793 initialization for controlled types in Ada 2005 or later mode.
7795 2011-08-01 Robert Dewar <dewar@adacore.com>
7797 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7799 (Same_Aspect): New function.
7800 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7801 Type_Invariant, Precondition, Postcondition.
7802 * snames.ads-tmpl: Add Name_Type_Invariant.
7804 2011-08-01 Robert Dewar <dewar@adacore.com>
7806 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7808 (Freeze_All_Ent): Fix error in handling inherited aspects.
7809 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7810 already analyzed, but don't skip entire processing of a declaration,
7811 that's wrong in some cases of declarations being rewritten.
7812 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7813 Don't delay for integer, string literals
7814 Treat predicates in usual manner for delay, remove special case code,
7816 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7817 (Build_Predicate_Function): Update saved expression in aspect
7818 (Build_Invariant_Procedure): Update saved expression in aspect
7819 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7820 of replacement of discriminant references if the reference is simple.
7822 2011-08-01 Robert Dewar <dewar@adacore.com>
7824 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7825 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7826 Static_Predicate and Dynamic_Predicate.
7827 (Build_Predicate_Function): Add processing for Static_Predicate
7828 and Dynamic_Predicate.
7829 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7830 (From_Static_Predicate): New flag
7831 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7833 2011-08-01 Robert Dewar <dewar@adacore.com>
7835 * usage.adb: Documentation cleanup for Ada version modes in usage.
7836 * expander.adb: Minor reformatting.
7838 2011-08-01 Robert Dewar <dewar@adacore.com>
7840 * atree.ads: Minor comment fix.
7841 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7842 a-witeio.ads, sem_prag.adb: Minor reformatting.
7844 2011-08-01 Doug Rupp <rupp@adacore.com>
7846 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7847 pointers. Use descrip.h header file for convenience. Add some
7850 2011-08-01 Robert Dewar <dewar@adacore.com>
7852 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7853 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7854 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7856 (Check_Aspect_At_End_Of_Declarations): New procedure
7857 (Analye_Aspect_Specification): Minor changes for above procedures
7858 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7859 specification node as well.
7861 2011-08-01 Pascal Obry <obry@adacore.com>
7863 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7864 Windows files. Use GetFilesAttributes() in this case to check for file
7865 existence instead of returning with an error code.
7867 2011-08-01 Vincent Celier <celier@adacore.com>
7869 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7870 High is above Source length.
7872 2011-08-01 Robert Dewar <dewar@adacore.com>
7874 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7876 2011-08-01 Robert Dewar <dewar@adacore.com>
7878 * aspects.ads (Boolean_Aspects): New subtype.
7879 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7880 for derived types in cases where the parent type and derived type have
7882 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7883 with aspects when parent type also has aspects.
7884 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7885 boolean expression at this point).
7886 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7887 accordance with final decision on the Ada 2012 feature.
7888 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7890 2011-08-01 Matthew Heaney <heaney@adacore.com>
7892 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7894 2011-08-01 Pascal Obry <obry@adacore.com>
7896 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7897 Fix Replace_Slice when High is above current string size.
7898 (Replace_Slice): Fix DL computation when High is above current
7901 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7903 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7905 2011-08-01 Matthew Heaney <heaney@adacore.com>
7907 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7910 2011-08-01 Pascal Obry <obry@adacore.com>
7912 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7915 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7917 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7918 access to protected subprograms in generic bodies.
7919 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7920 protected type, indicate that the convention of the subprogram is
7921 Convention_Protected, because it may be used in subsequent declarations
7922 within the protected declaration.
7924 2011-08-01 Vincent Celier <celier@adacore.com>
7926 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7927 and "final" procedures when the name of the library is "ada", to avoid
7928 duplicate symbols "adainit" and "adafinal" in executables.
7930 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7932 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7933 quantified expression that appears within a postcondition and uses the
7934 Ada2012 'Result attribute.
7936 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7938 * init.c (__gnat_error_handler): Cast reason to int.
7939 (__gnat_install_handler): Explain sa_sigaction use.
7941 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7943 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7944 subprogram has copy-in copy-out parameters, try to promote the mode of
7945 the return type if it is passed in registers.
7947 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7949 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7950 left operand as addressable.
7952 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7954 * gcc-interface/gigi.h (build_function_stub): Remove.
7955 (build_return_expr): Likewise.
7956 (convert_vms_descriptor): Declare.
7957 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7958 (build_function_stub): Move to...
7959 * gcc-interface/utils2.c (build_return_expr): Move to...
7960 * gcc-interface/trans.c (build_function_stub): ...here.
7961 (build_return_expr): ...here.
7962 (Subprogram_Body_to_gnu): Add local variable for language_function.
7963 Disconnect the parameter attributes cache, if any, once done with it.
7964 Call end_subprog_body only after setting the end_locus.
7965 Build the stub associated with the function, if any, at the very end.
7966 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7967 variables and streamline control flow.
7969 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7972 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7975 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7978 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7979 Assign to act.sa_sigaction.
7980 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7981 current->return_address to char * before arithmetic.
7983 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7985 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7986 Correct argument types.
7987 Extract code from reason.
7988 (__gnat_install_handler): Assign to act.sa_sigaction.
7990 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7992 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7993 (GNAT1_OBJS): ...here.
7995 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7998 * g-socthi-mingw.adb (Fill): Fix formatting.
8000 * gcc-interface/gigi.h: Move around comment.
8002 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8005 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8007 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
8010 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8012 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
8014 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8015 range comparison if Pmode is SImode.
8017 2011-07-12 Laurent GUERBY <laurent@guerby.net>
8018 Eric Botcazou <ebotcazou@adacore.com>
8020 * adadecode.c: Wrap up in extern "C" block.
8021 * adadecode.h: Likewise.
8022 * adaint.c: Likewise. Remove 'const' keyword.
8023 * adaint.h: Likewise.
8025 * atree.h: Likewise.
8027 * cstreams.c: Likewise.
8031 * final.c: Likewise.
8033 * initialize.c: Likewise.
8035 * namet.h: Likewise.
8036 * nlists.h: Likewise.
8037 * raise.c: Likewise.
8038 * raise.h: Likewise.
8039 * repinfo.h: Likewise.
8040 * seh_init.c: Likewise.
8041 * targext.c: Likewise.
8042 * tracebak.c: Likewise.
8043 * uintp.h: Likewise.
8044 * urealp.h: Likewise.
8045 * xeinfo.adb: Wrap up generated C code in extern "C" block.
8046 * xsinfo.adb: Likewise.
8047 * xsnamest.adb: Likewise.
8048 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8049 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8050 * gcc-interface/misc.c: Likewise.
8051 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8052 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
8053 ada/targext.o here...
8054 (GNAT_ADA_OBJS): ...and not here.
8055 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8056 (GNATBIND_OBJS): Reorder.
8058 2011-07-07 Richard Henderson <rth@redhat.com>
8060 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8061 dwarf2out_frame_init.
8063 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
8065 * gcc-interface/misc.c (gnat_init): Tweak previous change.
8067 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8070 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8072 2011-07-06 Richard Guenther <rguenther@suse.de>
8074 * gcc-interface/misc.c (gnat_init): Merge calls to
8075 build_common_tree_nodes and build_common_tree_nodes_2.
8076 Re-initialize boolean_false_node.
8078 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
8079 Olivier Hainque <hainque@adacore.com>
8080 Nicolas Setton <setton@adacore.com>
8082 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8083 the type according to the ARTIFICIAL_P parameter.
8084 (create_type_decl): Likewise.
8085 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8087 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
8089 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8090 (gnatbind): Likewise.
8092 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8094 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8096 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8098 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8099 local variable throughout. Remove useless call to Base_Type.
8100 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8101 Take it also into account for the volatileness of the field. Set the
8102 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
8104 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8106 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8107 on a dereference built for a by-ref object if it has an address clause.
8109 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8111 * einfo.ads (Address_Taken): Document use for the second argument of
8112 Asm_Input and Asm_Output attributes.
8113 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8114 argument is an entity name, then set Address_Taken on it.
8115 <Attribute_Asm_Output>: Likewise.
8116 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8117 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8118 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8119 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8121 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
8124 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8126 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8128 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8129 (ada/utils.o): Update dependencies.
8130 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8131 ../../../libcpp/libcpp.a.
8132 * gcc-interface/utils.c: Include common/common-target.h.
8133 (process_attributes): Use targetm_common.have_named_sections.
8135 2011-06-07 Richard Guenther <rguenther@suse.de>
8137 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8140 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8142 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8143 TREE_THIS_NOTRAP flag.
8145 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8147 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8150 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8152 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8153 constants whose full view has discriminants specially.
8155 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8157 * gcc-interface/utils.c: Include diagnostic.h.
8158 (gnat_write_global_declarations): Output debug information for all
8159 global type declarations before finalizing the compilation unit.
8160 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8162 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8164 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8166 2011-05-25 Kai Tietz <ktietz@redhat.com>
8168 * adaint.c (__gnat_to_canonical_file_list_next): Use array
8169 initialization instead of const/none-const pointer assignment.
8171 2011-05-24 Joseph Myers <joseph@codesourcery.com>
8173 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8174 $(EXTRA_GNAT1_OBJS).
8175 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8176 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8177 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8178 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8179 libcommon-target.a instead of prefix.o.
8181 2011-05-21 Joseph Myers <joseph@codesourcery.com>
8184 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8186 2011-05-20 Joseph Myers <joseph@codesourcery.com>
8188 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8189 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8190 instead of version.o.
8192 2011-05-18 Kai Tietz <ktietz@redhat.com>
8194 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8195 boolean_false_node instead of integer_zero_node.
8196 (convert_with_check): Likewise.
8197 * gcc-interface/decl.c (choices_to_gnu): Likewise.
8199 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
8201 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8202 type of the parameter is an unconstrained array, convert the actual to
8203 the type of the formal in the In Out and Out cases as well.
8205 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8207 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8208 call build_function_type_array or build_varargs_function_type_array
8210 (create_subprog_type): Don't call build_function_type; call
8211 build_function_type_vec instead.
8213 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8215 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8216 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8217 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8219 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
8221 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8223 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8224 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8226 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8228 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8230 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8232 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8233 instead of accessing TYPE_ARG_TYPES directly.
8234 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8236 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8239 * gcc-interface/gigi.h (get_variant_part): Declare.
8240 * gcc-interface/decl.c (get_variant_part): Make global.
8241 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8242 types have the same constant size, are record types and T1 has a
8243 variant part while T2 doesn't.
8245 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8247 * gcc-interface/utils.c (begin_subprog_body): Do not call
8249 (end_subprog_body): Likewise.
8251 2011-05-04 Richard Guenther <rguenther@suse.de>
8253 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8255 (pos_to_constructor): Likewise.
8257 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8258 Eric Botcazou <ebotcazou@adacore.com>
8260 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8261 of build_function_type. Adjust calls to...
8262 (build_raise_check): ...this. Do not take a void_tree parameter.
8263 Call build_function_type_list instead of build_function_type.
8264 Fix head comment and swap couple of conditional blocks.
8266 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8268 * gnatvsn.ads (Library_Version): Bump to 4.7.
8269 (Current_Year): Bump to 2011.
8271 2011-04-29 Michael Matz <matz@suse.de>
8273 * gcc-interface/misc.c (gnat_handle_option): Set
8274 warn_maybe_uninitialized.
8276 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8278 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8279 the Watson/McCabe paper.
8281 2011-04-23 Jim Meyering <meyering@redhat.com>
8283 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8285 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8287 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8290 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8292 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8294 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8295 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8296 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8297 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8298 <all>: Do not set flags on the reused DECL node coming from an alias.
8299 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8300 don't need debug info here...
8301 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8302 (gigi): Adjust calls to create_subprog_decl.
8303 (build_raise_check): Likewise.
8304 (establish_gnat_vms_condition_handler): Likewise.
8305 (Compilation_Unit_to_gnu): Likewise.
8306 (gnat_to_gnu): Likewise.
8308 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8310 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8311 (NO_REORDER_ADAFLAGS): New variable.
8312 (EXTRA_GNATTOOLS): Always define.
8313 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8314 Clean up and adjust list of files compiled with special options.
8315 * gcc-interface/Make-lang.in: Likewise.
8316 (ada/decl.o): Cosmetical change.
8317 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8319 2011-04-20 Jim Meyering <meyering@redhat.com>
8321 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8323 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8325 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8326 $(CFLAGS) on the link line.
8328 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8330 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8331 padded type built for the return type if it is unconstrained.
8333 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8335 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8337 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8339 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8340 before calling TREE_CHAIN.
8341 * gcc-interface/misc.c (gnat_init_ts): New function.
8342 (LANG_HOOKS_INIT_TS): Define.
8344 2011-04-12 Martin Jambor <mjambor@suse.cz>
8346 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8347 instead of cgraph_node.
8349 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8351 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8352 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8355 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8357 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8358 of aggregate types that contain a placeholder.
8360 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8362 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8364 (handle_type_generic_attribute): Likewise.
8366 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8369 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8371 2011-04-04 Kai Tietz <ktietz@redhat.com>
8374 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8377 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8379 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8380 type case, do not strip a padding type around the array type.
8382 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8384 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8387 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8389 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8390 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8391 code for -feliminate-unused-debug-types.
8392 (gnat_post_options): Likewise.
8394 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8396 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8397 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8400 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8402 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8403 DECL_ARTIFICIAL flag on enumeration types.
8405 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8407 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8408 fat pointer types artificial unconditionally.
8409 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8412 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8414 * gcc-interface/gigi.h (get_dummy_type): Declare.
8415 (build_dummy_unc_pointer_types): Likewise.
8416 (finish_fat_pointer_type): Likewise.
8417 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8418 fat pointer type has been built, complete it in place.
8419 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8420 and thin pointers. Remove useless variable.
8421 (finish_fat_pointer_type): Make global and move to...
8422 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8423 (get_dummy_type): New function.
8424 (build_dummy_unc_pointer_types): Likewise.
8425 (gnat_pushdecl): Propage the name to the anonymous variants only.
8426 (update_pointer_to): Only adjust the pointer types in the unconstrained
8429 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8431 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8432 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8433 if this is a Taft amendment type and the full declaration is available.
8434 * gcc-interface/trans.c (process_type): Likewise.
8435 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8436 (process_freeze_entity): Likewise.
8437 * gcc-interface/utils.c (dummy_global): New static variable.
8438 (gnat_write_global_declarations): If there are types declared as used
8439 at the global level, insert them in the global hash table.
8441 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8443 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8444 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8445 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8447 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8448 flag of the type accordingly.
8449 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8451 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8453 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8454 finalizing types when updating the pointers to the designated type.
8455 <all>: Finalize the deferred types even if we didn't defer processing
8456 of incomplete types in this invocation.
8458 2011-04-01 Olivier Hainque <hainque@adacore.com>
8459 Nicolas Setton <setton@adacore.com>
8460 Eric Botcazou <ebotcazou@adacore.com>
8462 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8463 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8465 2011-03-28 Kai Tietz <ktietz@redhat.com>
8467 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8469 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8470 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8472 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8474 2011-03-28 Tristan Gingold <gingold@adacore.com>
8477 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8478 Use ada output of gnatbind.
8479 (ada/b_gnatb.adb): Ditto.
8480 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8481 (ada.mostlyclean, ada.stage1)
8482 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8483 (ada.stagefeedback): Adjust.
8484 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8485 Use ada output of gnatbind.
8486 (b_gnatm.adb): Ditto.
8487 (b_gnatl.o, b_gnatm.o): New rules.
8489 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8491 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8492 for the padded type built to support a specified size or alignment.
8494 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8496 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8497 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8498 unconditionally to the end of the unit when the designated type is
8500 <all>: Rename local variable. Attempt to un-defer types only and do it
8501 for limited_with'ed types as well.
8502 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8503 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8504 consistently and remove redundant call to finalize_from_with_types.
8506 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8508 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8509 subprograms without a previous spec declared in the same unit.
8510 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8511 subprograms at the end of the unit instead of at the beginning.
8512 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8513 isn't public for the special handling of non-inline functions nested
8514 inside inline external functions.
8516 2011-03-25 Jeff Law <law@redhat.com>
8518 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8520 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8522 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8523 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8524 to compute Set_Size_Depends_On_Discriminant.
8525 (Layout_Type): Call it on array types in back-end layout mode.
8526 * sem_util.adb (Requires_Transient_Scope): Return true for array
8527 types only if the size depends on the value of discriminants.
8528 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8529 type if the RHS is a call to a function that returns an unconstrained
8530 type with default discriminant.
8532 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8534 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8535 non-conversion to the nominal result type at the end.
8537 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8539 * gcc-interface/trans.c (create_temporary): New function taken from...
8540 (create_init_temporary): ...here. Call it.
8541 (call_to_gnu): Create the temporary for the return value early, if any.
8542 Create it for a function with copy-in/copy-out parameters if there is
8543 no target; in other cases of copy-in/copy-out, use another temporary.
8544 Push the new binding level lazily. Add and rename local variables.
8546 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8548 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8550 (set_rm_size): Likewise.
8552 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8554 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8555 for the padded type built in order to support a specified alignment.
8556 Fix incorrect formatting.
8558 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8561 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8563 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8565 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8566 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8567 to the end of the list. Adjust recursive call. Rename local variable.
8568 If REORDER is true, reorder components of the record type.
8569 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8570 components_to_record and adjust the parameter list.
8572 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8574 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8575 disabled, use the variable for bounds of loop iteration scheme.
8577 2011-03-21 Kai Tietz <ktietz@redhat.com>
8580 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8582 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8584 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8585 out whether the expression is read-only. Short-circuit placeholder
8586 case and rename a couple of local variables.
8588 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8590 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8591 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8592 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8593 (convert): Deal with conversions from a smaller form type specially.
8595 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8597 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8598 its argument, except for the special -I- switch.
8600 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8602 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8605 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8607 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8609 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8611 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8613 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8614 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8615 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8616 Do not generate the check directly, instead instantiate the template
8617 check present in the descriptor.
8618 (make_descriptor_field): Move around.
8619 (build_vms_descriptor32): Build a template check in the POINTER field.
8620 (build_vms_descriptor): Remove useless suffixes.
8621 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8623 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8626 * targext.c: Include target files if IN_RTS is defined.
8628 2011-01-26 Richard Guenther <rguenther@suse.de>
8631 * targext.c: Include config.h.
8632 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8635 2011-01-04 Pascal Obry <obry@adacore.com>
8636 Eric Botcazou <ebotcazou@adacore.com>
8638 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8640 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8642 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8643 end-of-case on the end label and its associated gotos, if any.
8645 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8647 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8648 expressions of the parameter cache within the statement group of
8651 2011-01-04 Olivier Hainque <hainque@adacore.com>
8652 Eric Botcazou <ebotcazou@adacore.com>
8654 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8655 (set_end_locus_from_node): New function.
8656 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8657 make and the function end_locus.
8658 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8659 for the elaboration subprogram.
8660 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8661 set the end_locus of the expression as well.
8663 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8666 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8667 variables that are referenced in exception handlers volatile.
8671 Copyright (C) 2011 Free Software Foundation, Inc.
8673 Copying and distribution of this file, with or without modification,
8674 are permitted in any medium without royalty provided the copyright
8675 notice and this notice are preserved.
8677 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8678 - fix bugs in the description of Source_Trace;
8679 - get rid of UNIT_NAME;
8681 2011-08-02 Javier Miranda <miranda@adacore.com>
8684 (Build_Dispatching_Requeue): Adding support for VM targets
8685 since we cannot directly reference the Tag entity.
8686 * exp_sel.adb (Build_K): Adding support for VM targets.
8687 (Build_S_Assignment): Adding support for VM targets.
8689 (Default_Prim_Op_Position): In VM targets do not restrict availability
8690 of predefined interface primitives to compiling in Ada 2005 mode.
8691 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8692 restricted to compiling in Ada 2005 mode.
8693 (Make_VM_TSD): Generate code that declares and initializes the OSD
8694 record. Needed to support dispatching calls through synchronized
8697 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8698 primitives associated with synchronized interfaces.
8699 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8700 primitives associated with synchronized interfaces.
8702 2011-08-02 Yannick Moy <moy@adacore.com>
8704 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8705 statements hidden in SPARK if preceded by the HIDE directive
8706 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8707 exception handlers as hidden in SPARK if preceded by the HIDE directive
8708 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8709 if starting with the HIDE directive
8710 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8711 starting with the HIDE directive; mark the declarations in a private
8712 part as hidden in SPARK if the private part starts with the HIDE
8714 * restrict.adb, restrict.ads
8715 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8716 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8717 argument node belongs to a part which is hidden in SPARK
8718 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8719 parts in SPARK; protect the possibly costly call to
8720 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8721 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8722 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8723 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8725 (Scan): recognize special comment starting with '#' and followed by
8726 SPARK keyword "hide" as a HIDE directive.
8728 2011-08-02 Yannick Moy <moy@adacore.com>
8730 * types.ads, erroutc.ads: Minor reformatting.
8732 2011-08-02 Vincent Celier <celier@adacore.com>
8734 * link.c: Add response file support for cross platforms.
8736 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8738 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8739 in an association, set parent field of copy before partial analysis.
8740 * sem_res.adb (Resolve_Slice): create reference to itype only when
8741 expansion is enabled.
8743 2011-08-02 Yannick Moy <moy@adacore.com>
8745 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8746 for new flag denoting which subprogram bodies are in ALFA
8747 * restrict.adb, sem_ch7.adb: Update comment
8748 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8749 sem_ch9.adb, sem_res.adb: Add calls to
8750 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8751 * sem_ch6.adb (Analyze_Function_Return): add calls to
8752 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8753 middle of the body, and extended return.
8754 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8755 False when missing return.
8756 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8757 to True for subprograms whose spec is in ALFA. Remove later on the flag
8758 on the entity used for a subprogram body when there exists a separate
8760 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8761 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8762 False, otherwise do nothing.
8764 2011-08-02 Robert Dewar <dewar@adacore.com>
8766 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8768 2011-08-02 Yannick Moy <moy@adacore.com>
8770 * sem_ch4.ads: minor formatting.
8772 2011-08-02 Yannick Moy <moy@adacore.com>
8774 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8775 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8776 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8777 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8778 opt.ads: cleanup of SPARK mode
8780 2011-08-02 Yannick Moy <moy@adacore.com>
8782 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8784 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8785 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8787 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8788 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8789 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8790 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8792 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8794 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8795 functions whose return type is not in ALFA.
8796 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8798 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8799 parameter's type is not in ALFA.
8800 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8803 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8805 * sem_ch6 (Analyze_Expression_Function): treat the function as
8806 Inline_Always, and introduce a subprogram declaration for it when it is
8808 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8809 expression functions, so that the back-end can determine whether they
8810 can in fact be inlined.
8811 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8812 a function body comes from an expression function.
8814 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8816 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8817 null exclusions to test Can_Never_Be_Null on the anonymous access types
8818 of the formals rather than testing the formals themselves. Exclude this
8819 check in cases where the Old_Formal is marked as a controlling formal,
8820 to avoid issuing spurious errors for bodies completing dispatching
8821 operations (due to the flag not getting set on controlling access
8822 formals in body specs).
8823 (Find_Corresponding_Spec): When checking full and subtype conformance of
8824 subprogram bodies in instances, pass Designated and E in that order, for
8825 consistency with the expected order of the formals (New_Id followed by
8828 2011-08-02 Robert Dewar <dewar@adacore.com>
8830 * sem_ch8.adb: Minor reformatting.
8832 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8834 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8835 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8836 primitive operations of class-wide actuals.
8838 2011-08-02 Javier Miranda <miranda@adacore.com>
8840 * exp_atag.ads, exp_atag.adb
8841 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8842 since its value is implicitly passed in argument Typ.
8843 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8844 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8845 Build_Common_Dispatching_Select_Statements.
8847 2011-08-02 Robert Dewar <dewar@adacore.com>
8849 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8850 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8853 2011-08-02 Robert Dewar <dewar@adacore.com>
8855 * sem_res.adb: Minor reformatting.
8856 * sem_prag.adb: Minor reformatting.
8858 2011-08-02 Javier Miranda <miranda@adacore.com>
8860 * exp_atag.adb, exp_atags.ads
8861 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8862 by the tagged type Entity. Required to use this routine in the VM
8863 targets since we do not have available the Tag entity in the VM
8866 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8867 Ada.Tags has not been previously loaded.
8869 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8870 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8872 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8873 view of enclosing scopes. Required to handle enclosing scopes that
8874 are synchronized types whose full view is a task type.
8876 (Build_VM_TSDs): Minor code improvement to avoid generating and
8877 analyzing lists with empty nodes.
8878 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8879 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8880 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8881 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8882 (Make_Select_Specific_Data_Table): Add support for VM targets.
8883 (Make_VM_TSD): Generate code to initialize the SSD structure of
8886 2011-08-02 Yannick Moy <moy@adacore.com>
8888 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8889 cross-references section in ALI.
8890 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8891 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8893 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8894 subprogram or package entity of a node
8895 (Is_Local_Reference_Type): new function returns True for references
8896 selected in local cross-references.
8897 (Lt): function extracted from Lt in Output_References
8898 (Write_Entity_Name): function extracted from Output_References
8899 (Generate_Definition): generate reference with type 'D' for definition
8900 of objects (object declaration and parameter specification), with
8901 appropriate locations and units, for use in local cross-references.
8902 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8903 references of type 'I' for initialization in object definition.
8904 (Output_References): move part of function Lt and procedure
8905 Write_Entity_Name outside of the body. Ignore references of types 'D'
8906 and 'I' introduced for local cross-references.
8907 (Output_Local_References): new procedure to output the local
8908 cross-references sections.
8909 (Lref_Entity_Status): new array defining whether an entity is a local
8910 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8911 with 'I' type when initialization expression is present.
8912 * get_scos.adb, get_scos.ads: Correct comments and typos
8914 2011-08-02 Javier Miranda <miranda@adacore.com>
8916 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8918 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8920 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8923 2011-08-02 Vincent Celier <celier@adacore.com>
8925 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8926 (No_Space_Img): New function
8927 (Find_Excluded_Sources): When reading from a file, record the file name
8928 and the line number for each excluded source.
8929 (Mark_Excluded_Sources): When reporting an error, if the excluded
8930 sources were read from a file, include file name and line number in
8933 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8935 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8937 2011-08-02 Robert Dewar <dewar@adacore.com>
8939 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8941 2011-08-02 Javier Miranda <miranda@adacore.com>
8943 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8944 generation of TSDs to the DOTNET compiler.
8945 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8946 generation of TSDs to the DOTNET compiler.
8948 2011-08-02 Javier Miranda <miranda@adacore.com>
8950 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8951 record of all the tagged types declared inside library level package
8952 declarations, library level package bodies or library level subprograms.
8953 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8954 associated with a given tagged type.
8955 (Build_VM_TSDs): New subprogram.
8956 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8957 compilation units that are subprograms.
8958 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8959 compilation units that are package bodies.
8960 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8961 units that are a package declaration or a package instantiation.
8962 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8963 reorganization to improve the error generated by the frontend when the
8964 function Ada.Tags.Secondary_Tag is not available.
8965 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8966 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8968 2011-08-02 Javier Miranda <miranda@adacore.com>
8970 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8972 2011-08-02 Robert Dewar <dewar@adacore.com>
8974 * s-imenne.ads: Minor reformatting.
8976 2011-08-02 Robert Dewar <dewar@adacore.com>
8978 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8979 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8980 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8982 2011-08-02 Robert Dewar <dewar@adacore.com>
8984 * einfo.ads (Materialize_Entity): Document this is only for renamings
8985 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8986 required debug information in the case where we transform the object
8987 declaration into a renaming declaration.
8988 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8990 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8993 2011-08-02 Robert Dewar <dewar@adacore.com>
8995 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8996 Suppress_Init_Procs.
8997 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8998 Suppress_Initialization/Initialization_Suppressed.
8999 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9000 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9001 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9002 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9004 2011-08-02 Robert Dewar <dewar@adacore.com>
9006 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9011 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9012 only have inheritable classwide pre/postconditions.
9014 2011-08-02 Javier Miranda <miranda@adacore.com>
9016 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9017 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9018 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9019 checks if the external tag of a type is the same as the external tag
9020 of some other declaration.
9022 2011-08-02 Thomas Quinot <quinot@adacore.com>
9024 * s-taskin.ads: Minor reformatting.
9026 2011-08-02 Emmanuel Briot <briot@adacore.com>
9028 * g-comlin.adb (Display_Help): swap the order in which it prints the
9029 short help and the general usage.
9031 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9033 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9034 the aspect declarations and attach them to the generic copy for
9035 subsequent analysis.
9036 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9037 declarations of the generic tree to the new subprogram declarations.
9038 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9039 conditions that apply to a subprogram instance.
9041 2011-08-02 Robert Dewar <dewar@adacore.com>
9043 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9045 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9047 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9048 private type with a tagged full view is not derived in the immediate
9049 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9051 2011-08-02 Robert Dewar <dewar@adacore.com>
9053 * exp_ch4.adb: Minor reformatting.
9055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9057 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9058 Ada2012 iterator, the loop will be rewritten during expansion into a
9059 while loop with a cursor and an element declaration. Do not analyze the
9060 body in this case, because if the container is for indefinite types the
9061 actual subtype of the elements will only be determined when the cursor
9062 declaration is analyzed.
9064 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9066 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9067 size/alignment related attributes in CodePeer_Mode.
9069 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9071 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9072 Prepend_Element, since this can result in the operation getting the
9073 wrong slot in the full type's dispatch table if the full type has
9074 inherited operations. The incomplete type's operation will get added
9075 to the proper position in the full type's primitives
9076 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9077 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9078 dispatching operations, since there are cases where nonprimitive
9079 subprograms can get added to the list of incomplete dependents (such
9080 as subprograms in nested packages).
9081 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9082 private part when determining whether to add a primitive with a
9083 parameter of a tagged incomplete type to the Private_Dependents list.
9084 Such primitives can also occur in the visible part, and should not have
9085 been excluded from being private dependents.
9086 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9087 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9088 list of a Taft-amendment incomplete type is a primitive before issuing
9089 an error that the full type must appear in the same unit. There are
9090 cases where nonprimitives can be in the list (such as subprograms in
9092 * sem_disp.adb (Derives_From): Use correct condition for checking that
9093 a formal's type is derived from the type of the corresponding formal in
9094 the parent subprogram (the condition was completely wrong). Add
9095 checking that was missing for controlling result types being derived
9096 from the result type of the parent operation.
9098 2011-08-02 Yannick Moy <moy@adacore.com>
9100 * errout.adb (First_Node): minor renaming
9101 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9104 2011-08-02 Yannick Moy <moy@adacore.com>
9106 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9107 before accessing operands.
9108 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9109 decide whether an initialization expression respects SPARK rules, as
9110 the plain node is the expanded one. This allows for more valid warnings
9112 * gnat_rm.texi: Minor update.
9114 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9116 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9119 2011-08-02 Robert Dewar <dewar@adacore.com>
9121 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9123 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9125 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9126 loop statements and the element renaming declaration with a block when
9127 the element type is controlled.
9129 2011-08-02 Yannick Moy <moy@adacore.com>
9131 * sinfo.ads: Minor formatting.
9133 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9135 * sem_aggr.adb (Add_Association): if the association has a box and no
9136 expression, use the Sloc of the aggregate itself for the new
9138 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9141 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9143 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9144 When a container is provided via a function call, generate a renaming
9145 of the function result. This avoids the creation of a transient scope
9146 and the premature finalization of the container.
9147 * exp_ch7.adb (Is_Container_Cursor): Removed.
9148 (Wrap_Transient_Declaration): Remove the supression of the finalization
9149 of the list controller when the declaration denotes a container cursor,
9152 2011-08-02 Yannick Moy <moy@adacore.com>
9154 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9155 node is from source, instead of the original node being from source.
9157 (Resolve_Array_Aggregate): refine the check for a static expression, to
9158 recognize also static ranges
9159 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9160 Array_Type_Declaration): postpone the test for the type being a subtype
9161 mark after the type has been resolved, so that component-selection and
9162 expanded-name are discriminated.
9163 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9164 to distinguish the case of an iteration scheme, so that an error is
9165 issed on a non-static range in SPARK except in an iteration scheme.
9166 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9167 In_Iter_Schm = True.
9168 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9169 user-defined operators so that they are allowed in renaming
9171 (Find_Selected_Component): refine the check for prefixing of operators
9172 so that they are allowed in renaming. Move the checks for restrictions
9173 on selector name after analysis discriminated between
9174 component-selection and expanded-name.
9175 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9176 concatenation argument of string type if it is static.
9177 * sem_util.adb, sem_util.ads
9178 (Check_Later_Vs_Basic_Declarations): add a new function
9179 Is_Later_Declarative_Item to decice which declarations are allowed as
9180 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9181 mode, add that renamings are considered as later items.
9182 (Enclosing_Package): new function to return the enclosing package
9183 (Enter_Name): correct the rule for homonyms in SPARK
9184 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9185 from source (result of expansion) to avoid issuing wrong warnings.
9187 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9189 * errout.adb: On anything but an expression First_Node returns its
9192 2011-08-02 Pascal Obry <obry@adacore.com>
9194 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9196 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9198 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9199 Set the associated loop as the related expression of internally
9201 * exp_ch7.adb (Is_Container_Cursor): New routine.
9202 (Wrap_Transient_Declaration): Supress the finalization of the list
9203 controller when the declaration denotes a container cursor.
9205 2011-08-02 Yannick Moy <moy@adacore.com>
9207 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9209 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9210 expression is a simple expression. This check cannot be performed in
9211 the semantics, so just drop it.
9212 (P_Index_Or_Discriminant_Constraint): move check that the index or
9213 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9214 semantics. Other cases were previously checked in the semantics.
9215 * par-ch4.adb (P_Name): move checks that a selector name is not
9216 character literal or an operator symbol to Find_Selected_Component in
9218 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9219 declarations are not placed after later declarations in a separate
9220 procedure in Sem_Util (possibly not the best choice?), to be used both
9221 during parsing, for Ada 83 mode, and during semantic analysis, for
9223 * par-endh.adb (Check_End): move check that end label is not missing
9224 to Process_End_Label in the semantics
9225 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9226 the special case for SPARK restriction
9227 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9228 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9229 parameter Force to issue the error message even on internal node (used
9230 for generated end label). Call Check_Restriction to check when an error
9231 must be issued. In SPARK mode, issue an error message even if the
9232 restriction is not set.
9233 (Check_Restriction): new procedure with an additional out parameter to
9234 inform the caller that a message has been issued
9235 * sem_aggr.adb: Minor modification of message
9236 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9237 instead of issuing an error message directly
9238 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9239 declarations are not placed after later declarations, by calling
9240 Check_Later_Vs_Basic_Declarations
9241 (Analyze_Subtype_Declaration): move here the check that an index or
9242 discriminant constraint must be a subtype mark. Change the check that
9243 a subtype of String must start at one so that it works on subtype marks.
9244 * sem_ch4.adb (Analyze_Call): move here the check that a named
9245 association cannot follow a positional one in a call
9246 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9247 instead of issuing an error message directly
9248 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9249 selector name is not a character literal or an operator symbol. Move
9250 here the check that the prefix of an expanded name cannot be a
9251 subprogram or a loop statement.
9252 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9253 procedure called from parsing and semantics to check that basic
9254 declarations are not placed after later declarations
9255 (Process_End_Label): move here the check that end label is not missing
9257 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9259 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9260 representation clause in codepeer mode, since it confuses CodePeer and
9261 does not bring useful info.
9263 2011-08-02 Ed Falis <falis@adacore.com>
9265 * init.c: initialize fp hw on MILS.
9267 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9269 * errout.adb (First_Node): for bodies, return the node itself (small
9270 optimization). For other nodes, do not check source_unit if the node
9271 comes from Standard.
9273 2011-08-02 Robert Dewar <dewar@adacore.com>
9275 * exp_ch3.adb: Minor comment additions.
9276 * sem_ch13.adb: Minor reformatting.
9278 2011-08-02 Pascal Obry <obry@adacore.com>
9280 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9282 2011-08-02 Robert Dewar <dewar@adacore.com>
9284 * sem_attr.adb: Minor reformatting.
9286 2011-08-02 Robert Dewar <dewar@adacore.com>
9288 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9289 (Has_Default_Component_Value): Removed
9290 * einfo.ads Comment updates
9291 (Has_Default_Aspect): Replaces Has_Default_Value
9292 (Has_Default_Component_Value): Removed
9294 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9296 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9297 (Get_Simple_Init_Val): Handle Default_Value aspect
9298 (Needs_Simple_Initialization): Handle Default_Value aspect
9299 * exp_ch3.ads: Needs_Simple_Initialization
9300 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9301 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9303 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9304 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9305 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9307 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9309 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9310 package containing iteration primitives.
9311 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9313 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9315 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9316 "of", pre-analyze expression in case it is a function call with
9317 finalization actions that must be placed ahead of the loop.
9318 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9319 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9321 2011-08-02 Geert Bosch <bosch@adacore.com>
9323 * cstand.adb (Create_Float_Types): Only consider C's long double for
9324 Long_Long_Float, in addition to double.
9326 2011-08-02 Robert Dewar <dewar@adacore.com>
9328 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9329 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9330 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9333 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9335 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9338 2011-08-02 Javier Miranda <miranda@adacore.com>
9340 * einfo.ads, einfo.adb
9341 (Original_Access_Type): Move this attribute to Node26 since there was
9342 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9343 which causes conflicts and breaks the generation of the .NET compiler.
9344 (Interface_Name): Add missing documentation on JGNAT only uses of
9347 2011-08-02 Geert Bosch <bosch@adacore.com>
9349 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9350 (Find_Back_End_Float_Type): Likewise
9351 (Create_Back_End_Float_Types): Likewise
9352 (Create_Float_Types): Likewise
9353 (Register_Float_Type): Likewise
9354 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9355 Nlist and split out type selection in new local Find_Base_Type function.
9356 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9358 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9360 2011-08-02 Robert Dewar <dewar@adacore.com>
9362 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9364 * opt.ads: Minor comment change.
9365 * sem_ch12.adb: Minor code reorganization.
9367 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9369 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9370 subtype's list of rep items to the list on the full subtype in the case
9371 where the lists are the same.
9373 2011-08-02 Geert Bosch <bosch@adacore.com>
9375 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9376 using the one from System.Strings, which also deallocates all strings.
9378 2011-08-02 Geert Bosch <bosch@adacore.com>
9380 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9382 * gcc-interface/Make-lang.in: Update dependencies.
9384 2011-08-02 Olivier Hainque <hainque@adacore.com>
9386 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9389 2011-08-02 Javier Miranda <miranda@adacore.com>
9391 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9392 associated with anonymous access to subprograms.
9394 2011-08-02 Geert Bosch <bosch@adacore.com>
9397 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9398 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9399 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9400 (Add_Symbol_Definition): Move to switch-c.adb
9401 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9402 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9403 (Add_Symbol_Definition): Move to switch-c.adb.
9404 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9406 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9408 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9409 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9411 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9412 (Add_Symbol_Definition): Moved from Prepcomp.
9413 * switch-c.ads: Update copyright notice. Use String_List instead of
9414 Argument_List, removing dependency on System.OS_Lib.
9416 2011-08-02 Yannick Moy <moy@adacore.com>
9418 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9419 mode on initialization expression which does not respect SPARK
9421 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9422 if the tree referenced by its argument represents an initialization
9423 expression in SPARK, suitable for initializing an object in an object
9426 2011-08-02 Javier Miranda <miranda@adacore.com>
9428 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9429 internally generated access to subprogram with its associated protected
9431 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9433 2011-08-02 Geert Bosch <bosch@adacore.com>
9435 * cstand.adb (Register_Float_Type): Print information about type to
9436 register, if the Debug_Flag_Dot_B is set.
9437 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9438 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9439 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9440 with a requested precision of more than Max_Digits digits and no more
9441 than Max_Base_Digits digits, if a range specification is present and the
9442 Predefined_Float_Types list has a suitable type to derive from.
9443 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9444 case of type completion with pragma Import
9446 (Process_Import_Predefined_Type): Processing to complete a type
9447 with pragma Import. Currently supports floating point types only.
9448 (Set_Convention_From_Pragma): Do nothing without underlying type.
9449 (Process_Convention): Guard against absence of underlying type,
9450 which may happen when importing incomplete types.
9451 (Process_Import_Or_Interface): Handle case of importing predefined
9452 types. Tweak error message.
9454 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9456 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9457 functions to previous change. Reorganize code slightly.
9459 2011-08-02 Geert Bosch <bosch@adacore.com>
9461 * back_end.ads (Register_Type_Proc): New call back procedure type for
9462 allowing the back end to provide information about available types.
9463 (Register_Back_End_Types): New procedure to register back end types.
9464 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9466 * cstand.adb (Back_End_Float_Types): New list for floating point types
9467 supported by the back end.
9468 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9469 (Copy_Float_Type): New procedure to make new copies of predefined types.
9470 (Register_Float_Type): New call back procedure to populate the BEFT list
9471 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9472 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9473 (Create_Float_Types): New procedure to create entities for floating
9474 point types predefined in Standard, and put these and any remaining
9475 BEFTs on the Predefined_Float_Types list.
9476 * stand.ads (Predefined_Float_Types): New list for predefined floating
9477 point types that do not have declarations in package Standard.
9479 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9481 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9482 entity node for the unit containing the parameter.
9483 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9484 (Add_Inlined_Subprogram): Likewise.
9485 * gcc-interface/Make-lang.in: Update dependencies.
9487 2011-08-02 Thomas Quinot <quinot@adacore.com>
9489 * s-stusta.adb (Print): Make sure Pos is always initialized to a
9492 2011-08-02 Geert Bosch <bosch@adacore.com>
9494 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9496 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9498 * sem_type.adb (Covers): Move trivial case to the top and reuse the
9499 computed value of Base_Type.
9501 2011-08-02 Yannick Moy <moy@adacore.com>
9503 * restrict.adb (Check_Restriction): issue an error for any use of
9504 class-wide, even if the No_Dispatch restriction is not set.
9505 * sem_aggr.adb: Correct typos in comments and messages in formal mode
9506 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9507 when completing a private extension, the type named in the private part
9508 is not the same as that named in the visible part.
9509 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9510 of an inherited primitive operations of a tagged type or type extension
9511 that returns the tagged type.
9512 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9513 function which returns True for an implicit operation inherited by the
9514 derived type declaration for the argument type.
9515 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9518 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9520 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9521 Process_Bounds, to perform analysis with expansion of a range or an
9522 expression that is the iteration scheme for a loop.
9523 (Analyze_Iterator_Specification): If domain of iteration is given by a
9524 function call with a controlled result, as is the case if call returns
9525 a predefined container, ensure that finalization actions are properly
9527 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9529 2011-08-02 Javier Miranda <miranda@adacore.com>
9531 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9532 * gcc-interface/Make-lang.in: Update dependencies.
9534 2011-08-02 Javier Miranda <miranda@adacore.com>
9536 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9537 determine if the analysis is performed using N or Original_Node (N).
9538 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9539 functionality of routine Is_Variable avoids code duplication.
9540 * checks.adb (Determine_Range): Handle temporaries generated by
9541 Remove_Side_Effects.
9543 2011-08-02 Javier Miranda <miranda@adacore.com>
9545 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9546 expansion of the condition. Required since the previous analysis was
9547 done with expansion disabled (see Resolve_Quantified_Expression) and
9548 hence checks were not inserted and record comparisons have not been
9551 2011-08-02 Ed Falis <falis@adacore.com>
9553 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9556 2011-08-02 Bob Duff <duff@adacore.com>
9558 * opt.ads: Minor comment fix.
9560 2011-08-02 Bob Duff <duff@adacore.com>
9562 * sem_ch12.adb (Analyze_Package_Instantiation,
9563 Analyze_Subprogram_Instantiation): Turn off style checking while
9564 analyzing an instance. Whatever style checks that apply to the generic
9565 unit should apply, so it makes no sense to apply them in an instance.
9566 This was causing trouble when compiling an instance of a runtime
9567 unit that violates the -gnatyO switch.
9568 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9569 one of the two case statements, causing spurious errors.
9571 2011-08-02 Robert Dewar <dewar@adacore.com>
9573 * uname.adb: Minor reformatting.
9574 * gnatcmd.adb: Minor reformatting.
9575 * exp_attr.adb: Minor reformatting.
9577 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9579 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9580 No_Dispatching_Calls, do not look for the Assign primitive, because
9581 predefined primitives are not created in this case.
9583 2011-08-02 Bob Duff <duff@adacore.com>
9585 * stylesw.ads: Minor comment fixes.
9587 2011-08-02 Robert Dewar <dewar@adacore.com>
9589 * freeze.adb (Add_To_Result): New procedure.
9591 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9593 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9594 time, if the specific run-time routines for handling streams of strings
9595 are not available, use the default mechanism.
9597 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9599 * s-regpat.ads: Fix typo.
9601 2011-08-02 Vincent Celier <celier@adacore.com>
9603 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9604 not null, call it to create the in memory config project file without
9605 parsing an existing default config project file.
9607 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9609 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9611 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9613 * sem_elim.adb: an abstract subprogram does not need an eliminate
9614 pragma for its descendant to be eliminable.
9616 2011-08-02 Ed Falis <falis@adacore.com>
9618 * init.c: revert to handling before previous checkin for VxWorks
9619 * s-intman-vxworks.adb: delete unnecessary declarations related to
9620 using Ada interrupt facilities for handling signals.
9621 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9622 * s-intman-vxworks.ads: Import __gnat_install_handler as
9623 Initialize_Interrupts.
9624 * s-taprop-vxworks.adb: Delete Signal_Mask.
9625 (Abort_Handler): change construction of mask to unblock exception
9628 2011-08-02 Jerome Guitton <guitton@adacore.com>
9630 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9631 Debug_Raise_Exception before propagation starts.
9633 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9635 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9636 to Restriction_Check_Required.
9637 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9638 * sem_res.adb (Resolve_Call): Likewise.
9639 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9641 2011-08-02 Bob Duff <duff@adacore.com>
9643 * stylesw.ads: Update comment.
9644 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9645 * errout.ads: Remove obsolete comment.
9647 2011-08-02 Javier Miranda <miranda@adacore.com>
9649 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9650 (Set_Is_Safe_To_Reevaluate): new procedure.
9651 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9652 assignment is allowed on safe-to-reevaluate variables.
9653 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9654 temporary created to remove side effects in expressions that use
9655 the secondary stack as safe-to-reevaluate.
9656 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9657 variables that are not true constants.
9659 2011-08-02 Robert Dewar <dewar@adacore.com>
9661 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9662 sem_res.adb, sem_ch6.adb: Minor reformatting.
9664 2011-08-02 Jerome Guitton <guitton@adacore.com>
9666 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9668 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9670 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9671 not set Overridden_Operation if subprogram is an initialization
9674 2011-08-02 Yannick Moy <moy@adacore.com>
9676 * par-ch6.adb: Correct obsolete name in comments
9677 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9678 which takes two message arguments (existing function takes one), with
9679 second message used for continuation.
9680 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9681 block statements that originate from a source block statement, not
9682 generated block statements
9683 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9684 symmetry with procedure case
9685 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9686 function to issue an error in formal mode if a package specification
9687 contains more than one tagged type or type extension.
9688 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9689 parameters matching formals of tagged types are objects (or ancestor
9690 type conversions of objects), not general expressions. Issue an error
9691 on view conversions that are not involving ancestor conversion of an
9693 (Resolve_Type_Conversion): in formal mode, issue an error on the
9694 operand of an ancestor type conversion which is not an object
9695 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9696 procedure so that it works also for actuals of function calls
9697 (Is_Actual_Tagged_Parameter): new function which determines if its
9698 argument is an actual parameter of a formal of tagged type in a
9700 (Is_SPARK_Object_Reference): new function which determines if the tree
9701 referenced by its argument represents an object in SPARK
9703 2011-08-02 Robert Dewar <dewar@adacore.com>
9705 * sem_ch3.adb: Minor reformatting
9706 Minor comment addition
9707 Minor error msg text change
9709 2011-08-02 Javier Miranda <miranda@adacore.com>
9711 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9712 function. Used to be more precise when we generate a variable plus one
9713 assignment to remove side effects in the evaluation of the Bound
9715 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9716 of the bound expression to force its re-analysis and thus expand the
9717 associated transient scope (if required). Code cleanup replacing the
9718 previous code that declared the constant entity by an invocation to
9719 routine Force_Evaluation which centralizes this work in the frontend.
9721 2011-08-02 Robert Dewar <dewar@adacore.com>
9723 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9724 (Base_Type): Now uses improved Is_Base_Type function
9725 * einfo.ads (Base_Type): Inline this function
9727 2011-08-02 Robert Dewar <dewar@adacore.com>
9729 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9730 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9732 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9734 * gcc-interface/Make-lang.in: Update dependencies.
9735 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9738 2011-08-02 Yannick Moy <moy@adacore.com>
9740 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9741 non-simple expression used in delta constraint
9742 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9743 index constraint which is not a subtype mark
9744 * par.adb: With and use Restrict
9745 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9746 mode on component type which is not a subtype mark and default
9747 expression on component
9748 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9749 of string which does not have a lower index bound equal to 1
9750 (Array_Type_Declaration): issue an error in formal mode on index or
9751 component type which is not a subtype mark, and on aliased keyword on
9753 (Derived_Type_Declaration): issue an error in formal mode on interface,
9754 limited or abstract type
9755 (Record_Type_Declaration): issue an error in formal mode on interface
9756 (Record_Type_Definition): issue an error in formal mode on tagged types
9757 and type extensions not declared in the specification of a library unit
9758 package; on null non-tagged record; on variant part
9760 2011-08-02 Vincent Celier <celier@adacore.com>
9762 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9763 not declared for qualified library project when Library_Name is not
9764 declared, but Library_Dir is.
9766 2011-08-02 Robert Dewar <dewar@adacore.com>
9768 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9769 pragmas (affects aspects [Component_]Default_Value
9770 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9771 component type for the resolution
9773 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9775 * einfo.adb (Base_Type): Tune implementation for speed.
9777 2011-08-02 Robert Dewar <dewar@adacore.com>
9779 * freeze.adb: Minor reformatting.
9781 2011-08-02 Thomas Quinot <quinot@adacore.com>
9783 * scos.ads: Update comments.
9785 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9787 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9788 base type, because the parent may be a subtype of a private type whose
9789 convention is established in a private part.
9791 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9793 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9794 statement in a block when the expansion of the return expression has
9795 created a finalization chain.
9796 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9797 with the parent node.
9798 Add N_Extended_Return_Statement to handle the case where a transient
9799 object declaration appears in the Return_Object_Declarations list of
9800 an extended return statement.
9802 2011-08-02 Matthew Gingell <gingell@adacore.com>
9804 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9805 unused parameter 'name'.
9807 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9809 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9810 inherited operation, check whether its alias, which is the source
9811 operastion that it renames, has been marked eliminated.
9813 2011-08-02 Javier Miranda <miranda@adacore.com>
9815 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9816 in-mode parameter whose type is an access type since it can be used to
9817 modify its designated object. Enforce code that handles as safe an
9818 access type that is not access-to-constant but it is the result of a
9819 previous removal of side-effects.
9820 (Remove_Side_Effects): Minor code reorganization of cases which require
9821 no action. Done to incorporate documentation on new cases uncovered
9822 working in this ticket: no action needed if this routine was invoked
9823 too early and the nodes are not yet decorated.
9824 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9825 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9826 were issued with actuals that are implicitly provided by
9829 2011-08-02 Robert Dewar <dewar@adacore.com>
9831 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9833 2011-08-02 Yannick Moy <moy@adacore.com>
9835 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9836 to issue an error in formal mode on attribute not supported in this mode
9837 (Analyze_Attribute): issue errors on standard attributes not supported
9839 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9840 comment, and issue error in formal mode on modulus which is not a power
9842 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9844 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9846 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9847 operator on modular type (except 'not').
9849 2011-08-02 Robert Dewar <dewar@adacore.com>
9851 * gnat_rm.texi: Minor reformatting.
9853 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9855 * s-osinte-linux.ads: Minor comment update and reformatting.
9856 * i-cexten.ads: Make this unit pure, as for its parent.
9857 Will allow its usage in more contexts if needed.
9859 2011-08-02 Robert Dewar <dewar@adacore.com>
9861 * s-utf_32.ads: Minor comment fix.
9863 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9865 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9866 operation of a tagged synchronized type, handle the case where the
9867 controlling argument is overloaded.
9869 2011-08-02 Yannick Moy <moy@adacore.com>
9871 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9872 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9873 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9874 SPARK mode and formal verification mode on processing SPARK restriction
9875 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9876 requiring consistency checking.
9878 2011-08-02 Robert Dewar <dewar@adacore.com>
9880 * sem_res.adb: Minor reformatting.
9882 2011-08-02 Robert Dewar <dewar@adacore.com>
9884 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9885 a-cforse.ads: Remove unneeded with of Ada.Containers
9886 Remove commented out pragma Inline's
9887 Move specifications of new subprograms to the actual specs
9889 2011-08-02 Yannick Moy <moy@adacore.com>
9891 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9892 a-cforse.ads: Update comments.
9894 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9896 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9898 2011-08-02 Robert Dewar <dewar@adacore.com>
9900 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9901 a-cforse.ads, a-cofove.ads: Minor reformatting.
9903 2011-08-02 Claire Dross <dross@adacore.com>
9905 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9906 a-cofove.ads: Add comments.
9908 2011-08-02 Yannick Moy <moy@adacore.com>
9910 * gnat_rm.texi: Document formal containers.
9912 2011-08-02 Emmanuel Briot <briot@adacore.com>
9914 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9917 2011-08-02 Robert Dewar <dewar@adacore.com>
9919 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9922 2011-08-02 Robert Dewar <dewar@adacore.com>
9924 * aspects.adb: New aspects Default_Value and Default_Component_Value
9925 New format of Aspect_Names table checks for omitted entries
9926 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9927 handling of boolean aspects for derived types.
9928 New aspects Default_Value and Default_Component_Value
9929 New format of Aspect_Names table checks for omitted entries
9930 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9931 (Has_Default_Value): New flag
9932 (Has_Default_Component_Value): New flag
9933 (Has_Default_Value): New flag
9934 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9936 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9937 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9938 Default_Value and Default_Component_Value
9939 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9940 New aspects Default_Value and Default_Component_Value
9941 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9942 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9944 2011-08-02 Vincent Celier <celier@adacore.com>
9946 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9947 inherit library kind.
9949 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9951 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9954 2011-08-02 Robert Dewar <dewar@adacore.com>
9956 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9958 2011-08-02 Yannick Moy <moy@adacore.com>
9960 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9962 2011-08-02 Robert Dewar <dewar@adacore.com>
9964 * impunit.adb: Add comment.
9966 2011-08-02 Yannick Moy <moy@adacore.com>
9968 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9969 qualification of aggregates in formal mode
9970 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9972 (Resolve_Aggregate): complete the test that an aggregate is adequately
9973 qualified in formal mode
9975 2011-08-02 Pascal Obry <obry@adacore.com>
9977 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9978 * mlib-prj.adb: Supress warning when compiling binder generated file.
9979 (Build_Library): Supress all warnings when compiling the binder
9982 2011-08-02 Yannick Moy <moy@adacore.com>
9984 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9986 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9987 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9988 Add with/use clauses to make Check_Formal_Restriction visible
9990 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9992 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9993 in-parameters when type of the generic formal is private in the generic
9994 spec and non-private in the body.
9996 2011-08-02 Claire Dross <dross@adacore.com>
9998 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9999 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10000 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10001 * impunit.adb, Makefile.rtl: Take new files into account.
10003 2011-08-02 Robert Dewar <dewar@adacore.com>
10005 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10006 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10008 2011-08-02 Yannick Moy <moy@adacore.com>
10010 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10012 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10013 matching static array bounds, taking into account the special case of
10015 * sem_ch3.adb: Typo in comment.
10017 2011-08-02 Yannick Moy <moy@adacore.com>
10019 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10020 which issues an error in formal mode if its argument node is originally
10022 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10023 has a discriminant specification so that it does not include the case
10025 (Derived_Type_Declaration): move here the test that a derived type has a
10026 discriminant specification
10027 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10028 first element of a component association before accessing its choices
10029 (presence of component association is not enough)
10030 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10031 declaration is a library item before accessing the next element in a
10032 list, as library items are not member of lists
10033 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10034 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10035 Check_Formal_Restriction whenever possible.
10037 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10039 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10040 reference when needed.
10042 2011-08-02 Bob Duff <duff@adacore.com>
10044 * gnat_ugn.texi: Fix typo.
10046 2011-08-02 Vincent Celier <celier@adacore.com>
10048 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10049 archive file name. Do not use the full path name of archives for Open
10052 2011-08-02 Robert Dewar <dewar@adacore.com>
10054 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10055 Analyze_Aspect_Specifications
10057 (Analyze_Aspect_Specifications): New handling for boolean aspects
10058 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10059 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10060 sequence for Analyze_Aspect_Specifications
10061 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10062 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10064 2011-08-02 Robert Dewar <dewar@adacore.com>
10066 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10067 aspects, since these no longer exist.
10069 2011-08-02 Robert Dewar <dewar@adacore.com>
10071 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10072 semicolon, do not try to see if there are aspects following it.
10073 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10076 2011-08-02 Robert Dewar <dewar@adacore.com>
10078 * sem_ch8.adb, aspects.ads: Minor reformatting.
10080 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10082 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10083 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10085 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10087 2011-08-02 Yannick Moy <moy@adacore.com>
10089 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10090 mode on subprogram declaration outside of package specification, unless
10091 it is followed by a pragma Import
10092 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10093 Access_Type_Declaration): issue error in formal mode on access type
10094 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10096 (Analyze_Object_Declaration): issue error in formal mode on object
10097 declaration which does not respect SPARK restrictions
10098 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10099 declaration which does not respect SPARK restrictions
10100 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10101 error in formal mode on digits or delta constraint
10102 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10103 decimal fixed point type
10104 (Derived_Type_Declaration): issue error in formal mode on derived type
10105 other than type extensions of tagged record types
10106 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10107 with check on access definition
10108 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10109 mode on protected definition.
10110 (Analyze_Task_Definition): issue error in formal mode on task definition
10112 2011-08-02 Robert Dewar <dewar@adacore.com>
10114 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10116 2011-08-02 Javier Miranda <miranda@adacore.com>
10118 * sem_ch6.adb (Can_Override_Operator): New function.
10119 (Verify_Overriding_Indicator): Add missing code to check overriding
10120 indicator in operators. Fixes regression.
10121 (Check_Overriding_Indicator): Minor reformating after replacing the
10122 code that evaluates if the subprogram can override an operator by
10123 invocations to the above new function.
10125 (Write_Field26_Name): Add missing code to ensure that, following
10126 the documentation in einfo.ads, this field is not shown as attribute
10127 "Static_Initialization" on non-dispatching functions.
10129 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10131 * sem_res.adb (Resolve_Call): A call to
10132 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10133 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10134 i.e., when the second parameter is of type Time_Span.
10136 2011-08-02 Vincent Celier <celier@adacore.com>
10138 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10139 with an archive instead of -L<library dir> -l<library name>.
10141 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10143 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10144 mark the base types In_Use in addition to making the operations
10147 2011-08-02 Ed Falis <falis@adacore.com>
10149 * init.c: add and setup __gnat_signal_mask for the exception signals
10150 * s-inmaop-vxworks.adb: new file.
10151 * s-intman-vxworks.adb: remove unnecessary initializations and
10153 * s-intman-vxworks.ads: remove unnecessary variable
10154 * s-taprop-vxworks.adb: simplify signal initialization
10156 2011-08-02 Robert Dewar <dewar@adacore.com>
10158 * sem_ch8.adb: Minor code reorganization, comment updates.
10160 2011-08-02 Robert Dewar <dewar@adacore.com>
10162 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10163 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10165 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10166 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10168 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10170 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10171 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10172 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10173 use_type_clauses, to handle more efficiently use_type and use_all_type
10175 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10176 Ada2012 Use_All_Type clause.
10177 (Use_Class_Wide_Operations): new procedure.
10179 2011-08-02 Robert Dewar <dewar@adacore.com>
10181 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10182 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10183 expression to expression function.
10185 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10187 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10188 if types are compatible.
10190 2011-08-02 Yannick Moy <moy@adacore.com>
10192 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10193 returns True if its argument array types have same dimension and same
10194 static bounds at each index.
10195 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10196 OUT or IN OUT paramaters which are not view conversions in SPARK.
10197 (Resolve_Arithmetic_Op): issue an error in formal mode on
10198 multiplication or division with operands of fixed point types which are
10199 not qualified or explicitly converted.
10200 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10201 Boolean or array type (except String) operands.
10202 (Resolve_Equality_Op): issue an error in formal mode on equality
10203 operators for array types other than String with non-matching static
10205 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10206 for array types with non-matching static bounds. Factorize the code in
10207 Matching_Static_Array_Bounds.
10208 (Resolve_Qualified_Expression): issue an error in formal mode on
10209 qualified expressions for array types with non-matching static bounds.
10210 (Resolve_Type_Conversion): issue an error in formal mode on type
10211 conversion for array types with non-matching static bounds
10213 2011-08-02 Robert Dewar <dewar@adacore.com>
10215 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10217 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10219 * par-ch9.adb: save location of entry for proper error message.
10221 2011-08-02 Javier Miranda <miranda@adacore.com>
10223 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10224 (Use_Full_View) which permits this routine to climb through the
10225 ancestors using the full-view of private parents.
10226 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10227 Use_Full_View to true in calls to Is_Ancestor.
10228 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10229 true in call to Is_Ancestor.
10230 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10231 Use_Full_View to true in call to Is_Ancestor.
10232 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10233 call to Is_Ancestor.
10234 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10235 Use_Full_View to true in calls to Is_Ancestor.
10236 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10237 Make_Select_Specific_Data_Table, Register_Primitive,
10238 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10239 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10240 to true in call to Is_Ancestor.
10241 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10242 Use_Full_View to true in calls to Is_Ancestor.
10244 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10245 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10247 2011-08-02 Robert Dewar <dewar@adacore.com>
10249 * gnat_rm.texi: Minor reformatting.
10250 * sem_prag.adb: Minor reformatting.
10252 2011-08-02 Tristan Gingold <gingold@adacore.com>
10254 * vms_data.ads: Add VMS qualifier for -gnateP.
10256 2011-08-02 Robert Dewar <dewar@adacore.com>
10258 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10259 * par-ch7.adb (P_Package): Proper placement of aspects for package
10260 decl/instantiation.
10261 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10262 (End_Statements): Add Is_Sloc parameterr
10263 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10264 (Check_End): Ad Is_Sloc parameter
10265 (End_Statements): Add Is_Sloc parameterr
10267 2011-08-02 Vincent Celier <celier@adacore.com>
10269 * ug_words: Add VMS qualifier equivalent to -gnateP:
10270 /SYMBOL_PREPROCESSING.
10272 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10274 * gnat-style.texi: For hexadecimal numeric literals the typical
10275 grouping of digits is 4 to represent 2 bytes.
10276 A procedure spec which is split into several lines is indented two
10279 2011-08-02 Yannick Moy <moy@adacore.com>
10281 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10282 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10283 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10285 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10286 choice in array aggregate
10287 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10289 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10290 positional and named aggregate for record, or others in record
10291 aggregate, or multiple choice in record aggregate
10292 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10293 array operands to logical operations AND, OR and XOR do not have the
10294 same static lower and higher bounds
10295 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10297 2011-08-01 Robert Dewar <dewar@adacore.com>
10299 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10300 Replaces Last_Source_Node_In_Sequence.
10301 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10302 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10303 parens and blank in string (this was inconsistently implemented).
10305 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10306 blank in string (this was inconsistently implemented).
10308 (Set_Global_Switches): Set formal mode switches appropriately
10309 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10311 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10312 call Set_Error_Msg_Lang to set "spark" as language name.
10313 * par.adb: Remove unnecessary call to set formal language for errout
10314 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10315 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10317 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10318 calls to it, moved after resolution so that types are known
10319 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10320 result of concatenation is not of type String
10321 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10322 concatenation is not properly restricted
10323 * gnat_rm.texi: Add doc on pragma Spark_95.
10324 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10325 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10326 * gcc-interface/Make-lang.in: Update dependencies.
10328 2011-08-01 Javier Miranda <miranda@adacore.com>
10330 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10331 condition that detects if the overridden operation must replace an
10334 2011-08-01 Javier Miranda <miranda@adacore.com>
10336 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10337 code declarations inserted by Insert_Actions in each alternative of the
10338 N_Case_Expression node.
10340 2011-08-01 Robert Dewar <dewar@adacore.com>
10342 * sem_ch6.adb: Minor code reorganization.
10343 * sem_util.adb: Minor reformatting.
10345 2011-08-01 Pascal Obry <obry@adacore.com>
10347 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10348 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10350 2011-08-01 Yannick Moy <moy@adacore.com>
10352 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10353 literal or operator symbol which is prefixed
10354 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10355 mode on access attributes.
10356 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10357 that concatenation operands are properly restricted in formal mode
10358 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10359 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10360 result of the concatenation has a type different from String.
10361 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10362 Analyze_Quantified_Expression, Analyze_Slice,
10363 Analyze_Null): issue an error in formal mode on unsupported constructs
10365 (Analyze_Block_Statement): only issue error on source block statement
10366 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10367 function which returns the last node in a list of nodes for which
10368 Comes_From_Source returns True, if any
10369 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10370 Last_Source_Node_In_Sequence
10371 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10372 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10373 mode on unsupported constructs
10374 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10375 rest of the actions may be needed later on since the error is marked as
10377 * sinfo.ads: Typos in comments.
10379 2011-08-01 Pascal Obry <obry@adacore.com>
10381 * projects.texi: Minor editing.
10383 2011-08-01 Yannick Moy <moy@adacore.com>
10385 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10386 insertion character ~~
10387 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10388 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10389 with insertion character ~~
10390 (Set_Msg_Text): treat insertion character ~~
10391 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10392 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10393 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10394 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10395 errors related to the formal language restriction not serious
10396 (insertion character |).
10397 * par.adb (Par): set formal language for error messages if needed
10398 * sem_ch6.adb (Check_Missing_Return): take into account possible
10399 generated statements at the end of the function
10400 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10401 enumeration value to define a new pragma SPARK_95
10402 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10403 SPARK_Version): new type and variables to store the SPARK version
10405 (SPARK_Mode): return True when SPARK_Version is set
10406 * par-prag.adb: Correct indentation
10407 (Prag): take Pragma_SPARK_95 into account
10408 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10411 2011-08-01 Robert Dewar <dewar@adacore.com>
10413 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10414 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10415 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10417 2011-08-01 Pascal Obry <obry@adacore.com>
10419 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10420 Target_Name to Get_Path call.
10421 (Parse_Single_Project): Likewise.
10422 (Post_Parse_Context_Clause): Likewise.
10423 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10424 Call Initialise_Project_Path with the proper Target_Name.
10425 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10427 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10428 with the proper Target_Name.
10429 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10430 Part.Parse routine.
10431 (Parse_Project_And_Apply_Config): Likewise.
10432 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10433 This is fine as this part of the code is supporting only native
10435 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10436 is fine as this part of the code is supporting only native compilation.
10438 2011-08-01 Yannick Moy <moy@adacore.com>
10440 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10441 of homonym, unless the homonym is one of the cases allowed in SPARK
10442 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10443 package declaration occurring after a body.
10445 2011-08-01 Robert Dewar <dewar@adacore.com>
10447 * checks.adb, exp_ch4.adb: Minor reformatting.
10449 2011-08-01 Javier Miranda <miranda@adacore.com>
10451 * einfo.ads (Access_Disp_Table): Fix documentation.
10452 (Dispatch_Table_Wrappers): Fix documentation.
10454 2011-08-01 Pascal Obry <obry@adacore.com>
10456 * prj-env.adb, prj-env.ads: Minor reformatting.
10458 2011-08-01 Yannick Moy <moy@adacore.com>
10460 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10461 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10462 procedures out of these packages.
10463 * errout.ads, errout.adb
10464 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10465 procedures in of this package
10466 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10467 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10468 on misplaced later vs initial declarations, like in Ada 83
10469 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10470 formal mode on attribute of private type whose full type declaration
10472 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10473 package declaration inside a package specification
10474 (Analyze_Full_Type_Declaration): issue error in formal mode on
10475 controlled type or discriminant type
10476 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10477 user-defined operator means that it should come from the source
10478 (New_Overloaded_Entity): issue error in formal mode on overloaded
10480 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10482 2011-08-01 Thomas Quinot <quinot@adacore.com>
10484 * atree.adb: Minor reformatting.
10485 * checks.adb: Minor reformatting.
10487 2011-08-01 Vincent Celier <celier@adacore.com>
10489 * s-parame-vms-ia64.ads: Fix typo in comment
10491 * s-parame-vms-restrict.ads: Removed, unused.
10493 2011-08-01 Javier Miranda <miranda@adacore.com>
10496 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10498 (Constrain_Index): Remove side effects in the evaluation of the bounds.
10499 * sem_ch3.ads, sem_ch3.adb
10500 (Is_Constant_Bound): New extended version of the subprogram that was
10501 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10502 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10503 * sem_aux.ads (Constant_Value): Fix typo in comment.
10504 * checks.adb (Generate_Index_Checks): New implementation which, for
10505 array objects with constant bounds, generates the runtime check
10506 referencing the bounds of the array type. For other cases this routine
10507 provides its previous behavior obtaining such values from the array
10509 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10511 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10512 we cannot have semantic interpretations of the new node.
10514 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10516 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10519 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10521 * sem_ch8.adb: Minor code editing.
10522 * s-vxwext.adb: Remove trailing space.
10523 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10524 consistency with other files.
10526 2011-08-01 Thomas Quinot <quinot@adacore.com>
10528 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10530 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10532 * par-ch10.adb: reject parameterized expressions as compilation unit.
10533 * sem_ch4.adb: handle properly conditional expression with overloaded
10534 then_clause and no else_clause.
10536 2011-08-01 Tristan Gingold <gingold@adacore.com>
10538 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10539 like done by System.Aux_DEC.
10540 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10542 2011-08-01 Yannick Moy <moy@adacore.com>
10544 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10545 missing label at end of declaration (subprogram or package)
10546 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10547 of positional and named parameter association
10548 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10549 Error_Msg_SP which adds a prefix to the error message giving the name
10550 of the formal language analyzed
10551 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10552 access result type in subprogram, unconstrained array as result type,.
10553 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10555 * sem_ch8.adb: Code clean up.
10557 2011-08-01 Javier Miranda <miranda@adacore.com>
10559 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10560 * einfo.ads (Access_Disp_Table): Fix documentation.
10561 (Dispatch_Table_Wrappers): Fix documentation.
10562 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10563 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10564 to enforce the documentation of this attribute.
10565 (Set_Is_Interface): Cleanup the assertion.
10566 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10567 the Underlying_Type entity before reading attribute Access_Disp_Table.
10568 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10569 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10570 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10571 the Underlying_Type entity before reading attribute Access_Disp_Table.
10572 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10573 Locate the Underlying_Type entity before reading attribute
10576 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10578 * s-poosiz.ads: Additional overriding indicators.
10580 2011-08-01 Yannick Moy <moy@adacore.com>
10582 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10584 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10585 parameter specification does not include a subtype mark.
10586 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10587 formal mode on abstract subprogram.
10588 (Analyze_Subprogram_Specification): issue error in formal mode on
10589 user-defined operator.
10590 (Process_Formals): issue error in formal mode on access parameter and
10591 default expression.
10592 * sem_ch9.adb (Analyze_Abort_Statement,
10593 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10594 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10595 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10596 Analyze_Requeue, Analyze_Selective_Accept,
10597 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10598 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10599 issue error in formal mode on user-defined raise statement.
10601 2011-08-01 Thomas Quinot <quinot@adacore.com>
10603 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10604 declaration being hidden when overriding an implicit inherited
10606 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10607 (-gnats), do not complain about a source file that contains only a
10610 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10612 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10613 variable if already set.
10615 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10617 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10618 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10619 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10620 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10621 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10622 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10623 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10624 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10625 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10626 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10627 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10628 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10629 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10630 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10631 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10632 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10633 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10634 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10635 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10636 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10637 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10638 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10639 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10640 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10641 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10642 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10643 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10644 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10645 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10646 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10647 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10648 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10649 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10650 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10651 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10652 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10653 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10654 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10655 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10656 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10657 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10658 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10659 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10660 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10661 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10662 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10663 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10664 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10665 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10666 Use GNAT instead of GNARL.
10668 2011-08-01 Bob Duff <duff@adacore.com>
10670 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10671 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10672 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10675 2011-08-01 Yannick Moy <moy@adacore.com>
10677 * debug.adb (d.D) reverve flag for the SPARK mode
10678 (d.E) reverve flag for SPARK generation mode
10679 (d.F) reverve flag for Why generation mode
10680 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10681 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10682 functions which return True when the corresponding modes are set
10683 (Formal_Language): return "spark" or "alfa" when in formal verification
10685 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10686 Error_Msg to prefix the error message with a tag giving the formal
10688 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10689 message with a tag giving the formal language
10690 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10692 (Analyze_Case_Statement): issue error in formal mode on case statement
10693 with a single "others" case alternative
10694 (Analyze_Exit_Statement): issue errors in formal mode on exit
10695 statements which do not respect SPARK restrictions
10696 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10697 (Check_Unreachable_Code): always issue an error (not a warning) in
10698 formal mode on unreachable code (concerns both code after an infinite
10699 loop and after an unconditional jump, both not allowed in SPARK)
10700 * sem_ch6.adb (Analyze_Return_Statement): add call to
10701 Set_Return_Present for a procedure containing a return statement
10702 (already done for functions in Analyze_Function_Return)
10703 (Analyze_Function_Return): issue error in formal mode on extended
10704 return or if return is not last statement in function
10705 (Check_Missing_Return): issue error in formal mode if function does
10706 not end with return or if procedure contains a return
10707 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10708 function to detect if there is an inner scope of its parameter S which
10711 2011-08-01 Thomas Quinot <quinot@adacore.com>
10713 * sem_ch6.ads: Minor reformatting.
10715 2011-08-01 Javier Miranda <miranda@adacore.com>
10717 * sem_util.adb (Abstract_Interface_List): Complete condition when
10718 processing private type declarations to avoid reading unavailable
10720 (Is_Synchronized_Tagged_Type): Complete condition when processing
10721 private extension declaration nodes to avoid reading unavailable
10724 2011-08-01 Thomas Quinot <quinot@adacore.com>
10726 * sem_ch3.adb: Minor reformatting.
10728 2011-08-01 Thomas Quinot <quinot@adacore.com>
10730 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10731 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10732 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10733 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10734 for VMS, instead parametrize the common implementation with
10735 System.Parameters declarations.
10737 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10739 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10741 2011-08-01 Tristan Gingold <gingold@adacore.com>
10743 * seh_init.c: Fix SEH handler installation on win64.
10745 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10747 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10748 double analysis of an anonymous access to subprogram, because it can
10749 lead to improper sharing of profiles and a back-end crash.
10751 2011-08-01 Robert Dewar <dewar@adacore.com>
10753 * make.adb, sem_ch4.adb: Minor reformatting.
10754 * gcc-interface/Make-lang.in: Update dependencies.
10755 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10757 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10759 * gnat_rm.texi: Fix definition of Long_Integer.
10761 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10763 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10764 to prevent storage exhaustion.
10765 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10766 finalized is a function body, insert the cleanup code before the final
10767 return statement, to prevent spurious warnings.
10768 * s-pooglo.ads: add overriding indicator.
10770 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10772 * sem_ch4.adb (Operator_Check): improve error message when both a
10773 with_clause and a use_clause are needed to make operator usage legal.
10774 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10775 determine whether a compilation unit is visible within an other,
10776 either through a with_clause in the current unit, or a with_clause in
10777 its library unit or one one of its parents.
10779 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10781 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10782 over an arbitrary expression of an array or container type.
10783 * lib-xref.adb: clarify comment.
10785 2011-08-01 Bob Duff <duff@adacore.com>
10787 * einfo.ads: Minor reformatting.
10788 * debug.adb: Minor comment improvement.
10790 2011-08-01 Javier Miranda <miranda@adacore.com>
10792 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10793 consider hidden subprograms as valid candidates.
10795 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10797 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10799 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10801 * gnat_ugn.texi: Fix typo.
10803 2011-08-01 Robert Dewar <dewar@adacore.com>
10805 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10806 lib-xref.adb: Minor reformatting
10808 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10810 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10811 when to generate a call to Move_Final_List.
10812 (Has_Controlled_Parts): Remove this function.
10814 2011-08-01 Geert Bosch <bosch@adacore.com>
10816 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10817 "," in choice list.
10819 2011-08-01 Thomas Quinot <quinot@adacore.com>
10821 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10822 explicit raise of a predefined exception as Comes_From_Source if the
10823 original N_Raise_Statement comes from source.
10825 2011-08-01 Robert Dewar <dewar@adacore.com>
10827 * sinfo.ads: Add comment.
10828 * sem_ch6.adb: Minor reformatting.
10830 2011-08-01 Robert Dewar <dewar@adacore.com>
10832 * freeze.adb (Freeze_Entity): Refine check for bad component size
10833 clause to avoid rejecting confirming clause when atomic/aliased present.
10835 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10837 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10838 better determine whether an entity reference is a write.
10839 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10841 * lib-xref.adb (Output_References): Do no suppress a read reference at
10842 the same location as an immediately preceeding modify-reference, to
10843 handle properly in-out actuals.
10845 2011-08-01 Tristan Gingold <gingold@adacore.com>
10847 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10849 2011-08-01 Quentin Ochem <ochem@adacore.com>
10851 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10852 heap to compute the result.
10854 2011-08-01 Robert Dewar <dewar@adacore.com>
10856 * atree.ads: Minor reformatting.
10858 2011-08-01 Emmanuel Briot <briot@adacore.com>
10860 * g-expect.adb (Get_Command_Output): Fix memory leak.
10862 2011-08-01 Geert Bosch <bosch@adacore.com>
10864 * cstand.adb (P_Float_Type): New procedure to print the definition of
10865 predefined fpt types.
10866 (P_Mixed_Name): New procedure to print a name using mixed case
10867 (Print_Standard): Use P_Float_Type for printing floating point types
10868 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10869 precision IEEE float.
10871 2011-08-01 Thomas Quinot <quinot@adacore.com>
10873 * sem_ch3.adb: Minor reformatting.
10875 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10877 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10878 the completion of a generic function, insert the new body rather than
10879 rewriting the original.
10881 2011-08-01 Yannick Moy <moy@adacore.com>
10883 * sinfo.ads, errout.ads: Typos in comments.
10885 2011-08-01 Robert Dewar <dewar@adacore.com>
10887 * par-endh.adb: Minor reformatting.
10889 2011-08-01 Robert Dewar <dewar@adacore.com>
10891 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10892 (Pre_Post_Aspects): New subtype.
10893 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10894 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10895 * par-ch7.adb (P_Package): Remove Decl parameter
10896 (P_Package): Handle new syntax for aspects (before IS)
10897 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10899 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10900 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10901 (P_Package): Remove Decl parameter
10902 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10904 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10906 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10907 * sinfo.ads: Document new syntax for aspects in packages etc.
10908 * sprint.adb: Handle new syntax of aspects before IS in package
10910 2011-08-01 Thomas Quinot <quinot@adacore.com>
10912 * atree.ads: Minor reformatting.
10913 * sem_prag.adb: Minor reformatting.
10915 2011-08-01 Robert Dewar <dewar@adacore.com>
10917 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10918 case expr alternative.
10920 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10922 * sem_ch12.adb: Fix typo.
10924 2011-08-01 Geert Bosch <bosch@adacore.com>
10926 * sem_prag.adb (Check_No_Link_Name): New procedure.
10927 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10928 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10929 instead of Standard_Long_Long_Float_Size global. Preparation for
10930 eventual removal of per type constants.
10931 * exp_util.ads (Get_Stream_Size): New function returning the stream
10932 size value of subtype E.
10933 * exp_util.adb (Get_Stream_Size): Implement new function.
10934 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10936 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10938 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10940 2011-08-01 Geert Bosch <bosch@adacore.com>
10942 * cstand.adb: Fix comments.
10943 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10944 count of arguments.
10946 2011-08-01 Robert Dewar <dewar@adacore.com>
10948 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10950 2011-08-01 Geert Bosch <bosch@adacore.com>
10952 * atree.ads: Fix comment.
10954 2011-08-01 Robert Dewar <dewar@adacore.com>
10956 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10957 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10958 * par.adb: Add with for Namet.Sp.
10959 * par-tchk.adb: Minor reformatting.
10961 2011-08-01 Vincent Celier <celier@adacore.com>
10963 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10964 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10965 of the init procedure of a SAL.
10966 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10969 2011-08-01 Thomas Quinot <quinot@adacore.com>
10971 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10974 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10976 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10978 2011-08-01 Thomas Quinot <quinot@adacore.com>
10980 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10981 conformant with its spec (return True only for types that have
10982 an overriding Initialize primitive operation that prevents them from
10983 having preelaborable initialization).
10984 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10985 initialization for controlled types in Ada 2005 or later mode.
10987 2011-08-01 Robert Dewar <dewar@adacore.com>
10989 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10991 (Same_Aspect): New function.
10992 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10993 Type_Invariant, Precondition, Postcondition.
10994 * snames.ads-tmpl: Add Name_Type_Invariant.
10996 2011-08-01 Robert Dewar <dewar@adacore.com>
10998 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11000 (Freeze_All_Ent): Fix error in handling inherited aspects.
11001 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11002 already analyzed, but don't skip entire processing of a declaration,
11003 that's wrong in some cases of declarations being rewritten.
11004 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11005 Don't delay for integer, string literals
11006 Treat predicates in usual manner for delay, remove special case code,
11008 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11009 (Build_Predicate_Function): Update saved expression in aspect
11010 (Build_Invariant_Procedure): Update saved expression in aspect
11011 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11012 of replacement of discriminant references if the reference is simple.
11014 2011-08-01 Robert Dewar <dewar@adacore.com>
11016 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11017 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11018 Static_Predicate and Dynamic_Predicate.
11019 (Build_Predicate_Function): Add processing for Static_Predicate
11020 and Dynamic_Predicate.
11021 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11022 (From_Static_Predicate): New flag
11023 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11025 2011-08-01 Robert Dewar <dewar@adacore.com>
11027 * usage.adb: Documentation cleanup for Ada version modes in usage.
11028 * expander.adb: Minor reformatting.
11030 2011-08-01 Robert Dewar <dewar@adacore.com>
11032 * atree.ads: Minor comment fix.
11033 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11034 a-witeio.ads, sem_prag.adb: Minor reformatting.
11036 2011-08-01 Doug Rupp <rupp@adacore.com>
11038 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11039 pointers. Use descrip.h header file for convenience. Add some
11042 2011-08-01 Robert Dewar <dewar@adacore.com>
11044 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11045 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11046 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11048 (Check_Aspect_At_End_Of_Declarations): New procedure
11049 (Analye_Aspect_Specification): Minor changes for above procedures
11050 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11051 specification node as well.
11053 2011-08-01 Pascal Obry <obry@adacore.com>
11055 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11056 Windows files. Use GetFilesAttributes() in this case to check for file
11057 existence instead of returning with an error code.
11059 2011-08-01 Vincent Celier <celier@adacore.com>
11061 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11062 High is above Source length.
11064 2011-08-01 Robert Dewar <dewar@adacore.com>
11066 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11068 2011-08-01 Robert Dewar <dewar@adacore.com>
11070 * aspects.ads (Boolean_Aspects): New subtype.
11071 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11072 for derived types in cases where the parent type and derived type have
11074 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11075 with aspects when parent type also has aspects.
11076 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11077 boolean expression at this point).
11078 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11079 accordance with final decision on the Ada 2012 feature.
11080 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11082 2011-08-01 Matthew Heaney <heaney@adacore.com>
11084 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11086 2011-08-01 Pascal Obry <obry@adacore.com>
11088 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11089 Fix Replace_Slice when High is above current string size.
11090 (Replace_Slice): Fix DL computation when High is above current
11093 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11095 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11097 2011-08-01 Matthew Heaney <heaney@adacore.com>
11099 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11102 2011-08-01 Pascal Obry <obry@adacore.com>
11104 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11107 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11109 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11110 access to protected subprograms in generic bodies.
11111 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11112 protected type, indicate that the convention of the subprogram is
11113 Convention_Protected, because it may be used in subsequent declarations
11114 within the protected declaration.
11116 2011-08-01 Vincent Celier <celier@adacore.com>
11118 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11119 and "final" procedures when the name of the library is "ada", to avoid
11120 duplicate symbols "adainit" and "adafinal" in executables.
11122 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11124 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11125 quantified expression that appears within a postcondition and uses the
11126 Ada2012 'Result attribute.
11128 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11130 * init.c (__gnat_error_handler): Cast reason to int.
11131 (__gnat_install_handler): Explain sa_sigaction use.
11133 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11135 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11136 subprogram has copy-in copy-out parameters, try to promote the mode of
11137 the return type if it is passed in registers.
11139 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11141 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11142 left operand as addressable.
11144 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11146 * gcc-interface/gigi.h (build_function_stub): Remove.
11147 (build_return_expr): Likewise.
11148 (convert_vms_descriptor): Declare.
11149 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11150 (build_function_stub): Move to...
11151 * gcc-interface/utils2.c (build_return_expr): Move to...
11152 * gcc-interface/trans.c (build_function_stub): ...here.
11153 (build_return_expr): ...here.
11154 (Subprogram_Body_to_gnu): Add local variable for language_function.
11155 Disconnect the parameter attributes cache, if any, once done with it.
11156 Call end_subprog_body only after setting the end_locus.
11157 Build the stub associated with the function, if any, at the very end.
11158 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11159 variables and streamline control flow.
11161 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11164 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11165 g-trasym-dwarf.adb.
11167 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11170 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11171 Assign to act.sa_sigaction.
11172 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11173 current->return_address to char * before arithmetic.
11175 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11177 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11178 Correct argument types.
11179 Extract code from reason.
11180 (__gnat_install_handler): Assign to act.sa_sigaction.
11182 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11184 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11185 (GNAT1_OBJS): ...here.
11187 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11190 * g-socthi-mingw.adb (Fill): Fix formatting.
11192 * gcc-interface/gigi.h: Move around comment.
11194 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11197 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11199 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11202 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11204 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11206 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11207 range comparison if Pmode is SImode.
11209 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11210 Eric Botcazou <ebotcazou@adacore.com>
11212 * adadecode.c: Wrap up in extern "C" block.
11213 * adadecode.h: Likewise.
11214 * adaint.c: Likewise. Remove 'const' keyword.
11215 * adaint.h: Likewise.
11216 * argv.c: Likewise.
11217 * atree.h: Likewise.
11219 * cstreams.c: Likewise.
11221 * exit.c: Likewise.
11223 * final.c: Likewise.
11224 * init.c: Likewise.
11225 * initialize.c: Likewise.
11226 * link.c: Likewise.
11227 * namet.h: Likewise.
11228 * nlists.h: Likewise.
11229 * raise.c: Likewise.
11230 * raise.h: Likewise.
11231 * repinfo.h: Likewise.
11232 * seh_init.c: Likewise.
11233 * targext.c: Likewise.
11234 * tracebak.c: Likewise.
11235 * uintp.h: Likewise.
11236 * urealp.h: Likewise.
11237 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11238 * xsinfo.adb: Likewise.
11239 * xsnamest.adb: Likewise.
11240 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11241 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11242 * gcc-interface/misc.c: Likewise.
11243 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11244 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11245 ada/targext.o here...
11246 (GNAT_ADA_OBJS): ...and not here.
11247 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11248 (GNATBIND_OBJS): Reorder.
11250 2011-07-07 Richard Henderson <rth@redhat.com>
11252 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11253 dwarf2out_frame_init.
11255 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11257 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11259 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11262 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11264 2011-07-06 Richard Guenther <rguenther@suse.de>
11266 * gcc-interface/misc.c (gnat_init): Merge calls to
11267 build_common_tree_nodes and build_common_tree_nodes_2.
11268 Re-initialize boolean_false_node.
11270 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11271 Olivier Hainque <hainque@adacore.com>
11272 Nicolas Setton <setton@adacore.com>
11274 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11275 the type according to the ARTIFICIAL_P parameter.
11276 (create_type_decl): Likewise.
11277 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11279 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11281 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11282 (gnatbind): Likewise.
11284 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11286 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11288 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11290 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11291 local variable throughout. Remove useless call to Base_Type.
11292 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11293 Take it also into account for the volatileness of the field. Set the
11294 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11296 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11298 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11299 on a dereference built for a by-ref object if it has an address clause.
11301 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11303 * einfo.ads (Address_Taken): Document use for the second argument of
11304 Asm_Input and Asm_Output attributes.
11305 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11306 argument is an entity name, then set Address_Taken on it.
11307 <Attribute_Asm_Output>: Likewise.
11308 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11309 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11310 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11311 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11313 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11315 PR middle-end/46500
11316 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11318 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11320 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11321 (ada/utils.o): Update dependencies.
11322 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11323 ../../../libcpp/libcpp.a.
11324 * gcc-interface/utils.c: Include common/common-target.h.
11325 (process_attributes): Use targetm_common.have_named_sections.
11327 2011-06-07 Richard Guenther <rguenther@suse.de>
11329 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11332 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11334 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11335 TREE_THIS_NOTRAP flag.
11337 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11339 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11342 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11344 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11345 constants whose full view has discriminants specially.
11347 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11349 * gcc-interface/utils.c: Include diagnostic.h.
11350 (gnat_write_global_declarations): Output debug information for all
11351 global type declarations before finalizing the compilation unit.
11352 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11354 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11356 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11358 2011-05-25 Kai Tietz <ktietz@redhat.com>
11360 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11361 initialization instead of const/none-const pointer assignment.
11363 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11365 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11366 $(EXTRA_GNAT1_OBJS).
11367 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11368 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11369 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11370 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11371 libcommon-target.a instead of prefix.o.
11373 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11376 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11378 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11380 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11381 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11382 instead of version.o.
11384 2011-05-18 Kai Tietz <ktietz@redhat.com>
11386 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11387 boolean_false_node instead of integer_zero_node.
11388 (convert_with_check): Likewise.
11389 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11391 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11393 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11394 type of the parameter is an unconstrained array, convert the actual to
11395 the type of the formal in the In Out and Out cases as well.
11397 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11399 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11400 call build_function_type_array or build_varargs_function_type_array
11402 (create_subprog_type): Don't call build_function_type; call
11403 build_function_type_vec instead.
11405 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11407 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11408 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11409 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11411 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11413 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11415 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11416 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11418 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11420 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11422 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11424 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11425 instead of accessing TYPE_ARG_TYPES directly.
11426 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11428 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11431 * gcc-interface/gigi.h (get_variant_part): Declare.
11432 * gcc-interface/decl.c (get_variant_part): Make global.
11433 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11434 types have the same constant size, are record types and T1 has a
11435 variant part while T2 doesn't.
11437 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11439 * gcc-interface/utils.c (begin_subprog_body): Do not call
11441 (end_subprog_body): Likewise.
11443 2011-05-04 Richard Guenther <rguenther@suse.de>
11445 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11447 (pos_to_constructor): Likewise.
11449 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
11450 Eric Botcazou <ebotcazou@adacore.com>
11452 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11453 of build_function_type. Adjust calls to...
11454 (build_raise_check): ...this. Do not take a void_tree parameter.
11455 Call build_function_type_list instead of build_function_type.
11456 Fix head comment and swap couple of conditional blocks.
11458 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11460 * gnatvsn.ads (Library_Version): Bump to 4.7.
11461 (Current_Year): Bump to 2011.
11463 2011-04-29 Michael Matz <matz@suse.de>
11465 * gcc-interface/misc.c (gnat_handle_option): Set
11466 warn_maybe_uninitialized.
11468 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11470 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11471 the Watson/McCabe paper.
11473 2011-04-23 Jim Meyering <meyering@redhat.com>
11475 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11477 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11479 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11482 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11484 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11486 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
11487 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11488 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11489 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11490 <all>: Do not set flags on the reused DECL node coming from an alias.
11491 Set DECL_IGNORED_P on the DECL node built for subprograms if they
11492 don't need debug info here...
11493 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11494 (gigi): Adjust calls to create_subprog_decl.
11495 (build_raise_check): Likewise.
11496 (establish_gnat_vms_condition_handler): Likewise.
11497 (Compilation_Unit_to_gnu): Likewise.
11498 (gnat_to_gnu): Likewise.
11500 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
11502 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11503 (NO_REORDER_ADAFLAGS): New variable.
11504 (EXTRA_GNATTOOLS): Always define.
11505 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11506 Clean up and adjust list of files compiled with special options.
11507 * gcc-interface/Make-lang.in: Likewise.
11508 (ada/decl.o): Cosmetical change.
11509 (ada/misc.o): Remove dependency on $(PLUGIN_H).
11511 2011-04-20 Jim Meyering <meyering@redhat.com>
11513 * initialize.c (__gnat_initialize): Remove useless if-before-free.
11515 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11517 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11518 $(CFLAGS) on the link line.
11520 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11522 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11523 padded type built for the return type if it is unconstrained.
11525 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
11527 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11529 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11531 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11532 before calling TREE_CHAIN.
11533 * gcc-interface/misc.c (gnat_init_ts): New function.
11534 (LANG_HOOKS_INIT_TS): Define.
11536 2011-04-12 Martin Jambor <mjambor@suse.cz>
11538 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11539 instead of cgraph_node.
11541 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11543 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11544 alignment on fields of the RETURN type built for the Copy-In Copy-Out
11547 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11549 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11550 of aggregate types that contain a placeholder.
11552 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11554 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11556 (handle_type_generic_attribute): Likewise.
11558 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11561 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11563 2011-04-04 Kai Tietz <ktietz@redhat.com>
11566 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11569 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11571 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11572 type case, do not strip a padding type around the array type.
11574 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11576 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11579 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11581 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11582 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11583 code for -feliminate-unused-debug-types.
11584 (gnat_post_options): Likewise.
11586 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11588 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11589 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11592 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11594 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11595 DECL_ARTIFICIAL flag on enumeration types.
11597 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11599 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11600 fat pointer types artificial unconditionally.
11601 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11604 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11606 * gcc-interface/gigi.h (get_dummy_type): Declare.
11607 (build_dummy_unc_pointer_types): Likewise.
11608 (finish_fat_pointer_type): Likewise.
11609 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11610 fat pointer type has been built, complete it in place.
11611 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11612 and thin pointers. Remove useless variable.
11613 (finish_fat_pointer_type): Make global and move to...
11614 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11615 (get_dummy_type): New function.
11616 (build_dummy_unc_pointer_types): Likewise.
11617 (gnat_pushdecl): Propage the name to the anonymous variants only.
11618 (update_pointer_to): Only adjust the pointer types in the unconstrained
11621 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11623 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11624 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11625 if this is a Taft amendment type and the full declaration is available.
11626 * gcc-interface/trans.c (process_type): Likewise.
11627 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11628 (process_freeze_entity): Likewise.
11629 * gcc-interface/utils.c (dummy_global): New static variable.
11630 (gnat_write_global_declarations): If there are types declared as used
11631 at the global level, insert them in the global hash table.
11633 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11635 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11636 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11637 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11639 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11640 flag of the type accordingly.
11641 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11643 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11645 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11646 finalizing types when updating the pointers to the designated type.
11647 <all>: Finalize the deferred types even if we didn't defer processing
11648 of incomplete types in this invocation.
11650 2011-04-01 Olivier Hainque <hainque@adacore.com>
11651 Nicolas Setton <setton@adacore.com>
11652 Eric Botcazou <ebotcazou@adacore.com>
11654 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11655 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11657 2011-03-28 Kai Tietz <ktietz@redhat.com>
11659 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11661 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11662 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11664 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11666 2011-03-28 Tristan Gingold <gingold@adacore.com>
11669 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11670 Use ada output of gnatbind.
11671 (ada/b_gnatb.adb): Ditto.
11672 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11673 (ada.mostlyclean, ada.stage1)
11674 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11675 (ada.stagefeedback): Adjust.
11676 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11677 Use ada output of gnatbind.
11678 (b_gnatm.adb): Ditto.
11679 (b_gnatl.o, b_gnatm.o): New rules.
11681 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11683 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11684 for the padded type built to support a specified size or alignment.
11686 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11688 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11689 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11690 unconditionally to the end of the unit when the designated type is
11692 <all>: Rename local variable. Attempt to un-defer types only and do it
11693 for limited_with'ed types as well.
11694 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11695 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11696 consistently and remove redundant call to finalize_from_with_types.
11698 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11700 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11701 subprograms without a previous spec declared in the same unit.
11702 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11703 subprograms at the end of the unit instead of at the beginning.
11704 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11705 isn't public for the special handling of non-inline functions nested
11706 inside inline external functions.
11708 2011-03-25 Jeff Law <law@redhat.com>
11710 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11712 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11714 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11715 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11716 to compute Set_Size_Depends_On_Discriminant.
11717 (Layout_Type): Call it on array types in back-end layout mode.
11718 * sem_util.adb (Requires_Transient_Scope): Return true for array
11719 types only if the size depends on the value of discriminants.
11720 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11721 type if the RHS is a call to a function that returns an unconstrained
11722 type with default discriminant.
11724 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11726 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11727 non-conversion to the nominal result type at the end.
11729 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11731 * gcc-interface/trans.c (create_temporary): New function taken from...
11732 (create_init_temporary): ...here. Call it.
11733 (call_to_gnu): Create the temporary for the return value early, if any.
11734 Create it for a function with copy-in/copy-out parameters if there is
11735 no target; in other cases of copy-in/copy-out, use another temporary.
11736 Push the new binding level lazily. Add and rename local variables.
11738 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11740 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11742 (set_rm_size): Likewise.
11744 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11746 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11747 for the padded type built in order to support a specified alignment.
11748 Fix incorrect formatting.
11750 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11753 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11755 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11757 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11758 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11759 to the end of the list. Adjust recursive call. Rename local variable.
11760 If REORDER is true, reorder components of the record type.
11761 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11762 components_to_record and adjust the parameter list.
11764 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11766 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11767 disabled, use the variable for bounds of loop iteration scheme.
11769 2011-03-21 Kai Tietz <ktietz@redhat.com>
11772 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11774 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11776 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11777 out whether the expression is read-only. Short-circuit placeholder
11778 case and rename a couple of local variables.
11780 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11782 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11783 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11784 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11785 (convert): Deal with conversions from a smaller form type specially.
11787 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11789 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11790 its argument, except for the special -I- switch.
11792 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11794 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11797 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11799 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11801 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11803 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11805 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11806 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11807 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11808 Do not generate the check directly, instead instantiate the template
11809 check present in the descriptor.
11810 (make_descriptor_field): Move around.
11811 (build_vms_descriptor32): Build a template check in the POINTER field.
11812 (build_vms_descriptor): Remove useless suffixes.
11813 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11815 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11818 * targext.c: Include target files if IN_RTS is defined.
11820 2011-01-26 Richard Guenther <rguenther@suse.de>
11823 * targext.c: Include config.h.
11824 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11827 2011-01-04 Pascal Obry <obry@adacore.com>
11828 Eric Botcazou <ebotcazou@adacore.com>
11830 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11832 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11834 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11835 end-of-case on the end label and its associated gotos, if any.
11837 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11839 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11840 expressions of the parameter cache within the statement group of
11841 the CICO mechanism.
11843 2011-01-04 Olivier Hainque <hainque@adacore.com>
11844 Eric Botcazou <ebotcazou@adacore.com>
11846 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11847 (set_end_locus_from_node): New function.
11848 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11849 make and the function end_locus.
11850 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11851 for the elaboration subprogram.
11852 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11853 set the end_locus of the expression as well.
11855 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11858 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11859 variables that are referenced in exception handlers volatile.
11863 Copyright (C) 2011 Free Software Foundation, Inc.
11865 Copying and distribution of this file, with or without modification,
11866 are permitted in any medium without royalty provided the copyright
11867 notice and this notice are preserved.