1 2011-08-29 Thomas Quinot <quinot@adacore.com>
3 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4 Remove unused variables.
6 2011-08-29 Ed Schonberg <schonberg@adacore.com>
8 * sem_res.adb: Remove Build_Explicit_Dereference.
9 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
10 from sem_res.adb, used in analysis of additional constructs.
11 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
12 expansion of iterators.
13 (Is_Object_Reference): Recognize variables rewritten as explicit
14 dereferences in Ada2012.
15 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
16 Reversible_Iterator names, for expansion of Ada2012 iterators.
17 * aspects.ads, aspects.adb (Find_Aspect): Utility.
18 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
19 linked list container.
20 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
21 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
23 2011-08-29 Ed Schonberg <schonberg@adacore.com>
25 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
28 2011-08-29 Vincent Celier <celier@adacore.com>
30 * make.adb (Gnatmake): Get the maximum number of simultaneous
31 compilation processes after the Builder switches has been scanned, as
32 there may include -jnn.
34 2011-08-29 Matthew Heaney <heaney@adacore.com>
36 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
38 2011-08-29 Tristan Gingold <gingold@adacore.com>
40 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
41 GNAT_DRIVER_COMMAND_LINE to 255.
43 2011-08-29 Pascal Obry <obry@adacore.com>
45 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
46 reformatting and style fix (class attribute casing).
48 2011-08-29 Yannick Moy <moy@adacore.com>
50 * exp_ch11.adb: Yet another case where expansion should be common
51 between CodePeer and Alfa.
53 2011-08-29 Yannick Moy <moy@adacore.com>
55 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
57 2011-08-29 Ed Schonberg <schonberg@adacore.com>
59 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
60 incomplete type and its completion match.
62 2011-08-29 Yannick Moy <moy@adacore.com>
64 * exp_ch13.adb: Adjust previous change.
66 2011-08-29 Robert Dewar <dewar@adacore.com>
68 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
69 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
72 2011-08-29 Emmanuel Briot <briot@adacore.com>
74 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
75 initialize aggregated projects.
77 2011-08-29 Ed Schonberg <schonberg@adacore.com>
79 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
80 depth of candidates to resolve a potentially spurious ambiguity between
81 two visible subprograms.
83 2011-08-29 Yannick Moy <moy@adacore.com>
85 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
87 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
88 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
91 2011-08-29 Arnaud Charlet <charlet@adacore.com>
93 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
96 2011-08-29 Thomas Quinot <quinot@adacore.com>
98 * sem_res.adb: Minor reformatting.
100 2011-08-29 Johannes Kanig <kanig@adacore.com>
102 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
104 * gnat1drv.adb (Adjust_Global_Switches): Set
105 Use_Expressions_With_Actions to False in ALFA mode.
106 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
109 2011-08-29 Yannick Moy <moy@adacore.com>
111 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
112 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
113 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
114 tagged types and dispatching calls in Alfa mode.
116 2011-08-29 Javier Miranda <miranda@adacore.com>
118 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
119 we do not report an error on an Empty node.
121 2011-08-29 Geert Bosch <bosch@adacore.com>
123 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
124 a-nlrear.o and a-nurear.o.
126 2011-08-29 Robert Dewar <dewar@adacore.com>
128 * freeze.adb: Minor code reorganization.
130 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
131 sem_ch6.adb: Minor reformatting
133 2011-08-29 Tristan Gingold <gingold@adacore.com>
135 * s-except.ads, s-except.adb: Provide dummy body.
137 2011-08-29 Yannick Moy <moy@adacore.com>
139 * sem_warn.adb (Within_Postcondition): Take into account the case of
140 an Ensures component in a Test_Case.
142 2011-08-29 Tristan Gingold <gingold@adacore.com>
144 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
145 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
146 System_Exceptions_Debug
147 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
148 * a-except.adb: With and use System.Exceptions_Debug instead of
150 * a-except-2005.adb: Likewise.
151 * s-assert.adb: Likewise.
152 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
153 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
154 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
155 s-excdeb. Update dependencies.
156 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
157 as these no longer need external libraries.
159 2011-08-29 Ed Schonberg <schonberg@adacore.com>
161 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
162 exponentiation operator on universal values in a context that requires
165 2011-08-29 Tristan Gingold <gingold@adacore.com>
167 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
168 before calling notify_handled_exception.
169 * a-exextr.adb: Fix comment.
171 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
173 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
174 Finalize_Address of the access type's finalization master.
175 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
176 access type's finalization master. Add a guard to prevent
177 Associated_Storage_Pool from being set on .NET/JVM.
178 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
179 attribute Finalize_Address of the access type's finalization master.
180 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
181 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
182 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
184 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
185 use clause for System.IO
186 (Detach): Relax the assertion, to be reinstated later.
187 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
188 Relax the assertion on Finalize_Address, to be reinstated later.
189 (Is_Empty_List): New routine.
190 (pm): New debug routine.
191 (Set_Finalize_Address): New routine.
192 * s-finmas.ads (pm): New debug routine.
193 (Set_Finalize_Address): New routine.
194 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
196 2011-08-29 Tristan Gingold <gingold@adacore.com>
198 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
201 2011-08-29 Tristan Gingold <gingold@adacore.com>
203 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
204 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
205 (Finalize_TCB): Remove its finalization.
206 (Initialize): Remove assignment of GET_Exc_Stack_Addr
207 * s-soflin.adb (NT_Exc_Stack): Remove
208 (Get_Exc_Stack_Addr_NT): Likewise.
209 (Get_Exc_Stack_Addr_Soft): Likewise.
210 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
211 (Get_Exc_Stack_Addr): Likewise.
212 (Get_Exc_Stack_Addr_Soft): Likewise
213 * s-taspri-vms.ads (Exc_Stack_T): Remove.
214 (Exc_Stack_Ptr_T): Likewise.
215 (Private_Data): Remove Exc_Stack_Ptr component.
217 2011-08-29 Tristan Gingold <gingold@adacore.com>
219 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
221 2011-08-29 Tristan Gingold <gingold@adacore.com>
223 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
225 2011-08-29 Geert Bosch <bosch@adacore.com>
227 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
228 L2_Norm, Swap_Column): New generic subprograms
229 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
230 L2_Norm, Swap_Column): Implement new subprograms in order to
231 eliminate dependency on BLAS and LAPACK libraries in
232 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
233 version. Forward_Eliminate/Back_Substitute can be used to put a
234 matrix in row echelon or reduced row echelon form using partial
236 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
237 Swap_Column): Instantiate from System.Generic_Array_Operations.
238 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
239 (Sqrt): Local function for simple computation of square root without
240 adding dependencies on Generic_Elementary_Functions.
241 (Swap): New subprogram to exchange floating point numbers.
242 (Inverse): Reimplement using Jordan-Gauss elimination.
243 (Jacobi): New procedure implementing Jacobi's method for computation
244 of eigensystems, based on Rutishauser's implementation.
245 (L2_Norm): Implement directly using the inner product.
246 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
247 decreasing eigenvalue as required by the Ada RM.
248 (Swap_Column): New helper procedure for Sort_Eigensystem.
249 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
250 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
253 2011-08-29 Thomas Quinot <quinot@adacore.com>
255 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
258 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
260 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
261 than the current node.
262 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
263 Finalization_Master. The list headers have two fields instead of three.
264 This should fix alignment issue but subpool allocations are now
265 unusable. Alphabetize subprograms.
266 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
267 the size of the header when converting the beginning of the object to
268 a FM_Node. Set the master's Finalize_Address attribute if not already
270 (Deallocate_Any_Controlled): Use the offset rather than the size of the
271 header when converting the beginning of the object to a FM_Node.
273 2011-08-29 Gary Dismukes <dismukes@adacore.com>
275 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
276 reraise when compiling for CodePeer.
278 2011-08-29 Arnaud Charlet <charlet@adacore.com>
280 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
281 now needed by a-convec.adb. Fix warning.
283 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
285 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
286 processing of TSS routine Finalize_Address when compiling in
289 2011-08-29 Thomas Quinot <quinot@adacore.com>
291 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
292 sem_warn.adb: Minor reformatting.
294 2011-08-29 Emmanuel Briot <briot@adacore.com>
296 * prj-conf.adb (Get_Config_Switches): Also collect the list of
297 languages from aggregated projects.
299 2011-08-29 Yannick Moy <moy@adacore.com>
301 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
302 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
303 Traverse_Package_Declaration, Traverse_Subprogram_Body,
304 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
305 for stubs are traversed too when parameter is set
306 (Traverse_All_Compilation_Units): Traverse without going inside stubs
307 (Traverse_Declarations_Or_Statements): Do the special traversing for
309 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
310 return subprogram or package body from stub.
311 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
312 stubs without prior subprogram decl.
314 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
316 * gnat_ugn.texi: Fix typo.
318 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
320 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
321 which accounts for size vs alignment issues and calculates the size of
323 (Deallocate_Any_Controlled): Ditto.
324 (Nearest_Multiple_Rounded_Up): New routine.
326 2011-08-29 Tristan Gingold <gingold@adacore.com>
328 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
329 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
330 (Set_Exception_Msg): Ditto.
331 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
333 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
334 Use Save_Occurrence instead of Save_Occurrence_No_Private.
335 (Raise_With_Msg): Remove Cleanup_Flag.
336 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
337 Clean_Flag and Private_Data components.
339 2011-08-29 Yannick Moy <moy@adacore.com>
341 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
343 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
344 of an explicitly declared type, so that the base types of the original
345 type and this generated type are the same, and a "type" (not a subtype
347 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
348 small" in Alfa mode, like in CodePeer mode.
349 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
350 clauses in Alfa mode.
352 2011-08-29 Javier Miranda <miranda@adacore.com>
354 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
355 function to the package spec.
356 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
357 internally generated bodies of null procedures locate the internally
358 generated spec enforcing mode conformance.
359 (Is_Interface_Conformant): Ensure that the controlling formal of the
362 2011-08-29 Ed Schonberg <schonberg@adacore.com>
364 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
365 reject the pragma if it appears to apply to a formal subprogram.
367 2011-08-29 Ed Schonberg <schonberg@adacore.com>
369 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
370 inner expression, to prevent double evaluation.
372 2011-08-29 Tristan Gingold <gingold@adacore.com>
374 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
376 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
377 * a-except-2005.adb (Propagate_Exception): Adjust spec.
378 (Raise_Current_Excep): Adjust call.
379 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
381 2011-08-29 Thomas Quinot <quinot@adacore.com>
383 * exp_disp.adb: Minor reformatting.
385 2011-08-29 Tristan Gingold <gingold@adacore.com>
387 * a-exexpr.adb (Setup_Exception): Removed.
388 * a-exexpr-gcc.adb (Setup_Exception): Removed.
389 * a-except.adb (Exception_Propagation): Removed.
390 * a-except-2005.adb (Setup_Exception): Removed.
391 (Reraise): Remove call to Setup_Exception.
392 (Reraise_Occurrence): Ditto.
393 (Reraise_Occurrence_Always): Ditto.
394 (Reraise_Occurrence_No_Defer): Ditto.
395 (Transfer_Occurrence): Ditto.
396 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
397 (Set_Exception_Msg): Ditto.
399 2011-08-29 Robert Dewar <dewar@adacore.com>
401 * a-convec.adb, exp_disp.adb: Minor reformatting.
403 2011-08-29 Tristan Gingold <gingold@adacore.com>
405 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
407 2011-08-29 Gary Dismukes <dismukes@adacore.com>
409 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
410 Exception_Handlers to No_List instead of Empty_List in the case where
411 there are no handlers.
413 2011-08-29 Tristan Gingold <gingold@adacore.com>
415 * gcc-interface/gigi.h (enum standard_datatypes): Add
417 (reraise_zcx_decl): New macro.
418 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
419 (gigi): Set reraise_zcx_decl.
420 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
421 (gnat_to_gnu): Handle N_Raise_Statement.
423 2011-08-29 Robert Dewar <dewar@adacore.com>
425 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
426 a-undesu.adb: Minor reformatting.
428 2011-08-29 Ed Schonberg <schonberg@adacore.com>
430 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
431 table, accept an unfrozen untagged component if it is an actual for a
432 formal incomplete type.
433 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
434 provide new iterator forms over vectors.
435 Introduce type Iterator in package body to implement operations of
436 Reversible_Iterator interface.
437 * a-iteint.ads: Make package pure so it is usable with new container
438 packages, that are categorized Remote_Types.
440 2011-08-29 Robert Dewar <dewar@adacore.com>
442 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
444 2011-08-29 Bob Duff <duff@adacore.com>
446 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
447 of <>, because this is the routine that checks for dimensionality
448 errors (for example, for a two-dimensional array, (others => <>) should
449 be (others => (others => <>)).
451 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
453 * impunit.adb: Add new run-time units.
454 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
455 s-stposu.ads, s-stposu.adb: Code clean up.
456 Handle protected class-wide or task class-wide types
457 Handle C/C++/CIL/Java types.
458 * s-spsufi.adb, s-spsufi.ads: New files.
460 2011-08-29 Yannick Moy <moy@adacore.com>
462 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
463 library-level subprogram.
464 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
466 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
468 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
470 * gnat_rm.texi: Update doc for Test_Case pragma.
472 2011-08-29 Tristan Gingold <gingold@adacore.com>
474 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
476 (GCC_Exception_Access): New type.
477 (Unwind_DeleteException): New imported procedure
478 (Foreign_Exception): Import it.
479 (GNAT_GCC_Exception): Simply have the occurrence inside.
480 (To_GCC_Exception): New function.
481 (To_GNAT_GCC_Exception): New function.
482 (GNAT_GCC_Exception_Cleanup): New procedure..
483 (Propagate_GCC_Exception): New procedure.
484 (Reraise_GCC_Exception): New procedure.
485 (Setup_Current_Excep): New procedure.
486 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
487 (Unwind_RaiseException): Ditto.
488 (Unwind_ForcedUnwind): Ditto.
490 (Begin_Handler): Change type of parameter.
491 (End_Handler): Ditto. Now delete the exception if still present.
492 (Setup_Key): Removed.
493 (Is_Setup_And_Not_Propagated): Removed.
494 (Set_Setup_And_Not_Propagated): Ditto.
495 (Clear_Setup_And_Not_Propagated): Ditto.
496 (Save_Occurrence_And_Private): Ditto.
497 (EID_For): Add 'not null' constraint on parameter.
498 (Setup_Exception): Does nothing.
499 (Propagate_Exception): Simplified.
500 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
501 re-raise is not expanded anymore.
502 * s-except.ads (Foreign_Exception): New exception - placeholder for
504 * raise-gcc.c (__gnat_setup_current_excep): Declare
505 (CXX_EXCEPTION_CLASS): Define (not yet used)
506 (GNAT_EXCEPTION_CLASS): Define.
507 (is_handled_by): Handle foreign exceptions.
508 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
510 2011-08-29 Jose Ruiz <ruiz@adacore.com>
512 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
514 2011-08-29 Thomas Quinot <quinot@adacore.com>
516 * a-synbar-posix.adb: Minor reformatting.
518 2011-08-29 Jose Ruiz <ruiz@adacore.com>
520 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
521 a-exetim-default.ads (Interrupt_Clocks_Supported,
522 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
523 definitions to be compliant with AI-0171. The target systems do not
524 support separate account for the execution time of interrupt handlers.
526 2011-08-29 Jose Ruiz <ruiz@adacore.com>
528 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
529 in the barrier to put first the easiest to evaluate (and the one which
530 will be True more often). More efficient.
532 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
534 * s-atocou-x86.adb: Fix constraint in machine code insertion.
536 2011-08-29 Bob Duff <duff@adacore.com>
538 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
539 attributes that are now aspects, as specified by AI05-0229-1.
540 * sem_ch13.adb (Analyze_Aspect_Specifications,
541 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
542 pragmas or attribute references, as appropriate.
544 2011-08-29 Robert Dewar <dewar@adacore.com>
546 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
547 a-synbar-posix.ads: Minor reformatting.
549 2011-08-29 Yannick Moy <moy@adacore.com>
551 * snames.ads-tmpl: Add name Force.
553 2011-08-29 Pascal Obry <obry@adacore.com>
555 * prj-nmsc.adb: Minor reformatting.
557 2011-08-29 Jose Ruiz <ruiz@adacore.com>
559 * a-exetim.ads (Interrupt_Clocks_Supported,
560 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
561 definitions to be compliant with AI-0171.
563 2011-08-29 Robert Dewar <dewar@adacore.com>
565 * a-ngelfu.adb: Add comments.
567 2011-08-29 Geert Bosch <bosch@adacore.com>
569 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
570 the closest machine number to Pi / 2.0.
572 2011-08-29 Jose Ruiz <ruiz@adacore.com>
574 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
575 package Ada.Synchronous_Barriers.
576 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
577 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
578 default implementation using protected objects and another one
579 a-synbar-posix using POSIX barriers as the underlying support.
580 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
581 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
582 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
583 Clean up dependencies.
584 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
586 2011-08-29 Robert Dewar <dewar@adacore.com>
588 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
589 exp_dist.adb: Minor code reorganization.
592 2011-08-29 Thomas Quinot <quinot@adacore.com>
594 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
595 primitive operation must support external streaming if it is not a
596 controlling access result.
598 2011-08-29 Thomas Quinot <quinot@adacore.com>
600 * sinfo.ads, sem_ch7.adb: Minor reformatting.
602 2011-08-29 Bob Duff <duff@adacore.com>
604 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
605 restriction on allocators, as required by AI05-0013-1.
606 * restrict.ads: Minor comment fix.
608 2011-08-29 Tristan Gingold <gingold@adacore.com>
610 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
611 (To_Jmpbuf_Address): Ditto
612 (builtin_longjmp): Ditto
614 2011-08-29 Thomas Quinot <quinot@adacore.com>
616 * sem_res.adb: Minor reformatting.
618 2011-08-29 Vincent Celier <celier@adacore.com>
620 * make.adb (Gnatmake): Move special processing for VM targets after the
621 call to Get_Target_Parameters.
623 2011-08-29 Thomas Quinot <quinot@adacore.com>
625 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
627 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
629 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
630 where an anonymous access discriminant of a limited designated type
631 appears in a non-immutably limited discriminated type and issue an
632 error message. Add local variable Desig_T and replace all occurrences
635 2011-08-29 Jose Ruiz <ruiz@adacore.com>
637 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
638 implementation is compliant to RM D.15(15/2) after the modification
639 imposed by AI05-0094-1 (binding interpretation).
641 2011-08-29 Robert Dewar <dewar@adacore.com>
643 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
644 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
646 2011-08-29 Thomas Quinot <quinot@adacore.com>
648 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
649 the scope name, do not report a missing label as a style violation (it
650 will be diagnosed as an illegality).
651 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
652 variant records: Get_Enum_Lit_From_Pos already returns a usage
653 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
654 on Expr in Integer_Literal case so that it can be used by
657 2011-08-29 Tristan Gingold <gingold@adacore.com>
659 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
661 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
662 (Build_Abort_Block_Handler): New function to build an Abort_Signal
664 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
665 Build_Abort_Block_Handler to build the exception handler. Do not
666 undefer aborts for the Abort_Signal exception handler if back-end
668 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
669 back_end exceptions for all others and abort_signal.
670 * s-except.ads (ZCX_By_Default): New constant.
671 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
672 (Raise_Exception_Always): Ditto.
673 (Raise_From_Signal_Handler): Ditto.
674 (Raise_With_Location_And_Msg): Ditto.
675 (Raise_With_Msg): Ditto.
677 (Reraise_Occurence): Ditto.
678 (Reraise_Occurrence_Always): Ditto.
679 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
680 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
682 2011-08-29 Thomas Quinot <quinot@adacore.com>
684 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
686 2011-08-29 Robert Dewar <dewar@adacore.com>
688 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
689 Minor code reorganization.
691 2011-08-29 Bob Duff <duff@adacore.com>
693 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
694 2012, not just Ada 2005.
696 2011-08-29 Vincent Celier <celier@adacore.com>
698 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
699 with a project file or with gprbuid, if -gnatep= is specified, the
700 builder may need to be invoked with -x.
702 2011-08-29 Tristan Gingold <gingold@adacore.com>
704 * a-exexpr-gcc.adb: Minor comment fix.
706 2011-08-29 Robert Dewar <dewar@adacore.com>
708 * sem_ch8.adb: Minor reformatting.
710 2011-08-29 Bob Duff <duff@adacore.com>
712 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
713 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
714 treating "some" as unreserved in earlier Ada versions. This is now
715 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
716 rather than Name_Some, since Tok_Some is now recognized as reserved.
717 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
719 * scans.ads: Minor comment fixes.
720 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
721 for other language versions.
722 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
723 treating "some" as unreserved in earlier Ada versions. This is now
724 handled in Snames.Is_Keyword_Name.
725 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
727 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
728 unreserved in earlier Ada versions. This is now handled in
729 Snames.Is_Keyword_Name.
730 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
731 words as for other language versions.
732 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
733 Ada 2012, not just Ada 2005.
735 2011-08-29 Ed Schonberg <schonberg@adacore.com>
737 * sem_ch13.adb: Additional semantic checks for aspects involved in
740 2011-08-29 Matthew Heaney <heaney@adacore.com>
742 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
743 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
745 (Ancestor_Find): ditto.
747 2011-08-29 Thomas Quinot <quinot@adacore.com>
749 * par-endh.adb: Minor reformatting.
751 2011-08-29 Tristan Gingold <gingold@adacore.com>
753 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
754 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
755 (Adjust_N_CLeanups_For): Remove.
756 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
758 (Propgate_Exception): Adjust.
759 * raise-gcc.c: Add a few static/const.
760 (Adjust_N_Cleanups_For): Remove declaration.
761 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
763 2011-08-29 Ed Schonberg <schonberg@adacore.com>
765 * sem_ch8.adb: Use type of function return when rewriting as object
768 2011-08-29 Gary Dismukes <dismukes@adacore.com>
770 * sem_type.adb: Minor reformatting.
772 2011-08-29 Robert Dewar <dewar@adacore.com>
774 * makeutl.adb: Minor reformatting.
776 2011-08-29 Ed Schonberg <schonberg@adacore.com>
778 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
779 function call of a limited type, the expansion of the renaming is
780 complicated by the presence of various temporaries and subtypes that
781 capture constraints of the renamed object.
782 Rewrite node as an object declaration, whose expansion is simpler.
783 Given that the object is limited there is no copy involved and no
786 2011-08-29 Robert Dewar <dewar@adacore.com>
788 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
789 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
791 2011-08-29 Tristan Gingold <gingold@adacore.com>
793 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
794 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
795 system-linux-hppa.ads, system-linux-s390.ads,
796 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
797 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
798 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
799 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
800 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
801 system-solaris-sparc.ads, system-lynxos-x86.ads,
802 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
803 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
804 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
805 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
806 system-vxworks-x86.ads: Remove GCC_ZCX_Support
807 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
808 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
809 * opt.ads: Adjust comment.
810 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
811 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
812 * system.ads: Move GCC_ZCX_Support to obsolete entries.
814 2011-08-29 Emmanuel Briot <briot@adacore.com>
816 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
817 file name is specified on the gnatmake or gprbuild command line, and
818 before we search for that file in the project.
820 2011-08-29 Ed Schonberg <schonberg@adacore.com>
822 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
823 used to determine whether a possible interpretation for an overloadable
824 entity is declared within the current instantiation and should be
825 included in the candidate set.
827 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
829 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
831 2011-08-29 Ed Schonberg <schonberg@adacore.com>
833 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
834 access subtype is access_to_subprogram, when applying checks for
837 2011-08-29 Matthew Heaney <heaney@adacore.com>
839 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
840 for sibling when common parent.
842 2011-08-29 Thomas Quinot <quinot@adacore.com>
844 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
847 2011-08-29 Ed Schonberg <schonberg@adacore.com>
849 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
850 for the return type when in ASIS mode.
852 2011-08-29 Vincent Celier <celier@adacore.com>
854 * make.adb (Gnatmake): Get the default search dirs, then the target
855 parameters after getting the Builder switches, as the Builder switches
856 may include --RTS= and that could change the default search dirs.
858 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
860 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
861 Make_Final_Call. Move the processing for class-wide types before the
862 processing for derivations from [Limited_]Controlled.
863 (Make_Final_Call): Move the processing for class-wide types before the
864 processing for derivations from [Limited_]Controlled.
865 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
866 Add code to account for alignments larger than the list header. Add a
867 comment illustrating the structure of the allocated object + padding +
869 (Deallocate_Any_Controlled): Add code to account for alignments larger
870 than the list header.
872 2011-08-29 Ed Schonberg <schonberg@adacore.com>
874 * sinfo.ads, sinfo.adb: New node kind
875 N_Formal_Incomplete_Type_Definition, related flags.
876 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
877 Parse formal incomplete types.
878 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
880 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
881 Formal incomplete types do not need completion.
882 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
883 Validate_Incomplete_Type_Instance): New procedures to handle formal
885 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
886 that corresponds to a formal incomplete type.
887 * sprint.adb: Handle formal incomplete type declarations.
888 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
891 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
893 * a-fihema.ads, a-fihema.adb: Unit removed.
894 * a-undesu.ads, a-undesu.adb: New unit implementing
895 Ada.Unchecked_Deallocate_Subpool.
896 * einfo.adb: Remove Associated_Collection from the node usage.
897 Add Finalization_Master to the node usage.
898 (Associated_Collection): Removed.
899 (Finalization_Master): New routine.
900 (Set_Associated_Collection): Removed.
901 (Set_Finalization_Master): New routine.
902 (Write_Field23_Name): Remove Associated_Collection from the output. Add
903 Finalization_Master to the output.
904 * einfo.ads: Remove attribute Associated_Collection and its uses in
906 Add new attribute Finalization_Master along with its uses in entitites.
907 (Associated_Collection): Removed along with its pragma import.
908 (Finalization_Master): New routine along with a pragma import.
909 (Set_Associated_Collection): Removed along with its pragma import.
910 (Set_Finalization_Master): New routine along with a pragma import.
911 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
912 Build_Finalization_Collection with Build_Finalization_Master.
913 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
914 before the bodies of the predefined routines. Add comment explaining
915 this. Replace call to Build_Finalization_Collection with
916 Build_Finalization_Master.
917 (Freeze_Type): Replace call to Build_Finalization_Collection with
918 Build_Finalization_Master.
919 (Make_Finalize_Address_Body): Comment reformatting.
920 (Make_Predefined_Primitive_Specs): Code reformatting.
921 (Stream_Operation_OK): Update comment mentioning finalization
922 collections. Replace RE_Finalization_Collection with
923 RE_Finalization_Master.
924 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
925 Associated_Collection with Finalization_Master. Replace call to
926 Build_Finalization_Collection with Build_Finalization_Master.
927 (Expand_Allocator_Expression): Replace call to Associated_Collection
928 with Finalization_Master. Replace call to Set_Associated_Collection with
929 Set_Finalization_Master. Remove the generation of
930 Set_Finalize_Address_Ptr.
931 (Expand_N_Allocator): Replace call to Associated_Collection with
932 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
933 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
934 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
935 comment on usage. Replace call to Needs_BIP_Collection with
936 Needs_BIP_Finalization_Master Remplace BIP_Collection with
937 BIP_Finalization_Master. Update all comments which mention finalization
938 collections. Replace Associated_Collection with
939 Finalization_Master. Replace Build_Finalization_Collection with
940 Build_Finalization_Master.
941 (BIP_Formal_Suffix): Update BIP_Collection's case.
942 (Build_Heap_Allocator): Update the related comment. Rename local
943 variable Collect to Fin_Mas_Id and update its occurrences. Update
944 comments which mention finalization collections. Replace
945 Set_Associated_Collection with Set_Finalization_Master.
946 (Expand_Call): Update the code which detects a special piece of library
948 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
949 Add_Collection_Actual_To_Build_In_Place_Call with
950 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
951 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
952 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
953 Add_Collection_Actual_To_Build_In_Place_Call with
954 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
955 (Make_Build_In_Place_Call_In_Assignment): Replace call to
956 Add_Collection_Actual_To_Build_In_Place_Call with
957 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
958 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
959 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
960 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
961 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
962 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
963 Replace call to Set_Associated_Collection with Set_Finalization_Master.
964 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
965 Replace the call to Associated_Collection with Finalization_Master.
966 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
967 Update the way finalization master names are generated. Update the
968 retrieval of the correct access type which will carry the pool and
970 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
971 (Make_Finalize_Address_Body): Abstract types do not need
972 Finalize_Address. Code reformatting.
973 (Make_Finalize_Address_Stmts): Update comment on usage.
974 (Make_Set_Finalize_Address_Ptr_Call): Removed.
975 (Process_Declarations): Update comments.
976 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
977 Build_Finalization_Master. Update associated comment.
978 (Make_Set_Finalize_Address_Ptr_Call): Removed.
979 * exp_ch13.adb: Update comments which mention finalization collections.
980 (Expand_N_Free_Statement): Replace the call to Associated_Collection
981 with Finalization_Master.
982 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
983 create calls to routines Allocate_Any_Controlled and
984 Deallocate_Any_Controlled.
985 (Find_Finalize_Address): New routine.
986 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
988 (Requires_Cleanup_Actions): Update the comment on freeze node
990 * exp_util.ads: Remove comment on generated code for
991 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
992 is better to simply look in the body.
993 * freeze.adb (Freeze_All): Update the comment of finalization
994 collections. Replace the call to Associated_Collection with
995 Finalization_Master. Replace the call to Build_Finalization_Collection
996 with Build_Finalization_Master.
997 * impunit.adb: Add a-undesu and s-stposu to the list of units.
998 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1000 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1001 Ada.Finalization. Add processing for children of System.Storage_Pools.
1002 * rtsfind.ads: Remove the naming of second level children of
1004 Remove Ada_Finalization_Heap_Management from the list of units.
1005 Remove subtype Ada_Finalization_Child.
1006 Remove the following subprogram entities:
1010 RE_Finalization_Collection
1011 RE_Finalization_Collection_Ptr
1012 RE_Set_Finalize_Address_Ptr
1014 Add the naming of second level children of System.Storage_Pools.
1015 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1017 Add subtype System_Storage_Pools_Child.
1018 Add the following subprogram entities to System.Finalization_Masters:
1020 RE_Finalization_Master
1021 RE_Finalization_Master_Ptr
1023 Add the following subprogram entities to System.Storage_Pools.Subpools:
1025 RE_Allocate_Any_Controlled
1026 RE_Deallocate_Any_Controlled
1027 RE_Root_Storage_Pool_With_Subpools
1031 Move the following subprogram entities from
1032 Ada.Finalization.Heap_Management to System.Finalization_Masters:
1034 RE_Add_Offset_To_Address
1039 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1040 Set_Associated_Collection with Set_Finalization_Master.
1041 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1042 BIP_Finalization_Master is created.
1043 * s-finmas.adb: New unit System.Finalization_Masters.
1044 * s-finmas.ads: New unit System.Finalization_Masters.
1045 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1046 * s-stposu.ads, s-stposu.adb: New unit implementing
1047 System.Storage_Pools.Subpools.
1049 2011-08-29 Bob Duff <duff@adacore.com>
1051 * tbuild.adb: Add assertion.
1053 2011-08-29 Thomas Quinot <quinot@adacore.com>
1055 * s-pooglo.adb: Minor reformatting.
1057 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1059 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1060 an indexed component of a packed array whose element type is a record
1061 with a representation clause different from that of the right-hand
1062 side, generate a temporary to minimuze the number of bit-field
1063 operations generated.
1065 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1067 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1068 declarations, and thus are likely insertion points for actions.
1070 2011-08-29 Bob Duff <duff@adacore.com>
1072 * einfo.ads: Minor comment fix.
1074 2011-08-29 Robert Dewar <dewar@adacore.com>
1076 * frontend.adb, gnat1drv.adb: Minor reformatting.
1078 2011-08-29 Tristan Gingold <gingold@adacore.com>
1080 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1081 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
1082 space in front of the header.
1084 2011-08-29 Johannes Kanig <kanig@adacore.com>
1086 * frontend.adb (Frontend): Exit after creating Standard package when
1087 -gnatd.H is present.
1088 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1091 2011-08-29 Robert Dewar <dewar@adacore.com>
1093 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1094 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1095 snames.ads-tmpl: Minor reformatting.
1097 2011-08-29 Philippe Gil <gil@adacore.com>
1099 * prj.adb (Reset_Units_In_Table): New procedure.
1100 Reset units to avoid access to freed memory.
1102 2011-08-29 Thomas Quinot <quinot@adacore.com>
1104 * get_scos.adb: When reading a P statement SCO without a pragma name
1105 (from an older ALI file), ensure that the Pragma_Name component is set
1106 to Unknown_Pragma (not left uninitialized).
1108 2011-08-29 Vincent Celier <celier@adacore.com>
1110 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1111 modified to compute correctly the object path of a SAL project that is
1112 extending another library project.
1113 (Write_Path_File): New procedure.
1114 * makeutl.ads (Directories): New table moved from Buildgpr
1115 (Get_Directories): New procedure moved from Buildgpr
1116 (Write_Path_File): New procedure
1117 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1118 paths before binding SALs, instead of Set_Ada_Paths.
1119 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1121 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1122 (Current_Source_Path_File_Of): New function
1123 (Set_Current_Object_Path_File_Of): New procedure
1124 (Current_Source_Object_File_Of): New function
1125 (Set_Current_Object_Path_File_Of): New procedure
1126 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1127 (Current_Source_Path_File_Of): New function
1128 (Set_Current_Object_Path_File_Of): New procedure
1129 (Current_Source_Object_File_Of): New function
1130 (Set_Current_Object_Path_File_Of): New procedure
1132 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1134 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1135 packed entity, use a bit-field assignment only if there is no change of
1138 2011-08-29 Thomas Quinot <quinot@adacore.com>
1140 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1141 Is_RTU instead of using Chars comparisons.
1143 2011-08-29 Thomas Quinot <quinot@adacore.com>
1145 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1146 temporary object if the actual is constrained, and the discriminants
1147 read from the stream don't match.
1149 2011-08-29 Tristan Gingold <gingold@adacore.com>
1151 * sem_attr.adb, exp_attr.adb: Add handling of
1152 Attribute_System_Allocator_Alignment
1153 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1154 Attribute_System_Allocator_Alignment.
1155 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1156 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1157 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1158 get_target_system_allocator_alignment.
1160 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1162 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1165 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1167 * exp_ch3.adb (In_Runtime): Fix typo.
1169 2011-08-29 Bob Duff <duff@adacore.com>
1171 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1173 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1175 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1176 and a separate tag assignment is generated, ensure that the tag
1177 assignment is analyzed.
1179 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1181 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1182 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1183 of statement lists that may contain local declarations.
1184 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1185 duplicate the triggering statements needed for the expansion of this
1186 construct, when the trigger is a dispatching call to a synchronized
1189 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1191 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1192 * bindgen.adb: Add comments.
1193 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1196 2011-08-29 Robert Dewar <dewar@adacore.com>
1198 * exp_attr.adb: Minor reformatting.
1199 Minor code reorganization and commenting.
1200 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1203 2011-08-29 Thomas Quinot <quinot@adacore.com>
1205 * get_scos.adb: Ignore chaining indicators not currently supported
1208 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1210 * system.ads: Minor editing.
1212 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1214 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1216 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1217 Attribute_Elab_Subp_Body.
1218 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1219 * sem_util.adb: Update comments.
1221 2011-08-29 Thomas Quinot <quinot@adacore.com>
1223 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1224 pragma name for each SCO statement corresponding to a pragma.
1226 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1228 * opt.ads: Minor editing.
1230 2011-08-29 Yannick Moy <moy@adacore.com>
1232 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1233 that only made sense for CodePeer mode.
1235 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1237 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1238 which is no longer used.
1239 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1240 handling of the 64-bit division check.
1241 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1243 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1246 2011-08-29 Thomas Quinot <quinot@adacore.com>
1248 * get_scos.adb: Minor reformatting.
1250 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1252 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
1253 statement list is wrapped in a block, the block is explicitly analyzed
1254 in order to properly redecorate the entities and create a servicing
1257 2011-08-29 Tristan Gingold <gingold@adacore.com>
1259 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1260 (Set_Zero_Cost_Handling): Remove.
1262 2011-08-29 Thomas Quinot <quinot@adacore.com>
1264 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1266 2011-08-29 Geert Bosch <bosch@adacore.com>
1268 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1269 instruction, as the latter may produce -0.0, which is not a valid VAX
1271 (Neg_G): Likewise for VAX F float.
1273 2011-08-29 Robert Dewar <dewar@adacore.com>
1275 * exp_util.adb: Minor reformatting.
1277 2011-08-29 Yannick Moy <moy@adacore.com>
1279 * sem_ch3.adb: Minor comment update.
1281 2011-08-29 Thomas Quinot <quinot@adacore.com>
1283 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1286 2011-08-29 Thomas Quinot <quinot@adacore.com>
1288 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1289 current statement sequence on a generic instantiation or a subprogram
1292 2011-08-29 Robert Dewar <dewar@adacore.com>
1294 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1297 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1299 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1300 Correct the check which involves the freeze node of a controlled or
1301 access-to-controlled type.
1303 2011-08-29 Geert Bosch <bosch@adacore.com>
1305 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1307 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1310 2011-08-29 Yannick Moy <moy@adacore.com>
1312 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1313 for every index type and component type that is not a subtype_mark.
1314 (Process_Subtype): Set Etype of subtype.
1316 2011-08-29 Robert Dewar <dewar@adacore.com>
1318 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1319 reorganization. Minor reformatting.
1321 2011-08-29 Steve Baird <baird@adacore.com>
1323 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1324 for CodePeer and ALFA modes.
1326 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1328 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1329 that comes from an enclosing scope if it is not the renaming of an
1330 actual, to handle properly a spurious ambiguity in an instance.
1332 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
1334 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1335 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
1336 use it instead of the Esize of the first parameter.
1337 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1339 <Size>: Likewise. Call it for composite types on the RM size.
1341 2011-08-29 Yannick Moy <moy@adacore.com>
1343 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1344 * sem_util.adb (Unique_Name): Correct behaviour for names of
1347 2011-08-29 Yannick Moy <moy@adacore.com>
1349 * sem_prag.adb (Check_Precondition_Postcondition): In formal
1350 verification mode, analyze pragma expression for correctness, for
1351 pre/post on library-level subprogram, as it is not expanded later.
1353 2011-08-29 Yannick Moy <moy@adacore.com>
1355 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1356 in formal verification.
1358 2011-08-29 Thomas Quinot <quinot@adacore.com>
1360 * sem_util.adb: Minor reformatting.
1361 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1363 * par_sco.ads, par_sco.adb: Update comments.
1365 2011-08-29 Yannick Moy <moy@adacore.com>
1367 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1368 associated getter/setter.
1369 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1371 2011-08-29 Vincent Celier <celier@adacore.com>
1373 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1374 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1375 with declarations for Language_Kind and Dependency_Kind for Ada.
1376 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1377 (Process_Compiler): Take into account the new attributes Dependency_Kind
1379 (Check_Configuration): Check if language kind is unit based, not if the
1380 language name is Ada.
1381 (Process_Exceptions_Unit_Based): Ditto
1382 (Add_Language): Remove default additions of language and dependency kind
1383 * prj.ads: Minor comment change
1384 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1386 2011-08-29 Johannes Kanig <kanig@adacore.com>
1388 * debug.adb: Update comments.
1390 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1392 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1393 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1394 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1395 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1396 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1398 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1400 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1401 (GNATLIBCFLAGS_FOR_C): Replace
1402 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1403 (gnatlib-shared-default, gnatlib-shared-dual-win32)
1404 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1405 (gnatlib-sjlj, gnatlib-zcx): Likewise.
1407 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
1409 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1411 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1413 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1415 2011-08-05 Nicolas Roche <roche@adacore.com>
1417 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1418 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1420 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1422 2011-08-05 Matthew Heaney <heaney@adacore.com>
1424 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1425 subprogram bodies declared out-of-order.
1427 2011-08-05 Yannick Moy <moy@adacore.com>
1429 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1430 entities directly in package Standard, otherwise skip the standard
1433 2011-08-05 Robert Dewar <dewar@adacore.com>
1435 * a-cbmutr.adb: Minor reformatting
1436 (Allocate_Node): refactor node allocation algorithm
1438 2011-08-05 Robert Dewar <dewar@adacore.com>
1440 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1441 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1443 (Analyze_Pragma, case Check_Policy): Ditto.
1444 * sem_prag.ads (Check_Disabled): New function
1445 * snames.ads-tmpl: Add Name_Disable.
1447 2011-08-05 Robert Dewar <dewar@adacore.com>
1449 * gnat_rm.texi: Document implementation-defined policy DISABLE for
1450 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1452 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1454 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1455 that appears in a generic formal part and applies to a formal
1458 2011-08-05 Robert Dewar <dewar@adacore.com>
1460 * a-cbmutr.ads: Minor reformatting.
1462 2011-08-05 Matthew Heaney <heaney@adacore.com>
1464 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1465 to check count, check sign of value instead.
1466 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1467 (Copy_Subtree): allocate copy of source element
1468 (Equal_Subtree): compare elements, not access objects
1470 2011-08-05 Vincent Celier <celier@adacore.com>
1472 * gnat_ugn.texi: Fix VMS alternative.
1474 2011-08-05 Thomas Quinot <quinot@adacore.com>
1476 * sem_ch11.adb: Add comment.
1478 2011-08-05 Robert Dewar <dewar@adacore.com>
1480 * exp_util.adb: Minor comment fix.
1482 2011-08-05 Robert Dewar <dewar@adacore.com>
1484 * scng.adb (Error_Unterminated_String): Improve flag position when
1487 2011-08-05 Matthew Heaney <heaney@adacore.com>
1489 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1491 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1492 multiway tree containers.
1494 2011-08-05 Robert Dewar <dewar@adacore.com>
1496 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1497 * stylesw.adb: Implement -gnatyC to control comment spacing
1498 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1500 * usage.adb: Add line for -gnatyC.
1502 2011-08-05 Robert Dewar <dewar@adacore.com>
1504 * gnat_ugn.texi: Document -gnatyC.
1505 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1506 synonym for COMMENTS2).
1508 2011-08-05 Robert Dewar <dewar@adacore.com>
1510 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1511 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1512 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1513 a-comutr.ads, lib-xref.adb: Minor reformatting.
1515 2011-08-05 Robert Dewar <dewar@adacore.com>
1517 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1518 warning if there is an exception handler present.
1520 2011-08-05 Pascal Obry <obry@adacore.com>
1522 * a-iteint.ads: Fix copyright year.
1524 2011-08-05 Thomas Quinot <quinot@adacore.com>
1526 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1527 statement SCO for a USE clause or a representation clause.
1529 2011-08-05 Yannick Moy <moy@adacore.com>
1531 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1532 between body and spec for stub.
1533 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1534 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1535 pragma precondition or postcondition, for which the enclosing
1536 subprogram or package in the AST is not the desired one, return empty.
1538 2011-08-05 Thomas Quinot <quinot@adacore.com>
1540 * g-expect.adb: Minor reformatting.
1542 2011-08-05 Bob Duff <duff@adacore.com>
1544 * a-fihema.adb: Comment out OS_Lib.
1546 2011-08-05 Matthew Heaney <heaney@adacore.com>
1548 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1549 (unbounded multiway tree containers) and a-iteint.ads.
1550 * a-comutr.ads, a-comutr.adb:
1551 This is the new Ada 2012 unit for unbounded multiway tree containers
1552 * a-cimutr.ads, a-cimutr.adb
1553 This is the new Ada 2012 unit for indefinite multiway tree containers
1554 * a-iteint.ads: New file.
1556 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1558 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1560 2011-08-05 Bob Duff <duff@adacore.com>
1562 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1564 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1566 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1568 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1569 general indexing aspects of Ada2012. Called when analyzing indexed
1570 components when other interpretations fail.
1571 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1572 in an expression context where overloading is meaningful. This excludes
1573 the occurrence in an aspect specification (efficiency only).
1574 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1575 related to iterators can be set by an attribute specification, but
1577 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1578 Constant_Indexing and Variable_Indexing.
1579 (Check_Indexing_Functions): New procedure to perform legality checks.
1580 Additional semantic checks at end of declarations.
1582 2011-08-05 Sergey Rybin <rybin@adacore.com>
1584 * tree_io.ads: Update ASIS_Version_Number because of the change of the
1585 order of calling Tree_Write/Tree_Read routines made for aspects.
1587 2011-08-05 Bob Duff <duff@adacore.com>
1589 * a-fihema.adb (Finalize): Fix race condition.
1591 2011-08-05 Yannick Moy <moy@adacore.com>
1593 * sem_ch12.adb (Analyze_Package_Instantiation,
1594 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1597 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1599 * sem_type.adb (Specific_Type): in an instance, the type-specific
1600 operand of an equality check that involves null may have a private
1601 type. Use full view to determine legality of construct.
1603 2011-08-05 Vincent Celier <celier@adacore.com>
1605 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1606 delete or close the file when the call to gnatmake was successful.
1608 2011-08-05 Yannick Moy <moy@adacore.com>
1610 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1611 Global_Discard_Names.
1613 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1615 * sinfo.ads: comments on use of entity field for aspect specifications.
1617 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1619 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1620 node is not itself an entity but a selected component, it is a
1621 rewritten parameterless call to an en enclosing synchronized operation,
1622 and this expansion will be performed again in the instance, so there is
1623 no global information to preserve.
1625 2011-08-05 Javier Miranda <miranda@adacore.com>
1627 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1628 for renamings of predefined primitives.
1629 (In_Predef_Prims_DT): New subprogram.
1631 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1633 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1634 possible interpretation of name is a reference type, add an
1635 interpretation that is the designated type of the reference
1636 discriminant of that type.
1637 * sem_res.adb (resolve): If the interpretation imposed by context is an
1638 implicit dereference, rewrite the node as the deference of the
1639 reference discriminant.
1640 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1641 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1642 parent type or base type.
1643 * sem_ch4.adb (Process_Indexed_Component,
1644 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1645 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1646 Check for implicit dereference.
1647 (List_Operand_Interps): Indicate when an implicit dereference is
1649 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1651 2011-08-05 Thomas Quinot <quinot@adacore.com>
1653 * scos.ads: Update documentation of SCO table. Pragma statements can now
1654 be marked as disabled (using 'p' instead of 'P' as the statement kind).
1655 * par_sco.ads, par_sco.adb: Implement the above change.
1656 (Process_Decisions_Defer): Generate a P decision for the first parameter
1657 of a dyadic pragma Debug.
1658 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1660 * put_scos.adb: Code simplification based on above change.
1662 2011-08-05 Robert Dewar <dewar@adacore.com>
1664 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1665 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1666 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1667 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1669 2011-08-05 Bob Duff <duff@adacore.com>
1671 * a-stunau.ads, g-spipat.adb: Update comments.
1673 2011-08-05 Bob Duff <duff@adacore.com>
1675 * a-fihema.ads: Minor comment fix.
1676 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1678 (Attach, Detach): Remove some unnecessary code.
1679 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1681 2011-08-05 Bob Duff <duff@adacore.com>
1683 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1684 allocation for Objects component. This simplifies the code somewhat. It
1685 is also a little more efficient in the not-so-unusual case where there
1686 are no controlled objects allocated.
1687 Make Finalization_Started flag atomic.
1688 (Finalize): Avoid unnecessary detachment of items from the list.
1689 (pcol): Minor cleanup.
1691 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1693 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1694 package whose name is the same as that of the generic unit, or its
1697 2011-08-05 Bob Duff <duff@adacore.com>
1699 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1700 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1701 Minor comment fixes.
1703 2011-08-05 Arnaud Charlet <charlet@adacore.com>
1705 * make.adb (Linking_Phase): No longer need to set source search path
1706 before calling gnatlink in CodePeer mode.
1707 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1708 gcc in CodePeer mode, since the binder generated file no longer has a
1710 * switch.ads, switch.adb (Is_Language_Switch): Removed.
1711 * switch-c.adb: Update comment.
1713 2011-08-05 Thomas Quinot <quinot@adacore.com>
1715 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1717 2011-08-05 Nicolas Roche <roche@adacore.com>
1719 * gnat_ugn.texi: Fix minor syntax error issue.
1721 2011-08-05 Vincent Celier <celier@adacore.com>
1723 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1724 delete or close the file when the call to gnatmake returns a non
1725 successful return code.
1727 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1729 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1730 check, indicate that the copy of the original node does not come from
1731 source, to prevent an infinite recursion of the expansion.
1733 2011-08-05 Johannes Kanig <kanig@adacore.com>
1735 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1736 VC generation for subprogram bodies.
1738 2011-08-05 Yannick Moy <moy@adacore.com>
1741 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1742 the base type with the smallest allowed base type.
1744 2011-08-05 Sergey Rybin <rybin@adacore.com>
1746 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1749 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1751 * sem_ch12.ads: minor comment updates.
1753 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1755 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1756 instantiation and a formal package the compiler generates a package
1757 renaming declaration so that the generic name within the declaration
1758 is interpreted as a renaming of the instance. At the end of a formal
1759 package declaration, this renaming must become invisible.
1761 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1763 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1764 comparison and rely on concrete entities instead.
1766 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1768 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1769 and discriminants, to indicate that the type has an access discriminant
1770 that supports implicit dereference.
1771 * snames.ads-tmpl: Add names of aspects and attributes related to
1772 Ada2012 iterators: constant_indexing, default_iterator,
1773 iterator_element, implicit_dereference, variable_indexing.
1774 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1775 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1776 iterator-related aspects.
1777 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1779 2011-08-05 Sergey Rybin <rybin@adacore.com>
1781 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1782 metrics in gnatmetric to cover new kinds of coupling mentrics.
1784 2011-08-05 Steve Baird <baird@adacore.com>
1786 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1787 of calling the user-defined main subprogram.
1788 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1789 is set) Call_Main_Subprogram ahead of, as opposed to
1791 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1792 generation of a "with" of the user-defined main subprogram.
1793 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1794 (which is now called from Gen_Main instead).
1796 2011-08-05 Emmanuel Briot <briot@adacore.com>
1798 * projects.texi: Added reference to the Makefile package.
1800 2011-08-05 Thomas Quinot <quinot@adacore.com>
1802 * exp_ch7.adb: Minor comment rewording.
1804 2011-08-05 Ed Falis <falis@adacore.com>
1806 * env.c: Fix comment.
1808 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1810 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1811 character comparison and rely on concrete entities instead.
1813 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1815 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1816 suggested by AI95-0068.
1818 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1820 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1821 the two potential initialization calls. This accounts for any
1822 access-before-elaboration checks which may precede the initialization
1824 (Next_Suitable_Statement): New routine. Returns the next real statement
1825 after the input node while skipping generated checks.
1826 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1827 with comment on usage.
1828 Do not generate Elaborate_All when the trigger is a finalization call
1829 coming from a type init proc.
1830 (Check_Elab_Call): Propagate the initialization procedure context to
1831 subsequent calls to Check_A_Call.
1832 (Check_Internal_Call_Continue): Propagate the initialization procedure
1833 context to subsequent calls to Check_Elab_Call.
1834 (Is_Finalization_Procedure): New routine. Returns True if the input
1835 entity denotes a [Deep_]Finalize routine.
1836 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1837 along with comment on usage.
1839 2011-08-05 Vadim Godunko <godunko@adacore.com>
1841 * s-atocou.ads: Add list of supported platforms.
1843 2011-08-05 Yannick Moy <moy@adacore.com>
1845 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1847 * opt.ads (Disable_ALI_File): new Boolean flag
1848 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1850 2011-08-05 Ed Falis <falis@adacore.com>
1852 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1853 environ is properly defined.
1855 2011-08-05 Vincent Celier <celier@adacore.com>
1857 * make.adb (Compilation_Phase): Exit immediately when all objects have
1858 been found up to date, to avoid multiple exit messages.
1859 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1860 same project for languages with no compiler.
1861 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1863 2011-08-05 Robert Dewar <dewar@adacore.com>
1865 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1866 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1867 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1868 s-atocou-builtin.adb: Minor reformatting.
1870 2011-08-05 Yannick Moy <moy@adacore.com>
1872 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1873 if the node to wrap is a pragma check, this node and enclosed
1874 expression are not expanded, so do not apply any transformations here.
1875 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1876 introducing transient scopes.
1878 2011-08-05 Jose Ruiz <ruiz@adacore.com>
1880 * adaint.c (__gnat_set_writable, __gnat_set_readable,
1881 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1882 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1883 routine is available, so we use the default implementation of these
1885 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1886 support for copying attributes on VxWorks 6.
1888 2011-08-05 Yannick Moy <moy@adacore.com>
1890 * debug.adb: Remove use of -gnatd.D.
1891 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1892 * opt.ads: Simplify variables for ALFA mode, to keep one only
1893 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1896 2011-08-05 Vincent Celier <celier@adacore.com>
1898 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1899 Builder'Default_Switches.
1901 2011-08-05 Vincent Celier <celier@adacore.com>
1903 * makeusg.adb: Add lines for --create-map-file switches.
1905 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1907 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1908 profile is incomplete and the full view is available, replace it with
1910 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1911 incomplete, freezing the subprogram is delayed until the full view is
1913 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1914 fixed-point multiplication operator and the predefined operator is
1915 resolved in favor of the user-defined one.
1917 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1919 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1922 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1924 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1925 whether a type lacks user-defined Read or Write operations, or has a
1926 component that lacks them.
1927 * sem_attr.adb (Check_Stream_Attribute): if restriction
1928 No_Default_Stream_Attributes is active, verify that all subcomponent
1929 types of the target have user-defined stream operations, and report
1931 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1932 * exp_strm.adb: Build_Elementary_Input_Call,
1933 Build_Elementary_Write_Call): remove checks for restriction
1934 No_Default_Stream_Attributes, now checked in semantics.
1936 2011-08-04 Vincent Celier <celier@adacore.com>
1938 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1939 switches on the command line, look for all valid --RTS switches in the
1940 Builder switches and for each language use the first runtime name found
1941 to invoke gprconfig.
1942 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1943 command line and there is no auto-configuration.
1944 (Runtime_Name_Set_For): New function.
1946 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1948 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1949 elaborate initialization expression for variable Abort when processing
1950 a package body or a declaration.
1951 (Create_Finalizer): Propagate the package context when creating the
1952 exception-related variables.
1953 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1954 For_Package along with usage comment.
1956 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1958 * gcc-interface/Makefile.in: Clean up targets.
1959 Enable new package for atomic counters and copy-on-write implementation
1960 of unbounded strings on x86 platforms.
1961 * gcc-interface/Make-lang.in: Update dependencies.
1963 2011-08-04 Robert Dewar <dewar@adacore.com>
1965 * exp_ch7.adb: Minor reformatting.
1967 2011-08-04 Robert Dewar <dewar@adacore.com>
1969 * exp_strm.adb: Minor reformatting.
1971 2011-08-04 Vadim Godunko <godunko@adacore.com>
1973 * s-atocou.adb: Replace by dummy version and use on targets where atomic
1974 operations are not supported.
1975 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1976 * s-atocou-x86.adb: New file.
1977 * Makefile.rtl: Add s-atocou.o file
1979 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1981 * make.adb (Compile): Move setting of CodePeer_Mode to ...
1982 (Compilation_Phase): ... here.
1983 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1985 2011-08-04 Thomas Quinot <quinot@adacore.com>
1987 * Make-generated.in: Fix minor typo in comment.
1989 2011-08-04 Thomas Quinot <quinot@adacore.com>
1991 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1994 2011-08-04 Robert Dewar <dewar@adacore.com>
1996 * a-coinho.adb: Minor reformatting.
1998 2011-08-04 Robert Dewar <dewar@adacore.com>
2000 * a-coinho.ads: Minor reformatting.
2002 2011-08-04 Vadim Godunko <godunko@adacore.com>
2004 * s-atocou.ads, s-atocou.adb: New files.
2005 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2006 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2007 direct use of GCC's atomic builtins and replace them by use of new
2008 atomic counter package.
2010 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2012 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2014 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2016 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2017 with a call to Get_External_Tag.
2018 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2019 subprogram usage. Remove the guard against package declarations and
2020 bodies since Build_Cleanup_Statements is no longer invoked in that
2022 (Build_Components): Initialize Tagged_Type_Stmts when the context
2023 contains at least one library-level tagged type.
2024 (Build_Finalizer): New local variables Has_Tagged_Types and
2025 Tagged_Type_Stmts along with associated comments on usage. Update the
2026 logic to include tagged type processing.
2027 (Create_Finalizer): Insert all library-level tagged type unregistration
2028 code before the jump block circuitry.
2029 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2030 (Expand_N_Package_Declaration): Remove the call to
2031 Build_Cleanup_Statements.
2032 (Process_Tagged_Type_Declaration): New routine. Generate a call to
2033 unregister the external tag of a tagged type.
2034 (Processing_Actions): Reimplemented to handle tagged types.
2035 (Process_Declarations): Detect the declaration of a library-level
2036 tagged type and carry out the appropriate actions.
2037 (Unregister_Tagged_Types): Removed. The machinery has been directly
2038 merged with Build_Finalizer.
2040 2011-08-04 Robert Dewar <dewar@adacore.com>
2042 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2043 gnatls.adb, exp_ch3.adb: Minor reformatting.
2045 2011-08-04 Marc Sango <sango@adacore.com>
2047 * sem_attr.adb (Analyze_Attribute): Replace the message
2048 "invisible attribute of}" of the spark restriction violation in
2049 attribute reference by the simple message "invisible attribute of type".
2050 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2051 two insertion characters: '&' and '}'.
2053 2011-08-04 Vadim Godunko <godunko@adacore.com>
2055 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2056 * a-coinho.ads, a-coinho.adb: New file.
2057 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2059 2011-08-04 Nicolas Roche <roche@adacore.com>
2061 * alfa_test.adb: Not all ali files are containing alfa information even
2062 if compiled with -gnatd.F. So suppress warning about missing ALFA
2065 2011-08-04 Yannick Moy <moy@adacore.com>
2067 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2069 * put_alfa.adb: Check that scope name is not empty.
2071 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2073 * exp_ch3.adb (Stream_Operation_Ok): new predicate
2074 Needs_Elementary_Stream_Operation, to determine whether user-defined
2075 Read and Write attributes are available for the elementary components
2076 of the given type. If only the predefined attributes are available,
2077 then when restriction No_Default_Stream_Attributes is active the
2078 predefined stream attributes for the composite type cannot be created.
2080 2011-08-04 Robert Dewar <dewar@adacore.com>
2082 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2083 Put routines in alpha order
2085 2011-08-04 Jose Ruiz <ruiz@adacore.com>
2087 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2088 * gcc-interface/Make-lang.in: Update dependencies.
2090 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2092 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2093 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2096 2011-08-04 Robert Dewar <dewar@adacore.com>
2098 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2099 lib-xref-alfa.adb: Minor reformatting.
2101 2011-08-04 Marc Sango <sango@adacore.com>
2103 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2104 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2105 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2108 2011-08-04 Tristan Gingold <gingold@adacore.com>
2110 * bindgen.adb (Gen_Adainit_C): Remove.
2111 (Gen_Adafinal_C): Ditto.
2112 (Gen_Elab_Externals_C): Ditto.
2113 (Gen_Elab_Calls_C): Ditto.
2114 (Gen_Elab_Order_C): Ditto.
2115 (Gen_Elab_Defs_C): Ditto.
2116 (Gen_Finalize_Library_C): Ditto.
2117 (Gen_Finalize_Library_Defs_C): Ditto.
2118 (Gen_Main_C): Ditto.
2119 (Gen_Output_File_C): Ditto.
2120 (Gen_Restrictions_C): Ditto.
2121 (Gen_Versions_C): Ditto.
2122 (Write_Info_Ada_C): Ditto.
2123 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2124 (Gen_Output_File): Do not force Ada_Bind_File anymore.
2125 Always call Gen_Output_File_Ada.
2126 * gnatlink.adb (Begin_Info): Now a constant.
2128 (Ada_Bind_File): Remove
2129 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
2130 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2131 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2132 * opt.ads (Ada_Bind_File): Remove.
2134 2011-08-04 Thomas Quinot <quinot@adacore.com>
2136 * projects.texi: Document target-specific directory in default project
2139 2011-08-04 Thomas Quinot <quinot@adacore.com>
2141 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2144 2011-08-04 Yannick Moy <moy@adacore.com>
2146 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2147 opt.ads, lib-xref.ads: Code clean up.
2149 2011-08-04 Yannick Moy <moy@adacore.com>
2151 * gnat_rm.texi: Update description of Test_Case
2152 * gnat_ugn.texi: Typo.
2154 2011-08-04 Ed Falis <falis@adacore.com>
2156 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2158 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2160 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2161 it is of type Root_Controlled. This action eliminates fields Prev and
2162 Next from type equality.
2164 2011-08-04 Yannick Moy <moy@adacore.com>
2166 * lib-xref-alfa.adb: Correct typo.
2168 2011-08-04 Matthew Heaney <heaney@adacore.com>
2170 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2173 2011-08-04 Yannick Moy <moy@adacore.com>
2175 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2176 (Analyze_Pragma): allow static string expression for name of Test_Case,
2177 instead of simply string literals.
2178 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2181 2011-08-04 Vincent Celier <celier@adacore.com>
2183 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2184 case suffixes to find truncated main sources.
2186 2011-08-04 Tristan Gingold <gingold@adacore.com>
2188 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2189 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2190 (Compute_Current_Task): Ditto.
2192 2011-08-04 Tristan Gingold <gingold@adacore.com>
2194 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2196 2011-08-04 Yannick Moy <moy@adacore.com>
2198 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2199 library-level constant.
2200 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2201 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2202 used as selector of parameter association, in ALFA mode.
2204 2011-08-04 Robert Dewar <dewar@adacore.com>
2206 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2207 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2210 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2212 * make.adb (Linking_Phase): Set source search path before calling
2213 gnatlink in CodePeer mode.
2215 2011-08-04 Javier Miranda <miranda@adacore.com>
2217 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2218 Remove code which takes care of building TSDs.
2219 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2220 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2221 the accessibility check in VM targets.
2222 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2223 (Building_Static_DT): Now returns false for VM targets.
2224 (Build_VM_TSDs): Removed.
2225 (Expand_Interface_Conversion): Generate missing runtime check for
2226 conversions to interface types whose target type is unknown at compile
2228 (Make_VM_TSD): Add missing code to disable the generation of calls to
2229 Check_TSD if the tagged type is not defined at library level, or not
2230 has a representation clause specifying its external tag, or -gnatdQ is
2232 * exp_disp.ads (Build_VM_TSDs): Removed.
2233 (Make_VM_TSDs): Spec relocated from exp_disp.adb
2234 * sem_disp.adb (Check_Dispatching_Operation): No code required to
2235 register primitives in the dispatch tables in VM targets.
2236 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2237 initialization of class-wide interface objects in VM targets.
2238 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2241 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2243 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2244 when dotnet-ld cannot be found.
2246 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2248 * bindgen.adb: Simplify significantly generation of binder body file in
2250 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2251 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
2254 2011-08-04 Yannick Moy <moy@adacore.com>
2256 * sem_prag.adb, sem.ads: Code cleanup.
2258 2011-08-04 Tristan Gingold <gingold@adacore.com>
2260 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2261 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2262 results if possible.
2263 * s-stusta.adb (Print): Adjust after changes in s-stausa.
2264 * gnat_ugn.texi: Update dynamic stack usage section.
2266 2011-08-04 Steve Baird <baird@adacore.com>
2268 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2269 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2270 contains only a call to the user-defined main subprogram.
2271 (Gen_Main_Ada) - If CodePeer_Mode is set, then
2272 call the "wrapper" subprogram instead of directly
2273 calling the user-defined main subprogram.
2275 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2277 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2278 alternatives of a case statement for controlled objects. Rename local
2279 variable A to Dead_Alt.
2280 (Expand_N_If_Statement): Check the then and else statements of an if
2281 statement for controlled objects. Check the then statements of all
2282 elsif parts of an if statement for controlled objects.
2283 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2285 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2286 detects a loop associated with the expansion of an array object.
2287 Augment the processing of the loop statements to account for a possible
2288 wrap done by Process_Statements_For_Controlled_Objects.
2289 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2290 statements and abortable part of an asynchronous select for controlled
2292 (Expand_N_Conditional_Entry_Call): Check the else statements of a
2293 conditional entry call for controlled objects.
2294 (Expand_N_Selective_Accept): Check the alternatives of a selective
2295 accept for controlled objects.
2296 (Expand_N_Timed_Entry_Call): Check the entry call and delay
2297 alternatives of a timed entry call for controlled objects.
2298 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2299 exception handler for controlled objects.
2300 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2301 Add formal parameter Nested_Constructs along with its associated
2303 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2304 Requires_Cleanup_Actions.
2305 (Process_Statements_For_Controlled_Objects): New routine.
2306 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2307 routine. Inspect a node which contains a non-handled sequence of
2308 statements for controlled objects. If such an object is found, the
2309 statements are wrapped in a block.
2311 2011-08-04 Bob Duff <duff@adacore.com>
2313 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2314 need to compare with Class_Wide_Type (T2), in order to get at the
2315 original class-wide type node.
2316 * sem_type.ads (Covers): Improve the comment.
2317 * einfo.ads (Class_Wide_Type): Improve the comment.
2318 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2319 the type of the Deref.
2321 2011-08-04 Yannick Moy <moy@adacore.com>
2323 * gnat_rm.texi: Document that Test_Case pragma can only appear on
2324 separate declarations.
2325 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2326 check identifier of pragma argument.
2327 (Chain_TC): check that no other test case associated to the same entity
2328 share the same name.
2329 (Check_Test_Case): disallow test case inside subprogram body
2330 (Analyze_Pragma): correct call to check identifier and not argument
2331 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2332 function gets name from test case pragma.
2334 2011-08-04 Yannick Moy <moy@adacore.com>
2336 * gnat_rm.texi: Document new pragma and aspect.
2337 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2338 (No_Duplicates_Allowed): new constant array defining whether duplicates
2339 aspects of each kind can appear on the same declaration.
2340 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2341 field, which points to a node holding the previous Spec_PPC_List.
2342 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2343 through the indirection with Contract.
2344 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2345 * par-prag.adb (Prag): do nothing on Test_Case pragma
2346 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2348 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2349 component Ensures of Test_Case.
2350 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2351 (Analyze_Generic_Subprogram_Declaration,
2352 Analyze_Subprogram_Instantiation,
2353 Analyze_Abstract_Subprogram_Declaration,
2354 Analyze_Subprogram_Body_Helper,
2355 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2356 insert contract in subprogram node at point of definition
2358 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2359 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2360 corresponding pragma
2361 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2362 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2363 similar to the analysis of pre/post
2364 (Derive_Subprogram): insert contract in subprogram node at point of
2366 * sem_prag.adb, sem_prag.ads
2367 (Check_Arg_Is_String_Literal, Check_Identifier):
2368 new checking procedures to be called in treatment of pragmas
2369 (Check_Test_Case): new procedure to check that a Test_Case aspect or
2370 pragma is well-formed. This does not check currently that 'Result is
2371 used only in the Ensures component of a Test_Case.
2372 (Analyze_Pragma): add case for Test_Case
2373 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2374 components of a Test_Case.
2375 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2376 expressions in the 3rd (and 4th if present) arguments of a Test_Case
2377 pragma, treated as spec expressions.
2378 (Sig_Flags): add value -1 for Test_Case.
2379 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2380 Get_Requires_From_Test_Case_Pragma): getters for both expression
2381 components of a Test_Case.
2382 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2383 indirection between an entry or [generic] subprogram entity and its
2384 pre/post + test-cases.
2385 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2386 get/set for fields of an N_Contract node.
2387 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2388 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2389 names and pragma for Test_Case.
2390 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2392 2011-08-04 Vincent Celier <celier@adacore.com>
2394 * gnat_ugn.texi: Improve documentation of gnatmake switch
2395 --source-info-file=.
2397 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2399 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2400 type). Initialize Atyp to the appropriate type which is later checked
2401 for completion. Rewrite the assertion associated with private type
2404 2011-08-04 Ed Falis <falis@adacore.com>
2406 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2407 initialize the number of CPUs.
2409 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2411 * sem_type.adb (Disambiguate): New subsidiary routine
2412 In_Same_Declaration_List, to implement AI05-0020: a user-defined
2413 equality on an anonymous access type whose designated type is private
2414 does not lead to an ambiguity with the universal access equality
2415 operator in the body or child units of the defining package. The same
2416 is true for a multiplication operator on a private type completed with
2419 2011-08-04 Javier Miranda <miranda@adacore.com>
2421 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2422 (Normalize_Scalars_Config): Removed.
2424 (Register_Opt_Config_Switches): Remove registering config values of
2425 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2426 (Restore_Opt_Config_Switches): Remove code which restores the values of
2427 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2428 Init_Or_Norm_Scalars.
2429 (Save_Opt_Config_Switches): Remove code which saves values of
2430 Init_Or_Norm_Scalars and Normalize_Scalars.
2431 (Set_Opt_Config_Switches): Remove code which restores config values of
2432 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2433 Init_Or_Norm_Scalars.
2435 2011-08-04 Yannick Moy <moy@adacore.com>
2437 * frontend.adb (Frontend): remove previous patch to avoid full
2438 qualification in ALFA mode.
2439 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2440 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2441 unique name for an entity, which could be used to identify the entity
2442 across compilation units.
2444 2011-08-04 Thomas Quinot <quinot@adacore.com>
2447 (Initialize_Default_Project_Path): Add target specific directory
2448 ($prefix/$target/lib/gnat) in front of project path in all cases
2449 (making gnatmake's behaviour consistent with gprbuild).
2450 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2451 Pass target name from Sdefault to project subsystem.
2452 * gnatls.adb: Show new target specific default project directory.
2454 2011-08-04 Johannes Kanig <kanig@adacore.com>
2456 * cstand.adb: Add Information to Identifier in Standard
2457 (Identifer_For): Set Entity to the corresponding entity
2459 2011-08-04 Sergey Rybin <rybin@adacore.com>
2461 * gnat_ugn.texi: Update doc on gnatcheck.
2463 2011-08-04 Yannick Moy <moy@adacore.com>
2465 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2468 2011-08-04 Yannick Moy <moy@adacore.com>
2470 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2471 performing expansion.
2472 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2473 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2474 it is not called in ALFA mode.
2476 2011-08-04 Emmanuel Briot <briot@adacore.com>
2478 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2479 after all, so removed.
2481 2011-08-04 Sergey Rybin <rybin@adacore.com>
2483 * vms_data.ads: Add missing VMS qualifiers.
2485 2011-08-04 Emmanuel Briot <briot@adacore.com>
2487 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2488 the list of files on the command line after processing it through
2491 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2493 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2494 processing for .NET/JVM. These targets can now benefit from
2495 Raise_From_Controlled_Operation and they share the same processing with
2497 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2498 These targets need transient scopes in order to properly finalize short
2499 lived controlled objects.
2500 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2501 NET/JVM. These targets can now benefit from
2502 Raise_From_Controlled_Operation and they share the same processing with
2505 2011-08-04 Geert Bosch <bosch@adacore.com>
2507 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2509 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2511 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2512 Expand_Record_Aggregate, to determine whether aggregate must be
2513 expanded into assignments. This is the case if the ancestor part is
2514 private, regarless of the setting of the flag Has_Private_Ancestor.
2516 2011-08-04 Ed Falis <falis@adacore.com>
2518 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2520 2011-08-04 Bob Duff <duff@adacore.com>
2522 * sinfo.ads: Fix comment.
2524 2011-08-04 Steve Baird <baird@adacore.com>
2526 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2527 choose a package name in much the same way as is
2528 done for JGNAT when VM_Target /= No_VM, except that
2529 a slightly more distinctive prefix string is used.
2531 2011-08-04 Emmanuel Briot <briot@adacore.com>
2533 * makeutl.adb (Complete_Mains): no longer accept unit names on the
2534 gnatmake command line.
2535 This behavior was never documented (and was supported only because of
2536 an early bug in the code). This case might lead to ambiguous cases
2537 (between unit names and truncated base names without suffixes).
2539 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2541 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2542 Remove the external tag of a tagged type from the internal hash table.
2543 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2544 expanded usage of the routine. Strenghten the check for Is_Master. Add
2545 processing for tagged types.
2546 (Build_Finalizer): Create all the necessary lists used in finalizer
2547 creation when the processed context is a package that may contain
2549 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2550 Requires_Cleanup_Actions.
2551 (Expand_N_Package_Body): Package bodies may need clean up code
2552 depending on whether they contain tagged types.
2553 (Expand_N_Package_Declaration): Package declarations may need clean up
2554 code depending on whether they contain tagged types.
2555 (Unregister_Tagged_Types): New routine. Search through a list of
2556 declarations or statements, looking for non-abstract Ada tagged types.
2557 For each such type, generate code to unregister the external tag.
2558 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2559 Requires_Cleanup_Actions.
2560 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2561 through a list of declarations or statements looking for non-abstract
2562 Ada tagged types or controlled objects.
2563 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2564 Requires_Cleanup_Actions.
2565 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2566 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2569 2011-08-04 Vincent Celier <celier@adacore.com>
2571 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2572 has Ada sources, not project Project, because if the root project
2573 Project has no sources of its own, all projects will be deemed without
2576 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2578 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2579 of the No_Param_Proc acc-to-subp type used for initialization of
2580 __gnat_finalize_library_objects so that it's declared at library level
2581 rather than nested inside of the adainit routine.
2583 2011-08-04 Javier Miranda <miranda@adacore.com>
2585 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2586 if the tagged type has a representation clause which specifies its
2589 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2591 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2592 Remove previous procedure with that name.
2593 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2595 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2596 subtype mark, the ancestor cannot have unknown discriminants.
2597 (Resolve_Record_Aggregate): if the type has invisible components
2598 because of a private ancestor, the aggregate is illegal.
2600 2011-08-04 Vincent Celier <celier@adacore.com>
2602 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2603 account switches -gnat2005, -gnat12 and -gnat2012.
2605 2011-08-04 Bob Duff <duff@adacore.com>
2607 * s-tasdeb.ads: Minor comment fix.
2609 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2611 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2613 * switch.ads, switch.adb (Is_Language_Switch): New function.
2615 2011-08-04 Vincent Celier <celier@adacore.com>
2617 * switch-c.adb: Minor comment addition.
2619 2011-08-04 Vincent Celier <celier@adacore.com>
2621 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2622 ending with '=' is followed by a space (missing file name).
2624 2011-08-04 Pascal Obry <obry@adacore.com>
2626 * g-regist.ads: Fix size of HKEY on x86_64-windows.
2628 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2630 * sem_ch12.adb (Analyze_Associations): New routine
2631 Check_Overloaded_Formal_Subprogram to reject a formal package when
2632 there is a named association or a box initialisation for an overloaded
2633 formal subprogram of the corresponding generic.
2635 2011-08-04 Yannick Moy <moy@adacore.com>
2637 * alfa.ads (ALFA_Xref_Record): add component for type of entity
2638 * get_alfa.adb, put_alfa.adb: Read and write new component of
2640 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2642 2011-08-04 Pascal Obry <obry@adacore.com>
2644 * urealp.adb: Minor reformatting.
2646 2011-08-04 Tristan Gingold <gingold@adacore.com>
2648 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2649 Handle the case when Cleanup_Protected_Object returns Empty.
2651 2011-08-04 Yannick Moy <moy@adacore.com>
2653 * frontend.adb (Frontend): only qualify names in non-ALFA mode
2655 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2657 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2658 call, ignore functions.
2660 2011-08-04 Geert Bosch <bosch@adacore.com>
2662 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2665 2011-08-04 Emmanuel Briot <briot@adacore.com>
2667 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2668 as an index for Builder'Switches. This conforms to the documentation.
2669 * make.adb (Insert_Project_Sources): avoid duplicate code
2671 2011-08-04 Emmanuel Briot <briot@adacore.com>
2673 * makeutl.adb (Complete_Mains): if the user has passed a relative file
2674 name on the command line (for instance "../dummy"), never assume it can
2677 2011-08-04 Tristan Gingold <gingold@adacore.com>
2679 * bindgen.adb: Remove code the reference or create the
2680 Break_Start/__gnat_break_start procedure.
2681 * s-stalib.adb (Break_Start): Removed.
2683 2011-08-04 Emmanuel Briot <briot@adacore.com>
2685 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2686 shared with gprbuild.
2688 2011-08-04 Yannick Moy <moy@adacore.com>
2690 * par-ch4.adb (P_Primary): preferentially issue an error message about
2691 a missing parenthesis arount a conditional or case expression in Ada
2692 2012 mode, if we detect that the alignment is not correct for a
2695 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2697 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2698 tag-to-class-wide conversion as needing finalization actions.
2699 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2700 a tag-to-class-wide conversion as needing finalization actions.
2701 (Is_Finalizable_Transient): The result of a tag-to-class-wide
2702 conversion does not need finalization actions.
2703 (Is_Tag_To_CW_Conversion): New routine.
2704 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2705 whether an object is the result of a tag-to-class-wide conversion.
2707 2011-08-04 Yannick Moy <moy@adacore.com>
2709 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2710 the left-hand-side and right-hand-side of a conjunct are inserted when
2711 translating a pre- or postcondition
2712 * sem_ch6.adb: Correct typo in comment
2714 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2716 * gnat_rm.texi: Ravenscar does not prohibit dependence on
2717 Unchecked_Conversion and Unchecked_Deallocation.
2719 2011-08-04 Thomas Quinot <quinot@adacore.com>
2721 * make.adb: Minor reformatting.
2723 2011-08-04 Emmanuel Briot <briot@adacore.com>
2725 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2726 sources in the project and its imported projects, but not in the whole
2729 2011-08-04 Emmanuel Briot <briot@adacore.com>
2731 * make.adb: Remove debug trace.
2733 2011-08-04 Vincent Celier <celier@adacore.com>
2735 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2736 path in canonical form, to be able to compare path names on platforms
2737 such as Windows or Darwin.
2739 2011-08-04 Thomas Quinot <quinot@adacore.com>
2741 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2742 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2743 * scos.ads: Update documentation accordingly.
2744 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2747 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2749 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2750 attribute only if prefix type is scalar.
2752 2011-08-04 Emmanuel Briot <briot@adacore.com>
2754 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2755 in gnatmake for specifying mains on the command line that do not belong
2756 to the main project. These mains must currently all belong to the same
2758 (Ultimate_Extension_Of): removed, since duplicated
2759 Ultimate_Extending_Project.
2761 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2763 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2765 (CodePeer_Mode_String): New.
2766 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2768 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2769 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2770 mode, since no useful elaboration subprogram is needed by CodePeer.
2771 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2772 In this mode, compile binder file with -gnatC and do stop after this
2775 2011-08-04 Vincent Celier <celier@adacore.com>
2777 * exp_ch7.adb: Minor comment fix.
2779 2011-08-04 Robert Dewar <dewar@adacore.com>
2781 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2782 exp_ch4.adb, makeutl.adb: Minor reformatting.
2784 2011-08-04 Emmanuel Briot <briot@adacore.com>
2786 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2787 Create several new subprograms to move code out of Make. This makes the
2788 code more readable, removes code duplication, and is a preparation work
2789 for adding support for aggregate projects.
2791 2011-08-04 Tristan Gingold <gingold@adacore.com>
2793 * s-po32gl.ads, s-po32gl.adb: New files.
2794 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2795 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2796 (Build_Finalization_Collection): Use it.
2797 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2798 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2800 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2801 * gcc-interface/Make-lang.in: Update dependencies.
2803 2011-08-04 Emmanuel Briot <briot@adacore.com>
2805 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2808 2011-08-04 Emmanuel Briot <briot@adacore.com>
2810 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2811 command line is not a file name, also check whether it could be a unit
2814 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2816 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2817 the header of the finalization routine.
2818 If the unit has no finalizer but is a body whose spec has one, then
2819 generate the decrement of the elaboration entity only.
2820 If the unit has a finalizer and is a spec, then do not generate the
2821 decrement of the elaboration entity.
2822 (Gen_Finalize_Library_C): Likewise.
2824 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2826 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2827 (Bounds_Size_Expression): Removed.
2828 (Double_Alignment_Of): New subsidiary routine.
2829 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2830 for a hole in the dope vector of unconstrained arrays due to different
2831 index and element alignments.
2833 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2835 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2836 raise program_error because body has not been seen yet.
2838 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2840 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2843 2011-08-04 Vincent Celier <celier@adacore.com>
2845 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2847 2011-08-04 Yannick Moy <moy@adacore.com>
2849 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2850 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2852 2011-08-04 Thomas Quinot <quinot@adacore.com>
2854 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2855 instantiation in RCI.
2857 2011-08-04 Emmanuel Briot <briot@adacore.com>
2859 * make.adb: Share more code with gprbuild
2861 2011-08-04 Emmanuel Briot <briot@adacore.com>
2863 * projects.texi: Added documentation for the IDE'Gnat project file
2866 2011-08-04 Nicolas Roche <roche@adacore.com>
2868 * gnat_rm.texi: Minor editing.
2870 2011-08-04 Javier Miranda <miranda@adacore.com>
2872 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2873 and the library case for VM targets.
2874 (Gen_Adainit_Ada): Likewise.
2876 2011-08-04 Robert Dewar <dewar@adacore.com>
2878 * g-altive.ads: Minor comment updates.
2879 * prj-nmsc.adb: Minor reformatting.
2881 2011-08-04 Javier Miranda <miranda@adacore.com>
2884 (Normalize_Scalars_Config): Value of the configuration switch set by
2885 pragma Normalize_Scalars when it appears in the gnat.adc file.
2886 (Normalize_Scalars): New field for record Config_Switches_Type. Used
2887 to save and restore settings of this pragma.
2889 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2890 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2892 2011-08-04 Vincent Celier <celier@adacore.com>
2894 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2896 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2898 * makeutl.adb: Minor reformatting.
2900 2011-08-04 Olivier Hainque <hainque@adacore.com>
2902 * g-altive.ads: Update comments to reflect that only the soft
2903 binding is available today.
2905 2011-08-04 Robert Dewar <dewar@adacore.com>
2907 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2908 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2909 * gcc-interface/Make-lang.in: Update dependencies.
2911 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2913 * prj-env.adb: Remove local debug traces.
2915 2011-08-04 Yannick Moy <moy@adacore.com>
2917 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2918 was used instead of Hi_OK, which could cause a read of an uninitialized
2919 value later on. Detected while working on the new warning.
2920 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2922 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2923 in more cases, in order to detect more unreferenced values.
2924 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2925 object for expression, if any.
2927 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2929 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2930 the operand types instead of the Esize.
2932 2011-08-04 Steve Baird <baird@adacore.com>
2934 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2935 enable CodePeer_Mode.
2936 * bindusg.adb (Display): Add help message describing -P binder switch.
2937 * gnat_ugn.texi: Document -P binder switch.
2938 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2939 user-defined main program directly.
2940 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2941 user-defined main program in the context clause of the package body.
2943 2011-08-04 Yannick Moy <moy@adacore.com>
2945 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2946 duplicate of Defining_Entity
2947 (Get_Unique_Entity_For_Decl): rename function into
2948 Unique_Defining_Entity
2949 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2950 (Formal_Proof_On): remove synthesized flag
2951 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2952 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2953 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2954 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2955 Annotate (Formal_Proof)
2957 2011-08-04 Emmanuel Briot <briot@adacore.com>
2959 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2960 source files with non-standard naming schemes, in imported projects
2962 2011-08-04 Emmanuel Briot <briot@adacore.com>
2964 * makeutl.adb (Complete_Mains): when a multi-unit source file is
2965 specified on the gprbuild command line, we need to compile all units
2966 within that file, not just the first one we find
2967 Fix error message for mains that are not found.
2969 2011-08-04 Thomas Quinot <quinot@adacore.com>
2971 * sem_ch6.adb: Update comment.
2972 * sem_ch12.adb: Minor reformatting.
2974 2011-08-04 Bob Duff <duff@adacore.com>
2976 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2977 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2978 race condition whose symptom is to fail to lock Parent. That, in turn,
2979 causes Parent.Awake_Count to be accessed without locking Parent, which
2980 causes another race condition whose symptom is that Parent.Awake_Count
2981 can be off by 1 (either too high or too low). The solution is to lock
2982 Parent unconditionally, and then lock Acceptor, before reading
2983 Acceptor.Terminate_Alternative.
2985 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2987 * debug.adb: Update comment.
2989 2011-08-04 Robert Dewar <dewar@adacore.com>
2991 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2992 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2993 exp_ch6.adb: Minor reformatting.
2995 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2997 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3000 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3002 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3004 2011-08-04 Thomas Quinot <quinot@adacore.com>
3006 * sinfo.ads: Minor reformatting.
3008 2011-08-04 Emmanuel Briot <briot@adacore.com>
3010 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3011 even if there is no location.
3013 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3015 * sem_res.adb, sem_ch4.adb: move check for restriction
3016 No_Task_Hierarchy to resolve_allocator.
3018 2011-08-04 Thomas Quinot <quinot@adacore.com>
3020 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3021 This flag of N_Pragma nodes is not used, remove it as well as all of
3022 the associated circuitry.
3024 2011-08-04 Javier Miranda <miranda@adacore.com>
3026 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3027 runtime check on duplicated externa tags
3028 * debug.adb Document switch -gnatdQ.
3030 2011-08-04 Gary Dismukes <dismukes@adacore.com>
3032 * a-fihema.ads: Minor typo fix.
3034 2011-08-04 Yannick Moy <moy@adacore.com>
3036 * sem_ch10.adb: Minor comment update.
3038 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3040 * einfo.adb: Update the node field usage to reflect the renaming of
3041 Return_Flag to Return_ Flag_Or_Transient_Decl.
3042 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3043 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3044 (Write_Field15_Name): Change Return_Flag to
3045 Return_Flag_Or_Transient_Decl.
3046 * einfo.ads: Rename node field Return_Flag to
3047 Return_Flag_Or_Transient_Decl. Update the associated comment and all
3048 occurrences in entities.
3049 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3050 associated Inline pragma.
3051 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3052 associated Inline pragma.
3053 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3055 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3056 Return_Flag and Set_Return_Flag.
3057 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3058 objects generated for controlled transients declared inside an
3059 Exception_With_Actions. Update the calls to Return_Flag.
3060 (Process_Object_Declaration): Add code to add a null guard for hook
3061 objects generated for controlled transients declared inside an
3062 Exception_With_Actions. Update related comment.
3063 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3064 objects generated for controlled transients declared inside an
3065 Exception_With_Actions. Update the calls to Return_Flag.
3066 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3068 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3070 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3071 positional aggregate.
3073 2011-08-04 Vincent Celier <celier@adacore.com>
3075 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3076 SLOC only for pragmas.
3078 2011-08-04 Emmanuel Briot <briot@adacore.com>
3080 * projects.texi: Minor typo fix.
3082 2011-08-04 Emmanuel Briot <briot@adacore.com>
3084 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3085 on case-sensitive file systems.
3087 2011-08-04 Thomas Quinot <quinot@adacore.com>
3089 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3090 nested in a disabled pragma.
3091 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3092 enclosing pragma, if any, for X decisions.
3094 2011-08-04 Thomas Quinot <quinot@adacore.com>
3096 * sem_prag.adb: Minor reformatting.
3098 2011-08-04 Vincent Celier <celier@adacore.com>
3100 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3101 allowed in no run time mode.
3103 2011-08-04 Vincent Celier <celier@adacore.com>
3105 * make.adb (Check): When -gnatc is used, check for the source file
3106 inside the ALI file with a canonical case file name.
3108 2011-08-04 Emmanuel Briot <briot@adacore.com>
3110 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3111 overriding the separator.
3113 2011-08-04 Robert Dewar <dewar@adacore.com>
3115 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3116 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3118 2011-08-04 Robert Dewar <dewar@adacore.com>
3120 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3122 2011-08-04 Yannick Moy <moy@adacore.com>
3124 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3125 'Result only appears in postcondition of function.
3127 2011-08-04 Thomas Quinot <quinot@adacore.com>
3129 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3130 external tag, include the value of the external tag in the exception
3133 2011-08-04 Yannick Moy <moy@adacore.com>
3135 * sem_attr.adb (Result): modify error message for misplaced 'Result
3137 2011-08-04 Sergey Rybin <rybin@adacore.com>
3139 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3140 clear that the second argument must be an identifier.
3142 2011-08-04 Thomas Quinot <quinot@adacore.com>
3144 * exp_ch9.adb (Build_Barrier_Function): When compiling with
3145 -fpreserve-control-flow, insert an IF statement on the barrier
3146 condition to ensure that a conditional branch instruction is generated.
3148 2011-08-04 Emmanuel Briot <briot@adacore.com>
3150 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3151 (Processing_Flags.Ignore_Missing_With): new flag.
3153 2011-08-04 Emmanuel Briot <briot@adacore.com>
3155 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3156 Source_List_File on case-insensitive systems where the file is actually
3157 on a case-sensitive file system (NFS,...).
3159 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3161 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3162 function return contains a controlled [extension] aggregate and the
3163 return statement is not part of a handled sequence of statements, wrap
3164 the return in a block. This ensures that all controlled temporaries
3165 generated during aggregate resolution will be picked up by the
3166 finalization machinery.
3168 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3170 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3171 components, freeze type before resolution, to ensure that default
3172 initializations are present for all components.
3173 * sem_res.adb (Resolve_Actuals): the designated object of an
3174 accces-to-constant type is a legal actual in a call to an
3175 initialization procedure.
3177 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3179 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3180 N_Unchecked_Type_Conversion to the possible containers of a renamed
3183 2011-08-04 Yannick Moy <moy@adacore.com>
3185 * par-ch13.adb (Aspect_Specifications_Present): recognize
3186 "with Identifier'Class =>" as an aspect, so that a meaningful warning
3187 is issued in Strict mode.
3188 * par.adb: Fix typos in comments.
3190 2011-08-04 Yannick Moy <moy@adacore.com>
3192 * sem_attr.adb (Result): modify error message to take into account Post
3193 aspect when compiling Ada 2012 (or newer) code.
3195 2011-08-04 Nicolas Roche <roche@adacore.com>
3197 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3198 remove need for GCC exceptions.
3200 2011-08-04 Vincent Celier <celier@adacore.com>
3202 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3203 project, not the source file name.
3204 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3205 excluded, continue looking. This excluded source will only be returned
3206 if there is no other source with the same base name that is not locally
3209 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3211 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3212 private and one of the operands is a real literal, use a qualified
3213 expression rather than a conversion which is not meaningful to the
3216 2011-08-04 Yannick Moy <moy@adacore.com>
3218 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3219 corresponding aspect X'Class are allowed, proceed with analysis of the
3220 aspect instead of skipping it.
3222 2011-08-04 Tristan Gingold <gingold@adacore.com>
3224 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3225 This will allow to have an Ada implementation for the subprogram.
3227 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3229 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3230 completion and aspects are present, apply them to the entity for the
3231 type which is currently the partial view, but which is the one that
3233 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3234 applies to a partial view, indicate that the full view has predicates
3235 and delayed aspects.
3236 (Replace_Type_Reference): Handle properly predicates that apply to the
3237 full view of a private completion.
3239 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3241 * layout.adb (Layout_Type): For composite types, do not set Esize.
3242 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3244 (Size_Known): Look at the RM size of components instead of the Esize.
3245 (Freeze_Record_Type): Look at the RM size instead of the Esize to
3246 issue warning and activate Implicit_Packing.
3247 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
3248 if the Esize is not known.
3249 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3250 for elementary types only.
3251 (Analyze_Record_Representation_Clause): Look at the RM size instead
3252 of the Esize to issue errors.
3253 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
3255 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
3257 Look at the RM size instead of the Esize for types if the latter is
3259 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3261 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3263 * sem_type.adb: proper handling of equality not involving anonymous
3266 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3268 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3269 Vis_Decls. When creating a library-level finalizer for a package spec,
3270 both the declaration and body of the finalizer are inserted either in
3271 the visible or private declarations of the package spec.
3273 2011-08-04 Javier Miranda <miranda@adacore.com>
3275 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3276 use of the full-view of a type when invoking Is_Ancestor.
3277 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3278 the full-view of private parents is requested, then use also the
3279 full-view of the parent of the first derivation.
3281 2011-08-04 Tristan Gingold <gingold@adacore.com>
3283 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3284 instead of the locally imported procedure.
3285 * s-taprop-mingw.adb (Enter_Task): Ditto.
3286 * s-valrea.adb (Scan_Real): Ditto.
3287 * s-imgrea.adb (Set_Image_Real): Ditto.
3288 * s-flocon.ads: Make the package pure.
3290 2011-08-04 Thomas Quinot <quinot@adacore.com>
3292 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3293 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3294 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3295 New subprogram, moved here from...
3296 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3297 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3298 rewriting of the last argument into a procedure call statement here...
3299 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3302 2011-08-04 Thomas Quinot <quinot@adacore.com>
3304 * par_sco.adb: Minor reformatting.
3306 2011-08-04 Robert Dewar <dewar@adacore.com>
3308 * erroutc.adb: Minor reformatting.
3310 2011-08-04 Thomas Quinot <quinot@adacore.com>
3312 * par_sco.adb: Comment update.
3314 2011-08-04 Tristan Gingold <gingold@adacore.com>
3316 * s-flocon.ads: New file.
3317 * g-flocon.ads: Now a renaming of s-flocon.
3318 * Makefile.rtl: Add s-flocon.o
3320 2011-08-04 Javier Miranda <miranda@adacore.com>
3322 * exp_strm.adb (Build_Array_Input_Function): if the array type is
3323 constrained, do not attempt to build a subtype of it.
3325 2011-08-04 Yannick Moy <moy@adacore.com>
3327 * errout.ads Change comments: remove 'R'M as an example where quotes
3328 are needed; add ALFA as another case where quotes are not needed
3329 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3330 case where quotes are not needed.
3331 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3332 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3333 Remove all occurrences of 'A'L'F'A
3335 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3337 * sem_ch13.adb: check legality of invariant pragma.
3339 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3341 * bindgen.adb: Add comments.
3343 2011-08-04 Yannick Moy <moy@adacore.com>
3345 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3347 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3348 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3350 2011-08-04 Robert Dewar <dewar@adacore.com>
3352 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3353 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3354 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3356 2011-08-04 Thomas Quinot <quinot@adacore.com>
3358 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3360 2011-08-04 Thomas Quinot <quinot@adacore.com>
3363 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3366 2011-08-04 Robert Dewar <dewar@adacore.com>
3368 * einfo.ads, exp_ch4.adb: Minor reformatting.
3370 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3372 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3374 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3376 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3377 type in all cases to compute list of primitive operations, because full
3378 view may be an itype that is not attached to the list of declarations.
3380 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3382 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3383 library has already been finalized.
3384 (Gen_Adafinal_C): Likewise.
3385 (Gen_Adainit_Ada): Generate an early return if the library has
3386 already been elaborated.
3387 (Gen_Adainit_C): Likewise.
3388 (Gen_Output_File_Ada): Generate an elaboration flag.
3389 (Gen_Output_File_C): Likewise.
3391 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3393 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3394 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3395 built in the first place.
3396 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3397 for CodePeer because Finalize_Address was not built to begin with.
3398 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3400 2011-08-04 Pascal Obry <obry@adacore.com>
3402 * adaint.c (__gnat_tmp_name): Use current process id to create temp
3403 filenames, this ensures unicity of filenames across processes.
3405 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3407 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3408 Raise_Controlled to Raise_From_Controlled_Operation. Update the
3409 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3410 Add False as the actual to From_Abort in the generated call to
3411 Raise_From_Controlled_Operation.
3413 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3415 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3416 so that the ali file name can be retrieved from outside of this package.
3417 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3418 doing nothing in the general case, but used to update the object file
3419 timestamp if directly generated by the backend.
3420 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3421 to a later time than the ali file one.
3423 2011-08-04 Yannick Moy <moy@adacore.com>
3425 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3426 entities whose body contains an Annotate pragma which forces formal
3428 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3429 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3430 Mark_Non_ALFA_Subprogram to pass in a message and node.
3431 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3432 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3433 surrounding subprogram.
3434 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3435 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3436 as not in ALFA is annotated with Formal_Proof being On, then an error
3437 is issued based on the additional parameters for message and node.
3438 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3439 * gcc-interface/Make-lang.in: Update dependencies.
3441 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3443 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3444 Finalize_Address when CodePeer is enabled.
3446 2011-08-04 Pascal Obry <obry@adacore.com>
3448 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3449 the latter returns a pointer to a static buffer which is deallocated
3450 at the end of the routine.
3452 2011-08-04 Yannick Moy <moy@adacore.com>
3454 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3455 after index creation; mark unconstrained base array type generated as
3456 being in/not in ALFA as well
3457 (Make_Index): mark subtype created as in/not in ALFA
3458 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3459 over a loop as in/not in ALFA, depending on its type and form of loop
3462 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3464 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3465 directly to False on .NET and JVM.
3467 2011-08-04 Yannick Moy <moy@adacore.com>
3469 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3470 constraint that subtype must come from source code to be in ALFA, so
3471 that anonymous subtypes can be in ALFA too.
3473 2011-08-04 Yannick Moy <moy@adacore.com>
3475 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3476 reference for ALFA mode.
3477 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3478 procedure public so as to use it from formal verification back-end.
3480 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3482 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3483 invalid checks of the Parameter, making Remove_Switch not working
3486 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3488 * targparm.ads: Update header: no run-time exception is needed on this
3491 2011-08-04 Vincent Celier <celier@adacore.com>
3493 * a-fihema.adb: Use System.IO instead of GNAT.IO
3495 2011-08-04 Thomas Quinot <quinot@adacore.com>
3497 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3498 are forbidden in Compiler_Unit mode.
3500 2011-08-04 Robert Dewar <dewar@adacore.com>
3502 * sem_util.adb: Minor reformatting.
3504 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3506 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3507 library-level finalizers.
3508 (Gen_Finalize_Library_C): Update the import string for library-level
3510 (Gen_Finalize_Library_Defs_C): Update the definition name of a
3511 library-level finalizer.
3512 * exp_ch7.adb: Remove with and use clauses for Stringt.
3513 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3514 Spec_Decl. Add local variable Body_Id. The names of library-level
3515 finalizers are now manually fully qualified and are no longer external.
3516 A single name is now capable of servicing .NET, JVM and non-VM targets.
3517 Pragma Export is no longer required to provide visibility for the name.
3518 (Create_Finalizer_String): Removed.
3519 (New_Finalizer_Name): New routine which mimics New_..._Name.
3521 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3523 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3524 elaboration counter to Standard_Short_Integer.
3525 * sem_util.adb (Build_Elaboration_Entity): Likewise.
3526 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3527 (Gen_Elab_Externals_C): Likewise.
3529 2011-08-04 Ed Falis <falis@adacore.com>
3531 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3532 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3533 system-vxworks-mips.ads, system-vxworks-x86.ads
3534 (Always_Compatible_Rep): set to False for all VxWorks targets.
3536 2011-08-04 Robert Dewar <dewar@adacore.com>
3538 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3539 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3540 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3541 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3542 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3543 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3544 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3545 Minor reformatting and code reorganization.
3547 2011-08-04 Emmanuel Briot <briot@adacore.com>
3549 * projects.texi: Added doc for aggregate projects.
3551 2011-08-04 Emmanuel Briot <briot@adacore.com>
3553 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3554 Add support for overriding the Project_Path in aggregate projects.
3556 2011-08-04 Robert Dewar <dewar@adacore.com>
3558 * a-cofove.ads: Minor reformatting.
3560 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3562 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3563 on the generated code.
3564 (Build_Finalize_Statements): Update the comment on the generated code.
3565 (Build_Initialize_Statements): Update the comment on the generated code.
3566 (Build_Object_Declarations): Add local variable Result. The object
3567 declarations are now built in sequence.
3568 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3571 2011-08-04 Robert Dewar <dewar@adacore.com>
3573 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3575 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3577 * einfo.ads (Elaboration_Entity): Document new definition and use.
3578 (Elaboration_Entity_Required): Adjust to above change.
3579 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3580 * exp_ch12.adb: And with and use for Snames.
3581 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3582 * exp_util.adb (Set_Elaboration_Flag): Likewise.
3583 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3584 <Check_Unit_Name>: Deal with N_Expanded_Name.
3585 <Attribute_Elaborated>: Extend to all unit names.
3586 * sem_elab.adb: And with and use for Uintp.
3587 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3588 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3589 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3590 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3591 from Gen_Adainit_Ada.
3592 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3593 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
3594 case, do not call System.Standard_Library.Adafinal; instead call
3595 finalize_library if needed.
3596 (Gen_Adafinal_C): Likewise.
3597 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3598 non-main program case.
3599 (Gen_Adainit_C): Generate a couple of external declarations here.
3600 In the main program case, set SSL.Finalize_Library_Objects.
3601 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3602 (Gen_Elab_Calls_C): Likewise.
3603 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
3604 (Gen_Finalize_Library_C): Likewise. Generate a full function.
3605 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3607 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3608 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
3610 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3611 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
3612 of external declarations. Call Gen_Finalize_Library_C.
3614 2011-08-04 Emmanuel Briot <briot@adacore.com>
3616 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3617 Compute_Compilation_Phases): new subprogram.
3618 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3619 The number of mains as well as the various compilation phases that
3620 need to be run are now project tree specific, since various
3621 aggregated trees might have different requirements. In particular,
3622 they do not all require bind or link phases.
3624 2011-08-04 Emmanuel Briot <briot@adacore.com>
3626 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3627 (Project_Tree_Appdata): New type.
3628 It is now possible to associate application-specific data to a project
3629 tree. In particular, this is used in the gprbuild builder to avoid a
3630 number of global tables and htables, especially now that there can be
3631 several project trees loaded at once because of aggregate projects.
3632 (Debug_Name): new procedure.
3633 * projects.texi: Clarify syntax of "**" for Source_Dirs
3635 2011-08-03 Emmanuel Briot <briot@adacore.com>
3637 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3638 the "roots" for a main.
3639 (Fill_From_Project): add support for aggregate projects. Main units
3640 in aggregated projects are now automatically added in the list of
3641 files to build (although this fails later on in gprbuild, because
3642 these files are not using the root proejct tree, so this needs
3644 * gcc-interface/Make-lang.in: Update dependencies.
3646 2011-08-03 Yannick Moy <moy@adacore.com>
3648 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3649 conditional expression in ALFA.
3650 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3651 expressions as not in ALFA.
3653 2011-08-03 Robert Dewar <dewar@adacore.com>
3655 * a-cofove.adb: Minor reformatting.
3657 2011-08-03 Emmanuel Briot <briot@adacore.com>
3659 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3660 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3662 These packages are more logically placed in the Queue package, since
3663 they manipulate the queue. It is also likely that they can be adapted
3664 for gnatmake, thus sharing more code.
3665 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3666 that we could move the above.
3668 2011-08-03 Emmanuel Briot <briot@adacore.com>
3670 * errutil.adb (Finalize): clean up the list of error messages on exit.
3671 Calling this subprogram multiple times will no longer show duplicate
3672 error messages on stderr.
3674 2011-08-03 Emmanuel Briot <briot@adacore.com>
3676 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3677 Getopt_Switches when we have already define a command line
3680 2011-08-03 Yannick Moy <moy@adacore.com>
3682 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3683 in ALFA. Instead, they are considered as assertions to prove.
3684 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3685 nodes as not in ALFA. Instead, include conditional expressions in ALFA
3686 if they have no ELSE part, or if they occur in pre- and postconditions,
3687 where the Condition cannot have side-effects in ALFA
3688 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3689 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3690 Instead, include type conversion between scalar types in ALFA.
3691 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3692 if-and-only-if its type is in ALFA.
3694 2011-08-03 Thomas Quinot <quinot@adacore.com>
3696 * scos.adb, get_scos.adb, put_scos.adb
3697 New code letter for decisions: G (entry guard)
3699 (Traverse_Subprogram_Body): Rename to...
3700 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3701 (Traverse_Protected_Body): New subprogram
3702 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3703 protected bodies and entry bodies.
3705 2011-08-03 Yannick Moy <moy@adacore.com>
3707 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3708 entities with get/set subprograms, which is set on procedure entities
3709 generated by the compiler for a postcondition.
3710 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3711 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3712 entity for a declaration
3713 (Get_Unique_Entity_For_Decl): new function returning an entity which
3714 represents a declaration, so that matching spec and body have the same
3717 2011-08-03 Robert Dewar <dewar@adacore.com>
3719 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3720 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3722 2011-08-03 Yannick Moy <moy@adacore.com>
3724 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3725 library-level because retriction No_Implicit_Dynamic_Code in the
3726 front-end prevents its definition as a local subprogram
3727 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3728 for reuse in other contexts
3729 (Traverse_Declarations_Or_Statements,
3730 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3731 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3732 procedures take a callback parameter to be called on all declarations
3734 (Traverse_All_Compilation_Units): new generic function to traverse a
3735 compilation unit and call a callback parameter on all declarations
3737 2011-08-03 Javier Miranda <miranda@adacore.com>
3739 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3740 in Java since they are always enclosed in a namespace that
3741 differentiates them, and overloaded entities are supported by the VM.
3743 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3745 * checks.adb (Determine_Range): If a computed bound of an operation is
3746 outside the range of the base type of the expression, and overflow
3747 checks are enabled, the result is unknown and cannot be used for any
3748 subsequent constant folding.
3749 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3750 unknown, so is the result of the comparison.
3752 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3754 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3755 From_Abort. When finalization was triggered by an abort, propagate
3756 Standard'Abort_Signal rather than Program_Error.
3757 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3759 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3760 From_Abort. When finalization was triggered by an abort, propagate
3761 Standard'Abort_Signal rather than Program_Error.
3762 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3764 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3765 Abort_Id. Update the calls to Build_Object_Declarations and
3766 Build_Raise_Statement to include Abort_Id.
3767 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3768 calls to Build_Object_Declarations and Build_Raise_Statement to include
3770 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3771 calls to Build_Object_Declarations and Build_Raise_Statement to include
3773 (Build_Components): Create an entity for Abort_Id when exceptions are
3774 allowed on the target.
3775 (Build_Finalizer): New local variable Abort_Id.
3776 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3777 calls to Build_Object_Declarations and Build_Raise_Statement to include
3779 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3780 declaration of flag Abort_Id to preserve the original abort status
3781 before finalization code is executed.
3782 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3783 runtime routine Raise_From_Controlled_Operation.
3784 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3785 Abort_Id. Update the call to Build_Object_Declarations to include
3786 Abort_Id. Update the layout of the finalizer body.
3787 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3788 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3789 clunky code to create all flags and objects related to
3790 exception propagation and replace it with a call to
3791 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3793 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3794 Add new formal Abort_Id and associated comment on its use.
3795 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3797 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3798 Remove the clunky code to create all flags and objects related to
3799 exception propagation and replace it with a call to
3800 Build_Object_Declarations. Update the call to Build_Raise_Statement.
3802 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3804 * s-tassta.adb: Fix minor typos.
3806 2011-08-03 Robert Dewar <dewar@adacore.com>
3808 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3809 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3811 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3813 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3814 to packages. This ensures that the finalizer body will not end up
3815 inside the freeze node.
3816 (Process_Declarations): Add code to detect whether a freeze node has a
3817 nested finalization collection.
3819 2011-08-03 Pascal Obry <obry@adacore.com>
3821 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3822 (Current_Session): Return a not null access to Session_Type.
3823 (Default_Session): Likewise.
3825 2011-08-03 Robert Dewar <dewar@adacore.com>
3827 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3828 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3830 2011-08-03 Pascal Obry <obry@adacore.com>
3832 * g-awk.ads: Minor comment fix.
3834 2011-08-03 Sergey Rybin <rybin@adacore.com>
3836 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3837 the tree structure related to discriminant constraints.
3838 Original_Discriminant cannot be used any more for computing the
3839 defining name for the reference to a discriminant.
3841 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3843 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3844 function is not visibly tagged, this is not a dispatching call and
3845 therfore is not Tag_Indeterminate, even if the function is marked as
3846 dispatching on result.
3848 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3850 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3851 (Expand_N_Free_Statement): Add a guard to protect against run-times
3852 which do not support controlled types.
3853 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3854 against run-times which do not support controlled types.
3855 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3856 against run-times which do not support controlled types.
3857 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3858 against run-times which do not support controlled types.
3859 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3860 protect against run-times which do not support controlled types.
3862 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3864 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3865 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3867 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3869 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3870 modified in the source, to prevent spurious warnings when compiling
3873 2011-08-03 Thomas Quinot <quinot@adacore.com>
3875 * a-except-2005.adb: Minor reformatting.
3877 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3879 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3880 is a renaming declaration in the private part of a package, do not emit
3881 a warning that the with_clause could be moved because the renaming may
3882 be used in the body or in a child unit.
3884 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3886 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3887 Propagate the Comes_From_Source attribute from the original return
3888 object to the renaming.
3890 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3892 * exp_ch7.adb (Build_Raise_Statement): Do not call
3893 Raise_From_Controlled_Operation when this routine is not present in
3894 the run-time library.
3895 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3896 libraries (Ravenscar), tasks are non-terminating, and protected objects
3897 and tasks can only appear at library level, so we do not want
3898 finalization of protected objects nor tasks.
3899 * exp_intr.adb: Minor clarification in comment.
3900 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3901 Gen_Output_File_C): Remove references to finalization of library-level
3902 objects when using restricted run-time libraries.
3904 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3906 * sem_ch3.adb (Build_Discriminant_Constraints): Set
3907 Original_Discriminant only if the parent type is a generic formal.
3909 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3911 * exp_ch13.adb: Add with and use clause for Targparm;
3912 (Expand_N_Free_Statement): Prevent the generation of a custom
3913 Deallocate on .NET/JVM targets since this requires pools and address
3915 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3916 .NET/JVM targets, attach the newly allocated object to the access
3917 type's finalization collection. Do not generate a call to
3918 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3919 exist in the runtime.
3920 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3921 create a custom Allocate for object that do not require initialization.
3922 Attach a newly allocated object to the access type's finalization
3923 collection on .NET/JVM.
3924 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3925 assignment of controlled types on .NET/JVM. The two hidden pointers
3926 Prev and Next and stored and later restored after the assignment takes
3928 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3929 kludge for .NET/JVM to recognize a particular piece of code coming from
3930 Heap_Management and change the call to Finalize into Deep_Finalize.
3931 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3932 finalization collections on .NET/JVM only for types derived from
3933 Controlled. Separate the association of storage pools with a collection
3934 and only allow it on non-.NET/JVM targets.
3935 (Make_Attach_Call): New routine.
3936 (Make_Detach_Call): New routine.
3937 (Process_Object_Declarations): Suppress the generation of
3938 build-in-place return object clean up code on .NET/JVM since it uses
3940 * exp_ch7.ads (Make_Attach_Call): New routine.
3941 (Make_Detach_Call): New routine.
3942 * exp_intr.adb Add with and use clause for Targparm.
3943 (Expand_Unc_Deallocation): Detach a controlled object from a collection
3944 on .NET/JVM targets.
3945 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3946 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3947 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3948 names used in finalization.
3950 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3952 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3953 (Attach, Detach): Lock the current task when chaining an object onto a
3956 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3958 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3959 Rewritten to create the message strings when the exception is not
3960 raised by an abort during finalization.
3961 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3962 Raise_From_Controlled_Operation and update its associated comment.
3963 * a-fihema.ads, a-fihema.adb: New GNAT unit.
3964 Ada.Finalization.Heap_Management provides key functionality
3965 associated with controlled objects on the heap, their creation,
3966 finalization and reclamation. Type Finalization_Collection is
3967 effectively a wrapper which sits ontop of a storage pool and performs
3968 all necessary bookkeeping for all the objects it contains. Each
3969 access-to-controlled or access-to-class-wide type receives a collection
3970 as part of its expansion. The compiler generates buffer code and
3971 invokes Allocate / Deallocate to create and destroy allocated
3973 * a-finali.adb ("="): Removed.
3974 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3975 fields Prev and Next.
3976 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3977 A library unit with at least one controlled object on the library level
3978 has a special finalizer which is invoked by the binder. To signal this,
3979 ali files carry field PF.
3980 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3981 associated comment on field usage.
3982 * a-tags.adb (Get_RC_Offset): Removed.
3983 (Needs_Finalization): New routine.
3984 * a-tags.ads: Update the structure of the GNAT dispatch tables.
3985 Dispatch tables now carry field Needs_Finalization which provides
3986 runtime indication whether a type is controlled or has controlled
3987 components or both. Remove field RC_Offset.
3988 (Get_RC_Offset): Removed along with its associated pragma Export.
3989 Since tagged types with controlled components no longer carry hidden
3990 field _controller, the special mechanism to retrieve its location is no
3992 (Needs_Finalization): New routine.
3993 * atree.ads, atree.adb (Elist24): New routine.
3994 (Set_Elist24): New routine.
3995 * atree.h: Add a define clause for Elist24.
3996 * bindgen.adb New library-level variable Lib_Final_Built.
3997 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3998 presence of a VM target, the routine generates calls to the proper
3999 library finalization routine.
4000 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4001 targets. Set the correct library finalization routine depending on
4002 whether the library has controlled objects or this is a VM compilation.
4003 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4004 to library-level finalizers of compiled units in reverse order of
4005 elaboration. It also produces exception management code and reraises a
4006 potential exception after all units have been finalized.
4007 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4008 library-level finalizers of compiled units in reverse order of
4010 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4011 definitions of all library-level finalizers available to the compilation
4012 (Gen_Main_Ada): Directly call Adafinal which now contails all target
4014 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4015 System.Standard_Library.Adafinal directly. If the library needs
4016 finalization actions, create the sequence of finalization calls.
4017 (Gen_Output_File_Ada): Alphabetize local variables and constants.
4018 Generate a with clause for System.Soft_Links when compiling for a VM.
4019 Remove the code which imports System.Standard_Library.Adafinal as
4020 Do_Finalize. Generate the library finalization routine.
4021 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4022 If the library needs finalization actions, create all the definitions
4023 of library- level finalizers.
4024 (Has_Finalizer): New routine. Determines whether at least one compiled
4025 unit has a library-level finalizer.
4026 Add type Qualification_Mode.
4027 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4028 * einfo.adb: New usage of field 15 as Return_Flag.
4029 Remove Finalization_Chain_Entity from the usages of field 19.
4030 Remove Associated_Final_Chain from the usages of field 23.
4031 New usage of field 23 as Associated_Collection.
4032 New usage of field 24 as Finalizer.
4033 New usage of flag 252 as Is_Processed_Transient.
4034 (Associated_Final_Chain): Removed.
4035 (Associated_Collection): New routine.
4036 (Finalization_Chain_Entity): Removed.
4037 (Finalizer): New routine.
4038 (Is_Finalizer): New routine.
4039 (Is_Processed_Transient): New routine.
4040 (Return_Flag): New routine.
4041 (Set_Associated_Final_Chain): Removed.
4042 (Set_Associated_Collection): New routine.
4043 (Set_Finalization_Chain_Entity): Removed.
4044 (Set_Finalizer): New routine.
4045 (Set_Is_Processed_Transient): New routine.
4046 (Set_Return_Flag): New routine.
4047 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4049 (Write_Field8_Name): Alphabetize the output.
4050 (Write_Field11_Name): Alphabetize the output.
4051 (Write_Field12_Name): Alphabetize the output.
4052 (Write_Field13_Name): Alphabetize the output.
4053 (Write_Field14_Name): Alphabetize the output.
4054 (Write_Field15_Name): Alphabetize the output.
4055 (Write_Field16_Name): Alphabetize the output.
4056 (Write_Field17_Name): Alphabetize the output.
4057 (Write_Field18_Name): Alphabetize the output.
4058 (Write_Field19_Name): Alphabetize the output. Remove the output of
4059 Finalization_Chain_Entity.
4060 (Write_Field20_Name): Alphabetize the output.
4061 (Write_Field21_Name): Alphabetize the output.
4062 (Write_Field22_Name): Alphabetize the output.
4063 (Write_Field23_Name): Alphabetize the output. Remove the output of
4064 Associated_Final_Chain. Add output for Associated_Collection.
4065 (Write_Field24_Name): Alphabetize the output.
4066 (Write_Field25_Name): Add output for Finalizer.
4067 (Write_Field26_Name): Alphabetize the output.
4068 (Write_Field27_Name): Alphabetize the output.
4069 (Write_Field28_Name): Alphabetize the output.
4070 * einfo.ads: Add new field description for Associated_Collection and
4072 Remove Associated_Final_Chain and its uses in nodes.
4073 Remove Finalization_Chain_Entity and its uses in nodes.
4074 Add new field description for Finalizer and its uses in nodes.
4075 Add new synthesized attribute Is_Finalizer.
4076 Add new flag description for Is_Processed_Transient and its uses in
4078 Add new field description for Return_Flag and its uses in nodes.
4079 (Associated_Final_Chain): Removed along with its pragma Inline.
4080 (Associated_Collection): New routine and pragma Inline.
4081 (Finalization_Chain_Entity): Removed along with its pragma Inline.
4082 (Finalizer): New routine and pragma Inline.
4083 (Is_Finalizer): New routine and pragma Inline.
4084 (Is_Processed_Transient): New routine and pragma Inline.
4085 (Return_Flag): New routine and pragma Inline.
4086 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4087 (Set_Associated_Collection): New routine and pragma Inline.
4088 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4089 (Set_Finalizer): New routine and pragma Inline.
4090 (Set_Is_Processed_Transient): New routine and pragma Inline.
4091 (Set_Return_Flag): New routine and pragma Inline.
4092 * exp_aggr.adb: Alphabetize subprograms.
4093 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4094 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4095 associated comments. Remove local variables External_Final_List and
4097 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4098 Ancestor. Remove the retrieval of finalization lists. Update the call to
4100 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4101 lists. Update the call to Late_Expansion.
4102 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4103 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4104 (Gen_Assign): Remove the retrieval of the finalization list used to
4105 build the assignment. Update the calls to Make_Init_Call and
4107 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4108 Remove the mechanism to determine attachment levels and finalization
4109 list retrieval. Remove the processing for coextensions.
4110 (Init_Controller): Removed. Controllers no longer exist.
4111 (Late_Expansion): Remove formals Flist and Obj along with their
4112 associated comments. Update the calls to Build_Record_Aggr_Code and
4113 Build_Array_Aggr_Code.
4114 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4115 (Expand_N_Freeze_Entity): Add special processing for finalizers which
4116 appear in entry bodies, protected subprograms and task bodies.
4117 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4118 * exp_ch3.adb (Add_Final_Chain): Removed.
4119 (Build_Array_Init_Proc): Alphabetize local variables.
4120 (Build_Assignment): Alphabetize local variables. Update the call to
4122 (Build_Class_Wide_Master): Rename local variables to better reflect
4124 (Build_Discriminant_Assignments): Code reformatting.
4125 (Build_Init_Call_Thru): Code reformatting.
4126 (Build_Init_Procedure): Code reformatting. Generate a special version
4127 of Deep_Finalize which is capable of finalizing all initialized
4128 components and ignore the rest.
4129 (Build_Init_Statements): Rename local variables to better reflect their
4131 Reimplement the mechanism to include the creation and update of an index
4132 variable called a "counter". It is used as a bookmark for tracing
4133 initialized and non-initialized components.
4134 (Build_Initialization_Call): Remove local variable Controller_Typ.
4135 Alphabetize all local variables. Remove the initialization of the
4136 record controller and update the call to Make_Init_Call.
4137 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4138 New local variable Counter.
4139 (Constrain_Array): Alphabetize.
4140 (Expand_Freeze_Array_Type): Create a collection instead of a
4142 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4143 Finalize_Address which is used in conjunction with allocated controlled
4145 (Expand_N_Object_Declaration): Remove the creation of a finalization
4146 list for anonymous access types. Update the calls to Make_Init_Call and
4148 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4149 retrieval of finalization lists. Remove the expansion of the record
4150 controller. Create TSS primitive Finalize_Address used in conjunction
4151 with controlled objects on the heap. Create finalization collections
4152 for access-to-controlled record components.
4153 (Expand_Record_Controller): Removed.
4154 (Freeze_Type): Remove the freezing of record controllers. Freezing of
4155 class-wide types now requires additional processing. Create
4156 finalization collections for access-to-controlled types.
4157 (Increment_Counter): New routine.
4158 (Make_Counter): New routine.
4159 (Make_Eq_If): Remove the mention of Name_uController.
4160 (Make_Predefined_Primitive_Specs): There is no longer need to skip
4161 types coming from System.Finalization_Root.
4162 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4163 (Predefined_Primitive_Bodies): There is no longer need to skip types
4164 coming from System.Finalization_Root.
4165 (Stream_Operation_OK): Do not generate stream routines for
4166 type Ada.Finalization.Heap_Management.Finalization_Collection.
4167 * exp_ch3.ads: Alphabetize subprograms.
4168 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4169 Add with and use clause for Lib.
4170 (Complete_Coextension_Finalization): Removed.
4171 (Complete_Controlled_Allocation): New routine. Create a finalization
4172 collection for anonymous access-to-controlled types. Create a custom
4173 Allocate which interfaces with the back end and the machinery in
4175 (Expand_Allocator_Expression): Add necessary calls to
4176 Complete_Controlled_Allocation. Remove the retrieval of finalization
4177 lists. Update the calls to Make_Adjust_Call. Generate a call to
4178 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4179 the associated collection.
4180 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4181 Code clean up. Remove the retrieval of finalization lists and
4183 Update the call to Make_Init_Call. Generate a call to
4184 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4185 the associated collection.
4186 (Get_Allocator_Final_List): Removed. Finalization lists are not
4188 (Suitable_Element): Remove the mention of Name_uController.
4189 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4190 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4191 the left hand side, carry out the assignment and adjust the left hand
4193 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4194 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4195 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4196 BIP_Collection and BIPcollection.
4197 (Build_Heap_Allocator): New routine used to allocate the return object
4198 of a build-in-place function onto a collection.
4199 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4200 (Expand_Call): Do not replace direct calls to Deep routines with their
4202 (Expand_N_Extended_Return_Statement): Give all variables shorter names
4203 and update their occurrences. Add a special return flag to monitor the
4204 [ab]normal execution of the function. The flag is set right before the
4206 Rewrite the mechanism used to allocate a build-in-place return object
4207 on the heap or on a storage pool.
4208 (Is_Direct_Deep_Call): New routine.
4209 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4210 build-in-place function call instead of a final list. Build a call to
4211 Set_Finalize_Address_Ptr to decorate the associated collection.
4212 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4213 order to name the build-in-place function call's result for later
4214 finalization. Add a collection to a build-in-place function call
4215 instead of a final list.
4216 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4217 build-in-place function call instead of a final list. Remove the code
4218 which moves one final list and transforms it into the actual in a
4219 nested build-in-place call.
4220 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4221 build-in-place function call instead of a final list.
4222 (Move_Final_List): Removed.
4223 (Needs_BIP_Collection): New routine.
4224 (Needs_BIP_Final_List): Removed.
4225 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4226 enumeration type BIP_Formal_Kind.
4227 Update the related comment.
4228 (Needs_BIP_Collection): New routine.
4229 (Needs_BIP_Final_List): Removed.
4230 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4231 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4232 majority of subprograms in this unit. Add Name_Finalize_Address to
4233 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4234 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4235 statements for an array type.
4236 (Build_Adjust_Statements): Create the adjust statements for a record
4238 (Build_Cleanup_Statements): New routine. A procedure which given any
4239 construct containing asynchronous calls, references to _master, or is a
4240 task body, a task allocation or a protected body produces the necessary
4241 runtime calls to clean up these constructs.
4242 (Build_Exception_Handler): New routine.
4243 (Build_Final_List): Removed.
4244 (Build_Finalization_Collection): New routine. A core procedure which
4245 creates a collection to service heap allocated controlled objects
4246 associated with an access-to-controlled type.
4247 (Build_Finalize_Statements): Create the finalization statements for a
4249 (Build_Finalizer): New routine. A core procedure which given any
4250 construct with declarations and/or statements detects all objects which
4251 need any type of clean up (controlled objects, protected objects) and
4252 generates all necessary code to clean up the said objects in the proper
4254 (Build_Finalizer_Call): New routine.
4255 (Build_Initialize_Statements): Create the initialization statements for
4256 an array type. The generated routine contains code to finalize partially
4258 (Build_Object_Declarations): New routine.
4259 (Build_Raise_Statement): New routine.
4260 (Clean_Simple_Protected_Objects): Removed.
4261 (Controller_Component): Removed.
4262 (Enclosing_Function): New routine.
4263 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4264 either declarations or statements or both.
4265 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4266 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4268 (Find_Final_List): Removed.
4269 (Global_Flist_Ref): Removed.
4270 (In_Finalization_Root): Removed.
4271 (Insert_Actions_In_Scope_Around): Determine the range of the transient
4272 scope in terms of tree nodes. Process all transient variables within
4274 (Make_Adjust_Call): Rewritten. There is no longer an attach call
4275 generated after the adjust.
4276 (Make_Attach_Call): Removed.
4277 (Make_Call): New routine.
4278 (Make_Clean): Removed.
4279 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4281 (Make_Deep_Proc): Rewritten to generate the new profile signature used
4283 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4285 (Make_Final_Call): Modified to simply create a call to either
4286 Deep_Finalize or Finalize.
4287 (Make_Finalize_Address_Body): New routine.
4288 (Make_Finalize_Address_Stmts): New routine. A function which produces
4289 TSS primitive Finalize_Address used in conjunction with heap allocated
4291 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4292 (Make_Init_Call): Rewritten. There is no longer an attach call
4293 generated after initialization.
4294 (Make_Local_Deep_Finalize): New routine.
4295 (Make_Set_Finalize_Address_Ptr_Call): New routine.
4296 (Make_Transient_Block): Remove the finalization list retrieval and
4298 (Needs_Finalization): Moved to Exp_Util.
4299 (Parent_Field_Type): New routine.
4300 (Preprocess_Components): New routine.
4301 (Process_Transient_Objects): New routine.
4302 (Wrap_HSS_In_Block): New routine.
4303 (Wrap_Transient_Declaration): Remove finalization list management and
4304 controller insertion.
4305 (Wrap_Transient_Expression): Code reformatting.
4306 (Wrap_Transient_Statement): Code reformatting.
4307 * exp_ch7.ads (Build_Final_List): Removed.
4308 (Build_Finalization_Collection): New routine.
4309 (Build_Raise_Statement): New routine.
4310 (Controller_Component): Removed.
4311 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4312 (Find_Final_List): Removed.
4313 (In_Finalization_Root): Removed.
4314 (Is_Simple_Protected_Type): Update related comment.
4315 (Make_Adjust_Call): New parameter profile and associated comments.
4316 (Make_Attach_Call): Removed.
4317 (Make_Final_Call): New parameter profile and associated comments.
4318 (Make_Finalize_Address_Body): New routine.
4319 (Make_Init_Call): New parameter profile and associated comments.
4320 (Make_Local_Deep_Finalize): New routine.
4321 (Make_Set_Finalize_Address_Ptr_Call): New routine.
4322 (Needs_Finalization): Moved to Exp_Util.
4323 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4324 (Expand_N_Protected_Body): Remove the handling of finalization lists.
4325 (Find_Protection_Type): Moved to Exp_Util.
4326 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4327 (Make_DT): Update sequence of dispatch table initialization. Remove the
4328 initialization of field RC_Offset. Add initialization of field Needs_
4330 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4331 Reimplement how an object is first finalized, then deallocated.
4332 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4334 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4335 Register TSS_Finalize_Address with type TSS_Names.
4336 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4337 procedure provides the interface between an allocation / deallocation
4338 and the support machinery in Ada.Finalization.Heap_Management.
4339 (Find_Init_Call): Code reformatting.
4340 (Find_Init_Call_In_List): Code reformatting.
4341 (Find_Protection_Type): Moved from Exp_Ch9.
4342 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4343 (Has_Controlled_Coextensions): Removed.
4344 (Has_Controlled_Objects): New routine.
4345 (In_Library_Level_Package_Body): New routine.
4346 (Insert_Action_After): New routine.
4347 (Is_Finalizable_Transient): New routine. This predicate determines
4348 whether an object declaration is one of the many variants of controlled
4350 (Is_Null_Access_BIP_Func_Call): New routine.
4351 (Is_Non_BIP_Func_Call): New routine.
4352 (Is_Related_To_Func_Return): New routine.
4353 (Needs_Finalization): Moved from Exp_Ch7.
4354 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4355 (Find_Protection_Type): Moved from Exp_Ch9.
4356 (Has_Controlled_Coextensions): Removed.
4357 (Has_Controlled_Objects): New routine.
4358 (In_Library_Level_Package_Body): New routine.
4359 (Insert_Action_After): New routine.
4360 (Is_Finalizable_Transient): New routine.
4361 (Is_Null_Access_BIP_Func_Call): New routine.
4362 (Is_Non_BIP_Func_Call): New routine.
4363 (Is_Related_To_Func_Return): New routine.
4364 (Needs_Finalization): Moved from Exp_ch7.
4365 * expander.adb (Expand): Add a case for N_Free_Statement.
4366 * freeze.adb (Freeze_All): Replace the generation of a finalization
4367 list with a collection for access-to-controlled types.
4368 (Freeze_Entity): Code reformatting.
4369 (Freeze_Record_Type): Remove the freezing of a record controller
4371 (Freeze_Subprogram): Code reformatting.
4372 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4374 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4375 has a library-level finalizer.
4376 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4377 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4378 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4379 files. Add a-fihema to the list of object files.
4381 Alphabetize the associations in type Is_Parameterless_Attribute.
4382 * rtsfind.ads: Ada.Finalization_List.Controller and
4383 System.Finalization_Implementation are no longer a GNAT unit.
4384 Update the range of type Ada_Finalization_Child. Remove the following
4385 recoverable entities:
4387 RE_Attach_To_Final_List
4391 RE_Finalizable_Ptr_Ptr
4392 RE_Global_Final_List
4393 RE_Limited_Record_Controller
4396 RE_Record_Controller
4397 RE_Simple_List_Controller
4399 Add the following recoverable entities:
4401 RE_Add_Offset_To_Address
4405 RE_Exception_Identity
4406 RE_Finalization_Collection
4407 RE_Finalization_Collection_Ptr
4408 RE_Needs_Finalization
4409 RE_Save_Library_Occurrence
4410 RE_Set_Finalize_Address_Ptr
4411 RE_Set_Storage_Pool_Ptr
4413 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4415 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4416 (First_Stored_Discriminant): Remove the mention of Name_uController.
4417 * sem_aux.ads: Comment reformatting.
4418 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4419 to redecorate an already existing class-wide type.
4420 (Decorate_Tagged_Type): New parameter profile and associated comment.
4421 Create a "shadow class-wide type" for a shadow entity.
4422 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4423 of the final chain along with the associated comment.
4424 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4425 Full_Desig and set it to the full view of the designated type.
4426 Initialize the finalization collection to empty.
4427 (Build_Derived_Record_Type): Alphabetize local variables. Code
4429 (Collect_Fixed_Components): Remove the mention of Name_uController.
4430 (Create_Constrained_Components): Remove the mention of Name_uController.
4431 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4432 class-wide type of a shadow entity.
4433 (Process_Full_View): Update the machinery which marks type
4434 Limited_Controlled's entity as limited.
4435 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4436 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4437 list, instead make a collection build-in-place formal.
4438 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4439 a designated type in order to establish a match between the renaming
4440 and the renamed entity.
4441 (Find_Selected_Component): Add guard to prevent spurious exceptions
4442 from being raised on .NET/JVM.
4443 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4444 to the list of primitive that need special processing. Update arrays
4445 C_Names and D_Names.
4446 (Replace_Types): Handle class-wide types.
4447 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4448 different parameter profile, look at the first formal.
4449 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4450 use clauses for Exp_Util.
4451 * sem_res.adb: Remove with and use clauses for Elists.
4452 (Propagate_Coextensions): Removed.
4453 (Resolve_Allocator): Do not propagate the list of coextensions from one
4454 allocator to another.
4455 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4456 Deaccessed_T to Desig_Typ.
4457 (Enter_Name): Remove the mention of Name_uController.
4458 (Gather_Components): Remove the mention of Name_uController.
4459 (Incomplete_Or_Private_View): New routine.
4460 (Is_Coextension_Root): Removed.
4461 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4462 * sem_util.ads (Incomplete_Or_Private_View): New routine.
4463 (Is_Coextension_Root): Removed.
4464 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4465 Controlled types are now derived from a null tagged record. Remove
4466 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4467 * sinfo.adb (Coextensions): Removed.
4468 (Set_Coextensions): Removed.
4469 * sinfo.ads: Remove Coextensions from the explanation of node fields
4470 and its uses in nodes.
4471 Update the field usage of N_Allocator.
4472 (Coextensions): Removed along with its pragma Inline.
4473 (Set_Coextensions): Removed along with its pragma Inline.
4474 * snames.ads-tmpl: Remove names
4479 Name_uLocal_Final_List
4480 Name_Finalization_Root
4487 Name_Finalize_Address
4488 * s-pooglo.adb (Allocate): Add overriding indicator.
4489 (Deallocate): Add overriding indicator.
4490 (Storage_Size): Add overriding indicator.
4491 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4492 than Finalize_Global_List.
4493 (Null_Finalize_Global_List): Removed.
4494 (Save_Library_Occurrence): New routine.
4495 * s-soflin.ads: Remove variable Finalize_Global_List along with its
4496 initialization. Add variable Finalize_Library_Objects along with its
4497 pragma Export. Add variables Library_Exception and
4498 Library_Exception_Set along with their pragma Export.
4499 (Null_Finalize_Global_List): Removed.
4500 (Save_Library_Occurrence): New routine.
4501 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4502 rather than Finalize_Global_List.
4503 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4504 of the constructed node.
4506 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4508 * link.c: Include "auto-host.h" before system headers.
4510 2011-08-03 Vincent Celier <celier@adacore.com>
4512 * make.adb (Gnatmake): Add to table Library_Projs only library projects
4513 that are not extended. Do not check if a library project that is
4514 extended should be regenerated. Do not add to table Library_Paths the
4515 libraries that are in extended projects. Link only with libraries that
4516 are in libray projects that are not extended.
4517 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4518 for a library project that is extended.
4520 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4522 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4523 conforming subprogram renamings that appear to be completions if they
4524 are not fully conformant.
4525 Such renamings are homographs but not completions.
4526 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4527 names in a subprogram renaming that appears in an instance.
4529 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4531 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4532 not immutably limited, build actual subtype from expression to provide
4533 proper bounds to caller.
4535 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4537 * sem_ch8.adb: Minor comment correction.
4539 2011-08-03 Thomas Quinot <quinot@adacore.com>
4541 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4542 returning a limited array, use an extended return statement.
4544 2011-08-03 Vincent Celier <celier@adacore.com>
4546 * make.adb (Initialize): If --subdirs= is used, but no project file is
4547 specified, attempt to create the specify subdir if it does not already
4548 exist and use it as the object directory as if -D had been specified.
4550 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4552 * s-tpopsp-vms.adb: New file.
4553 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4554 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4556 2011-08-03 Emmanuel Briot <briot@adacore.com>
4558 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4561 2011-08-03 Yannick Moy <moy@adacore.com>
4563 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4564 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4565 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4566 detect that an array has static bounds.
4568 2011-08-03 Thomas Quinot <quinot@adacore.com>
4570 * exp_dist.adb: Minor reformatting.
4572 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4574 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4575 (ATCB_Key): Removed, not always used.
4577 2011-08-03 Emmanuel Briot <briot@adacore.com>
4579 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4580 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4581 most remaining global variables.
4583 2011-08-03 Robert Dewar <dewar@adacore.com>
4585 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4586 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4589 2011-08-03 Javier Miranda <miranda@adacore.com>
4591 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4592 that must be passed by copy in VM targets.
4594 2011-08-03 Emmanuel Briot <briot@adacore.com>
4596 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4597 duplicates a similar htable now in the project tree.
4599 2011-08-03 Claire Dross <dross@adacore.com>
4601 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4602 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4603 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4604 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4605 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4606 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4607 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4610 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4612 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4613 (ATCB_Key): Removed, not always used.
4614 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4616 * s-tpopsp-tls.adb: New file.
4617 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4618 x86/x64/ia64/powerpc/sparc Linux.
4620 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4622 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4623 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4625 2011-08-03 Thomas Quinot <quinot@adacore.com>
4627 * rtsfind.ads, exp_dist.adb, exp_dist.ads
4628 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4629 Fix type selection for mapping integer types to PolyORB types.
4631 2011-08-03 Bob Duff <duff@adacore.com>
4633 * sem_ch7.adb: Minor comment clarification.
4635 2011-08-03 Bob Duff <duff@adacore.com>
4637 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4638 an error analyzing a choice, skip further processing. Further
4639 processing could cause a crash or cascade errors.
4641 2011-08-03 Emmanuel Briot <briot@adacore.com>
4643 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4644 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4645 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4646 prj-env.ads (Shared_Project_Tree_Data): new type
4647 An aggregate project and its aggregated trees need to share the common
4648 data structures used for lists of strings, packages,... This makes the
4649 code simpler since otherwise we have to pass the root tree (also used
4650 for the configuration file data) in addition to the current project
4651 tree. This also avoids ambiguities as to which tree should be used.
4652 And finally this saves a bit of memory.
4653 (For_Every_Project_Imported): new parameter Tree.
4654 Since aggregated projects are using a different tree, we need to let
4655 the caller know which tree to use to manipulate the returned project.
4657 2011-08-03 Robert Dewar <dewar@adacore.com>
4659 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4660 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4661 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4662 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4664 2011-08-03 Javier Miranda <miranda@adacore.com>
4666 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4667 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4669 2011-08-03 Bob Duff <duff@adacore.com>
4671 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4674 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
4676 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4677 g-sehash.ads: Fix typo. Update header.
4679 2011-08-03 Thomas Quinot <quinot@adacore.com>
4681 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4684 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4686 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4687 prefixes of private types along with records, since the selector may be
4689 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4690 private types along with records, since the selector may be a
4693 2011-08-03 Emmanuel Briot <briot@adacore.com>
4695 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4697 2011-08-03 Javier Miranda <miranda@adacore.com>
4699 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4700 Tagged_Type_Expansion.
4702 2011-08-03 Yannick Moy <moy@adacore.com>
4704 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4705 violation when the argument of concatenation is the name of a
4708 2011-08-03 Emmanuel Briot <briot@adacore.com>
4710 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4711 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4712 (Process_Declarative_Items): new parameter Child_Env.
4714 2011-08-03 Yannick Moy <moy@adacore.com>
4716 * alfa.ads: Update format of ALFA section in ALI file in order to
4717 add a mapping from bodies to specs when both are present.
4718 (ALFA_Scope_Record): Add components for spec file/scope.
4719 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4721 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4722 collected, fill in the spec information when relevant.
4723 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4726 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4728 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4729 code unit to decide whether to add internally generated subprograms.
4731 2011-08-03 Javier Miranda <miranda@adacore.com>
4733 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4734 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4735 be handled by copy in VM targets.
4737 2011-08-03 Emmanuel Briot <briot@adacore.com>
4739 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4740 code with Makeutl.Get_Switches.
4741 * prj-tree.adb: Update comment.
4743 2011-08-03 Thomas Quinot <quinot@adacore.com>
4745 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4746 subprogram with a limited formal that does not support external
4749 2011-08-03 Yannick Moy <moy@adacore.com>
4751 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4753 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4754 not from current unit in two phases, because it is not possible to
4755 change the table while iterating over its content.
4756 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4758 2011-08-03 Sergey Rybin <rybin@adacore.com>
4760 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4761 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4763 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4765 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4766 and the component type is composite, this is ambiguous for predefined
4767 concatenation, but if the node is not overloaded and the entity is a use
4768 -defined function its profile can be used to resolve that aggregate.
4770 2011-08-03 Robert Dewar <dewar@adacore.com>
4772 * exp_ch4.adb: Minor code cleanup.
4774 2011-08-03 Thomas Quinot <quinot@adacore.com>
4776 * exp_dist.adb: Do not generate distribution stubs if serious errors
4777 have been diagnosed.
4779 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4781 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4782 the first formal of a primitive operation, go to the base type to
4783 handle properly an access to a derived type with constrained
4785 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4786 user-defined function that is only use-visible.
4788 2011-08-03 Robert Dewar <dewar@adacore.com>
4790 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4791 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4792 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4793 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4794 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4795 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4796 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4797 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4799 2011-08-03 Robert Dewar <dewar@adacore.com>
4801 * repinfo.adb (List_Mechanism): Add handling of
4802 Convention_Ada_Pass_By_XXX.
4803 * sem_mech.adb (Set_Mechanism): Ditto.
4804 * sem_prag.adb (Process_Convention): Add entries for
4805 Convention_Ada_Pass_By_XXX.
4806 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4808 2011-08-03 Pascal Obry <obry@adacore.com>
4810 * makeutl.adb: Minor reformatting.
4812 2011-08-03 Vincent Celier <celier@adacore.com>
4815 (Get_File_Name) If the file cannot be found when there are no config
4816 pragmas file and May_Fail is True, return No_File instead of the file
4817 name, to be consistent.
4819 2011-08-03 Pascal Obry <obry@adacore.com>
4821 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4824 2011-08-03 Javier Miranda <miranda@adacore.com>
4827 (Same_Representation): In VM targets the representation of arrays with
4828 aliased components differs from arrays with non-aliased components.
4830 2011-08-03 Emmanuel Briot <briot@adacore.com>
4832 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4833 not systematically lower case attribute indexes that contain no "."
4834 Fix definition of several Naming attributes, which take
4835 a unit name as index and therefore should be case insensitive.
4836 Minor refactoring (reduce length of variable names).
4838 2011-08-03 Emmanuel Briot <briot@adacore.com>
4840 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4842 2011-08-03 Emmanuel Briot <briot@adacore.com>
4844 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4845 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4846 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4847 prj-tree.ads (Prj.Tree.Environment): new type.
4849 2011-08-03 Emmanuel Briot <briot@adacore.com>
4851 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4852 prj-tree.adb, prj-tree.ads (Environment): new type.
4854 2011-08-03 Emmanuel Briot <briot@adacore.com>
4856 * prj-tree.ads: Remove unused variable.
4858 2011-08-03 Yannick Moy <moy@adacore.com>
4860 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4861 issuing messages related to SPARK restriction violation.
4863 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4865 * sem_ch6.adb: guard against error nodes in return statements.
4867 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4869 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4870 a warning can only appear on a configuration file, so emit warning
4871 without further checks.
4873 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4875 * s-interr.ads: add overriding keyword.
4877 2011-08-03 Geert Bosch <bosch@adacore.com>
4879 * exp_attr.adb: Fix minor typo.
4881 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4883 * par-ch4.adb: improve error recovery.
4885 2011-08-03 Emmanuel Briot <briot@adacore.com>
4887 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4888 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4891 2011-08-03 Emmanuel Briot <briot@adacore.com>
4893 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4894 "external" as an attribute name in aggregate projects.
4896 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4898 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4899 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4900 from 0, so we need to adjust.
4902 2011-08-03 Emmanuel Briot <briot@adacore.com>
4904 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4905 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4907 2011-08-03 Yannick Moy <moy@adacore.com>
4909 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4910 restriction on overloaded entity if the entity is not an operator.
4912 2011-08-03 Yannick Moy <moy@adacore.com>
4914 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4915 restrict.ads: Rename remaining Check_Formal_Restriction* into
4916 Check_SPARK_Restriction*.
4918 2011-08-03 Emmanuel Briot <briot@adacore.com>
4920 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4921 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4923 (Project_Empty): removed
4924 (Empty_Project): new parameter Qualifier
4925 This is used to have fields specific to aggregate projects, cleaner
4926 New field to store the list of aggregated projects.
4927 (Check_Aggregate_Project): removed
4928 (Process_Aggregated_Projects, Free): new subprograms.
4930 2011-08-03 Olivier Hainque <hainque@adacore.com>
4932 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4934 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4936 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4937 explicit dereference of an unconstrained type, create a constrained
4938 subtype for it, as is done for function calls that return an
4941 2011-08-03 Thomas Quinot <quinot@adacore.com>
4943 * g-pehage.adb (Finalize): Avoid possible double-free.
4945 2011-08-03 Steve Baird <baird@adacore.com>
4947 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4948 Elab_Spec/Body attrs in CodePeer_Mode.
4950 2011-08-03 Javier Miranda <miranda@adacore.com>
4952 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4953 low bound is not known at compile time but they have no others choice.
4954 Done because in this case the bounds can be obtained directly from the
4957 2011-08-03 Ed Falis <falis@adacore.com>
4959 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4960 on VxWorks SMP. Remove unusable constant ANY_CPU.
4962 2011-08-03 Emmanuel Briot <briot@adacore.com>
4964 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4965 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4966 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4967 Prj.Env.Initialize_Empty): new subprograms
4968 (Get_Env, Find_Project): remove parameter Target_Name.
4970 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4972 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4973 as a condition for the delayed call to Derived_Subprograms done for the
4974 case of the rewriting of a derived type that constrains the
4975 discriminants of its parent type.
4976 Avoids redundant subprogram derivations for private subtype derivations.
4978 2011-08-03 Javier Miranda <miranda@adacore.com>
4980 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4981 Build_Record_Aggr_Code.
4982 (Build_Record_Aggr_Code): Add missing support to initialize hidden
4983 discriminants in extension aggregates.
4985 2011-08-03 Emmanuel Briot <briot@adacore.com>
4987 * prj-pp.adb (Print): also output project qualifiers, since in
4988 particular "aggregate" is mandatory in an aggregate project.
4990 2011-08-03 Emmanuel Briot <briot@adacore.com>
4992 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4993 (Debug_Output): new function.
4995 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4997 * gnat_ugn.texi: Document -Wstack-usage.
4998 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5000 2011-08-03 Thomas Quinot <quinot@adacore.com>
5002 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5003 have keyword LIMITED.
5005 2011-08-03 Yannick Moy <moy@adacore.com>
5007 * alfa.adb, alfa.ads, alfa_test.adb: New files.
5008 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5009 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5010 section (does not happen in compiler, only if code directly calls
5012 * get_alfa.adb, get_alfa.ads: New files.
5013 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5015 * lib-xref-alfa.adb: New file.
5016 * lib-xref.adb, lib-xref.ads
5017 (Xref_Entry): redefine information needed in cross-references for ALFA.
5018 Push ALFA treatments in separated local package.
5019 (Enclosing_Subpragram_Or_Package): treat specially subprogram
5020 identifiers. Return entity of package body instead of spec. Return
5021 Empty for a scope with no location.
5022 (Generate_Reference): adapt to new components for ALFA information.
5023 Remove the need for D references on definitions.
5024 (Is_Local_Reference): moved to ALFA local package
5025 (Output_References): extract subfunction as Extract_Source_Name
5026 (Output_Local_References): remove procedure, replaced by filtering of
5027 cross-references in package ALFA and printing in Put_ALFA.
5028 (Write_Entity_Name): remove procedure
5029 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5030 print exact name of entity as it appears in source file
5031 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5032 * put_alfa.adb, put_alfa.ads: New files.
5033 * xref_lib.adb (Search_Xref): protect read of cross-references against
5034 reading other sections of the ALI file, in gnatxref
5035 (Search): protect read of cross-references against reading other
5036 sections of the ALI file, in gnatfind.
5037 * gcc-interface/Make-lang.in: Update dependencies.
5039 2011-08-03 Thomas Quinot <quinot@adacore.com>
5041 * sem_ch3.adb: Minor reformatting.
5043 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5045 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5046 raising an exception.
5048 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5050 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5051 type, always use 1 as the lower bound or string, even if lower bound of
5052 context is not static, to handle properly null strings in a non-static
5055 2011-08-03 Bob Duff <duff@adacore.com>
5057 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5058 always legal on the right-hand side of an assignment statement; there
5059 is always an applicable index constraint in this case. Therefore, the
5060 check for Pkind = N_Assignment_Statement is now unconditional -- it
5061 doesn't depend on whether Is_Constrained (Typ).
5063 2011-08-03 Robert Dewar <dewar@adacore.com>
5065 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5067 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5069 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5070 for an itype created within a generic unit.
5072 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5074 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5075 suppresses all inlining.
5077 2011-08-03 Robert Dewar <dewar@adacore.com>
5079 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5080 exp_aggr.adb: Minor reformatting.
5082 2011-08-03 Thomas Quinot <quinot@adacore.com>
5084 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5085 tagged assignment when discriminant checks are suppressed. This is
5086 useless and extremely costly in terms of static stack usage.
5088 2011-08-03 Bob Duff <duff@adacore.com>
5090 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5091 of generics, because this leads to the wrong entity in the wrong scope,
5092 causing (e.g.) pragma Export_Procedure to get an error if the entity is
5094 (Process_Interface_Name): Follow Alias for instances of generics, to
5095 correct for the above change.
5097 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5099 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5100 is an integer literal it is always safe to replace the reference. In
5101 addition, if the reference appears in the generated code for an object
5102 declaration it is necessary to copy because otherwise the reference
5103 might be to the uninitilized value of the discriminant of the object
5106 2011-08-03 Pascal Obry <obry@adacore.com>
5108 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5109 ACL used, in this case we want to check for ending .exe, not .exe
5110 anywhere in the path.
5112 2011-08-03 Sergey Rybin <rybin@adacore.com>
5114 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5115 the tree structure (semantic decoration of references to record
5118 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5120 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5121 choices of a named array aggregate, bail out when any choices are
5122 marked as Errors_Posted.
5124 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5126 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5127 in which entity is frozen, to handle properly loop variables in
5130 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5132 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5133 subtype is not static, compute the upper bound using attributes, to
5134 handle properly index types that are not integer types.
5136 2011-08-03 Bob Duff <duff@adacore.com>
5138 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5139 Update copyright notice.
5141 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5143 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5144 Original_Discriminant if within an instance.
5145 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5147 2011-08-03 Thomas Quinot <quinot@adacore.com>
5149 * einfo.ads: Minor reformatting.
5151 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5153 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5154 composite type with an unfrozen subcomponent, in the profile of a
5155 primitive operation.
5157 2011-08-03 Robert Dewar <dewar@adacore.com>
5159 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5161 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5163 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5164 unconstrained type with discriminants is initialized with an aggregate,
5165 use the constrained subtype of the aggregate as the type of the object,
5166 because it is immutable, and this allows the back-end to generate no
5167 code for the object declaration.
5169 2011-08-03 Robert Dewar <dewar@adacore.com>
5171 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5172 comparison operand is variable, and turns out to be zero or negative.
5174 2011-08-03 Javier Miranda <miranda@adacore.com>
5177 (Expand_Dispatching_Constructor_Call): Disable expansion of
5178 code required for native targets. Done to avoid generating
5179 references to unavailable runtime entities in VM targets.
5181 (Expand_N_Object_Declaration): Add missing support to handle
5182 the explicit initialization of class-wide interface objects.
5185 2011-08-03 Matthew Heaney <heaney@adacore.com>
5187 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5189 2011-08-03 Matthew Heaney <heaney@adacore.com>
5191 * a-cbdlli.adb (Splice): move source items from first to last
5193 2011-08-03 Yannick Moy <moy@adacore.com>
5195 * sem_util.ads: comment added.
5197 2011-08-03 Javier Miranda <miranda@adacore.com>
5200 (Expand_Record_Aggregate): In VM targets disable the expansion into
5201 assignments of aggregates whose type is not known at compile time.
5203 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5205 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5206 protected entries and task entries, to build the proper renaming
5207 declaration for entry formals, used in debugging.
5208 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5209 parameters in the same way.
5211 2011-08-02 Robert Dewar <dewar@adacore.com>
5213 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5214 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5215 code reorganization.
5217 2011-08-02 Robert Dewar <dewar@adacore.com>
5219 * debug.adb: Debug flag d.P to suppress length comparison optimization
5220 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5221 comparison of Length by comparing First/Last instead.
5223 2011-08-02 Matthew Heaney <heaney@adacore.com>
5225 * a-cobove.ads: Code clean up.
5227 2011-08-02 Vincent Celier <celier@adacore.com>
5229 * adaint.c (file_names_case_sensitive_cache): New static int.
5230 (__gnat_get_file_names_case_sensitive): Cache the return value in
5231 file_names_case_sensitive_cache at the first invocation, to avoid
5232 multiple calls to getenv.
5234 2011-08-02 Bob Duff <duff@adacore.com>
5236 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5238 2011-08-02 Yannick Moy <moy@adacore.com>
5240 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5241 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5242 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5243 indicate that we are in a precondition or postcondition. This is used in
5244 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5245 decide whether to flag the spec or body of the current subprogram as
5248 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
5250 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
5252 * a-extiin.ads: New file.
5254 2011-08-02 Bob Duff <duff@adacore.com>
5256 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5257 now raises Name_Error instead of Use_Error in certain cases. The other
5258 parts of this AI were already implemented properly.
5260 2011-08-02 Vincent Celier <celier@adacore.com>
5262 * link.c: Only import "auto-host.h" when building the gnattools.
5264 2011-08-02 Yannick Moy <moy@adacore.com>
5266 * sem_util.adb: Inter-unit inlining does not work for a subprogram
5267 which calls a local subprogram, so extract subprogram
5268 from Mark_Non_ALFA_Subprogram_Body.
5270 2011-08-02 Javier Miranda <miranda@adacore.com>
5273 (Extract_Dispatching_Call): If the type of the dispatching object is an
5274 access type then return an explicit dereference in the Object out-mode
5277 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5279 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5280 compatibility checks for all indexes of an array subtype, not just the
5281 first. Reset Has_Dynamic_Range_Check on the subtype before each
5282 potential check to ensure that Insert_Range_Checks will not elide any
5283 of the dynamic checks.
5285 2011-08-02 Yannick Moy <moy@adacore.com>
5287 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5288 SPARK restriction at parsing time.
5289 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5290 directive only if the SPARK restriction is set for this unit.
5292 2011-08-02 Yannick Moy <moy@adacore.com>
5294 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5295 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5296 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5297 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5298 Mark_Non_ALFA_Subprogram_Body.
5299 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5302 2011-08-02 Yannick Moy <moy@adacore.com>
5304 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5307 2011-08-02 Robert Dewar <dewar@adacore.com>
5309 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5310 exp_ch3.adb: Minor reformatting.
5312 2011-08-02 Emmanuel Briot <briot@adacore.com>
5314 * adaint.c (__gnat_locate_exec_on_path): only returns executable
5315 files, not any regular file.
5316 (__gnat_locate_file_with_predicate): new subprogram.
5318 2011-08-02 Yannick Moy <moy@adacore.com>
5320 * sinfo.adb, sinfo.ads: Restrict the use of flags
5321 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5322 nodes, plus N_Subtype_Declaration for the 2nd one.
5324 2011-08-02 Sergey Rybin <rybin@adacore.com>
5326 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5327 - fix bugs in the description of Source_Trace;
5328 - get rid of UNIT_NAME;
5330 2011-08-02 Javier Miranda <miranda@adacore.com>
5333 (Build_Dispatching_Requeue): Adding support for VM targets
5334 since we cannot directly reference the Tag entity.
5335 * exp_sel.adb (Build_K): Adding support for VM targets.
5336 (Build_S_Assignment): Adding support for VM targets.
5338 (Default_Prim_Op_Position): In VM targets do not restrict availability
5339 of predefined interface primitives to compiling in Ada 2005 mode.
5340 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5341 restricted to compiling in Ada 2005 mode.
5342 (Make_VM_TSD): Generate code that declares and initializes the OSD
5343 record. Needed to support dispatching calls through synchronized
5346 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5347 primitives associated with synchronized interfaces.
5348 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5349 primitives associated with synchronized interfaces.
5351 2011-08-02 Yannick Moy <moy@adacore.com>
5353 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5354 statements hidden in SPARK if preceded by the HIDE directive
5355 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5356 exception handlers as hidden in SPARK if preceded by the HIDE directive
5357 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5358 if starting with the HIDE directive
5359 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5360 starting with the HIDE directive; mark the declarations in a private
5361 part as hidden in SPARK if the private part starts with the HIDE
5363 * restrict.adb, restrict.ads
5364 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5365 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5366 argument node belongs to a part which is hidden in SPARK
5367 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5368 parts in SPARK; protect the possibly costly call to
5369 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5370 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5371 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5372 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5374 (Scan): recognize special comment starting with '#' and followed by
5375 SPARK keyword "hide" as a HIDE directive.
5377 2011-08-02 Yannick Moy <moy@adacore.com>
5379 * types.ads, erroutc.ads: Minor reformatting.
5381 2011-08-02 Vincent Celier <celier@adacore.com>
5383 * link.c: Add response file support for cross platforms.
5385 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5387 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5388 in an association, set parent field of copy before partial analysis.
5389 * sem_res.adb (Resolve_Slice): create reference to itype only when
5390 expansion is enabled.
5392 2011-08-02 Yannick Moy <moy@adacore.com>
5394 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5395 for new flag denoting which subprogram bodies are in ALFA
5396 * restrict.adb, sem_ch7.adb: Update comment
5397 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5398 sem_ch9.adb, sem_res.adb: Add calls to
5399 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5400 * sem_ch6.adb (Analyze_Function_Return): add calls to
5401 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5402 middle of the body, and extended return.
5403 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5404 False when missing return.
5405 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5406 to True for subprograms whose spec is in ALFA. Remove later on the flag
5407 on the entity used for a subprogram body when there exists a separate
5409 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5410 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5411 False, otherwise do nothing.
5413 2011-08-02 Robert Dewar <dewar@adacore.com>
5415 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5417 2011-08-02 Yannick Moy <moy@adacore.com>
5419 * sem_ch4.ads: minor formatting.
5421 2011-08-02 Yannick Moy <moy@adacore.com>
5423 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5424 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5425 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5426 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5427 opt.ads: cleanup of SPARK mode
5429 2011-08-02 Yannick Moy <moy@adacore.com>
5431 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5433 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5434 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5436 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5437 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5438 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5439 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5441 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5443 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5444 functions whose return type is not in ALFA.
5445 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5447 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5448 parameter's type is not in ALFA.
5449 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5452 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5454 * sem_ch6 (Analyze_Expression_Function): treat the function as
5455 Inline_Always, and introduce a subprogram declaration for it when it is
5457 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5458 expression functions, so that the back-end can determine whether they
5459 can in fact be inlined.
5460 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5461 a function body comes from an expression function.
5463 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5465 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5466 null exclusions to test Can_Never_Be_Null on the anonymous access types
5467 of the formals rather than testing the formals themselves. Exclude this
5468 check in cases where the Old_Formal is marked as a controlling formal,
5469 to avoid issuing spurious errors for bodies completing dispatching
5470 operations (due to the flag not getting set on controlling access
5471 formals in body specs).
5472 (Find_Corresponding_Spec): When checking full and subtype conformance of
5473 subprogram bodies in instances, pass Designated and E in that order, for
5474 consistency with the expected order of the formals (New_Id followed by
5477 2011-08-02 Robert Dewar <dewar@adacore.com>
5479 * sem_ch8.adb: Minor reformatting.
5481 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5483 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5484 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5485 primitive operations of class-wide actuals.
5487 2011-08-02 Javier Miranda <miranda@adacore.com>
5489 * exp_atag.ads, exp_atag.adb
5490 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5491 since its value is implicitly passed in argument Typ.
5492 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5493 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5494 Build_Common_Dispatching_Select_Statements.
5496 2011-08-02 Robert Dewar <dewar@adacore.com>
5498 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5499 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5502 2011-08-02 Robert Dewar <dewar@adacore.com>
5504 * sem_res.adb: Minor reformatting.
5505 * sem_prag.adb: Minor reformatting.
5507 2011-08-02 Javier Miranda <miranda@adacore.com>
5509 * exp_atag.adb, exp_atags.ads
5510 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5511 by the tagged type Entity. Required to use this routine in the VM
5512 targets since we do not have available the Tag entity in the VM
5515 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5516 Ada.Tags has not been previously loaded.
5518 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5519 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5521 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5522 view of enclosing scopes. Required to handle enclosing scopes that
5523 are synchronized types whose full view is a task type.
5525 (Build_VM_TSDs): Minor code improvement to avoid generating and
5526 analyzing lists with empty nodes.
5527 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5528 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5529 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5530 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5531 (Make_Select_Specific_Data_Table): Add support for VM targets.
5532 (Make_VM_TSD): Generate code to initialize the SSD structure of
5535 2011-08-02 Yannick Moy <moy@adacore.com>
5537 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5538 cross-references section in ALI.
5539 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5540 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5542 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5543 subprogram or package entity of a node
5544 (Is_Local_Reference_Type): new function returns True for references
5545 selected in local cross-references.
5546 (Lt): function extracted from Lt in Output_References
5547 (Write_Entity_Name): function extracted from Output_References
5548 (Generate_Definition): generate reference with type 'D' for definition
5549 of objects (object declaration and parameter specification), with
5550 appropriate locations and units, for use in local cross-references.
5551 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5552 references of type 'I' for initialization in object definition.
5553 (Output_References): move part of function Lt and procedure
5554 Write_Entity_Name outside of the body. Ignore references of types 'D'
5555 and 'I' introduced for local cross-references.
5556 (Output_Local_References): new procedure to output the local
5557 cross-references sections.
5558 (Lref_Entity_Status): new array defining whether an entity is a local
5559 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5560 with 'I' type when initialization expression is present.
5561 * get_scos.adb, get_scos.ads: Correct comments and typos
5563 2011-08-02 Javier Miranda <miranda@adacore.com>
5565 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5567 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5569 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5572 2011-08-02 Vincent Celier <celier@adacore.com>
5574 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5575 (No_Space_Img): New function
5576 (Find_Excluded_Sources): When reading from a file, record the file name
5577 and the line number for each excluded source.
5578 (Mark_Excluded_Sources): When reporting an error, if the excluded
5579 sources were read from a file, include file name and line number in
5582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5584 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5586 2011-08-02 Robert Dewar <dewar@adacore.com>
5588 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5590 2011-08-02 Javier Miranda <miranda@adacore.com>
5592 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5593 generation of TSDs to the DOTNET compiler.
5594 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5595 generation of TSDs to the DOTNET compiler.
5597 2011-08-02 Javier Miranda <miranda@adacore.com>
5599 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5600 record of all the tagged types declared inside library level package
5601 declarations, library level package bodies or library level subprograms.
5602 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5603 associated with a given tagged type.
5604 (Build_VM_TSDs): New subprogram.
5605 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5606 compilation units that are subprograms.
5607 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5608 compilation units that are package bodies.
5609 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5610 units that are a package declaration or a package instantiation.
5611 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5612 reorganization to improve the error generated by the frontend when the
5613 function Ada.Tags.Secondary_Tag is not available.
5614 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5615 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5617 2011-08-02 Javier Miranda <miranda@adacore.com>
5619 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5621 2011-08-02 Robert Dewar <dewar@adacore.com>
5623 * s-imenne.ads: Minor reformatting.
5625 2011-08-02 Robert Dewar <dewar@adacore.com>
5627 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5628 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5629 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5631 2011-08-02 Robert Dewar <dewar@adacore.com>
5633 * einfo.ads (Materialize_Entity): Document this is only for renamings
5634 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5635 required debug information in the case where we transform the object
5636 declaration into a renaming declaration.
5637 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5639 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5642 2011-08-02 Robert Dewar <dewar@adacore.com>
5644 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5645 Suppress_Init_Procs.
5646 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5647 Suppress_Initialization/Initialization_Suppressed.
5648 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5649 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5650 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5651 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5653 2011-08-02 Robert Dewar <dewar@adacore.com>
5655 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5658 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5660 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5661 only have inheritable classwide pre/postconditions.
5663 2011-08-02 Javier Miranda <miranda@adacore.com>
5665 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5666 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5667 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5668 checks if the external tag of a type is the same as the external tag
5669 of some other declaration.
5671 2011-08-02 Thomas Quinot <quinot@adacore.com>
5673 * s-taskin.ads: Minor reformatting.
5675 2011-08-02 Emmanuel Briot <briot@adacore.com>
5677 * g-comlin.adb (Display_Help): swap the order in which it prints the
5678 short help and the general usage.
5680 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5682 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5683 the aspect declarations and attach them to the generic copy for
5684 subsequent analysis.
5685 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5686 declarations of the generic tree to the new subprogram declarations.
5687 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5688 conditions that apply to a subprogram instance.
5690 2011-08-02 Robert Dewar <dewar@adacore.com>
5692 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5694 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5696 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5697 private type with a tagged full view is not derived in the immediate
5698 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5700 2011-08-02 Robert Dewar <dewar@adacore.com>
5702 * exp_ch4.adb: Minor reformatting.
5704 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5706 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5707 Ada2012 iterator, the loop will be rewritten during expansion into a
5708 while loop with a cursor and an element declaration. Do not analyze the
5709 body in this case, because if the container is for indefinite types the
5710 actual subtype of the elements will only be determined when the cursor
5711 declaration is analyzed.
5713 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5715 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5716 size/alignment related attributes in CodePeer_Mode.
5718 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5720 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5721 Prepend_Element, since this can result in the operation getting the
5722 wrong slot in the full type's dispatch table if the full type has
5723 inherited operations. The incomplete type's operation will get added
5724 to the proper position in the full type's primitives
5725 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5726 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5727 dispatching operations, since there are cases where nonprimitive
5728 subprograms can get added to the list of incomplete dependents (such
5729 as subprograms in nested packages).
5730 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5731 private part when determining whether to add a primitive with a
5732 parameter of a tagged incomplete type to the Private_Dependents list.
5733 Such primitives can also occur in the visible part, and should not have
5734 been excluded from being private dependents.
5735 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5736 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5737 list of a Taft-amendment incomplete type is a primitive before issuing
5738 an error that the full type must appear in the same unit. There are
5739 cases where nonprimitives can be in the list (such as subprograms in
5741 * sem_disp.adb (Derives_From): Use correct condition for checking that
5742 a formal's type is derived from the type of the corresponding formal in
5743 the parent subprogram (the condition was completely wrong). Add
5744 checking that was missing for controlling result types being derived
5745 from the result type of the parent operation.
5747 2011-08-02 Yannick Moy <moy@adacore.com>
5749 * errout.adb (First_Node): minor renaming
5750 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5753 2011-08-02 Yannick Moy <moy@adacore.com>
5755 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5756 before accessing operands.
5757 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5758 decide whether an initialization expression respects SPARK rules, as
5759 the plain node is the expanded one. This allows for more valid warnings
5761 * gnat_rm.texi: Minor update.
5763 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5765 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5768 2011-08-02 Robert Dewar <dewar@adacore.com>
5770 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5772 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5774 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5775 loop statements and the element renaming declaration with a block when
5776 the element type is controlled.
5778 2011-08-02 Yannick Moy <moy@adacore.com>
5780 * sinfo.ads: Minor formatting.
5782 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5784 * sem_aggr.adb (Add_Association): if the association has a box and no
5785 expression, use the Sloc of the aggregate itself for the new
5787 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5790 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5792 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5793 When a container is provided via a function call, generate a renaming
5794 of the function result. This avoids the creation of a transient scope
5795 and the premature finalization of the container.
5796 * exp_ch7.adb (Is_Container_Cursor): Removed.
5797 (Wrap_Transient_Declaration): Remove the supression of the finalization
5798 of the list controller when the declaration denotes a container cursor,
5801 2011-08-02 Yannick Moy <moy@adacore.com>
5803 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5804 node is from source, instead of the original node being from source.
5806 (Resolve_Array_Aggregate): refine the check for a static expression, to
5807 recognize also static ranges
5808 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5809 Array_Type_Declaration): postpone the test for the type being a subtype
5810 mark after the type has been resolved, so that component-selection and
5811 expanded-name are discriminated.
5812 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5813 to distinguish the case of an iteration scheme, so that an error is
5814 issed on a non-static range in SPARK except in an iteration scheme.
5815 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5816 In_Iter_Schm = True.
5817 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5818 user-defined operators so that they are allowed in renaming
5820 (Find_Selected_Component): refine the check for prefixing of operators
5821 so that they are allowed in renaming. Move the checks for restrictions
5822 on selector name after analysis discriminated between
5823 component-selection and expanded-name.
5824 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5825 concatenation argument of string type if it is static.
5826 * sem_util.adb, sem_util.ads
5827 (Check_Later_Vs_Basic_Declarations): add a new function
5828 Is_Later_Declarative_Item to decice which declarations are allowed as
5829 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5830 mode, add that renamings are considered as later items.
5831 (Enclosing_Package): new function to return the enclosing package
5832 (Enter_Name): correct the rule for homonyms in SPARK
5833 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5834 from source (result of expansion) to avoid issuing wrong warnings.
5836 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5838 * errout.adb: On anything but an expression First_Node returns its
5841 2011-08-02 Pascal Obry <obry@adacore.com>
5843 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5845 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5847 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5848 Set the associated loop as the related expression of internally
5850 * exp_ch7.adb (Is_Container_Cursor): New routine.
5851 (Wrap_Transient_Declaration): Supress the finalization of the list
5852 controller when the declaration denotes a container cursor.
5854 2011-08-02 Yannick Moy <moy@adacore.com>
5856 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5858 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5859 expression is a simple expression. This check cannot be performed in
5860 the semantics, so just drop it.
5861 (P_Index_Or_Discriminant_Constraint): move check that the index or
5862 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5863 semantics. Other cases were previously checked in the semantics.
5864 * par-ch4.adb (P_Name): move checks that a selector name is not
5865 character literal or an operator symbol to Find_Selected_Component in
5867 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5868 declarations are not placed after later declarations in a separate
5869 procedure in Sem_Util (possibly not the best choice?), to be used both
5870 during parsing, for Ada 83 mode, and during semantic analysis, for
5872 * par-endh.adb (Check_End): move check that end label is not missing
5873 to Process_End_Label in the semantics
5874 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5875 the special case for SPARK restriction
5876 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5877 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5878 parameter Force to issue the error message even on internal node (used
5879 for generated end label). Call Check_Restriction to check when an error
5880 must be issued. In SPARK mode, issue an error message even if the
5881 restriction is not set.
5882 (Check_Restriction): new procedure with an additional out parameter to
5883 inform the caller that a message has been issued
5884 * sem_aggr.adb: Minor modification of message
5885 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5886 instead of issuing an error message directly
5887 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5888 declarations are not placed after later declarations, by calling
5889 Check_Later_Vs_Basic_Declarations
5890 (Analyze_Subtype_Declaration): move here the check that an index or
5891 discriminant constraint must be a subtype mark. Change the check that
5892 a subtype of String must start at one so that it works on subtype marks.
5893 * sem_ch4.adb (Analyze_Call): move here the check that a named
5894 association cannot follow a positional one in a call
5895 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5896 instead of issuing an error message directly
5897 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5898 selector name is not a character literal or an operator symbol. Move
5899 here the check that the prefix of an expanded name cannot be a
5900 subprogram or a loop statement.
5901 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5902 procedure called from parsing and semantics to check that basic
5903 declarations are not placed after later declarations
5904 (Process_End_Label): move here the check that end label is not missing
5906 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5908 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5909 representation clause in codepeer mode, since it confuses CodePeer and
5910 does not bring useful info.
5912 2011-08-02 Ed Falis <falis@adacore.com>
5914 * init.c: initialize fp hw on MILS.
5916 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5918 * errout.adb (First_Node): for bodies, return the node itself (small
5919 optimization). For other nodes, do not check source_unit if the node
5920 comes from Standard.
5922 2011-08-02 Robert Dewar <dewar@adacore.com>
5924 * exp_ch3.adb: Minor comment additions.
5925 * sem_ch13.adb: Minor reformatting.
5927 2011-08-02 Pascal Obry <obry@adacore.com>
5929 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5931 2011-08-02 Robert Dewar <dewar@adacore.com>
5933 * sem_attr.adb: Minor reformatting.
5935 2011-08-02 Robert Dewar <dewar@adacore.com>
5937 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5938 (Has_Default_Component_Value): Removed
5939 * einfo.ads Comment updates
5940 (Has_Default_Aspect): Replaces Has_Default_Value
5941 (Has_Default_Component_Value): Removed
5943 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5945 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5946 (Get_Simple_Init_Val): Handle Default_Value aspect
5947 (Needs_Simple_Initialization): Handle Default_Value aspect
5948 * exp_ch3.ads: Needs_Simple_Initialization
5949 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5950 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5952 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5953 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5954 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5956 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5958 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5959 package containing iteration primitives.
5960 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5962 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5964 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5965 "of", pre-analyze expression in case it is a function call with
5966 finalization actions that must be placed ahead of the loop.
5967 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5968 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5970 2011-08-02 Geert Bosch <bosch@adacore.com>
5972 * cstand.adb (Create_Float_Types): Only consider C's long double for
5973 Long_Long_Float, in addition to double.
5975 2011-08-02 Robert Dewar <dewar@adacore.com>
5977 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5978 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5979 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5982 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5984 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5987 2011-08-02 Javier Miranda <miranda@adacore.com>
5989 * einfo.ads, einfo.adb
5990 (Original_Access_Type): Move this attribute to Node26 since there was
5991 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5992 which causes conflicts and breaks the generation of the .NET compiler.
5993 (Interface_Name): Add missing documentation on JGNAT only uses of
5996 2011-08-02 Geert Bosch <bosch@adacore.com>
5998 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5999 (Find_Back_End_Float_Type): Likewise
6000 (Create_Back_End_Float_Types): Likewise
6001 (Create_Float_Types): Likewise
6002 (Register_Float_Type): Likewise
6003 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6004 Nlist and split out type selection in new local Find_Base_Type function.
6005 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6007 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6009 2011-08-02 Robert Dewar <dewar@adacore.com>
6011 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6013 * opt.ads: Minor comment change.
6014 * sem_ch12.adb: Minor code reorganization.
6016 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6018 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6019 subtype's list of rep items to the list on the full subtype in the case
6020 where the lists are the same.
6022 2011-08-02 Geert Bosch <bosch@adacore.com>
6024 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6025 using the one from System.Strings, which also deallocates all strings.
6027 2011-08-02 Geert Bosch <bosch@adacore.com>
6029 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6031 * gcc-interface/Make-lang.in: Update dependencies.
6033 2011-08-02 Olivier Hainque <hainque@adacore.com>
6035 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6038 2011-08-02 Javier Miranda <miranda@adacore.com>
6040 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6041 associated with anonymous access to subprograms.
6043 2011-08-02 Geert Bosch <bosch@adacore.com>
6046 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6047 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6048 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6049 (Add_Symbol_Definition): Move to switch-c.adb
6050 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6051 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6052 (Add_Symbol_Definition): Move to switch-c.adb.
6053 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6055 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6057 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6058 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6060 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6061 (Add_Symbol_Definition): Moved from Prepcomp.
6062 * switch-c.ads: Update copyright notice. Use String_List instead of
6063 Argument_List, removing dependency on System.OS_Lib.
6065 2011-08-02 Yannick Moy <moy@adacore.com>
6067 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6068 mode on initialization expression which does not respect SPARK
6070 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6071 if the tree referenced by its argument represents an initialization
6072 expression in SPARK, suitable for initializing an object in an object
6075 2011-08-02 Javier Miranda <miranda@adacore.com>
6077 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6078 internally generated access to subprogram with its associated protected
6080 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6082 2011-08-02 Geert Bosch <bosch@adacore.com>
6084 * cstand.adb (Register_Float_Type): Print information about type to
6085 register, if the Debug_Flag_Dot_B is set.
6086 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6087 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6088 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6089 with a requested precision of more than Max_Digits digits and no more
6090 than Max_Base_Digits digits, if a range specification is present and the
6091 Predefined_Float_Types list has a suitable type to derive from.
6092 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6093 case of type completion with pragma Import
6095 (Process_Import_Predefined_Type): Processing to complete a type
6096 with pragma Import. Currently supports floating point types only.
6097 (Set_Convention_From_Pragma): Do nothing without underlying type.
6098 (Process_Convention): Guard against absence of underlying type,
6099 which may happen when importing incomplete types.
6100 (Process_Import_Or_Interface): Handle case of importing predefined
6101 types. Tweak error message.
6103 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6105 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6106 functions to previous change. Reorganize code slightly.
6108 2011-08-02 Geert Bosch <bosch@adacore.com>
6110 * back_end.ads (Register_Type_Proc): New call back procedure type for
6111 allowing the back end to provide information about available types.
6112 (Register_Back_End_Types): New procedure to register back end types.
6113 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6115 * cstand.adb (Back_End_Float_Types): New list for floating point types
6116 supported by the back end.
6117 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6118 (Copy_Float_Type): New procedure to make new copies of predefined types.
6119 (Register_Float_Type): New call back procedure to populate the BEFT list
6120 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6121 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6122 (Create_Float_Types): New procedure to create entities for floating
6123 point types predefined in Standard, and put these and any remaining
6124 BEFTs on the Predefined_Float_Types list.
6125 * stand.ads (Predefined_Float_Types): New list for predefined floating
6126 point types that do not have declarations in package Standard.
6128 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6130 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6131 entity node for the unit containing the parameter.
6132 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6133 (Add_Inlined_Subprogram): Likewise.
6134 * gcc-interface/Make-lang.in: Update dependencies.
6136 2011-08-02 Thomas Quinot <quinot@adacore.com>
6138 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6141 2011-08-02 Geert Bosch <bosch@adacore.com>
6143 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6145 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6147 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6148 computed value of Base_Type.
6150 2011-08-02 Yannick Moy <moy@adacore.com>
6152 * restrict.adb (Check_Restriction): issue an error for any use of
6153 class-wide, even if the No_Dispatch restriction is not set.
6154 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6155 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6156 when completing a private extension, the type named in the private part
6157 is not the same as that named in the visible part.
6158 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6159 of an inherited primitive operations of a tagged type or type extension
6160 that returns the tagged type.
6161 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6162 function which returns True for an implicit operation inherited by the
6163 derived type declaration for the argument type.
6164 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6167 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6169 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6170 Process_Bounds, to perform analysis with expansion of a range or an
6171 expression that is the iteration scheme for a loop.
6172 (Analyze_Iterator_Specification): If domain of iteration is given by a
6173 function call with a controlled result, as is the case if call returns
6174 a predefined container, ensure that finalization actions are properly
6176 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6178 2011-08-02 Javier Miranda <miranda@adacore.com>
6180 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6181 * gcc-interface/Make-lang.in: Update dependencies.
6183 2011-08-02 Javier Miranda <miranda@adacore.com>
6185 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6186 determine if the analysis is performed using N or Original_Node (N).
6187 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6188 functionality of routine Is_Variable avoids code duplication.
6189 * checks.adb (Determine_Range): Handle temporaries generated by
6190 Remove_Side_Effects.
6192 2011-08-02 Javier Miranda <miranda@adacore.com>
6194 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6195 expansion of the condition. Required since the previous analysis was
6196 done with expansion disabled (see Resolve_Quantified_Expression) and
6197 hence checks were not inserted and record comparisons have not been
6200 2011-08-02 Ed Falis <falis@adacore.com>
6202 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6205 2011-08-02 Bob Duff <duff@adacore.com>
6207 * opt.ads: Minor comment fix.
6209 2011-08-02 Bob Duff <duff@adacore.com>
6211 * sem_ch12.adb (Analyze_Package_Instantiation,
6212 Analyze_Subprogram_Instantiation): Turn off style checking while
6213 analyzing an instance. Whatever style checks that apply to the generic
6214 unit should apply, so it makes no sense to apply them in an instance.
6215 This was causing trouble when compiling an instance of a runtime
6216 unit that violates the -gnatyO switch.
6217 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6218 one of the two case statements, causing spurious errors.
6220 2011-08-02 Robert Dewar <dewar@adacore.com>
6222 * uname.adb: Minor reformatting.
6223 * gnatcmd.adb: Minor reformatting.
6224 * exp_attr.adb: Minor reformatting.
6226 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6228 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6229 No_Dispatching_Calls, do not look for the Assign primitive, because
6230 predefined primitives are not created in this case.
6232 2011-08-02 Bob Duff <duff@adacore.com>
6234 * stylesw.ads: Minor comment fixes.
6236 2011-08-02 Robert Dewar <dewar@adacore.com>
6238 * freeze.adb (Add_To_Result): New procedure.
6240 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6242 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6243 time, if the specific run-time routines for handling streams of strings
6244 are not available, use the default mechanism.
6246 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6248 * s-regpat.ads: Fix typo.
6250 2011-08-02 Vincent Celier <celier@adacore.com>
6252 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6253 not null, call it to create the in memory config project file without
6254 parsing an existing default config project file.
6256 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6258 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6260 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6262 * sem_elim.adb: an abstract subprogram does not need an eliminate
6263 pragma for its descendant to be eliminable.
6265 2011-08-02 Ed Falis <falis@adacore.com>
6267 * init.c: revert to handling before previous checkin for VxWorks
6268 * s-intman-vxworks.adb: delete unnecessary declarations related to
6269 using Ada interrupt facilities for handling signals.
6270 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6271 * s-intman-vxworks.ads: Import __gnat_install_handler as
6272 Initialize_Interrupts.
6273 * s-taprop-vxworks.adb: Delete Signal_Mask.
6274 (Abort_Handler): change construction of mask to unblock exception
6277 2011-08-02 Jerome Guitton <guitton@adacore.com>
6279 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6280 Debug_Raise_Exception before propagation starts.
6282 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6284 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6285 to Restriction_Check_Required.
6286 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6287 * sem_res.adb (Resolve_Call): Likewise.
6288 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6290 2011-08-02 Bob Duff <duff@adacore.com>
6292 * stylesw.ads: Update comment.
6293 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6294 * errout.ads: Remove obsolete comment.
6296 2011-08-02 Javier Miranda <miranda@adacore.com>
6298 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6299 (Set_Is_Safe_To_Reevaluate): new procedure.
6300 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6301 assignment is allowed on safe-to-reevaluate variables.
6302 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6303 temporary created to remove side effects in expressions that use
6304 the secondary stack as safe-to-reevaluate.
6305 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6306 variables that are not true constants.
6308 2011-08-02 Robert Dewar <dewar@adacore.com>
6310 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6311 sem_res.adb, sem_ch6.adb: Minor reformatting.
6313 2011-08-02 Jerome Guitton <guitton@adacore.com>
6315 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6319 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6320 not set Overridden_Operation if subprogram is an initialization
6323 2011-08-02 Yannick Moy <moy@adacore.com>
6325 * par-ch6.adb: Correct obsolete name in comments
6326 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6327 which takes two message arguments (existing function takes one), with
6328 second message used for continuation.
6329 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6330 block statements that originate from a source block statement, not
6331 generated block statements
6332 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6333 symmetry with procedure case
6334 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6335 function to issue an error in formal mode if a package specification
6336 contains more than one tagged type or type extension.
6337 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6338 parameters matching formals of tagged types are objects (or ancestor
6339 type conversions of objects), not general expressions. Issue an error
6340 on view conversions that are not involving ancestor conversion of an
6342 (Resolve_Type_Conversion): in formal mode, issue an error on the
6343 operand of an ancestor type conversion which is not an object
6344 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6345 procedure so that it works also for actuals of function calls
6346 (Is_Actual_Tagged_Parameter): new function which determines if its
6347 argument is an actual parameter of a formal of tagged type in a
6349 (Is_SPARK_Object_Reference): new function which determines if the tree
6350 referenced by its argument represents an object in SPARK
6352 2011-08-02 Robert Dewar <dewar@adacore.com>
6354 * sem_ch3.adb: Minor reformatting
6355 Minor comment addition
6356 Minor error msg text change
6358 2011-08-02 Javier Miranda <miranda@adacore.com>
6360 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6361 function. Used to be more precise when we generate a variable plus one
6362 assignment to remove side effects in the evaluation of the Bound
6364 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6365 of the bound expression to force its re-analysis and thus expand the
6366 associated transient scope (if required). Code cleanup replacing the
6367 previous code that declared the constant entity by an invocation to
6368 routine Force_Evaluation which centralizes this work in the frontend.
6370 2011-08-02 Robert Dewar <dewar@adacore.com>
6372 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6373 (Base_Type): Now uses improved Is_Base_Type function
6374 * einfo.ads (Base_Type): Inline this function
6376 2011-08-02 Robert Dewar <dewar@adacore.com>
6378 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6379 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6381 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6383 * gcc-interface/Make-lang.in: Update dependencies.
6384 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6387 2011-08-02 Yannick Moy <moy@adacore.com>
6389 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6390 non-simple expression used in delta constraint
6391 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6392 index constraint which is not a subtype mark
6393 * par.adb: With and use Restrict
6394 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6395 mode on component type which is not a subtype mark and default
6396 expression on component
6397 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6398 of string which does not have a lower index bound equal to 1
6399 (Array_Type_Declaration): issue an error in formal mode on index or
6400 component type which is not a subtype mark, and on aliased keyword on
6402 (Derived_Type_Declaration): issue an error in formal mode on interface,
6403 limited or abstract type
6404 (Record_Type_Declaration): issue an error in formal mode on interface
6405 (Record_Type_Definition): issue an error in formal mode on tagged types
6406 and type extensions not declared in the specification of a library unit
6407 package; on null non-tagged record; on variant part
6409 2011-08-02 Vincent Celier <celier@adacore.com>
6411 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6412 not declared for qualified library project when Library_Name is not
6413 declared, but Library_Dir is.
6415 2011-08-02 Robert Dewar <dewar@adacore.com>
6417 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6418 pragmas (affects aspects [Component_]Default_Value
6419 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6420 component type for the resolution
6422 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6424 * einfo.adb (Base_Type): Tune implementation for speed.
6426 2011-08-02 Robert Dewar <dewar@adacore.com>
6428 * freeze.adb: Minor reformatting.
6430 2011-08-02 Thomas Quinot <quinot@adacore.com>
6432 * scos.ads: Update comments.
6434 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6436 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6437 base type, because the parent may be a subtype of a private type whose
6438 convention is established in a private part.
6440 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6442 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6443 statement in a block when the expansion of the return expression has
6444 created a finalization chain.
6445 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6446 with the parent node.
6447 Add N_Extended_Return_Statement to handle the case where a transient
6448 object declaration appears in the Return_Object_Declarations list of
6449 an extended return statement.
6451 2011-08-02 Matthew Gingell <gingell@adacore.com>
6453 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6454 unused parameter 'name'.
6456 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6458 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6459 inherited operation, check whether its alias, which is the source
6460 operastion that it renames, has been marked eliminated.
6462 2011-08-02 Javier Miranda <miranda@adacore.com>
6464 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6465 in-mode parameter whose type is an access type since it can be used to
6466 modify its designated object. Enforce code that handles as safe an
6467 access type that is not access-to-constant but it is the result of a
6468 previous removal of side-effects.
6469 (Remove_Side_Effects): Minor code reorganization of cases which require
6470 no action. Done to incorporate documentation on new cases uncovered
6471 working in this ticket: no action needed if this routine was invoked
6472 too early and the nodes are not yet decorated.
6473 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6474 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6475 were issued with actuals that are implicitly provided by
6478 2011-08-02 Robert Dewar <dewar@adacore.com>
6480 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6482 2011-08-02 Yannick Moy <moy@adacore.com>
6484 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6485 to issue an error in formal mode on attribute not supported in this mode
6486 (Analyze_Attribute): issue errors on standard attributes not supported
6488 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6489 comment, and issue error in formal mode on modulus which is not a power
6491 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6493 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6495 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6496 operator on modular type (except 'not').
6498 2011-08-02 Robert Dewar <dewar@adacore.com>
6500 * gnat_rm.texi: Minor reformatting.
6502 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6504 * s-osinte-linux.ads: Minor comment update and reformatting.
6505 * i-cexten.ads: Make this unit pure, as for its parent.
6506 Will allow its usage in more contexts if needed.
6508 2011-08-02 Robert Dewar <dewar@adacore.com>
6510 * s-utf_32.ads: Minor comment fix.
6512 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6514 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6515 operation of a tagged synchronized type, handle the case where the
6516 controlling argument is overloaded.
6518 2011-08-02 Yannick Moy <moy@adacore.com>
6520 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6521 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6522 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6523 SPARK mode and formal verification mode on processing SPARK restriction
6524 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6525 requiring consistency checking.
6527 2011-08-02 Robert Dewar <dewar@adacore.com>
6529 * sem_res.adb: Minor reformatting.
6531 2011-08-02 Robert Dewar <dewar@adacore.com>
6533 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6534 a-cforse.ads: Remove unneeded with of Ada.Containers
6535 Remove commented out pragma Inline's
6536 Move specifications of new subprograms to the actual specs
6538 2011-08-02 Yannick Moy <moy@adacore.com>
6540 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6541 a-cforse.ads: Update comments.
6543 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6545 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6547 2011-08-02 Robert Dewar <dewar@adacore.com>
6549 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6550 a-cforse.ads, a-cofove.ads: Minor reformatting.
6552 2011-08-02 Claire Dross <dross@adacore.com>
6554 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6555 a-cofove.ads: Add comments.
6557 2011-08-02 Yannick Moy <moy@adacore.com>
6559 * gnat_rm.texi: Document formal containers.
6561 2011-08-02 Emmanuel Briot <briot@adacore.com>
6563 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6566 2011-08-02 Robert Dewar <dewar@adacore.com>
6568 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6571 2011-08-02 Robert Dewar <dewar@adacore.com>
6573 * aspects.adb: New aspects Default_Value and Default_Component_Value
6574 New format of Aspect_Names table checks for omitted entries
6575 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6576 handling of boolean aspects for derived types.
6577 New aspects Default_Value and Default_Component_Value
6578 New format of Aspect_Names table checks for omitted entries
6579 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6580 (Has_Default_Value): New flag
6581 (Has_Default_Component_Value): New flag
6582 (Has_Default_Value): New flag
6583 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6585 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6586 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6587 Default_Value and Default_Component_Value
6588 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6589 New aspects Default_Value and Default_Component_Value
6590 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6591 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6593 2011-08-02 Vincent Celier <celier@adacore.com>
6595 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6596 inherit library kind.
6598 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6600 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6603 2011-08-02 Robert Dewar <dewar@adacore.com>
6605 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6607 2011-08-02 Yannick Moy <moy@adacore.com>
6609 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6611 2011-08-02 Robert Dewar <dewar@adacore.com>
6613 * impunit.adb: Add comment.
6615 2011-08-02 Yannick Moy <moy@adacore.com>
6617 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6618 qualification of aggregates in formal mode
6619 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6621 (Resolve_Aggregate): complete the test that an aggregate is adequately
6622 qualified in formal mode
6624 2011-08-02 Pascal Obry <obry@adacore.com>
6626 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6627 * mlib-prj.adb: Supress warning when compiling binder generated file.
6628 (Build_Library): Supress all warnings when compiling the binder
6631 2011-08-02 Yannick Moy <moy@adacore.com>
6633 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6635 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6636 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6637 Add with/use clauses to make Check_Formal_Restriction visible
6639 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6641 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6642 in-parameters when type of the generic formal is private in the generic
6643 spec and non-private in the body.
6645 2011-08-02 Claire Dross <dross@adacore.com>
6647 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6648 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6649 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6650 * impunit.adb, Makefile.rtl: Take new files into account.
6652 2011-08-02 Robert Dewar <dewar@adacore.com>
6654 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6655 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6657 2011-08-02 Yannick Moy <moy@adacore.com>
6659 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6661 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6662 matching static array bounds, taking into account the special case of
6664 * sem_ch3.adb: Typo in comment.
6666 2011-08-02 Yannick Moy <moy@adacore.com>
6668 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6669 which issues an error in formal mode if its argument node is originally
6671 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6672 has a discriminant specification so that it does not include the case
6674 (Derived_Type_Declaration): move here the test that a derived type has a
6675 discriminant specification
6676 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6677 first element of a component association before accessing its choices
6678 (presence of component association is not enough)
6679 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6680 declaration is a library item before accessing the next element in a
6681 list, as library items are not member of lists
6682 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6683 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6684 Check_Formal_Restriction whenever possible.
6686 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6688 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6689 reference when needed.
6691 2011-08-02 Bob Duff <duff@adacore.com>
6693 * gnat_ugn.texi: Fix typo.
6695 2011-08-02 Vincent Celier <celier@adacore.com>
6697 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6698 archive file name. Do not use the full path name of archives for Open
6701 2011-08-02 Robert Dewar <dewar@adacore.com>
6703 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6704 Analyze_Aspect_Specifications
6706 (Analyze_Aspect_Specifications): New handling for boolean aspects
6707 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6708 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6709 sequence for Analyze_Aspect_Specifications
6710 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6711 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6713 2011-08-02 Robert Dewar <dewar@adacore.com>
6715 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6716 aspects, since these no longer exist.
6718 2011-08-02 Robert Dewar <dewar@adacore.com>
6720 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6721 semicolon, do not try to see if there are aspects following it.
6722 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6725 2011-08-02 Robert Dewar <dewar@adacore.com>
6727 * sem_ch8.adb, aspects.ads: Minor reformatting.
6729 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6731 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6732 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6734 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6736 2011-08-02 Yannick Moy <moy@adacore.com>
6738 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6739 mode on subprogram declaration outside of package specification, unless
6740 it is followed by a pragma Import
6741 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6742 Access_Type_Declaration): issue error in formal mode on access type
6743 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6745 (Analyze_Object_Declaration): issue error in formal mode on object
6746 declaration which does not respect SPARK restrictions
6747 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6748 declaration which does not respect SPARK restrictions
6749 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6750 error in formal mode on digits or delta constraint
6751 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6752 decimal fixed point type
6753 (Derived_Type_Declaration): issue error in formal mode on derived type
6754 other than type extensions of tagged record types
6755 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6756 with check on access definition
6757 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6758 mode on protected definition.
6759 (Analyze_Task_Definition): issue error in formal mode on task definition
6761 2011-08-02 Robert Dewar <dewar@adacore.com>
6763 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6765 2011-08-02 Javier Miranda <miranda@adacore.com>
6767 * sem_ch6.adb (Can_Override_Operator): New function.
6768 (Verify_Overriding_Indicator): Add missing code to check overriding
6769 indicator in operators. Fixes regression.
6770 (Check_Overriding_Indicator): Minor reformating after replacing the
6771 code that evaluates if the subprogram can override an operator by
6772 invocations to the above new function.
6774 (Write_Field26_Name): Add missing code to ensure that, following
6775 the documentation in einfo.ads, this field is not shown as attribute
6776 "Static_Initialization" on non-dispatching functions.
6778 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6780 * sem_res.adb (Resolve_Call): A call to
6781 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6782 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6783 i.e., when the second parameter is of type Time_Span.
6785 2011-08-02 Vincent Celier <celier@adacore.com>
6787 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6788 with an archive instead of -L<library dir> -l<library name>.
6790 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6792 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6793 mark the base types In_Use in addition to making the operations
6796 2011-08-02 Ed Falis <falis@adacore.com>
6798 * init.c: add and setup __gnat_signal_mask for the exception signals
6799 * s-inmaop-vxworks.adb: new file.
6800 * s-intman-vxworks.adb: remove unnecessary initializations and
6802 * s-intman-vxworks.ads: remove unnecessary variable
6803 * s-taprop-vxworks.adb: simplify signal initialization
6805 2011-08-02 Robert Dewar <dewar@adacore.com>
6807 * sem_ch8.adb: Minor code reorganization, comment updates.
6809 2011-08-02 Robert Dewar <dewar@adacore.com>
6811 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6812 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6814 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6815 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6819 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6820 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6821 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6822 use_type_clauses, to handle more efficiently use_type and use_all_type
6824 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6825 Ada2012 Use_All_Type clause.
6826 (Use_Class_Wide_Operations): new procedure.
6828 2011-08-02 Robert Dewar <dewar@adacore.com>
6830 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6831 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6832 expression to expression function.
6834 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6836 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6837 if types are compatible.
6839 2011-08-02 Yannick Moy <moy@adacore.com>
6841 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6842 returns True if its argument array types have same dimension and same
6843 static bounds at each index.
6844 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6845 OUT or IN OUT paramaters which are not view conversions in SPARK.
6846 (Resolve_Arithmetic_Op): issue an error in formal mode on
6847 multiplication or division with operands of fixed point types which are
6848 not qualified or explicitly converted.
6849 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6850 Boolean or array type (except String) operands.
6851 (Resolve_Equality_Op): issue an error in formal mode on equality
6852 operators for array types other than String with non-matching static
6854 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6855 for array types with non-matching static bounds. Factorize the code in
6856 Matching_Static_Array_Bounds.
6857 (Resolve_Qualified_Expression): issue an error in formal mode on
6858 qualified expressions for array types with non-matching static bounds.
6859 (Resolve_Type_Conversion): issue an error in formal mode on type
6860 conversion for array types with non-matching static bounds
6862 2011-08-02 Robert Dewar <dewar@adacore.com>
6864 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6866 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6868 * par-ch9.adb: save location of entry for proper error message.
6870 2011-08-02 Javier Miranda <miranda@adacore.com>
6872 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6873 (Use_Full_View) which permits this routine to climb through the
6874 ancestors using the full-view of private parents.
6875 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6876 Use_Full_View to true in calls to Is_Ancestor.
6877 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6878 true in call to Is_Ancestor.
6879 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6880 Use_Full_View to true in call to Is_Ancestor.
6881 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6882 call to Is_Ancestor.
6883 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6884 Use_Full_View to true in calls to Is_Ancestor.
6885 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6886 Make_Select_Specific_Data_Table, Register_Primitive,
6887 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6888 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6889 to true in call to Is_Ancestor.
6890 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6891 Use_Full_View to true in calls to Is_Ancestor.
6893 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6894 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6896 2011-08-02 Robert Dewar <dewar@adacore.com>
6898 * gnat_rm.texi: Minor reformatting.
6899 * sem_prag.adb: Minor reformatting.
6901 2011-08-02 Tristan Gingold <gingold@adacore.com>
6903 * vms_data.ads: Add VMS qualifier for -gnateP.
6905 2011-08-02 Robert Dewar <dewar@adacore.com>
6907 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6908 * par-ch7.adb (P_Package): Proper placement of aspects for package
6910 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6911 (End_Statements): Add Is_Sloc parameterr
6912 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6913 (Check_End): Ad Is_Sloc parameter
6914 (End_Statements): Add Is_Sloc parameterr
6916 2011-08-02 Vincent Celier <celier@adacore.com>
6918 * ug_words: Add VMS qualifier equivalent to -gnateP:
6919 /SYMBOL_PREPROCESSING.
6921 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6923 * gnat-style.texi: For hexadecimal numeric literals the typical
6924 grouping of digits is 4 to represent 2 bytes.
6925 A procedure spec which is split into several lines is indented two
6928 2011-08-02 Yannick Moy <moy@adacore.com>
6930 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6931 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6932 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6934 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6935 choice in array aggregate
6936 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6938 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6939 positional and named aggregate for record, or others in record
6940 aggregate, or multiple choice in record aggregate
6941 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6942 array operands to logical operations AND, OR and XOR do not have the
6943 same static lower and higher bounds
6944 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6946 2011-08-01 Robert Dewar <dewar@adacore.com>
6948 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6949 Replaces Last_Source_Node_In_Sequence.
6950 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6951 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6952 parens and blank in string (this was inconsistently implemented).
6954 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6955 blank in string (this was inconsistently implemented).
6957 (Set_Global_Switches): Set formal mode switches appropriately
6958 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6960 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6961 call Set_Error_Msg_Lang to set "spark" as language name.
6962 * par.adb: Remove unnecessary call to set formal language for errout
6963 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6964 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6966 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6967 calls to it, moved after resolution so that types are known
6968 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6969 result of concatenation is not of type String
6970 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6971 concatenation is not properly restricted
6972 * gnat_rm.texi: Add doc on pragma Spark_95.
6973 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6974 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6975 * gcc-interface/Make-lang.in: Update dependencies.
6977 2011-08-01 Javier Miranda <miranda@adacore.com>
6979 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6980 condition that detects if the overridden operation must replace an
6983 2011-08-01 Javier Miranda <miranda@adacore.com>
6985 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6986 code declarations inserted by Insert_Actions in each alternative of the
6987 N_Case_Expression node.
6989 2011-08-01 Robert Dewar <dewar@adacore.com>
6991 * sem_ch6.adb: Minor code reorganization.
6992 * sem_util.adb: Minor reformatting.
6994 2011-08-01 Pascal Obry <obry@adacore.com>
6996 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6997 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6999 2011-08-01 Yannick Moy <moy@adacore.com>
7001 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7002 literal or operator symbol which is prefixed
7003 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7004 mode on access attributes.
7005 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7006 that concatenation operands are properly restricted in formal mode
7007 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7008 Analyze_Concatenation_Operand. Issue an error in formal mode if the
7009 result of the concatenation has a type different from String.
7010 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7011 Analyze_Quantified_Expression, Analyze_Slice,
7012 Analyze_Null): issue an error in formal mode on unsupported constructs
7014 (Analyze_Block_Statement): only issue error on source block statement
7015 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7016 function which returns the last node in a list of nodes for which
7017 Comes_From_Source returns True, if any
7018 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7019 Last_Source_Node_In_Sequence
7020 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7021 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7022 mode on unsupported constructs
7023 * sem_ch9.adb Do not return after issuing error in formal mode, as the
7024 rest of the actions may be needed later on since the error is marked as
7026 * sinfo.ads: Typos in comments.
7028 2011-08-01 Pascal Obry <obry@adacore.com>
7030 * projects.texi: Minor editing.
7032 2011-08-01 Yannick Moy <moy@adacore.com>
7034 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7035 insertion character ~~
7036 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7037 (Set_Error_Msg_Lang): new procedure which fixes the language for use
7038 with insertion character ~~
7039 (Set_Msg_Text): treat insertion character ~~
7040 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7041 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7042 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7043 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7044 errors related to the formal language restriction not serious
7045 (insertion character |).
7046 * par.adb (Par): set formal language for error messages if needed
7047 * sem_ch6.adb (Check_Missing_Return): take into account possible
7048 generated statements at the end of the function
7049 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7050 enumeration value to define a new pragma SPARK_95
7051 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7052 SPARK_Version): new type and variables to store the SPARK version
7054 (SPARK_Mode): return True when SPARK_Version is set
7055 * par-prag.adb: Correct indentation
7056 (Prag): take Pragma_SPARK_95 into account
7057 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7060 2011-08-01 Robert Dewar <dewar@adacore.com>
7062 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7063 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7064 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7066 2011-08-01 Pascal Obry <obry@adacore.com>
7068 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7069 Target_Name to Get_Path call.
7070 (Parse_Single_Project): Likewise.
7071 (Post_Parse_Context_Clause): Likewise.
7072 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7073 Call Initialise_Project_Path with the proper Target_Name.
7074 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7076 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7077 with the proper Target_Name.
7078 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7080 (Parse_Project_And_Apply_Config): Likewise.
7081 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7082 This is fine as this part of the code is supporting only native
7084 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7085 is fine as this part of the code is supporting only native compilation.
7087 2011-08-01 Yannick Moy <moy@adacore.com>
7089 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7090 of homonym, unless the homonym is one of the cases allowed in SPARK
7091 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7092 package declaration occurring after a body.
7094 2011-08-01 Robert Dewar <dewar@adacore.com>
7096 * checks.adb, exp_ch4.adb: Minor reformatting.
7098 2011-08-01 Javier Miranda <miranda@adacore.com>
7100 * einfo.ads (Access_Disp_Table): Fix documentation.
7101 (Dispatch_Table_Wrappers): Fix documentation.
7103 2011-08-01 Pascal Obry <obry@adacore.com>
7105 * prj-env.adb, prj-env.ads: Minor reformatting.
7107 2011-08-01 Yannick Moy <moy@adacore.com>
7109 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7110 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7111 procedures out of these packages.
7112 * errout.ads, errout.adb
7113 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7114 procedures in of this package
7115 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7116 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7117 on misplaced later vs initial declarations, like in Ada 83
7118 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7119 formal mode on attribute of private type whose full type declaration
7121 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7122 package declaration inside a package specification
7123 (Analyze_Full_Type_Declaration): issue error in formal mode on
7124 controlled type or discriminant type
7125 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7126 user-defined operator means that it should come from the source
7127 (New_Overloaded_Entity): issue error in formal mode on overloaded
7129 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7131 2011-08-01 Thomas Quinot <quinot@adacore.com>
7133 * atree.adb: Minor reformatting.
7134 * checks.adb: Minor reformatting.
7136 2011-08-01 Vincent Celier <celier@adacore.com>
7138 * s-parame-vms-ia64.ads: Fix typo in comment
7140 * s-parame-vms-restrict.ads: Removed, unused.
7142 2011-08-01 Javier Miranda <miranda@adacore.com>
7145 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7147 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7148 * sem_ch3.ads, sem_ch3.adb
7149 (Is_Constant_Bound): New extended version of the subprogram that was
7150 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7151 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7152 * sem_aux.ads (Constant_Value): Fix typo in comment.
7153 * checks.adb (Generate_Index_Checks): New implementation which, for
7154 array objects with constant bounds, generates the runtime check
7155 referencing the bounds of the array type. For other cases this routine
7156 provides its previous behavior obtaining such values from the array
7158 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7160 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7161 we cannot have semantic interpretations of the new node.
7163 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7165 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7168 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7170 * sem_ch8.adb: Minor code editing.
7171 * s-vxwext.adb: Remove trailing space.
7172 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7173 consistency with other files.
7175 2011-08-01 Thomas Quinot <quinot@adacore.com>
7177 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7179 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7181 * par-ch10.adb: reject parameterized expressions as compilation unit.
7182 * sem_ch4.adb: handle properly conditional expression with overloaded
7183 then_clause and no else_clause.
7185 2011-08-01 Tristan Gingold <gingold@adacore.com>
7187 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7188 like done by System.Aux_DEC.
7189 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7191 2011-08-01 Yannick Moy <moy@adacore.com>
7193 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7194 missing label at end of declaration (subprogram or package)
7195 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7196 of positional and named parameter association
7197 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7198 Error_Msg_SP which adds a prefix to the error message giving the name
7199 of the formal language analyzed
7200 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7201 access result type in subprogram, unconstrained array as result type,.
7202 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7204 * sem_ch8.adb: Code clean up.
7206 2011-08-01 Javier Miranda <miranda@adacore.com>
7208 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7209 * einfo.ads (Access_Disp_Table): Fix documentation.
7210 (Dispatch_Table_Wrappers): Fix documentation.
7211 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7212 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7213 to enforce the documentation of this attribute.
7214 (Set_Is_Interface): Cleanup the assertion.
7215 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7216 the Underlying_Type entity before reading attribute Access_Disp_Table.
7217 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7218 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7219 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7220 the Underlying_Type entity before reading attribute Access_Disp_Table.
7221 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7222 Locate the Underlying_Type entity before reading attribute
7225 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7227 * s-poosiz.ads: Additional overriding indicators.
7229 2011-08-01 Yannick Moy <moy@adacore.com>
7231 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7233 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7234 parameter specification does not include a subtype mark.
7235 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7236 formal mode on abstract subprogram.
7237 (Analyze_Subprogram_Specification): issue error in formal mode on
7238 user-defined operator.
7239 (Process_Formals): issue error in formal mode on access parameter and
7241 * sem_ch9.adb (Analyze_Abort_Statement,
7242 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7243 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7244 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7245 Analyze_Requeue, Analyze_Selective_Accept,
7246 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7247 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7248 issue error in formal mode on user-defined raise statement.
7250 2011-08-01 Thomas Quinot <quinot@adacore.com>
7252 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7253 declaration being hidden when overriding an implicit inherited
7255 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7256 (-gnats), do not complain about a source file that contains only a
7259 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7261 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7262 variable if already set.
7264 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7266 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7267 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7268 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7269 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7270 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7271 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7272 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7273 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7274 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7275 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7276 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7277 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7278 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7279 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7280 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7281 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7282 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7283 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7284 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7285 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7286 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7287 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7288 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7289 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7290 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7291 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7292 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7293 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7294 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7295 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7296 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7297 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7298 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7299 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7300 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7301 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7302 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7303 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7304 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7305 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7306 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7307 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7308 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7309 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7310 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7311 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7312 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7313 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7314 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7315 Use GNAT instead of GNARL.
7317 2011-08-01 Bob Duff <duff@adacore.com>
7319 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7320 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7321 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7324 2011-08-01 Yannick Moy <moy@adacore.com>
7326 * debug.adb (d.D) reverve flag for the SPARK mode
7327 (d.E) reverve flag for SPARK generation mode
7328 (d.F) reverve flag for Why generation mode
7329 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7330 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7331 functions which return True when the corresponding modes are set
7332 (Formal_Language): return "spark" or "alfa" when in formal verification
7334 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7335 Error_Msg to prefix the error message with a tag giving the formal
7337 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7338 message with a tag giving the formal language
7339 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7341 (Analyze_Case_Statement): issue error in formal mode on case statement
7342 with a single "others" case alternative
7343 (Analyze_Exit_Statement): issue errors in formal mode on exit
7344 statements which do not respect SPARK restrictions
7345 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7346 (Check_Unreachable_Code): always issue an error (not a warning) in
7347 formal mode on unreachable code (concerns both code after an infinite
7348 loop and after an unconditional jump, both not allowed in SPARK)
7349 * sem_ch6.adb (Analyze_Return_Statement): add call to
7350 Set_Return_Present for a procedure containing a return statement
7351 (already done for functions in Analyze_Function_Return)
7352 (Analyze_Function_Return): issue error in formal mode on extended
7353 return or if return is not last statement in function
7354 (Check_Missing_Return): issue error in formal mode if function does
7355 not end with return or if procedure contains a return
7356 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7357 function to detect if there is an inner scope of its parameter S which
7360 2011-08-01 Thomas Quinot <quinot@adacore.com>
7362 * sem_ch6.ads: Minor reformatting.
7364 2011-08-01 Javier Miranda <miranda@adacore.com>
7366 * sem_util.adb (Abstract_Interface_List): Complete condition when
7367 processing private type declarations to avoid reading unavailable
7369 (Is_Synchronized_Tagged_Type): Complete condition when processing
7370 private extension declaration nodes to avoid reading unavailable
7373 2011-08-01 Thomas Quinot <quinot@adacore.com>
7375 * sem_ch3.adb: Minor reformatting.
7377 2011-08-01 Thomas Quinot <quinot@adacore.com>
7379 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7380 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7381 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7382 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7383 for VMS, instead parametrize the common implementation with
7384 System.Parameters declarations.
7386 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7388 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7390 2011-08-01 Tristan Gingold <gingold@adacore.com>
7392 * seh_init.c: Fix SEH handler installation on win64.
7394 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7396 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7397 double analysis of an anonymous access to subprogram, because it can
7398 lead to improper sharing of profiles and a back-end crash.
7400 2011-08-01 Robert Dewar <dewar@adacore.com>
7402 * make.adb, sem_ch4.adb: Minor reformatting.
7403 * gcc-interface/Make-lang.in: Update dependencies.
7404 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7406 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7408 * gnat_rm.texi: Fix definition of Long_Integer.
7410 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7412 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7413 to prevent storage exhaustion.
7414 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7415 finalized is a function body, insert the cleanup code before the final
7416 return statement, to prevent spurious warnings.
7417 * s-pooglo.ads: add overriding indicator.
7419 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7421 * sem_ch4.adb (Operator_Check): improve error message when both a
7422 with_clause and a use_clause are needed to make operator usage legal.
7423 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7424 determine whether a compilation unit is visible within an other,
7425 either through a with_clause in the current unit, or a with_clause in
7426 its library unit or one one of its parents.
7428 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7430 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7431 over an arbitrary expression of an array or container type.
7432 * lib-xref.adb: clarify comment.
7434 2011-08-01 Bob Duff <duff@adacore.com>
7436 * einfo.ads: Minor reformatting.
7437 * debug.adb: Minor comment improvement.
7439 2011-08-01 Javier Miranda <miranda@adacore.com>
7441 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7442 consider hidden subprograms as valid candidates.
7444 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7446 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7448 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7450 * gnat_ugn.texi: Fix typo.
7452 2011-08-01 Robert Dewar <dewar@adacore.com>
7454 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7455 lib-xref.adb: Minor reformatting
7457 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7459 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7460 when to generate a call to Move_Final_List.
7461 (Has_Controlled_Parts): Remove this function.
7463 2011-08-01 Geert Bosch <bosch@adacore.com>
7465 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7468 2011-08-01 Thomas Quinot <quinot@adacore.com>
7470 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7471 explicit raise of a predefined exception as Comes_From_Source if the
7472 original N_Raise_Statement comes from source.
7474 2011-08-01 Robert Dewar <dewar@adacore.com>
7476 * sinfo.ads: Add comment.
7477 * sem_ch6.adb: Minor reformatting.
7479 2011-08-01 Robert Dewar <dewar@adacore.com>
7481 * freeze.adb (Freeze_Entity): Refine check for bad component size
7482 clause to avoid rejecting confirming clause when atomic/aliased present.
7484 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7486 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7487 better determine whether an entity reference is a write.
7488 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7490 * lib-xref.adb (Output_References): Do no suppress a read reference at
7491 the same location as an immediately preceeding modify-reference, to
7492 handle properly in-out actuals.
7494 2011-08-01 Tristan Gingold <gingold@adacore.com>
7496 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7498 2011-08-01 Quentin Ochem <ochem@adacore.com>
7500 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7501 heap to compute the result.
7503 2011-08-01 Robert Dewar <dewar@adacore.com>
7505 * atree.ads: Minor reformatting.
7507 2011-08-01 Emmanuel Briot <briot@adacore.com>
7509 * g-expect.adb (Get_Command_Output): Fix memory leak.
7511 2011-08-01 Geert Bosch <bosch@adacore.com>
7513 * cstand.adb (P_Float_Type): New procedure to print the definition of
7514 predefined fpt types.
7515 (P_Mixed_Name): New procedure to print a name using mixed case
7516 (Print_Standard): Use P_Float_Type for printing floating point types
7517 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7518 precision IEEE float.
7520 2011-08-01 Thomas Quinot <quinot@adacore.com>
7522 * sem_ch3.adb: Minor reformatting.
7524 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7526 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7527 the completion of a generic function, insert the new body rather than
7528 rewriting the original.
7530 2011-08-01 Yannick Moy <moy@adacore.com>
7532 * sinfo.ads, errout.ads: Typos in comments.
7534 2011-08-01 Robert Dewar <dewar@adacore.com>
7536 * par-endh.adb: Minor reformatting.
7538 2011-08-01 Robert Dewar <dewar@adacore.com>
7540 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7541 (Pre_Post_Aspects): New subtype.
7542 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7543 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7544 * par-ch7.adb (P_Package): Remove Decl parameter
7545 (P_Package): Handle new syntax for aspects (before IS)
7546 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7548 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7549 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7550 (P_Package): Remove Decl parameter
7551 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7553 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7555 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7556 * sinfo.ads: Document new syntax for aspects in packages etc.
7557 * sprint.adb: Handle new syntax of aspects before IS in package
7559 2011-08-01 Thomas Quinot <quinot@adacore.com>
7561 * atree.ads: Minor reformatting.
7562 * sem_prag.adb: Minor reformatting.
7564 2011-08-01 Robert Dewar <dewar@adacore.com>
7566 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7567 case expr alternative.
7569 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7571 * sem_ch12.adb: Fix typo.
7573 2011-08-01 Geert Bosch <bosch@adacore.com>
7575 * sem_prag.adb (Check_No_Link_Name): New procedure.
7576 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7577 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7578 instead of Standard_Long_Long_Float_Size global. Preparation for
7579 eventual removal of per type constants.
7580 * exp_util.ads (Get_Stream_Size): New function returning the stream
7581 size value of subtype E.
7582 * exp_util.adb (Get_Stream_Size): Implement new function.
7583 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7585 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7587 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7589 2011-08-01 Geert Bosch <bosch@adacore.com>
7591 * cstand.adb: Fix comments.
7592 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7595 2011-08-01 Robert Dewar <dewar@adacore.com>
7597 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7599 2011-08-01 Geert Bosch <bosch@adacore.com>
7601 * atree.ads: Fix comment.
7603 2011-08-01 Robert Dewar <dewar@adacore.com>
7605 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7606 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7607 * par.adb: Add with for Namet.Sp.
7608 * par-tchk.adb: Minor reformatting.
7610 2011-08-01 Vincent Celier <celier@adacore.com>
7612 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7613 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7614 of the init procedure of a SAL.
7615 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7618 2011-08-01 Thomas Quinot <quinot@adacore.com>
7620 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7623 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7625 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7627 2011-08-01 Thomas Quinot <quinot@adacore.com>
7629 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7630 conformant with its spec (return True only for types that have
7631 an overriding Initialize primitive operation that prevents them from
7632 having preelaborable initialization).
7633 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7634 initialization for controlled types in Ada 2005 or later mode.
7636 2011-08-01 Robert Dewar <dewar@adacore.com>
7638 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7640 (Same_Aspect): New function.
7641 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7642 Type_Invariant, Precondition, Postcondition.
7643 * snames.ads-tmpl: Add Name_Type_Invariant.
7645 2011-08-01 Robert Dewar <dewar@adacore.com>
7647 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7649 (Freeze_All_Ent): Fix error in handling inherited aspects.
7650 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7651 already analyzed, but don't skip entire processing of a declaration,
7652 that's wrong in some cases of declarations being rewritten.
7653 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7654 Don't delay for integer, string literals
7655 Treat predicates in usual manner for delay, remove special case code,
7657 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7658 (Build_Predicate_Function): Update saved expression in aspect
7659 (Build_Invariant_Procedure): Update saved expression in aspect
7660 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7661 of replacement of discriminant references if the reference is simple.
7663 2011-08-01 Robert Dewar <dewar@adacore.com>
7665 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7666 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7667 Static_Predicate and Dynamic_Predicate.
7668 (Build_Predicate_Function): Add processing for Static_Predicate
7669 and Dynamic_Predicate.
7670 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7671 (From_Static_Predicate): New flag
7672 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7674 2011-08-01 Robert Dewar <dewar@adacore.com>
7676 * usage.adb: Documentation cleanup for Ada version modes in usage.
7677 * expander.adb: Minor reformatting.
7679 2011-08-01 Robert Dewar <dewar@adacore.com>
7681 * atree.ads: Minor comment fix.
7682 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7683 a-witeio.ads, sem_prag.adb: Minor reformatting.
7685 2011-08-01 Doug Rupp <rupp@adacore.com>
7687 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7688 pointers. Use descrip.h header file for convenience. Add some
7691 2011-08-01 Robert Dewar <dewar@adacore.com>
7693 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7694 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7695 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7697 (Check_Aspect_At_End_Of_Declarations): New procedure
7698 (Analye_Aspect_Specification): Minor changes for above procedures
7699 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7700 specification node as well.
7702 2011-08-01 Pascal Obry <obry@adacore.com>
7704 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7705 Windows files. Use GetFilesAttributes() in this case to check for file
7706 existence instead of returning with an error code.
7708 2011-08-01 Vincent Celier <celier@adacore.com>
7710 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7711 High is above Source length.
7713 2011-08-01 Robert Dewar <dewar@adacore.com>
7715 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7717 2011-08-01 Robert Dewar <dewar@adacore.com>
7719 * aspects.ads (Boolean_Aspects): New subtype.
7720 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7721 for derived types in cases where the parent type and derived type have
7723 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7724 with aspects when parent type also has aspects.
7725 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7726 boolean expression at this point).
7727 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7728 accordance with final decision on the Ada 2012 feature.
7729 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7731 2011-08-01 Matthew Heaney <heaney@adacore.com>
7733 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7735 2011-08-01 Pascal Obry <obry@adacore.com>
7737 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7738 Fix Replace_Slice when High is above current string size.
7739 (Replace_Slice): Fix DL computation when High is above current
7742 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7744 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7746 2011-08-01 Matthew Heaney <heaney@adacore.com>
7748 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7751 2011-08-01 Pascal Obry <obry@adacore.com>
7753 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7756 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7758 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7759 access to protected subprograms in generic bodies.
7760 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7761 protected type, indicate that the convention of the subprogram is
7762 Convention_Protected, because it may be used in subsequent declarations
7763 within the protected declaration.
7765 2011-08-01 Vincent Celier <celier@adacore.com>
7767 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7768 and "final" procedures when the name of the library is "ada", to avoid
7769 duplicate symbols "adainit" and "adafinal" in executables.
7771 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7773 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7774 quantified expression that appears within a postcondition and uses the
7775 Ada2012 'Result attribute.
7777 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7779 * init.c (__gnat_error_handler): Cast reason to int.
7780 (__gnat_install_handler): Explain sa_sigaction use.
7782 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7784 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7785 subprogram has copy-in copy-out parameters, try to promote the mode of
7786 the return type if it is passed in registers.
7788 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7790 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7791 left operand as addressable.
7793 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7795 * gcc-interface/gigi.h (build_function_stub): Remove.
7796 (build_return_expr): Likewise.
7797 (convert_vms_descriptor): Declare.
7798 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7799 (build_function_stub): Move to...
7800 * gcc-interface/utils2.c (build_return_expr): Move to...
7801 * gcc-interface/trans.c (build_function_stub): ...here.
7802 (build_return_expr): ...here.
7803 (Subprogram_Body_to_gnu): Add local variable for language_function.
7804 Disconnect the parameter attributes cache, if any, once done with it.
7805 Call end_subprog_body only after setting the end_locus.
7806 Build the stub associated with the function, if any, at the very end.
7807 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7808 variables and streamline control flow.
7810 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7813 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7816 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7819 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7820 Assign to act.sa_sigaction.
7821 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7822 current->return_address to char * before arithmetic.
7824 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7826 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7827 Correct argument types.
7828 Extract code from reason.
7829 (__gnat_install_handler): Assign to act.sa_sigaction.
7831 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7833 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7834 (GNAT1_OBJS): ...here.
7836 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7839 * g-socthi-mingw.adb (Fill): Fix formatting.
7841 * gcc-interface/gigi.h: Move around comment.
7843 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7846 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7848 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7851 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7853 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7855 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7856 range comparison if Pmode is SImode.
7858 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7859 Eric Botcazou <ebotcazou@adacore.com>
7861 * adadecode.c: Wrap up in extern "C" block.
7862 * adadecode.h: Likewise.
7863 * adaint.c: Likewise. Remove 'const' keyword.
7864 * adaint.h: Likewise.
7866 * atree.h: Likewise.
7868 * cstreams.c: Likewise.
7872 * final.c: Likewise.
7874 * initialize.c: Likewise.
7876 * namet.h: Likewise.
7877 * nlists.h: Likewise.
7878 * raise.c: Likewise.
7879 * raise.h: Likewise.
7880 * repinfo.h: Likewise.
7881 * seh_init.c: Likewise.
7882 * targext.c: Likewise.
7883 * tracebak.c: Likewise.
7884 * uintp.h: Likewise.
7885 * urealp.h: Likewise.
7886 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7887 * xsinfo.adb: Likewise.
7888 * xsnamest.adb: Likewise.
7889 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7890 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7891 * gcc-interface/misc.c: Likewise.
7892 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7893 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7894 ada/targext.o here...
7895 (GNAT_ADA_OBJS): ...and not here.
7896 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7897 (GNATBIND_OBJS): Reorder.
7899 2011-07-07 Richard Henderson <rth@redhat.com>
7901 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7902 dwarf2out_frame_init.
7904 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7906 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7908 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7911 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7913 2011-07-06 Richard Guenther <rguenther@suse.de>
7915 * gcc-interface/misc.c (gnat_init): Merge calls to
7916 build_common_tree_nodes and build_common_tree_nodes_2.
7917 Re-initialize boolean_false_node.
7919 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7920 Olivier Hainque <hainque@adacore.com>
7921 Nicolas Setton <setton@adacore.com>
7923 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7924 the type according to the ARTIFICIAL_P parameter.
7925 (create_type_decl): Likewise.
7926 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7928 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7930 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7931 (gnatbind): Likewise.
7933 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7935 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7937 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7939 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7940 local variable throughout. Remove useless call to Base_Type.
7941 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7942 Take it also into account for the volatileness of the field. Set the
7943 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7945 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7947 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7948 on a dereference built for a by-ref object if it has an address clause.
7950 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7952 * einfo.ads (Address_Taken): Document use for the second argument of
7953 Asm_Input and Asm_Output attributes.
7954 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7955 argument is an entity name, then set Address_Taken on it.
7956 <Attribute_Asm_Output>: Likewise.
7957 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7958 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7959 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7960 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7962 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7965 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7967 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7969 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7970 (ada/utils.o): Update dependencies.
7971 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7972 ../../../libcpp/libcpp.a.
7973 * gcc-interface/utils.c: Include common/common-target.h.
7974 (process_attributes): Use targetm_common.have_named_sections.
7976 2011-06-07 Richard Guenther <rguenther@suse.de>
7978 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7981 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7983 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7984 TREE_THIS_NOTRAP flag.
7986 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7988 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7991 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7993 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7994 constants whose full view has discriminants specially.
7996 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7998 * gcc-interface/utils.c: Include diagnostic.h.
7999 (gnat_write_global_declarations): Output debug information for all
8000 global type declarations before finalizing the compilation unit.
8001 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8003 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8005 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8007 2011-05-25 Kai Tietz <ktietz@redhat.com>
8009 * adaint.c (__gnat_to_canonical_file_list_next): Use array
8010 initialization instead of const/none-const pointer assignment.
8012 2011-05-24 Joseph Myers <joseph@codesourcery.com>
8014 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8015 $(EXTRA_GNAT1_OBJS).
8016 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8017 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8018 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8019 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8020 libcommon-target.a instead of prefix.o.
8022 2011-05-21 Joseph Myers <joseph@codesourcery.com>
8025 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8027 2011-05-20 Joseph Myers <joseph@codesourcery.com>
8029 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8030 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8031 instead of version.o.
8033 2011-05-18 Kai Tietz <ktietz@redhat.com>
8035 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8036 boolean_false_node instead of integer_zero_node.
8037 (convert_with_check): Likewise.
8038 * gcc-interface/decl.c (choices_to_gnu): Likewise.
8040 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
8042 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8043 type of the parameter is an unconstrained array, convert the actual to
8044 the type of the formal in the In Out and Out cases as well.
8046 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8048 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8049 call build_function_type_array or build_varargs_function_type_array
8051 (create_subprog_type): Don't call build_function_type; call
8052 build_function_type_vec instead.
8054 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8056 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8057 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8058 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8060 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
8062 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8064 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8065 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8067 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8069 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8071 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8073 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8074 instead of accessing TYPE_ARG_TYPES directly.
8075 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8077 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8080 * gcc-interface/gigi.h (get_variant_part): Declare.
8081 * gcc-interface/decl.c (get_variant_part): Make global.
8082 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8083 types have the same constant size, are record types and T1 has a
8084 variant part while T2 doesn't.
8086 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8088 * gcc-interface/utils.c (begin_subprog_body): Do not call
8090 (end_subprog_body): Likewise.
8092 2011-05-04 Richard Guenther <rguenther@suse.de>
8094 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8096 (pos_to_constructor): Likewise.
8098 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8099 Eric Botcazou <ebotcazou@adacore.com>
8101 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8102 of build_function_type. Adjust calls to...
8103 (build_raise_check): ...this. Do not take a void_tree parameter.
8104 Call build_function_type_list instead of build_function_type.
8105 Fix head comment and swap couple of conditional blocks.
8107 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8109 * gnatvsn.ads (Library_Version): Bump to 4.7.
8110 (Current_Year): Bump to 2011.
8112 2011-04-29 Michael Matz <matz@suse.de>
8114 * gcc-interface/misc.c (gnat_handle_option): Set
8115 warn_maybe_uninitialized.
8117 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8119 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8120 the Watson/McCabe paper.
8122 2011-04-23 Jim Meyering <meyering@redhat.com>
8124 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8126 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8128 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8131 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8133 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8135 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8136 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8137 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8138 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8139 <all>: Do not set flags on the reused DECL node coming from an alias.
8140 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8141 don't need debug info here...
8142 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8143 (gigi): Adjust calls to create_subprog_decl.
8144 (build_raise_check): Likewise.
8145 (establish_gnat_vms_condition_handler): Likewise.
8146 (Compilation_Unit_to_gnu): Likewise.
8147 (gnat_to_gnu): Likewise.
8149 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8151 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8152 (NO_REORDER_ADAFLAGS): New variable.
8153 (EXTRA_GNATTOOLS): Always define.
8154 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8155 Clean up and adjust list of files compiled with special options.
8156 * gcc-interface/Make-lang.in: Likewise.
8157 (ada/decl.o): Cosmetical change.
8158 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8160 2011-04-20 Jim Meyering <meyering@redhat.com>
8162 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8164 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8166 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8167 $(CFLAGS) on the link line.
8169 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8171 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8172 padded type built for the return type if it is unconstrained.
8174 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8176 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8178 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8180 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8181 before calling TREE_CHAIN.
8182 * gcc-interface/misc.c (gnat_init_ts): New function.
8183 (LANG_HOOKS_INIT_TS): Define.
8185 2011-04-12 Martin Jambor <mjambor@suse.cz>
8187 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8188 instead of cgraph_node.
8190 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8192 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8193 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8196 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8198 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8199 of aggregate types that contain a placeholder.
8201 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8203 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8205 (handle_type_generic_attribute): Likewise.
8207 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8210 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8212 2011-04-04 Kai Tietz <ktietz@redhat.com>
8215 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8218 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8220 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8221 type case, do not strip a padding type around the array type.
8223 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8225 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8228 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8230 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8231 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8232 code for -feliminate-unused-debug-types.
8233 (gnat_post_options): Likewise.
8235 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8237 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8238 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8241 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8243 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8244 DECL_ARTIFICIAL flag on enumeration types.
8246 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8248 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8249 fat pointer types artificial unconditionally.
8250 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8253 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8255 * gcc-interface/gigi.h (get_dummy_type): Declare.
8256 (build_dummy_unc_pointer_types): Likewise.
8257 (finish_fat_pointer_type): Likewise.
8258 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8259 fat pointer type has been built, complete it in place.
8260 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8261 and thin pointers. Remove useless variable.
8262 (finish_fat_pointer_type): Make global and move to...
8263 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8264 (get_dummy_type): New function.
8265 (build_dummy_unc_pointer_types): Likewise.
8266 (gnat_pushdecl): Propage the name to the anonymous variants only.
8267 (update_pointer_to): Only adjust the pointer types in the unconstrained
8270 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8272 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8273 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8274 if this is a Taft amendment type and the full declaration is available.
8275 * gcc-interface/trans.c (process_type): Likewise.
8276 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8277 (process_freeze_entity): Likewise.
8278 * gcc-interface/utils.c (dummy_global): New static variable.
8279 (gnat_write_global_declarations): If there are types declared as used
8280 at the global level, insert them in the global hash table.
8282 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8284 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8285 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8286 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8288 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8289 flag of the type accordingly.
8290 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8292 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8294 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8295 finalizing types when updating the pointers to the designated type.
8296 <all>: Finalize the deferred types even if we didn't defer processing
8297 of incomplete types in this invocation.
8299 2011-04-01 Olivier Hainque <hainque@adacore.com>
8300 Nicolas Setton <setton@adacore.com>
8301 Eric Botcazou <ebotcazou@adacore.com>
8303 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8304 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8306 2011-03-28 Kai Tietz <ktietz@redhat.com>
8308 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8310 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8311 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8313 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8315 2011-03-28 Tristan Gingold <gingold@adacore.com>
8318 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8319 Use ada output of gnatbind.
8320 (ada/b_gnatb.adb): Ditto.
8321 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8322 (ada.mostlyclean, ada.stage1)
8323 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8324 (ada.stagefeedback): Adjust.
8325 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8326 Use ada output of gnatbind.
8327 (b_gnatm.adb): Ditto.
8328 (b_gnatl.o, b_gnatm.o): New rules.
8330 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8332 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8333 for the padded type built to support a specified size or alignment.
8335 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8337 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8338 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8339 unconditionally to the end of the unit when the designated type is
8341 <all>: Rename local variable. Attempt to un-defer types only and do it
8342 for limited_with'ed types as well.
8343 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8344 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8345 consistently and remove redundant call to finalize_from_with_types.
8347 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8349 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8350 subprograms without a previous spec declared in the same unit.
8351 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8352 subprograms at the end of the unit instead of at the beginning.
8353 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8354 isn't public for the special handling of non-inline functions nested
8355 inside inline external functions.
8357 2011-03-25 Jeff Law <law@redhat.com>
8359 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8361 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8363 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8364 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8365 to compute Set_Size_Depends_On_Discriminant.
8366 (Layout_Type): Call it on array types in back-end layout mode.
8367 * sem_util.adb (Requires_Transient_Scope): Return true for array
8368 types only if the size depends on the value of discriminants.
8369 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8370 type if the RHS is a call to a function that returns an unconstrained
8371 type with default discriminant.
8373 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8375 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8376 non-conversion to the nominal result type at the end.
8378 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8380 * gcc-interface/trans.c (create_temporary): New function taken from...
8381 (create_init_temporary): ...here. Call it.
8382 (call_to_gnu): Create the temporary for the return value early, if any.
8383 Create it for a function with copy-in/copy-out parameters if there is
8384 no target; in other cases of copy-in/copy-out, use another temporary.
8385 Push the new binding level lazily. Add and rename local variables.
8387 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8389 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8391 (set_rm_size): Likewise.
8393 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8395 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8396 for the padded type built in order to support a specified alignment.
8397 Fix incorrect formatting.
8399 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8402 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8404 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8406 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8407 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8408 to the end of the list. Adjust recursive call. Rename local variable.
8409 If REORDER is true, reorder components of the record type.
8410 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8411 components_to_record and adjust the parameter list.
8413 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8415 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8416 disabled, use the variable for bounds of loop iteration scheme.
8418 2011-03-21 Kai Tietz <ktietz@redhat.com>
8421 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8423 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8425 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8426 out whether the expression is read-only. Short-circuit placeholder
8427 case and rename a couple of local variables.
8429 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8431 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8432 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8433 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8434 (convert): Deal with conversions from a smaller form type specially.
8436 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8438 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8439 its argument, except for the special -I- switch.
8441 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8443 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8446 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8448 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8450 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8452 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8454 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8455 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8456 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8457 Do not generate the check directly, instead instantiate the template
8458 check present in the descriptor.
8459 (make_descriptor_field): Move around.
8460 (build_vms_descriptor32): Build a template check in the POINTER field.
8461 (build_vms_descriptor): Remove useless suffixes.
8462 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8464 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8467 * targext.c: Include target files if IN_RTS is defined.
8469 2011-01-26 Richard Guenther <rguenther@suse.de>
8472 * targext.c: Include config.h.
8473 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8476 2011-01-04 Pascal Obry <obry@adacore.com>
8477 Eric Botcazou <ebotcazou@adacore.com>
8479 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8481 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8483 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8484 end-of-case on the end label and its associated gotos, if any.
8486 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8488 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8489 expressions of the parameter cache within the statement group of
8492 2011-01-04 Olivier Hainque <hainque@adacore.com>
8493 Eric Botcazou <ebotcazou@adacore.com>
8495 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8496 (set_end_locus_from_node): New function.
8497 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8498 make and the function end_locus.
8499 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8500 for the elaboration subprogram.
8501 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8502 set the end_locus of the expression as well.
8504 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8507 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8508 variables that are referenced in exception handlers volatile.
8512 Copyright (C) 2011 Free Software Foundation, Inc.
8514 Copying and distribution of this file, with or without modification,
8515 are permitted in any medium without royalty provided the copyright
8516 notice and this notice are preserved.
8518 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8519 - fix bugs in the description of Source_Trace;
8520 - get rid of UNIT_NAME;
8522 2011-08-02 Javier Miranda <miranda@adacore.com>
8525 (Build_Dispatching_Requeue): Adding support for VM targets
8526 since we cannot directly reference the Tag entity.
8527 * exp_sel.adb (Build_K): Adding support for VM targets.
8528 (Build_S_Assignment): Adding support for VM targets.
8530 (Default_Prim_Op_Position): In VM targets do not restrict availability
8531 of predefined interface primitives to compiling in Ada 2005 mode.
8532 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8533 restricted to compiling in Ada 2005 mode.
8534 (Make_VM_TSD): Generate code that declares and initializes the OSD
8535 record. Needed to support dispatching calls through synchronized
8538 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8539 primitives associated with synchronized interfaces.
8540 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8541 primitives associated with synchronized interfaces.
8543 2011-08-02 Yannick Moy <moy@adacore.com>
8545 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8546 statements hidden in SPARK if preceded by the HIDE directive
8547 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8548 exception handlers as hidden in SPARK if preceded by the HIDE directive
8549 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8550 if starting with the HIDE directive
8551 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8552 starting with the HIDE directive; mark the declarations in a private
8553 part as hidden in SPARK if the private part starts with the HIDE
8555 * restrict.adb, restrict.ads
8556 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8557 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8558 argument node belongs to a part which is hidden in SPARK
8559 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8560 parts in SPARK; protect the possibly costly call to
8561 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8562 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8563 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8564 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8566 (Scan): recognize special comment starting with '#' and followed by
8567 SPARK keyword "hide" as a HIDE directive.
8569 2011-08-02 Yannick Moy <moy@adacore.com>
8571 * types.ads, erroutc.ads: Minor reformatting.
8573 2011-08-02 Vincent Celier <celier@adacore.com>
8575 * link.c: Add response file support for cross platforms.
8577 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8579 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8580 in an association, set parent field of copy before partial analysis.
8581 * sem_res.adb (Resolve_Slice): create reference to itype only when
8582 expansion is enabled.
8584 2011-08-02 Yannick Moy <moy@adacore.com>
8586 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8587 for new flag denoting which subprogram bodies are in ALFA
8588 * restrict.adb, sem_ch7.adb: Update comment
8589 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8590 sem_ch9.adb, sem_res.adb: Add calls to
8591 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8592 * sem_ch6.adb (Analyze_Function_Return): add calls to
8593 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8594 middle of the body, and extended return.
8595 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8596 False when missing return.
8597 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8598 to True for subprograms whose spec is in ALFA. Remove later on the flag
8599 on the entity used for a subprogram body when there exists a separate
8601 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8602 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8603 False, otherwise do nothing.
8605 2011-08-02 Robert Dewar <dewar@adacore.com>
8607 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8609 2011-08-02 Yannick Moy <moy@adacore.com>
8611 * sem_ch4.ads: minor formatting.
8613 2011-08-02 Yannick Moy <moy@adacore.com>
8615 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8616 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8617 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8618 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8619 opt.ads: cleanup of SPARK mode
8621 2011-08-02 Yannick Moy <moy@adacore.com>
8623 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8625 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8626 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8628 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8629 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8630 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8631 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8633 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8635 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8636 functions whose return type is not in ALFA.
8637 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8639 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8640 parameter's type is not in ALFA.
8641 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8644 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8646 * sem_ch6 (Analyze_Expression_Function): treat the function as
8647 Inline_Always, and introduce a subprogram declaration for it when it is
8649 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8650 expression functions, so that the back-end can determine whether they
8651 can in fact be inlined.
8652 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8653 a function body comes from an expression function.
8655 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8657 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8658 null exclusions to test Can_Never_Be_Null on the anonymous access types
8659 of the formals rather than testing the formals themselves. Exclude this
8660 check in cases where the Old_Formal is marked as a controlling formal,
8661 to avoid issuing spurious errors for bodies completing dispatching
8662 operations (due to the flag not getting set on controlling access
8663 formals in body specs).
8664 (Find_Corresponding_Spec): When checking full and subtype conformance of
8665 subprogram bodies in instances, pass Designated and E in that order, for
8666 consistency with the expected order of the formals (New_Id followed by
8669 2011-08-02 Robert Dewar <dewar@adacore.com>
8671 * sem_ch8.adb: Minor reformatting.
8673 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8675 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8676 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8677 primitive operations of class-wide actuals.
8679 2011-08-02 Javier Miranda <miranda@adacore.com>
8681 * exp_atag.ads, exp_atag.adb
8682 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8683 since its value is implicitly passed in argument Typ.
8684 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8685 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8686 Build_Common_Dispatching_Select_Statements.
8688 2011-08-02 Robert Dewar <dewar@adacore.com>
8690 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8691 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8694 2011-08-02 Robert Dewar <dewar@adacore.com>
8696 * sem_res.adb: Minor reformatting.
8697 * sem_prag.adb: Minor reformatting.
8699 2011-08-02 Javier Miranda <miranda@adacore.com>
8701 * exp_atag.adb, exp_atags.ads
8702 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8703 by the tagged type Entity. Required to use this routine in the VM
8704 targets since we do not have available the Tag entity in the VM
8707 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8708 Ada.Tags has not been previously loaded.
8710 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8711 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8713 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8714 view of enclosing scopes. Required to handle enclosing scopes that
8715 are synchronized types whose full view is a task type.
8717 (Build_VM_TSDs): Minor code improvement to avoid generating and
8718 analyzing lists with empty nodes.
8719 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8720 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8721 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8722 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8723 (Make_Select_Specific_Data_Table): Add support for VM targets.
8724 (Make_VM_TSD): Generate code to initialize the SSD structure of
8727 2011-08-02 Yannick Moy <moy@adacore.com>
8729 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8730 cross-references section in ALI.
8731 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8732 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8734 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8735 subprogram or package entity of a node
8736 (Is_Local_Reference_Type): new function returns True for references
8737 selected in local cross-references.
8738 (Lt): function extracted from Lt in Output_References
8739 (Write_Entity_Name): function extracted from Output_References
8740 (Generate_Definition): generate reference with type 'D' for definition
8741 of objects (object declaration and parameter specification), with
8742 appropriate locations and units, for use in local cross-references.
8743 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8744 references of type 'I' for initialization in object definition.
8745 (Output_References): move part of function Lt and procedure
8746 Write_Entity_Name outside of the body. Ignore references of types 'D'
8747 and 'I' introduced for local cross-references.
8748 (Output_Local_References): new procedure to output the local
8749 cross-references sections.
8750 (Lref_Entity_Status): new array defining whether an entity is a local
8751 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8752 with 'I' type when initialization expression is present.
8753 * get_scos.adb, get_scos.ads: Correct comments and typos
8755 2011-08-02 Javier Miranda <miranda@adacore.com>
8757 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8759 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8761 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8764 2011-08-02 Vincent Celier <celier@adacore.com>
8766 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8767 (No_Space_Img): New function
8768 (Find_Excluded_Sources): When reading from a file, record the file name
8769 and the line number for each excluded source.
8770 (Mark_Excluded_Sources): When reporting an error, if the excluded
8771 sources were read from a file, include file name and line number in
8774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8776 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8778 2011-08-02 Robert Dewar <dewar@adacore.com>
8780 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8782 2011-08-02 Javier Miranda <miranda@adacore.com>
8784 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8785 generation of TSDs to the DOTNET compiler.
8786 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8787 generation of TSDs to the DOTNET compiler.
8789 2011-08-02 Javier Miranda <miranda@adacore.com>
8791 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8792 record of all the tagged types declared inside library level package
8793 declarations, library level package bodies or library level subprograms.
8794 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8795 associated with a given tagged type.
8796 (Build_VM_TSDs): New subprogram.
8797 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8798 compilation units that are subprograms.
8799 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8800 compilation units that are package bodies.
8801 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8802 units that are a package declaration or a package instantiation.
8803 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8804 reorganization to improve the error generated by the frontend when the
8805 function Ada.Tags.Secondary_Tag is not available.
8806 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8807 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8809 2011-08-02 Javier Miranda <miranda@adacore.com>
8811 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8813 2011-08-02 Robert Dewar <dewar@adacore.com>
8815 * s-imenne.ads: Minor reformatting.
8817 2011-08-02 Robert Dewar <dewar@adacore.com>
8819 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8820 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8821 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8823 2011-08-02 Robert Dewar <dewar@adacore.com>
8825 * einfo.ads (Materialize_Entity): Document this is only for renamings
8826 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8827 required debug information in the case where we transform the object
8828 declaration into a renaming declaration.
8829 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8831 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8834 2011-08-02 Robert Dewar <dewar@adacore.com>
8836 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8837 Suppress_Init_Procs.
8838 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8839 Suppress_Initialization/Initialization_Suppressed.
8840 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8841 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8842 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8843 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8845 2011-08-02 Robert Dewar <dewar@adacore.com>
8847 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8850 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8852 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8853 only have inheritable classwide pre/postconditions.
8855 2011-08-02 Javier Miranda <miranda@adacore.com>
8857 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8858 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8859 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8860 checks if the external tag of a type is the same as the external tag
8861 of some other declaration.
8863 2011-08-02 Thomas Quinot <quinot@adacore.com>
8865 * s-taskin.ads: Minor reformatting.
8867 2011-08-02 Emmanuel Briot <briot@adacore.com>
8869 * g-comlin.adb (Display_Help): swap the order in which it prints the
8870 short help and the general usage.
8872 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8874 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8875 the aspect declarations and attach them to the generic copy for
8876 subsequent analysis.
8877 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8878 declarations of the generic tree to the new subprogram declarations.
8879 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8880 conditions that apply to a subprogram instance.
8882 2011-08-02 Robert Dewar <dewar@adacore.com>
8884 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8886 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8888 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8889 private type with a tagged full view is not derived in the immediate
8890 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8892 2011-08-02 Robert Dewar <dewar@adacore.com>
8894 * exp_ch4.adb: Minor reformatting.
8896 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8898 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8899 Ada2012 iterator, the loop will be rewritten during expansion into a
8900 while loop with a cursor and an element declaration. Do not analyze the
8901 body in this case, because if the container is for indefinite types the
8902 actual subtype of the elements will only be determined when the cursor
8903 declaration is analyzed.
8905 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8907 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8908 size/alignment related attributes in CodePeer_Mode.
8910 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8912 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8913 Prepend_Element, since this can result in the operation getting the
8914 wrong slot in the full type's dispatch table if the full type has
8915 inherited operations. The incomplete type's operation will get added
8916 to the proper position in the full type's primitives
8917 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8918 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8919 dispatching operations, since there are cases where nonprimitive
8920 subprograms can get added to the list of incomplete dependents (such
8921 as subprograms in nested packages).
8922 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8923 private part when determining whether to add a primitive with a
8924 parameter of a tagged incomplete type to the Private_Dependents list.
8925 Such primitives can also occur in the visible part, and should not have
8926 been excluded from being private dependents.
8927 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8928 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8929 list of a Taft-amendment incomplete type is a primitive before issuing
8930 an error that the full type must appear in the same unit. There are
8931 cases where nonprimitives can be in the list (such as subprograms in
8933 * sem_disp.adb (Derives_From): Use correct condition for checking that
8934 a formal's type is derived from the type of the corresponding formal in
8935 the parent subprogram (the condition was completely wrong). Add
8936 checking that was missing for controlling result types being derived
8937 from the result type of the parent operation.
8939 2011-08-02 Yannick Moy <moy@adacore.com>
8941 * errout.adb (First_Node): minor renaming
8942 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8945 2011-08-02 Yannick Moy <moy@adacore.com>
8947 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8948 before accessing operands.
8949 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8950 decide whether an initialization expression respects SPARK rules, as
8951 the plain node is the expanded one. This allows for more valid warnings
8953 * gnat_rm.texi: Minor update.
8955 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8957 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8960 2011-08-02 Robert Dewar <dewar@adacore.com>
8962 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8964 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8966 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8967 loop statements and the element renaming declaration with a block when
8968 the element type is controlled.
8970 2011-08-02 Yannick Moy <moy@adacore.com>
8972 * sinfo.ads: Minor formatting.
8974 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8976 * sem_aggr.adb (Add_Association): if the association has a box and no
8977 expression, use the Sloc of the aggregate itself for the new
8979 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8982 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8984 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8985 When a container is provided via a function call, generate a renaming
8986 of the function result. This avoids the creation of a transient scope
8987 and the premature finalization of the container.
8988 * exp_ch7.adb (Is_Container_Cursor): Removed.
8989 (Wrap_Transient_Declaration): Remove the supression of the finalization
8990 of the list controller when the declaration denotes a container cursor,
8993 2011-08-02 Yannick Moy <moy@adacore.com>
8995 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8996 node is from source, instead of the original node being from source.
8998 (Resolve_Array_Aggregate): refine the check for a static expression, to
8999 recognize also static ranges
9000 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9001 Array_Type_Declaration): postpone the test for the type being a subtype
9002 mark after the type has been resolved, so that component-selection and
9003 expanded-name are discriminated.
9004 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9005 to distinguish the case of an iteration scheme, so that an error is
9006 issed on a non-static range in SPARK except in an iteration scheme.
9007 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9008 In_Iter_Schm = True.
9009 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9010 user-defined operators so that they are allowed in renaming
9012 (Find_Selected_Component): refine the check for prefixing of operators
9013 so that they are allowed in renaming. Move the checks for restrictions
9014 on selector name after analysis discriminated between
9015 component-selection and expanded-name.
9016 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9017 concatenation argument of string type if it is static.
9018 * sem_util.adb, sem_util.ads
9019 (Check_Later_Vs_Basic_Declarations): add a new function
9020 Is_Later_Declarative_Item to decice which declarations are allowed as
9021 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9022 mode, add that renamings are considered as later items.
9023 (Enclosing_Package): new function to return the enclosing package
9024 (Enter_Name): correct the rule for homonyms in SPARK
9025 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9026 from source (result of expansion) to avoid issuing wrong warnings.
9028 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9030 * errout.adb: On anything but an expression First_Node returns its
9033 2011-08-02 Pascal Obry <obry@adacore.com>
9035 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9037 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9039 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9040 Set the associated loop as the related expression of internally
9042 * exp_ch7.adb (Is_Container_Cursor): New routine.
9043 (Wrap_Transient_Declaration): Supress the finalization of the list
9044 controller when the declaration denotes a container cursor.
9046 2011-08-02 Yannick Moy <moy@adacore.com>
9048 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9050 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9051 expression is a simple expression. This check cannot be performed in
9052 the semantics, so just drop it.
9053 (P_Index_Or_Discriminant_Constraint): move check that the index or
9054 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9055 semantics. Other cases were previously checked in the semantics.
9056 * par-ch4.adb (P_Name): move checks that a selector name is not
9057 character literal or an operator symbol to Find_Selected_Component in
9059 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9060 declarations are not placed after later declarations in a separate
9061 procedure in Sem_Util (possibly not the best choice?), to be used both
9062 during parsing, for Ada 83 mode, and during semantic analysis, for
9064 * par-endh.adb (Check_End): move check that end label is not missing
9065 to Process_End_Label in the semantics
9066 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9067 the special case for SPARK restriction
9068 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9069 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9070 parameter Force to issue the error message even on internal node (used
9071 for generated end label). Call Check_Restriction to check when an error
9072 must be issued. In SPARK mode, issue an error message even if the
9073 restriction is not set.
9074 (Check_Restriction): new procedure with an additional out parameter to
9075 inform the caller that a message has been issued
9076 * sem_aggr.adb: Minor modification of message
9077 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9078 instead of issuing an error message directly
9079 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9080 declarations are not placed after later declarations, by calling
9081 Check_Later_Vs_Basic_Declarations
9082 (Analyze_Subtype_Declaration): move here the check that an index or
9083 discriminant constraint must be a subtype mark. Change the check that
9084 a subtype of String must start at one so that it works on subtype marks.
9085 * sem_ch4.adb (Analyze_Call): move here the check that a named
9086 association cannot follow a positional one in a call
9087 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9088 instead of issuing an error message directly
9089 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9090 selector name is not a character literal or an operator symbol. Move
9091 here the check that the prefix of an expanded name cannot be a
9092 subprogram or a loop statement.
9093 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9094 procedure called from parsing and semantics to check that basic
9095 declarations are not placed after later declarations
9096 (Process_End_Label): move here the check that end label is not missing
9098 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9100 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9101 representation clause in codepeer mode, since it confuses CodePeer and
9102 does not bring useful info.
9104 2011-08-02 Ed Falis <falis@adacore.com>
9106 * init.c: initialize fp hw on MILS.
9108 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9110 * errout.adb (First_Node): for bodies, return the node itself (small
9111 optimization). For other nodes, do not check source_unit if the node
9112 comes from Standard.
9114 2011-08-02 Robert Dewar <dewar@adacore.com>
9116 * exp_ch3.adb: Minor comment additions.
9117 * sem_ch13.adb: Minor reformatting.
9119 2011-08-02 Pascal Obry <obry@adacore.com>
9121 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9123 2011-08-02 Robert Dewar <dewar@adacore.com>
9125 * sem_attr.adb: Minor reformatting.
9127 2011-08-02 Robert Dewar <dewar@adacore.com>
9129 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9130 (Has_Default_Component_Value): Removed
9131 * einfo.ads Comment updates
9132 (Has_Default_Aspect): Replaces Has_Default_Value
9133 (Has_Default_Component_Value): Removed
9135 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9137 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9138 (Get_Simple_Init_Val): Handle Default_Value aspect
9139 (Needs_Simple_Initialization): Handle Default_Value aspect
9140 * exp_ch3.ads: Needs_Simple_Initialization
9141 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9142 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9144 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9145 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9146 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9148 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9150 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9151 package containing iteration primitives.
9152 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9154 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9156 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9157 "of", pre-analyze expression in case it is a function call with
9158 finalization actions that must be placed ahead of the loop.
9159 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9160 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9162 2011-08-02 Geert Bosch <bosch@adacore.com>
9164 * cstand.adb (Create_Float_Types): Only consider C's long double for
9165 Long_Long_Float, in addition to double.
9167 2011-08-02 Robert Dewar <dewar@adacore.com>
9169 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9170 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9171 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9174 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9176 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9179 2011-08-02 Javier Miranda <miranda@adacore.com>
9181 * einfo.ads, einfo.adb
9182 (Original_Access_Type): Move this attribute to Node26 since there was
9183 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9184 which causes conflicts and breaks the generation of the .NET compiler.
9185 (Interface_Name): Add missing documentation on JGNAT only uses of
9188 2011-08-02 Geert Bosch <bosch@adacore.com>
9190 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9191 (Find_Back_End_Float_Type): Likewise
9192 (Create_Back_End_Float_Types): Likewise
9193 (Create_Float_Types): Likewise
9194 (Register_Float_Type): Likewise
9195 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9196 Nlist and split out type selection in new local Find_Base_Type function.
9197 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9199 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9201 2011-08-02 Robert Dewar <dewar@adacore.com>
9203 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9205 * opt.ads: Minor comment change.
9206 * sem_ch12.adb: Minor code reorganization.
9208 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9210 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9211 subtype's list of rep items to the list on the full subtype in the case
9212 where the lists are the same.
9214 2011-08-02 Geert Bosch <bosch@adacore.com>
9216 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9217 using the one from System.Strings, which also deallocates all strings.
9219 2011-08-02 Geert Bosch <bosch@adacore.com>
9221 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9223 * gcc-interface/Make-lang.in: Update dependencies.
9225 2011-08-02 Olivier Hainque <hainque@adacore.com>
9227 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9230 2011-08-02 Javier Miranda <miranda@adacore.com>
9232 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9233 associated with anonymous access to subprograms.
9235 2011-08-02 Geert Bosch <bosch@adacore.com>
9238 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9239 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9240 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9241 (Add_Symbol_Definition): Move to switch-c.adb
9242 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9243 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9244 (Add_Symbol_Definition): Move to switch-c.adb.
9245 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9247 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9249 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9250 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9252 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9253 (Add_Symbol_Definition): Moved from Prepcomp.
9254 * switch-c.ads: Update copyright notice. Use String_List instead of
9255 Argument_List, removing dependency on System.OS_Lib.
9257 2011-08-02 Yannick Moy <moy@adacore.com>
9259 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9260 mode on initialization expression which does not respect SPARK
9262 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9263 if the tree referenced by its argument represents an initialization
9264 expression in SPARK, suitable for initializing an object in an object
9267 2011-08-02 Javier Miranda <miranda@adacore.com>
9269 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9270 internally generated access to subprogram with its associated protected
9272 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9274 2011-08-02 Geert Bosch <bosch@adacore.com>
9276 * cstand.adb (Register_Float_Type): Print information about type to
9277 register, if the Debug_Flag_Dot_B is set.
9278 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9279 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9280 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9281 with a requested precision of more than Max_Digits digits and no more
9282 than Max_Base_Digits digits, if a range specification is present and the
9283 Predefined_Float_Types list has a suitable type to derive from.
9284 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9285 case of type completion with pragma Import
9287 (Process_Import_Predefined_Type): Processing to complete a type
9288 with pragma Import. Currently supports floating point types only.
9289 (Set_Convention_From_Pragma): Do nothing without underlying type.
9290 (Process_Convention): Guard against absence of underlying type,
9291 which may happen when importing incomplete types.
9292 (Process_Import_Or_Interface): Handle case of importing predefined
9293 types. Tweak error message.
9295 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9297 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9298 functions to previous change. Reorganize code slightly.
9300 2011-08-02 Geert Bosch <bosch@adacore.com>
9302 * back_end.ads (Register_Type_Proc): New call back procedure type for
9303 allowing the back end to provide information about available types.
9304 (Register_Back_End_Types): New procedure to register back end types.
9305 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9307 * cstand.adb (Back_End_Float_Types): New list for floating point types
9308 supported by the back end.
9309 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9310 (Copy_Float_Type): New procedure to make new copies of predefined types.
9311 (Register_Float_Type): New call back procedure to populate the BEFT list
9312 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9313 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9314 (Create_Float_Types): New procedure to create entities for floating
9315 point types predefined in Standard, and put these and any remaining
9316 BEFTs on the Predefined_Float_Types list.
9317 * stand.ads (Predefined_Float_Types): New list for predefined floating
9318 point types that do not have declarations in package Standard.
9320 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9322 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9323 entity node for the unit containing the parameter.
9324 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9325 (Add_Inlined_Subprogram): Likewise.
9326 * gcc-interface/Make-lang.in: Update dependencies.
9328 2011-08-02 Thomas Quinot <quinot@adacore.com>
9330 * s-stusta.adb (Print): Make sure Pos is always initialized to a
9333 2011-08-02 Geert Bosch <bosch@adacore.com>
9335 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9337 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9339 * sem_type.adb (Covers): Move trivial case to the top and reuse the
9340 computed value of Base_Type.
9342 2011-08-02 Yannick Moy <moy@adacore.com>
9344 * restrict.adb (Check_Restriction): issue an error for any use of
9345 class-wide, even if the No_Dispatch restriction is not set.
9346 * sem_aggr.adb: Correct typos in comments and messages in formal mode
9347 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9348 when completing a private extension, the type named in the private part
9349 is not the same as that named in the visible part.
9350 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9351 of an inherited primitive operations of a tagged type or type extension
9352 that returns the tagged type.
9353 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9354 function which returns True for an implicit operation inherited by the
9355 derived type declaration for the argument type.
9356 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9359 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9361 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9362 Process_Bounds, to perform analysis with expansion of a range or an
9363 expression that is the iteration scheme for a loop.
9364 (Analyze_Iterator_Specification): If domain of iteration is given by a
9365 function call with a controlled result, as is the case if call returns
9366 a predefined container, ensure that finalization actions are properly
9368 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9370 2011-08-02 Javier Miranda <miranda@adacore.com>
9372 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9373 * gcc-interface/Make-lang.in: Update dependencies.
9375 2011-08-02 Javier Miranda <miranda@adacore.com>
9377 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9378 determine if the analysis is performed using N or Original_Node (N).
9379 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9380 functionality of routine Is_Variable avoids code duplication.
9381 * checks.adb (Determine_Range): Handle temporaries generated by
9382 Remove_Side_Effects.
9384 2011-08-02 Javier Miranda <miranda@adacore.com>
9386 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9387 expansion of the condition. Required since the previous analysis was
9388 done with expansion disabled (see Resolve_Quantified_Expression) and
9389 hence checks were not inserted and record comparisons have not been
9392 2011-08-02 Ed Falis <falis@adacore.com>
9394 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9397 2011-08-02 Bob Duff <duff@adacore.com>
9399 * opt.ads: Minor comment fix.
9401 2011-08-02 Bob Duff <duff@adacore.com>
9403 * sem_ch12.adb (Analyze_Package_Instantiation,
9404 Analyze_Subprogram_Instantiation): Turn off style checking while
9405 analyzing an instance. Whatever style checks that apply to the generic
9406 unit should apply, so it makes no sense to apply them in an instance.
9407 This was causing trouble when compiling an instance of a runtime
9408 unit that violates the -gnatyO switch.
9409 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9410 one of the two case statements, causing spurious errors.
9412 2011-08-02 Robert Dewar <dewar@adacore.com>
9414 * uname.adb: Minor reformatting.
9415 * gnatcmd.adb: Minor reformatting.
9416 * exp_attr.adb: Minor reformatting.
9418 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9420 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9421 No_Dispatching_Calls, do not look for the Assign primitive, because
9422 predefined primitives are not created in this case.
9424 2011-08-02 Bob Duff <duff@adacore.com>
9426 * stylesw.ads: Minor comment fixes.
9428 2011-08-02 Robert Dewar <dewar@adacore.com>
9430 * freeze.adb (Add_To_Result): New procedure.
9432 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9434 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9435 time, if the specific run-time routines for handling streams of strings
9436 are not available, use the default mechanism.
9438 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9440 * s-regpat.ads: Fix typo.
9442 2011-08-02 Vincent Celier <celier@adacore.com>
9444 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9445 not null, call it to create the in memory config project file without
9446 parsing an existing default config project file.
9448 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9450 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9452 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9454 * sem_elim.adb: an abstract subprogram does not need an eliminate
9455 pragma for its descendant to be eliminable.
9457 2011-08-02 Ed Falis <falis@adacore.com>
9459 * init.c: revert to handling before previous checkin for VxWorks
9460 * s-intman-vxworks.adb: delete unnecessary declarations related to
9461 using Ada interrupt facilities for handling signals.
9462 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9463 * s-intman-vxworks.ads: Import __gnat_install_handler as
9464 Initialize_Interrupts.
9465 * s-taprop-vxworks.adb: Delete Signal_Mask.
9466 (Abort_Handler): change construction of mask to unblock exception
9469 2011-08-02 Jerome Guitton <guitton@adacore.com>
9471 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9472 Debug_Raise_Exception before propagation starts.
9474 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9476 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9477 to Restriction_Check_Required.
9478 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9479 * sem_res.adb (Resolve_Call): Likewise.
9480 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9482 2011-08-02 Bob Duff <duff@adacore.com>
9484 * stylesw.ads: Update comment.
9485 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9486 * errout.ads: Remove obsolete comment.
9488 2011-08-02 Javier Miranda <miranda@adacore.com>
9490 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9491 (Set_Is_Safe_To_Reevaluate): new procedure.
9492 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9493 assignment is allowed on safe-to-reevaluate variables.
9494 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9495 temporary created to remove side effects in expressions that use
9496 the secondary stack as safe-to-reevaluate.
9497 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9498 variables that are not true constants.
9500 2011-08-02 Robert Dewar <dewar@adacore.com>
9502 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9503 sem_res.adb, sem_ch6.adb: Minor reformatting.
9505 2011-08-02 Jerome Guitton <guitton@adacore.com>
9507 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9511 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9512 not set Overridden_Operation if subprogram is an initialization
9515 2011-08-02 Yannick Moy <moy@adacore.com>
9517 * par-ch6.adb: Correct obsolete name in comments
9518 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9519 which takes two message arguments (existing function takes one), with
9520 second message used for continuation.
9521 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9522 block statements that originate from a source block statement, not
9523 generated block statements
9524 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9525 symmetry with procedure case
9526 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9527 function to issue an error in formal mode if a package specification
9528 contains more than one tagged type or type extension.
9529 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9530 parameters matching formals of tagged types are objects (or ancestor
9531 type conversions of objects), not general expressions. Issue an error
9532 on view conversions that are not involving ancestor conversion of an
9534 (Resolve_Type_Conversion): in formal mode, issue an error on the
9535 operand of an ancestor type conversion which is not an object
9536 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9537 procedure so that it works also for actuals of function calls
9538 (Is_Actual_Tagged_Parameter): new function which determines if its
9539 argument is an actual parameter of a formal of tagged type in a
9541 (Is_SPARK_Object_Reference): new function which determines if the tree
9542 referenced by its argument represents an object in SPARK
9544 2011-08-02 Robert Dewar <dewar@adacore.com>
9546 * sem_ch3.adb: Minor reformatting
9547 Minor comment addition
9548 Minor error msg text change
9550 2011-08-02 Javier Miranda <miranda@adacore.com>
9552 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9553 function. Used to be more precise when we generate a variable plus one
9554 assignment to remove side effects in the evaluation of the Bound
9556 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9557 of the bound expression to force its re-analysis and thus expand the
9558 associated transient scope (if required). Code cleanup replacing the
9559 previous code that declared the constant entity by an invocation to
9560 routine Force_Evaluation which centralizes this work in the frontend.
9562 2011-08-02 Robert Dewar <dewar@adacore.com>
9564 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9565 (Base_Type): Now uses improved Is_Base_Type function
9566 * einfo.ads (Base_Type): Inline this function
9568 2011-08-02 Robert Dewar <dewar@adacore.com>
9570 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9571 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9573 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9575 * gcc-interface/Make-lang.in: Update dependencies.
9576 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9579 2011-08-02 Yannick Moy <moy@adacore.com>
9581 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9582 non-simple expression used in delta constraint
9583 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9584 index constraint which is not a subtype mark
9585 * par.adb: With and use Restrict
9586 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9587 mode on component type which is not a subtype mark and default
9588 expression on component
9589 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9590 of string which does not have a lower index bound equal to 1
9591 (Array_Type_Declaration): issue an error in formal mode on index or
9592 component type which is not a subtype mark, and on aliased keyword on
9594 (Derived_Type_Declaration): issue an error in formal mode on interface,
9595 limited or abstract type
9596 (Record_Type_Declaration): issue an error in formal mode on interface
9597 (Record_Type_Definition): issue an error in formal mode on tagged types
9598 and type extensions not declared in the specification of a library unit
9599 package; on null non-tagged record; on variant part
9601 2011-08-02 Vincent Celier <celier@adacore.com>
9603 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9604 not declared for qualified library project when Library_Name is not
9605 declared, but Library_Dir is.
9607 2011-08-02 Robert Dewar <dewar@adacore.com>
9609 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9610 pragmas (affects aspects [Component_]Default_Value
9611 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9612 component type for the resolution
9614 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9616 * einfo.adb (Base_Type): Tune implementation for speed.
9618 2011-08-02 Robert Dewar <dewar@adacore.com>
9620 * freeze.adb: Minor reformatting.
9622 2011-08-02 Thomas Quinot <quinot@adacore.com>
9624 * scos.ads: Update comments.
9626 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9628 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9629 base type, because the parent may be a subtype of a private type whose
9630 convention is established in a private part.
9632 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9634 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9635 statement in a block when the expansion of the return expression has
9636 created a finalization chain.
9637 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9638 with the parent node.
9639 Add N_Extended_Return_Statement to handle the case where a transient
9640 object declaration appears in the Return_Object_Declarations list of
9641 an extended return statement.
9643 2011-08-02 Matthew Gingell <gingell@adacore.com>
9645 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9646 unused parameter 'name'.
9648 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9650 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9651 inherited operation, check whether its alias, which is the source
9652 operastion that it renames, has been marked eliminated.
9654 2011-08-02 Javier Miranda <miranda@adacore.com>
9656 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9657 in-mode parameter whose type is an access type since it can be used to
9658 modify its designated object. Enforce code that handles as safe an
9659 access type that is not access-to-constant but it is the result of a
9660 previous removal of side-effects.
9661 (Remove_Side_Effects): Minor code reorganization of cases which require
9662 no action. Done to incorporate documentation on new cases uncovered
9663 working in this ticket: no action needed if this routine was invoked
9664 too early and the nodes are not yet decorated.
9665 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9666 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9667 were issued with actuals that are implicitly provided by
9670 2011-08-02 Robert Dewar <dewar@adacore.com>
9672 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9674 2011-08-02 Yannick Moy <moy@adacore.com>
9676 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9677 to issue an error in formal mode on attribute not supported in this mode
9678 (Analyze_Attribute): issue errors on standard attributes not supported
9680 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9681 comment, and issue error in formal mode on modulus which is not a power
9683 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9685 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9687 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9688 operator on modular type (except 'not').
9690 2011-08-02 Robert Dewar <dewar@adacore.com>
9692 * gnat_rm.texi: Minor reformatting.
9694 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9696 * s-osinte-linux.ads: Minor comment update and reformatting.
9697 * i-cexten.ads: Make this unit pure, as for its parent.
9698 Will allow its usage in more contexts if needed.
9700 2011-08-02 Robert Dewar <dewar@adacore.com>
9702 * s-utf_32.ads: Minor comment fix.
9704 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9706 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9707 operation of a tagged synchronized type, handle the case where the
9708 controlling argument is overloaded.
9710 2011-08-02 Yannick Moy <moy@adacore.com>
9712 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9713 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9714 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9715 SPARK mode and formal verification mode on processing SPARK restriction
9716 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9717 requiring consistency checking.
9719 2011-08-02 Robert Dewar <dewar@adacore.com>
9721 * sem_res.adb: Minor reformatting.
9723 2011-08-02 Robert Dewar <dewar@adacore.com>
9725 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9726 a-cforse.ads: Remove unneeded with of Ada.Containers
9727 Remove commented out pragma Inline's
9728 Move specifications of new subprograms to the actual specs
9730 2011-08-02 Yannick Moy <moy@adacore.com>
9732 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9733 a-cforse.ads: Update comments.
9735 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9737 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9739 2011-08-02 Robert Dewar <dewar@adacore.com>
9741 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9742 a-cforse.ads, a-cofove.ads: Minor reformatting.
9744 2011-08-02 Claire Dross <dross@adacore.com>
9746 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9747 a-cofove.ads: Add comments.
9749 2011-08-02 Yannick Moy <moy@adacore.com>
9751 * gnat_rm.texi: Document formal containers.
9753 2011-08-02 Emmanuel Briot <briot@adacore.com>
9755 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9758 2011-08-02 Robert Dewar <dewar@adacore.com>
9760 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9763 2011-08-02 Robert Dewar <dewar@adacore.com>
9765 * aspects.adb: New aspects Default_Value and Default_Component_Value
9766 New format of Aspect_Names table checks for omitted entries
9767 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9768 handling of boolean aspects for derived types.
9769 New aspects Default_Value and Default_Component_Value
9770 New format of Aspect_Names table checks for omitted entries
9771 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9772 (Has_Default_Value): New flag
9773 (Has_Default_Component_Value): New flag
9774 (Has_Default_Value): New flag
9775 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9777 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9778 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9779 Default_Value and Default_Component_Value
9780 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9781 New aspects Default_Value and Default_Component_Value
9782 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9783 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9785 2011-08-02 Vincent Celier <celier@adacore.com>
9787 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9788 inherit library kind.
9790 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9792 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9795 2011-08-02 Robert Dewar <dewar@adacore.com>
9797 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9799 2011-08-02 Yannick Moy <moy@adacore.com>
9801 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9803 2011-08-02 Robert Dewar <dewar@adacore.com>
9805 * impunit.adb: Add comment.
9807 2011-08-02 Yannick Moy <moy@adacore.com>
9809 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9810 qualification of aggregates in formal mode
9811 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9813 (Resolve_Aggregate): complete the test that an aggregate is adequately
9814 qualified in formal mode
9816 2011-08-02 Pascal Obry <obry@adacore.com>
9818 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9819 * mlib-prj.adb: Supress warning when compiling binder generated file.
9820 (Build_Library): Supress all warnings when compiling the binder
9823 2011-08-02 Yannick Moy <moy@adacore.com>
9825 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9827 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9828 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9829 Add with/use clauses to make Check_Formal_Restriction visible
9831 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9833 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9834 in-parameters when type of the generic formal is private in the generic
9835 spec and non-private in the body.
9837 2011-08-02 Claire Dross <dross@adacore.com>
9839 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9840 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9841 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9842 * impunit.adb, Makefile.rtl: Take new files into account.
9844 2011-08-02 Robert Dewar <dewar@adacore.com>
9846 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9847 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9849 2011-08-02 Yannick Moy <moy@adacore.com>
9851 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9853 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9854 matching static array bounds, taking into account the special case of
9856 * sem_ch3.adb: Typo in comment.
9858 2011-08-02 Yannick Moy <moy@adacore.com>
9860 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9861 which issues an error in formal mode if its argument node is originally
9863 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9864 has a discriminant specification so that it does not include the case
9866 (Derived_Type_Declaration): move here the test that a derived type has a
9867 discriminant specification
9868 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9869 first element of a component association before accessing its choices
9870 (presence of component association is not enough)
9871 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9872 declaration is a library item before accessing the next element in a
9873 list, as library items are not member of lists
9874 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9875 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9876 Check_Formal_Restriction whenever possible.
9878 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9880 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9881 reference when needed.
9883 2011-08-02 Bob Duff <duff@adacore.com>
9885 * gnat_ugn.texi: Fix typo.
9887 2011-08-02 Vincent Celier <celier@adacore.com>
9889 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9890 archive file name. Do not use the full path name of archives for Open
9893 2011-08-02 Robert Dewar <dewar@adacore.com>
9895 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9896 Analyze_Aspect_Specifications
9898 (Analyze_Aspect_Specifications): New handling for boolean aspects
9899 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9900 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9901 sequence for Analyze_Aspect_Specifications
9902 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9903 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9905 2011-08-02 Robert Dewar <dewar@adacore.com>
9907 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9908 aspects, since these no longer exist.
9910 2011-08-02 Robert Dewar <dewar@adacore.com>
9912 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9913 semicolon, do not try to see if there are aspects following it.
9914 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9917 2011-08-02 Robert Dewar <dewar@adacore.com>
9919 * sem_ch8.adb, aspects.ads: Minor reformatting.
9921 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9923 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9924 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9926 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9928 2011-08-02 Yannick Moy <moy@adacore.com>
9930 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9931 mode on subprogram declaration outside of package specification, unless
9932 it is followed by a pragma Import
9933 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9934 Access_Type_Declaration): issue error in formal mode on access type
9935 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9937 (Analyze_Object_Declaration): issue error in formal mode on object
9938 declaration which does not respect SPARK restrictions
9939 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9940 declaration which does not respect SPARK restrictions
9941 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9942 error in formal mode on digits or delta constraint
9943 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9944 decimal fixed point type
9945 (Derived_Type_Declaration): issue error in formal mode on derived type
9946 other than type extensions of tagged record types
9947 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9948 with check on access definition
9949 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9950 mode on protected definition.
9951 (Analyze_Task_Definition): issue error in formal mode on task definition
9953 2011-08-02 Robert Dewar <dewar@adacore.com>
9955 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9957 2011-08-02 Javier Miranda <miranda@adacore.com>
9959 * sem_ch6.adb (Can_Override_Operator): New function.
9960 (Verify_Overriding_Indicator): Add missing code to check overriding
9961 indicator in operators. Fixes regression.
9962 (Check_Overriding_Indicator): Minor reformating after replacing the
9963 code that evaluates if the subprogram can override an operator by
9964 invocations to the above new function.
9966 (Write_Field26_Name): Add missing code to ensure that, following
9967 the documentation in einfo.ads, this field is not shown as attribute
9968 "Static_Initialization" on non-dispatching functions.
9970 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9972 * sem_res.adb (Resolve_Call): A call to
9973 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9974 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9975 i.e., when the second parameter is of type Time_Span.
9977 2011-08-02 Vincent Celier <celier@adacore.com>
9979 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9980 with an archive instead of -L<library dir> -l<library name>.
9982 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9984 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9985 mark the base types In_Use in addition to making the operations
9988 2011-08-02 Ed Falis <falis@adacore.com>
9990 * init.c: add and setup __gnat_signal_mask for the exception signals
9991 * s-inmaop-vxworks.adb: new file.
9992 * s-intman-vxworks.adb: remove unnecessary initializations and
9994 * s-intman-vxworks.ads: remove unnecessary variable
9995 * s-taprop-vxworks.adb: simplify signal initialization
9997 2011-08-02 Robert Dewar <dewar@adacore.com>
9999 * sem_ch8.adb: Minor code reorganization, comment updates.
10001 2011-08-02 Robert Dewar <dewar@adacore.com>
10003 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10004 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10006 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10007 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10011 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10012 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10013 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10014 use_type_clauses, to handle more efficiently use_type and use_all_type
10016 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10017 Ada2012 Use_All_Type clause.
10018 (Use_Class_Wide_Operations): new procedure.
10020 2011-08-02 Robert Dewar <dewar@adacore.com>
10022 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10023 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10024 expression to expression function.
10026 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10028 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10029 if types are compatible.
10031 2011-08-02 Yannick Moy <moy@adacore.com>
10033 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10034 returns True if its argument array types have same dimension and same
10035 static bounds at each index.
10036 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10037 OUT or IN OUT paramaters which are not view conversions in SPARK.
10038 (Resolve_Arithmetic_Op): issue an error in formal mode on
10039 multiplication or division with operands of fixed point types which are
10040 not qualified or explicitly converted.
10041 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10042 Boolean or array type (except String) operands.
10043 (Resolve_Equality_Op): issue an error in formal mode on equality
10044 operators for array types other than String with non-matching static
10046 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10047 for array types with non-matching static bounds. Factorize the code in
10048 Matching_Static_Array_Bounds.
10049 (Resolve_Qualified_Expression): issue an error in formal mode on
10050 qualified expressions for array types with non-matching static bounds.
10051 (Resolve_Type_Conversion): issue an error in formal mode on type
10052 conversion for array types with non-matching static bounds
10054 2011-08-02 Robert Dewar <dewar@adacore.com>
10056 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10058 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10060 * par-ch9.adb: save location of entry for proper error message.
10062 2011-08-02 Javier Miranda <miranda@adacore.com>
10064 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10065 (Use_Full_View) which permits this routine to climb through the
10066 ancestors using the full-view of private parents.
10067 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10068 Use_Full_View to true in calls to Is_Ancestor.
10069 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10070 true in call to Is_Ancestor.
10071 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10072 Use_Full_View to true in call to Is_Ancestor.
10073 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10074 call to Is_Ancestor.
10075 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10076 Use_Full_View to true in calls to Is_Ancestor.
10077 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10078 Make_Select_Specific_Data_Table, Register_Primitive,
10079 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10080 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10081 to true in call to Is_Ancestor.
10082 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10083 Use_Full_View to true in calls to Is_Ancestor.
10085 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10086 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10088 2011-08-02 Robert Dewar <dewar@adacore.com>
10090 * gnat_rm.texi: Minor reformatting.
10091 * sem_prag.adb: Minor reformatting.
10093 2011-08-02 Tristan Gingold <gingold@adacore.com>
10095 * vms_data.ads: Add VMS qualifier for -gnateP.
10097 2011-08-02 Robert Dewar <dewar@adacore.com>
10099 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10100 * par-ch7.adb (P_Package): Proper placement of aspects for package
10101 decl/instantiation.
10102 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10103 (End_Statements): Add Is_Sloc parameterr
10104 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10105 (Check_End): Ad Is_Sloc parameter
10106 (End_Statements): Add Is_Sloc parameterr
10108 2011-08-02 Vincent Celier <celier@adacore.com>
10110 * ug_words: Add VMS qualifier equivalent to -gnateP:
10111 /SYMBOL_PREPROCESSING.
10113 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10115 * gnat-style.texi: For hexadecimal numeric literals the typical
10116 grouping of digits is 4 to represent 2 bytes.
10117 A procedure spec which is split into several lines is indented two
10120 2011-08-02 Yannick Moy <moy@adacore.com>
10122 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10123 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10124 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10126 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10127 choice in array aggregate
10128 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10130 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10131 positional and named aggregate for record, or others in record
10132 aggregate, or multiple choice in record aggregate
10133 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10134 array operands to logical operations AND, OR and XOR do not have the
10135 same static lower and higher bounds
10136 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10138 2011-08-01 Robert Dewar <dewar@adacore.com>
10140 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10141 Replaces Last_Source_Node_In_Sequence.
10142 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10143 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10144 parens and blank in string (this was inconsistently implemented).
10146 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10147 blank in string (this was inconsistently implemented).
10149 (Set_Global_Switches): Set formal mode switches appropriately
10150 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10152 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10153 call Set_Error_Msg_Lang to set "spark" as language name.
10154 * par.adb: Remove unnecessary call to set formal language for errout
10155 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10156 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10158 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10159 calls to it, moved after resolution so that types are known
10160 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10161 result of concatenation is not of type String
10162 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10163 concatenation is not properly restricted
10164 * gnat_rm.texi: Add doc on pragma Spark_95.
10165 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10166 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10167 * gcc-interface/Make-lang.in: Update dependencies.
10169 2011-08-01 Javier Miranda <miranda@adacore.com>
10171 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10172 condition that detects if the overridden operation must replace an
10175 2011-08-01 Javier Miranda <miranda@adacore.com>
10177 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10178 code declarations inserted by Insert_Actions in each alternative of the
10179 N_Case_Expression node.
10181 2011-08-01 Robert Dewar <dewar@adacore.com>
10183 * sem_ch6.adb: Minor code reorganization.
10184 * sem_util.adb: Minor reformatting.
10186 2011-08-01 Pascal Obry <obry@adacore.com>
10188 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10189 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10191 2011-08-01 Yannick Moy <moy@adacore.com>
10193 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10194 literal or operator symbol which is prefixed
10195 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10196 mode on access attributes.
10197 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10198 that concatenation operands are properly restricted in formal mode
10199 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10200 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10201 result of the concatenation has a type different from String.
10202 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10203 Analyze_Quantified_Expression, Analyze_Slice,
10204 Analyze_Null): issue an error in formal mode on unsupported constructs
10206 (Analyze_Block_Statement): only issue error on source block statement
10207 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10208 function which returns the last node in a list of nodes for which
10209 Comes_From_Source returns True, if any
10210 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10211 Last_Source_Node_In_Sequence
10212 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10213 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10214 mode on unsupported constructs
10215 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10216 rest of the actions may be needed later on since the error is marked as
10218 * sinfo.ads: Typos in comments.
10220 2011-08-01 Pascal Obry <obry@adacore.com>
10222 * projects.texi: Minor editing.
10224 2011-08-01 Yannick Moy <moy@adacore.com>
10226 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10227 insertion character ~~
10228 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10229 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10230 with insertion character ~~
10231 (Set_Msg_Text): treat insertion character ~~
10232 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10233 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10234 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10235 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10236 errors related to the formal language restriction not serious
10237 (insertion character |).
10238 * par.adb (Par): set formal language for error messages if needed
10239 * sem_ch6.adb (Check_Missing_Return): take into account possible
10240 generated statements at the end of the function
10241 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10242 enumeration value to define a new pragma SPARK_95
10243 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10244 SPARK_Version): new type and variables to store the SPARK version
10246 (SPARK_Mode): return True when SPARK_Version is set
10247 * par-prag.adb: Correct indentation
10248 (Prag): take Pragma_SPARK_95 into account
10249 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10252 2011-08-01 Robert Dewar <dewar@adacore.com>
10254 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10255 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10256 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10258 2011-08-01 Pascal Obry <obry@adacore.com>
10260 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10261 Target_Name to Get_Path call.
10262 (Parse_Single_Project): Likewise.
10263 (Post_Parse_Context_Clause): Likewise.
10264 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10265 Call Initialise_Project_Path with the proper Target_Name.
10266 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10268 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10269 with the proper Target_Name.
10270 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10271 Part.Parse routine.
10272 (Parse_Project_And_Apply_Config): Likewise.
10273 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10274 This is fine as this part of the code is supporting only native
10276 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10277 is fine as this part of the code is supporting only native compilation.
10279 2011-08-01 Yannick Moy <moy@adacore.com>
10281 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10282 of homonym, unless the homonym is one of the cases allowed in SPARK
10283 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10284 package declaration occurring after a body.
10286 2011-08-01 Robert Dewar <dewar@adacore.com>
10288 * checks.adb, exp_ch4.adb: Minor reformatting.
10290 2011-08-01 Javier Miranda <miranda@adacore.com>
10292 * einfo.ads (Access_Disp_Table): Fix documentation.
10293 (Dispatch_Table_Wrappers): Fix documentation.
10295 2011-08-01 Pascal Obry <obry@adacore.com>
10297 * prj-env.adb, prj-env.ads: Minor reformatting.
10299 2011-08-01 Yannick Moy <moy@adacore.com>
10301 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10302 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10303 procedures out of these packages.
10304 * errout.ads, errout.adb
10305 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10306 procedures in of this package
10307 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10308 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10309 on misplaced later vs initial declarations, like in Ada 83
10310 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10311 formal mode on attribute of private type whose full type declaration
10313 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10314 package declaration inside a package specification
10315 (Analyze_Full_Type_Declaration): issue error in formal mode on
10316 controlled type or discriminant type
10317 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10318 user-defined operator means that it should come from the source
10319 (New_Overloaded_Entity): issue error in formal mode on overloaded
10321 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10323 2011-08-01 Thomas Quinot <quinot@adacore.com>
10325 * atree.adb: Minor reformatting.
10326 * checks.adb: Minor reformatting.
10328 2011-08-01 Vincent Celier <celier@adacore.com>
10330 * s-parame-vms-ia64.ads: Fix typo in comment
10332 * s-parame-vms-restrict.ads: Removed, unused.
10334 2011-08-01 Javier Miranda <miranda@adacore.com>
10337 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10339 (Constrain_Index): Remove side effects in the evaluation of the bounds.
10340 * sem_ch3.ads, sem_ch3.adb
10341 (Is_Constant_Bound): New extended version of the subprogram that was
10342 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10343 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10344 * sem_aux.ads (Constant_Value): Fix typo in comment.
10345 * checks.adb (Generate_Index_Checks): New implementation which, for
10346 array objects with constant bounds, generates the runtime check
10347 referencing the bounds of the array type. For other cases this routine
10348 provides its previous behavior obtaining such values from the array
10350 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10352 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10353 we cannot have semantic interpretations of the new node.
10355 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10357 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10360 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10362 * sem_ch8.adb: Minor code editing.
10363 * s-vxwext.adb: Remove trailing space.
10364 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10365 consistency with other files.
10367 2011-08-01 Thomas Quinot <quinot@adacore.com>
10369 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10371 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10373 * par-ch10.adb: reject parameterized expressions as compilation unit.
10374 * sem_ch4.adb: handle properly conditional expression with overloaded
10375 then_clause and no else_clause.
10377 2011-08-01 Tristan Gingold <gingold@adacore.com>
10379 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10380 like done by System.Aux_DEC.
10381 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10383 2011-08-01 Yannick Moy <moy@adacore.com>
10385 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10386 missing label at end of declaration (subprogram or package)
10387 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10388 of positional and named parameter association
10389 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10390 Error_Msg_SP which adds a prefix to the error message giving the name
10391 of the formal language analyzed
10392 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10393 access result type in subprogram, unconstrained array as result type,.
10394 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10396 * sem_ch8.adb: Code clean up.
10398 2011-08-01 Javier Miranda <miranda@adacore.com>
10400 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10401 * einfo.ads (Access_Disp_Table): Fix documentation.
10402 (Dispatch_Table_Wrappers): Fix documentation.
10403 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10404 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10405 to enforce the documentation of this attribute.
10406 (Set_Is_Interface): Cleanup the assertion.
10407 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10408 the Underlying_Type entity before reading attribute Access_Disp_Table.
10409 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10410 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10411 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10412 the Underlying_Type entity before reading attribute Access_Disp_Table.
10413 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10414 Locate the Underlying_Type entity before reading attribute
10417 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10419 * s-poosiz.ads: Additional overriding indicators.
10421 2011-08-01 Yannick Moy <moy@adacore.com>
10423 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10425 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10426 parameter specification does not include a subtype mark.
10427 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10428 formal mode on abstract subprogram.
10429 (Analyze_Subprogram_Specification): issue error in formal mode on
10430 user-defined operator.
10431 (Process_Formals): issue error in formal mode on access parameter and
10432 default expression.
10433 * sem_ch9.adb (Analyze_Abort_Statement,
10434 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10435 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10436 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10437 Analyze_Requeue, Analyze_Selective_Accept,
10438 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10439 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10440 issue error in formal mode on user-defined raise statement.
10442 2011-08-01 Thomas Quinot <quinot@adacore.com>
10444 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10445 declaration being hidden when overriding an implicit inherited
10447 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10448 (-gnats), do not complain about a source file that contains only a
10451 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10453 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10454 variable if already set.
10456 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10458 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10459 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10460 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10461 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10462 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10463 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10464 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10465 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10466 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10467 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10468 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10469 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10470 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10471 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10472 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10473 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10474 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10475 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10476 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10477 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10478 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10479 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10480 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10481 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10482 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10483 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10484 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10485 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10486 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10487 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10488 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10489 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10490 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10491 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10492 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10493 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10494 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10495 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10496 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10497 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10498 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10499 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10500 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10501 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10502 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10503 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10504 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10505 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10506 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10507 Use GNAT instead of GNARL.
10509 2011-08-01 Bob Duff <duff@adacore.com>
10511 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10512 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10513 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10516 2011-08-01 Yannick Moy <moy@adacore.com>
10518 * debug.adb (d.D) reverve flag for the SPARK mode
10519 (d.E) reverve flag for SPARK generation mode
10520 (d.F) reverve flag for Why generation mode
10521 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10522 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10523 functions which return True when the corresponding modes are set
10524 (Formal_Language): return "spark" or "alfa" when in formal verification
10526 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10527 Error_Msg to prefix the error message with a tag giving the formal
10529 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10530 message with a tag giving the formal language
10531 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10533 (Analyze_Case_Statement): issue error in formal mode on case statement
10534 with a single "others" case alternative
10535 (Analyze_Exit_Statement): issue errors in formal mode on exit
10536 statements which do not respect SPARK restrictions
10537 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10538 (Check_Unreachable_Code): always issue an error (not a warning) in
10539 formal mode on unreachable code (concerns both code after an infinite
10540 loop and after an unconditional jump, both not allowed in SPARK)
10541 * sem_ch6.adb (Analyze_Return_Statement): add call to
10542 Set_Return_Present for a procedure containing a return statement
10543 (already done for functions in Analyze_Function_Return)
10544 (Analyze_Function_Return): issue error in formal mode on extended
10545 return or if return is not last statement in function
10546 (Check_Missing_Return): issue error in formal mode if function does
10547 not end with return or if procedure contains a return
10548 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10549 function to detect if there is an inner scope of its parameter S which
10552 2011-08-01 Thomas Quinot <quinot@adacore.com>
10554 * sem_ch6.ads: Minor reformatting.
10556 2011-08-01 Javier Miranda <miranda@adacore.com>
10558 * sem_util.adb (Abstract_Interface_List): Complete condition when
10559 processing private type declarations to avoid reading unavailable
10561 (Is_Synchronized_Tagged_Type): Complete condition when processing
10562 private extension declaration nodes to avoid reading unavailable
10565 2011-08-01 Thomas Quinot <quinot@adacore.com>
10567 * sem_ch3.adb: Minor reformatting.
10569 2011-08-01 Thomas Quinot <quinot@adacore.com>
10571 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10572 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10573 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10574 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10575 for VMS, instead parametrize the common implementation with
10576 System.Parameters declarations.
10578 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10580 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10582 2011-08-01 Tristan Gingold <gingold@adacore.com>
10584 * seh_init.c: Fix SEH handler installation on win64.
10586 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10588 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10589 double analysis of an anonymous access to subprogram, because it can
10590 lead to improper sharing of profiles and a back-end crash.
10592 2011-08-01 Robert Dewar <dewar@adacore.com>
10594 * make.adb, sem_ch4.adb: Minor reformatting.
10595 * gcc-interface/Make-lang.in: Update dependencies.
10596 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10598 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10600 * gnat_rm.texi: Fix definition of Long_Integer.
10602 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10604 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10605 to prevent storage exhaustion.
10606 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10607 finalized is a function body, insert the cleanup code before the final
10608 return statement, to prevent spurious warnings.
10609 * s-pooglo.ads: add overriding indicator.
10611 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10613 * sem_ch4.adb (Operator_Check): improve error message when both a
10614 with_clause and a use_clause are needed to make operator usage legal.
10615 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10616 determine whether a compilation unit is visible within an other,
10617 either through a with_clause in the current unit, or a with_clause in
10618 its library unit or one one of its parents.
10620 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10622 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10623 over an arbitrary expression of an array or container type.
10624 * lib-xref.adb: clarify comment.
10626 2011-08-01 Bob Duff <duff@adacore.com>
10628 * einfo.ads: Minor reformatting.
10629 * debug.adb: Minor comment improvement.
10631 2011-08-01 Javier Miranda <miranda@adacore.com>
10633 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10634 consider hidden subprograms as valid candidates.
10636 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10638 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10640 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10642 * gnat_ugn.texi: Fix typo.
10644 2011-08-01 Robert Dewar <dewar@adacore.com>
10646 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10647 lib-xref.adb: Minor reformatting
10649 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10651 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10652 when to generate a call to Move_Final_List.
10653 (Has_Controlled_Parts): Remove this function.
10655 2011-08-01 Geert Bosch <bosch@adacore.com>
10657 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10658 "," in choice list.
10660 2011-08-01 Thomas Quinot <quinot@adacore.com>
10662 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10663 explicit raise of a predefined exception as Comes_From_Source if the
10664 original N_Raise_Statement comes from source.
10666 2011-08-01 Robert Dewar <dewar@adacore.com>
10668 * sinfo.ads: Add comment.
10669 * sem_ch6.adb: Minor reformatting.
10671 2011-08-01 Robert Dewar <dewar@adacore.com>
10673 * freeze.adb (Freeze_Entity): Refine check for bad component size
10674 clause to avoid rejecting confirming clause when atomic/aliased present.
10676 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10678 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10679 better determine whether an entity reference is a write.
10680 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10682 * lib-xref.adb (Output_References): Do no suppress a read reference at
10683 the same location as an immediately preceeding modify-reference, to
10684 handle properly in-out actuals.
10686 2011-08-01 Tristan Gingold <gingold@adacore.com>
10688 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10690 2011-08-01 Quentin Ochem <ochem@adacore.com>
10692 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10693 heap to compute the result.
10695 2011-08-01 Robert Dewar <dewar@adacore.com>
10697 * atree.ads: Minor reformatting.
10699 2011-08-01 Emmanuel Briot <briot@adacore.com>
10701 * g-expect.adb (Get_Command_Output): Fix memory leak.
10703 2011-08-01 Geert Bosch <bosch@adacore.com>
10705 * cstand.adb (P_Float_Type): New procedure to print the definition of
10706 predefined fpt types.
10707 (P_Mixed_Name): New procedure to print a name using mixed case
10708 (Print_Standard): Use P_Float_Type for printing floating point types
10709 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10710 precision IEEE float.
10712 2011-08-01 Thomas Quinot <quinot@adacore.com>
10714 * sem_ch3.adb: Minor reformatting.
10716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10718 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10719 the completion of a generic function, insert the new body rather than
10720 rewriting the original.
10722 2011-08-01 Yannick Moy <moy@adacore.com>
10724 * sinfo.ads, errout.ads: Typos in comments.
10726 2011-08-01 Robert Dewar <dewar@adacore.com>
10728 * par-endh.adb: Minor reformatting.
10730 2011-08-01 Robert Dewar <dewar@adacore.com>
10732 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10733 (Pre_Post_Aspects): New subtype.
10734 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10735 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10736 * par-ch7.adb (P_Package): Remove Decl parameter
10737 (P_Package): Handle new syntax for aspects (before IS)
10738 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10740 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10741 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10742 (P_Package): Remove Decl parameter
10743 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10745 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10747 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10748 * sinfo.ads: Document new syntax for aspects in packages etc.
10749 * sprint.adb: Handle new syntax of aspects before IS in package
10751 2011-08-01 Thomas Quinot <quinot@adacore.com>
10753 * atree.ads: Minor reformatting.
10754 * sem_prag.adb: Minor reformatting.
10756 2011-08-01 Robert Dewar <dewar@adacore.com>
10758 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10759 case expr alternative.
10761 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10763 * sem_ch12.adb: Fix typo.
10765 2011-08-01 Geert Bosch <bosch@adacore.com>
10767 * sem_prag.adb (Check_No_Link_Name): New procedure.
10768 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10769 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10770 instead of Standard_Long_Long_Float_Size global. Preparation for
10771 eventual removal of per type constants.
10772 * exp_util.ads (Get_Stream_Size): New function returning the stream
10773 size value of subtype E.
10774 * exp_util.adb (Get_Stream_Size): Implement new function.
10775 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10777 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10779 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10781 2011-08-01 Geert Bosch <bosch@adacore.com>
10783 * cstand.adb: Fix comments.
10784 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10785 count of arguments.
10787 2011-08-01 Robert Dewar <dewar@adacore.com>
10789 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10791 2011-08-01 Geert Bosch <bosch@adacore.com>
10793 * atree.ads: Fix comment.
10795 2011-08-01 Robert Dewar <dewar@adacore.com>
10797 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10798 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10799 * par.adb: Add with for Namet.Sp.
10800 * par-tchk.adb: Minor reformatting.
10802 2011-08-01 Vincent Celier <celier@adacore.com>
10804 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10805 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10806 of the init procedure of a SAL.
10807 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10810 2011-08-01 Thomas Quinot <quinot@adacore.com>
10812 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10815 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10817 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10819 2011-08-01 Thomas Quinot <quinot@adacore.com>
10821 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10822 conformant with its spec (return True only for types that have
10823 an overriding Initialize primitive operation that prevents them from
10824 having preelaborable initialization).
10825 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10826 initialization for controlled types in Ada 2005 or later mode.
10828 2011-08-01 Robert Dewar <dewar@adacore.com>
10830 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10832 (Same_Aspect): New function.
10833 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10834 Type_Invariant, Precondition, Postcondition.
10835 * snames.ads-tmpl: Add Name_Type_Invariant.
10837 2011-08-01 Robert Dewar <dewar@adacore.com>
10839 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10841 (Freeze_All_Ent): Fix error in handling inherited aspects.
10842 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10843 already analyzed, but don't skip entire processing of a declaration,
10844 that's wrong in some cases of declarations being rewritten.
10845 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10846 Don't delay for integer, string literals
10847 Treat predicates in usual manner for delay, remove special case code,
10849 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10850 (Build_Predicate_Function): Update saved expression in aspect
10851 (Build_Invariant_Procedure): Update saved expression in aspect
10852 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10853 of replacement of discriminant references if the reference is simple.
10855 2011-08-01 Robert Dewar <dewar@adacore.com>
10857 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10858 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10859 Static_Predicate and Dynamic_Predicate.
10860 (Build_Predicate_Function): Add processing for Static_Predicate
10861 and Dynamic_Predicate.
10862 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10863 (From_Static_Predicate): New flag
10864 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10866 2011-08-01 Robert Dewar <dewar@adacore.com>
10868 * usage.adb: Documentation cleanup for Ada version modes in usage.
10869 * expander.adb: Minor reformatting.
10871 2011-08-01 Robert Dewar <dewar@adacore.com>
10873 * atree.ads: Minor comment fix.
10874 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10875 a-witeio.ads, sem_prag.adb: Minor reformatting.
10877 2011-08-01 Doug Rupp <rupp@adacore.com>
10879 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10880 pointers. Use descrip.h header file for convenience. Add some
10883 2011-08-01 Robert Dewar <dewar@adacore.com>
10885 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10886 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10887 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10889 (Check_Aspect_At_End_Of_Declarations): New procedure
10890 (Analye_Aspect_Specification): Minor changes for above procedures
10891 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10892 specification node as well.
10894 2011-08-01 Pascal Obry <obry@adacore.com>
10896 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10897 Windows files. Use GetFilesAttributes() in this case to check for file
10898 existence instead of returning with an error code.
10900 2011-08-01 Vincent Celier <celier@adacore.com>
10902 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10903 High is above Source length.
10905 2011-08-01 Robert Dewar <dewar@adacore.com>
10907 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10909 2011-08-01 Robert Dewar <dewar@adacore.com>
10911 * aspects.ads (Boolean_Aspects): New subtype.
10912 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10913 for derived types in cases where the parent type and derived type have
10915 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10916 with aspects when parent type also has aspects.
10917 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10918 boolean expression at this point).
10919 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10920 accordance with final decision on the Ada 2012 feature.
10921 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10923 2011-08-01 Matthew Heaney <heaney@adacore.com>
10925 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10927 2011-08-01 Pascal Obry <obry@adacore.com>
10929 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10930 Fix Replace_Slice when High is above current string size.
10931 (Replace_Slice): Fix DL computation when High is above current
10934 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10936 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10938 2011-08-01 Matthew Heaney <heaney@adacore.com>
10940 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10943 2011-08-01 Pascal Obry <obry@adacore.com>
10945 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10948 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10950 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10951 access to protected subprograms in generic bodies.
10952 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10953 protected type, indicate that the convention of the subprogram is
10954 Convention_Protected, because it may be used in subsequent declarations
10955 within the protected declaration.
10957 2011-08-01 Vincent Celier <celier@adacore.com>
10959 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10960 and "final" procedures when the name of the library is "ada", to avoid
10961 duplicate symbols "adainit" and "adafinal" in executables.
10963 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10965 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10966 quantified expression that appears within a postcondition and uses the
10967 Ada2012 'Result attribute.
10969 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10971 * init.c (__gnat_error_handler): Cast reason to int.
10972 (__gnat_install_handler): Explain sa_sigaction use.
10974 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10976 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10977 subprogram has copy-in copy-out parameters, try to promote the mode of
10978 the return type if it is passed in registers.
10980 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10982 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10983 left operand as addressable.
10985 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10987 * gcc-interface/gigi.h (build_function_stub): Remove.
10988 (build_return_expr): Likewise.
10989 (convert_vms_descriptor): Declare.
10990 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10991 (build_function_stub): Move to...
10992 * gcc-interface/utils2.c (build_return_expr): Move to...
10993 * gcc-interface/trans.c (build_function_stub): ...here.
10994 (build_return_expr): ...here.
10995 (Subprogram_Body_to_gnu): Add local variable for language_function.
10996 Disconnect the parameter attributes cache, if any, once done with it.
10997 Call end_subprog_body only after setting the end_locus.
10998 Build the stub associated with the function, if any, at the very end.
10999 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11000 variables and streamline control flow.
11002 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11005 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11006 g-trasym-dwarf.adb.
11008 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11011 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11012 Assign to act.sa_sigaction.
11013 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11014 current->return_address to char * before arithmetic.
11016 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11018 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11019 Correct argument types.
11020 Extract code from reason.
11021 (__gnat_install_handler): Assign to act.sa_sigaction.
11023 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11025 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11026 (GNAT1_OBJS): ...here.
11028 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11031 * g-socthi-mingw.adb (Fill): Fix formatting.
11033 * gcc-interface/gigi.h: Move around comment.
11035 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11038 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11040 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11043 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11045 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11047 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11048 range comparison if Pmode is SImode.
11050 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11051 Eric Botcazou <ebotcazou@adacore.com>
11053 * adadecode.c: Wrap up in extern "C" block.
11054 * adadecode.h: Likewise.
11055 * adaint.c: Likewise. Remove 'const' keyword.
11056 * adaint.h: Likewise.
11057 * argv.c: Likewise.
11058 * atree.h: Likewise.
11060 * cstreams.c: Likewise.
11062 * exit.c: Likewise.
11064 * final.c: Likewise.
11065 * init.c: Likewise.
11066 * initialize.c: Likewise.
11067 * link.c: Likewise.
11068 * namet.h: Likewise.
11069 * nlists.h: Likewise.
11070 * raise.c: Likewise.
11071 * raise.h: Likewise.
11072 * repinfo.h: Likewise.
11073 * seh_init.c: Likewise.
11074 * targext.c: Likewise.
11075 * tracebak.c: Likewise.
11076 * uintp.h: Likewise.
11077 * urealp.h: Likewise.
11078 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11079 * xsinfo.adb: Likewise.
11080 * xsnamest.adb: Likewise.
11081 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11082 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11083 * gcc-interface/misc.c: Likewise.
11084 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11085 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11086 ada/targext.o here...
11087 (GNAT_ADA_OBJS): ...and not here.
11088 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11089 (GNATBIND_OBJS): Reorder.
11091 2011-07-07 Richard Henderson <rth@redhat.com>
11093 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11094 dwarf2out_frame_init.
11096 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11098 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11100 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11103 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11105 2011-07-06 Richard Guenther <rguenther@suse.de>
11107 * gcc-interface/misc.c (gnat_init): Merge calls to
11108 build_common_tree_nodes and build_common_tree_nodes_2.
11109 Re-initialize boolean_false_node.
11111 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11112 Olivier Hainque <hainque@adacore.com>
11113 Nicolas Setton <setton@adacore.com>
11115 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11116 the type according to the ARTIFICIAL_P parameter.
11117 (create_type_decl): Likewise.
11118 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11120 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11122 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11123 (gnatbind): Likewise.
11125 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11127 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11129 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11131 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11132 local variable throughout. Remove useless call to Base_Type.
11133 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11134 Take it also into account for the volatileness of the field. Set the
11135 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11137 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11139 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11140 on a dereference built for a by-ref object if it has an address clause.
11142 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11144 * einfo.ads (Address_Taken): Document use for the second argument of
11145 Asm_Input and Asm_Output attributes.
11146 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11147 argument is an entity name, then set Address_Taken on it.
11148 <Attribute_Asm_Output>: Likewise.
11149 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11150 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11151 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11152 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11154 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11156 PR middle-end/46500
11157 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11159 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11161 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11162 (ada/utils.o): Update dependencies.
11163 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11164 ../../../libcpp/libcpp.a.
11165 * gcc-interface/utils.c: Include common/common-target.h.
11166 (process_attributes): Use targetm_common.have_named_sections.
11168 2011-06-07 Richard Guenther <rguenther@suse.de>
11170 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11173 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11175 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11176 TREE_THIS_NOTRAP flag.
11178 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11180 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11183 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11185 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11186 constants whose full view has discriminants specially.
11188 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11190 * gcc-interface/utils.c: Include diagnostic.h.
11191 (gnat_write_global_declarations): Output debug information for all
11192 global type declarations before finalizing the compilation unit.
11193 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11195 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11197 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11199 2011-05-25 Kai Tietz <ktietz@redhat.com>
11201 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11202 initialization instead of const/none-const pointer assignment.
11204 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11206 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11207 $(EXTRA_GNAT1_OBJS).
11208 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11209 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11210 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11211 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11212 libcommon-target.a instead of prefix.o.
11214 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11217 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11219 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11221 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11222 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11223 instead of version.o.
11225 2011-05-18 Kai Tietz <ktietz@redhat.com>
11227 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11228 boolean_false_node instead of integer_zero_node.
11229 (convert_with_check): Likewise.
11230 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11232 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11234 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11235 type of the parameter is an unconstrained array, convert the actual to
11236 the type of the formal in the In Out and Out cases as well.
11238 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11240 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11241 call build_function_type_array or build_varargs_function_type_array
11243 (create_subprog_type): Don't call build_function_type; call
11244 build_function_type_vec instead.
11246 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11248 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11249 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11250 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11252 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11254 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11256 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11257 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11259 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11261 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11263 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11265 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11266 instead of accessing TYPE_ARG_TYPES directly.
11267 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11269 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11272 * gcc-interface/gigi.h (get_variant_part): Declare.
11273 * gcc-interface/decl.c (get_variant_part): Make global.
11274 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11275 types have the same constant size, are record types and T1 has a
11276 variant part while T2 doesn't.
11278 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11280 * gcc-interface/utils.c (begin_subprog_body): Do not call
11282 (end_subprog_body): Likewise.
11284 2011-05-04 Richard Guenther <rguenther@suse.de>
11286 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11288 (pos_to_constructor): Likewise.
11290 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
11291 Eric Botcazou <ebotcazou@adacore.com>
11293 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11294 of build_function_type. Adjust calls to...
11295 (build_raise_check): ...this. Do not take a void_tree parameter.
11296 Call build_function_type_list instead of build_function_type.
11297 Fix head comment and swap couple of conditional blocks.
11299 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11301 * gnatvsn.ads (Library_Version): Bump to 4.7.
11302 (Current_Year): Bump to 2011.
11304 2011-04-29 Michael Matz <matz@suse.de>
11306 * gcc-interface/misc.c (gnat_handle_option): Set
11307 warn_maybe_uninitialized.
11309 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11311 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11312 the Watson/McCabe paper.
11314 2011-04-23 Jim Meyering <meyering@redhat.com>
11316 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11318 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11320 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11323 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11325 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11327 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
11328 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11329 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11330 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11331 <all>: Do not set flags on the reused DECL node coming from an alias.
11332 Set DECL_IGNORED_P on the DECL node built for subprograms if they
11333 don't need debug info here...
11334 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11335 (gigi): Adjust calls to create_subprog_decl.
11336 (build_raise_check): Likewise.
11337 (establish_gnat_vms_condition_handler): Likewise.
11338 (Compilation_Unit_to_gnu): Likewise.
11339 (gnat_to_gnu): Likewise.
11341 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
11343 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11344 (NO_REORDER_ADAFLAGS): New variable.
11345 (EXTRA_GNATTOOLS): Always define.
11346 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11347 Clean up and adjust list of files compiled with special options.
11348 * gcc-interface/Make-lang.in: Likewise.
11349 (ada/decl.o): Cosmetical change.
11350 (ada/misc.o): Remove dependency on $(PLUGIN_H).
11352 2011-04-20 Jim Meyering <meyering@redhat.com>
11354 * initialize.c (__gnat_initialize): Remove useless if-before-free.
11356 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11358 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11359 $(CFLAGS) on the link line.
11361 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11363 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11364 padded type built for the return type if it is unconstrained.
11366 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
11368 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11370 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11372 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11373 before calling TREE_CHAIN.
11374 * gcc-interface/misc.c (gnat_init_ts): New function.
11375 (LANG_HOOKS_INIT_TS): Define.
11377 2011-04-12 Martin Jambor <mjambor@suse.cz>
11379 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11380 instead of cgraph_node.
11382 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11384 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11385 alignment on fields of the RETURN type built for the Copy-In Copy-Out
11388 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11390 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11391 of aggregate types that contain a placeholder.
11393 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11395 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11397 (handle_type_generic_attribute): Likewise.
11399 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11402 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11404 2011-04-04 Kai Tietz <ktietz@redhat.com>
11407 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11410 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11412 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11413 type case, do not strip a padding type around the array type.
11415 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11417 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11420 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11422 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11423 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11424 code for -feliminate-unused-debug-types.
11425 (gnat_post_options): Likewise.
11427 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11429 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11430 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11433 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11435 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11436 DECL_ARTIFICIAL flag on enumeration types.
11438 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11440 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11441 fat pointer types artificial unconditionally.
11442 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11445 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11447 * gcc-interface/gigi.h (get_dummy_type): Declare.
11448 (build_dummy_unc_pointer_types): Likewise.
11449 (finish_fat_pointer_type): Likewise.
11450 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11451 fat pointer type has been built, complete it in place.
11452 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11453 and thin pointers. Remove useless variable.
11454 (finish_fat_pointer_type): Make global and move to...
11455 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11456 (get_dummy_type): New function.
11457 (build_dummy_unc_pointer_types): Likewise.
11458 (gnat_pushdecl): Propage the name to the anonymous variants only.
11459 (update_pointer_to): Only adjust the pointer types in the unconstrained
11462 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11464 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11465 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11466 if this is a Taft amendment type and the full declaration is available.
11467 * gcc-interface/trans.c (process_type): Likewise.
11468 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11469 (process_freeze_entity): Likewise.
11470 * gcc-interface/utils.c (dummy_global): New static variable.
11471 (gnat_write_global_declarations): If there are types declared as used
11472 at the global level, insert them in the global hash table.
11474 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11476 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11477 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11478 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11480 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11481 flag of the type accordingly.
11482 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11484 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11486 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11487 finalizing types when updating the pointers to the designated type.
11488 <all>: Finalize the deferred types even if we didn't defer processing
11489 of incomplete types in this invocation.
11491 2011-04-01 Olivier Hainque <hainque@adacore.com>
11492 Nicolas Setton <setton@adacore.com>
11493 Eric Botcazou <ebotcazou@adacore.com>
11495 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11496 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11498 2011-03-28 Kai Tietz <ktietz@redhat.com>
11500 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11502 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11503 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11505 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11507 2011-03-28 Tristan Gingold <gingold@adacore.com>
11510 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11511 Use ada output of gnatbind.
11512 (ada/b_gnatb.adb): Ditto.
11513 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11514 (ada.mostlyclean, ada.stage1)
11515 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11516 (ada.stagefeedback): Adjust.
11517 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11518 Use ada output of gnatbind.
11519 (b_gnatm.adb): Ditto.
11520 (b_gnatl.o, b_gnatm.o): New rules.
11522 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11524 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11525 for the padded type built to support a specified size or alignment.
11527 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11529 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11530 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11531 unconditionally to the end of the unit when the designated type is
11533 <all>: Rename local variable. Attempt to un-defer types only and do it
11534 for limited_with'ed types as well.
11535 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11536 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11537 consistently and remove redundant call to finalize_from_with_types.
11539 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11541 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11542 subprograms without a previous spec declared in the same unit.
11543 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11544 subprograms at the end of the unit instead of at the beginning.
11545 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11546 isn't public for the special handling of non-inline functions nested
11547 inside inline external functions.
11549 2011-03-25 Jeff Law <law@redhat.com>
11551 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11553 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11555 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11556 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11557 to compute Set_Size_Depends_On_Discriminant.
11558 (Layout_Type): Call it on array types in back-end layout mode.
11559 * sem_util.adb (Requires_Transient_Scope): Return true for array
11560 types only if the size depends on the value of discriminants.
11561 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11562 type if the RHS is a call to a function that returns an unconstrained
11563 type with default discriminant.
11565 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11567 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11568 non-conversion to the nominal result type at the end.
11570 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11572 * gcc-interface/trans.c (create_temporary): New function taken from...
11573 (create_init_temporary): ...here. Call it.
11574 (call_to_gnu): Create the temporary for the return value early, if any.
11575 Create it for a function with copy-in/copy-out parameters if there is
11576 no target; in other cases of copy-in/copy-out, use another temporary.
11577 Push the new binding level lazily. Add and rename local variables.
11579 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11581 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11583 (set_rm_size): Likewise.
11585 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11587 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11588 for the padded type built in order to support a specified alignment.
11589 Fix incorrect formatting.
11591 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11594 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11596 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11598 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11599 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11600 to the end of the list. Adjust recursive call. Rename local variable.
11601 If REORDER is true, reorder components of the record type.
11602 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11603 components_to_record and adjust the parameter list.
11605 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11607 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11608 disabled, use the variable for bounds of loop iteration scheme.
11610 2011-03-21 Kai Tietz <ktietz@redhat.com>
11613 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11615 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11617 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11618 out whether the expression is read-only. Short-circuit placeholder
11619 case and rename a couple of local variables.
11621 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11623 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11624 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11625 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11626 (convert): Deal with conversions from a smaller form type specially.
11628 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11630 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11631 its argument, except for the special -I- switch.
11633 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11635 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11638 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11640 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11642 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11644 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11646 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11647 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11648 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11649 Do not generate the check directly, instead instantiate the template
11650 check present in the descriptor.
11651 (make_descriptor_field): Move around.
11652 (build_vms_descriptor32): Build a template check in the POINTER field.
11653 (build_vms_descriptor): Remove useless suffixes.
11654 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11656 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11659 * targext.c: Include target files if IN_RTS is defined.
11661 2011-01-26 Richard Guenther <rguenther@suse.de>
11664 * targext.c: Include config.h.
11665 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11668 2011-01-04 Pascal Obry <obry@adacore.com>
11669 Eric Botcazou <ebotcazou@adacore.com>
11671 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11673 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11675 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11676 end-of-case on the end label and its associated gotos, if any.
11678 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11680 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11681 expressions of the parameter cache within the statement group of
11682 the CICO mechanism.
11684 2011-01-04 Olivier Hainque <hainque@adacore.com>
11685 Eric Botcazou <ebotcazou@adacore.com>
11687 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11688 (set_end_locus_from_node): New function.
11689 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11690 make and the function end_locus.
11691 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11692 for the elaboration subprogram.
11693 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11694 set the end_locus of the expression as well.
11696 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11699 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11700 variables that are referenced in exception handlers volatile.
11704 Copyright (C) 2011 Free Software Foundation, Inc.
11706 Copying and distribution of this file, with or without modification,
11707 are permitted in any medium without royalty provided the copyright
11708 notice and this notice are preserved.