1 2011-08-29 Yannick Moy <moy@adacore.com>
3 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
6 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
9 2011-08-29 Arnaud Charlet <charlet@adacore.com>
11 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
14 2011-08-29 Thomas Quinot <quinot@adacore.com>
16 * sem_res.adb: Minor reformatting.
18 2011-08-29 Johannes Kanig <kanig@adacore.com>
20 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
22 * gnat1drv.adb (Adjust_Global_Switches): Set
23 Use_Expressions_With_Actions to False in ALFA mode.
24 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
27 2011-08-29 Yannick Moy <moy@adacore.com>
29 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
30 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
31 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
32 tagged types and dispatching calls in Alfa mode.
34 2011-08-29 Javier Miranda <miranda@adacore.com>
36 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
37 we do not report an error on an Empty node.
39 2011-08-29 Geert Bosch <bosch@adacore.com>
41 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
42 a-nlrear.o and a-nurear.o.
44 2011-08-29 Robert Dewar <dewar@adacore.com>
46 * freeze.adb: Minor code reorganization.
48 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
49 sem_ch6.adb: Minor reformatting
51 2011-08-29 Tristan Gingold <gingold@adacore.com>
53 * s-except.ads, s-except.adb: Provide dummy body.
55 2011-08-29 Yannick Moy <moy@adacore.com>
57 * sem_warn.adb (Within_Postcondition): Take into account the case of
58 an Ensures component in a Test_Case.
60 2011-08-29 Tristan Gingold <gingold@adacore.com>
62 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
63 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
64 System_Exceptions_Debug
65 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
66 * a-except.adb: With and use System.Exceptions_Debug instead of
68 * a-except-2005.adb: Likewise.
69 * s-assert.adb: Likewise.
70 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
71 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
72 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
73 s-excdeb. Update dependencies.
74 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
75 as these no longer need external libraries.
77 2011-08-29 Ed Schonberg <schonberg@adacore.com>
79 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
80 exponentiation operator on universal values in a context that requires
83 2011-08-29 Tristan Gingold <gingold@adacore.com>
85 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
86 before calling notify_handled_exception.
87 * a-exextr.adb: Fix comment.
89 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
91 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
92 Finalize_Address of the access type's finalization master.
93 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
94 access type's finalization master. Add a guard to prevent
95 Associated_Storage_Pool from being set on .NET/JVM.
96 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
97 attribute Finalize_Address of the access type's finalization master.
98 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
99 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
100 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
102 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
103 use clause for System.IO
104 (Detach): Relax the assertion, to be reinstated later.
105 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
106 Relax the assertion on Finalize_Address, to be reinstated later.
107 (Is_Empty_List): New routine.
108 (pm): New debug routine.
109 (Set_Finalize_Address): New routine.
110 * s-finmas.ads (pm): New debug routine.
111 (Set_Finalize_Address): New routine.
112 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
114 2011-08-29 Tristan Gingold <gingold@adacore.com>
116 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
119 2011-08-29 Tristan Gingold <gingold@adacore.com>
121 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
122 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
123 (Finalize_TCB): Remove its finalization.
124 (Initialize): Remove assignment of GET_Exc_Stack_Addr
125 * s-soflin.adb (NT_Exc_Stack): Remove
126 (Get_Exc_Stack_Addr_NT): Likewise.
127 (Get_Exc_Stack_Addr_Soft): Likewise.
128 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
129 (Get_Exc_Stack_Addr): Likewise.
130 (Get_Exc_Stack_Addr_Soft): Likewise
131 * s-taspri-vms.ads (Exc_Stack_T): Remove.
132 (Exc_Stack_Ptr_T): Likewise.
133 (Private_Data): Remove Exc_Stack_Ptr component.
135 2011-08-29 Tristan Gingold <gingold@adacore.com>
137 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
139 2011-08-29 Tristan Gingold <gingold@adacore.com>
141 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
143 2011-08-29 Geert Bosch <bosch@adacore.com>
145 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
146 L2_Norm, Swap_Column): New generic subprograms
147 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
148 L2_Norm, Swap_Column): Implement new subprograms in order to
149 eliminate dependency on BLAS and LAPACK libraries in
150 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
151 version. Forward_Eliminate/Back_Substitute can be used to put a
152 matrix in row echelon or reduced row echelon form using partial
154 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
155 Swap_Column): Instantiate from System.Generic_Array_Operations.
156 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
157 (Sqrt): Local function for simple computation of square root without
158 adding dependencies on Generic_Elementary_Functions.
159 (Swap): New subprogram to exchange floating point numbers.
160 (Inverse): Reimplement using Jordan-Gauss elimination.
161 (Jacobi): New procedure implementing Jacobi's method for computation
162 of eigensystems, based on Rutishauser's implementation.
163 (L2_Norm): Implement directly using the inner product.
164 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
165 decreasing eigenvalue as required by the Ada RM.
166 (Swap_Column): New helper procedure for Sort_Eigensystem.
167 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
168 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
171 2011-08-29 Thomas Quinot <quinot@adacore.com>
173 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
176 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
178 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
179 than the current node.
180 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
181 Finalization_Master. The list headers have two fields instead of three.
182 This should fix alignment issue but subpool allocations are now
183 unusable. Alphabetize subprograms.
184 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
185 the size of the header when converting the beginning of the object to
186 a FM_Node. Set the master's Finalize_Address attribute if not already
188 (Deallocate_Any_Controlled): Use the offset rather than the size of the
189 header when converting the beginning of the object to a FM_Node.
191 2011-08-29 Gary Dismukes <dismukes@adacore.com>
193 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
194 reraise when compiling for CodePeer.
196 2011-08-29 Arnaud Charlet <charlet@adacore.com>
198 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
199 now needed by a-convec.adb. Fix warning.
201 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
203 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
204 processing of TSS routine Finalize_Address when compiling in
207 2011-08-29 Thomas Quinot <quinot@adacore.com>
209 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
210 sem_warn.adb: Minor reformatting.
212 2011-08-29 Emmanuel Briot <briot@adacore.com>
214 * prj-conf.adb (Get_Config_Switches): Also collect the list of
215 languages from aggregated projects.
217 2011-08-29 Yannick Moy <moy@adacore.com>
219 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
220 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
221 Traverse_Package_Declaration, Traverse_Subprogram_Body,
222 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
223 for stubs are traversed too when parameter is set
224 (Traverse_All_Compilation_Units): Traverse without going inside stubs
225 (Traverse_Declarations_Or_Statements): Do the special traversing for
227 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
228 return subprogram or package body from stub.
229 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
230 stubs without prior subprogram decl.
232 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
234 * gnat_ugn.texi: Fix typo.
236 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
238 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
239 which accounts for size vs alignment issues and calculates the size of
241 (Deallocate_Any_Controlled): Ditto.
242 (Nearest_Multiple_Rounded_Up): New routine.
244 2011-08-29 Tristan Gingold <gingold@adacore.com>
246 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
247 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
248 (Set_Exception_Msg): Ditto.
249 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
251 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
252 Use Save_Occurrence instead of Save_Occurrence_No_Private.
253 (Raise_With_Msg): Remove Cleanup_Flag.
254 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
255 Clean_Flag and Private_Data components.
257 2011-08-29 Yannick Moy <moy@adacore.com>
259 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
261 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
262 of an explicitly declared type, so that the base types of the original
263 type and this generated type are the same, and a "type" (not a subtype
265 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
266 small" in Alfa mode, like in CodePeer mode.
267 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
268 clauses in Alfa mode.
270 2011-08-29 Javier Miranda <miranda@adacore.com>
272 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
273 function to the package spec.
274 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
275 internally generated bodies of null procedures locate the internally
276 generated spec enforcing mode conformance.
277 (Is_Interface_Conformant): Ensure that the controlling formal of the
280 2011-08-29 Ed Schonberg <schonberg@adacore.com>
282 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
283 reject the pragma if it appears to apply to a formal subprogram.
285 2011-08-29 Ed Schonberg <schonberg@adacore.com>
287 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
288 inner expression, to prevent double evaluation.
290 2011-08-29 Tristan Gingold <gingold@adacore.com>
292 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
294 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
295 * a-except-2005.adb (Propagate_Exception): Adjust spec.
296 (Raise_Current_Excep): Adjust call.
297 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
299 2011-08-29 Thomas Quinot <quinot@adacore.com>
301 * exp_disp.adb: Minor reformatting.
303 2011-08-29 Tristan Gingold <gingold@adacore.com>
305 * a-exexpr.adb (Setup_Exception): Removed.
306 * a-exexpr-gcc.adb (Setup_Exception): Removed.
307 * a-except.adb (Exception_Propagation): Removed.
308 * a-except-2005.adb (Setup_Exception): Removed.
309 (Reraise): Remove call to Setup_Exception.
310 (Reraise_Occurrence): Ditto.
311 (Reraise_Occurrence_Always): Ditto.
312 (Reraise_Occurrence_No_Defer): Ditto.
313 (Transfer_Occurrence): Ditto.
314 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
315 (Set_Exception_Msg): Ditto.
317 2011-08-29 Robert Dewar <dewar@adacore.com>
319 * a-convec.adb, exp_disp.adb: Minor reformatting.
321 2011-08-29 Tristan Gingold <gingold@adacore.com>
323 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
325 2011-08-29 Gary Dismukes <dismukes@adacore.com>
327 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
328 Exception_Handlers to No_List instead of Empty_List in the case where
329 there are no handlers.
331 2011-08-29 Tristan Gingold <gingold@adacore.com>
333 * gcc-interface/gigi.h (enum standard_datatypes): Add
335 (reraise_zcx_decl): New macro.
336 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
337 (gigi): Set reraise_zcx_decl.
338 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
339 (gnat_to_gnu): Handle N_Raise_Statement.
341 2011-08-29 Robert Dewar <dewar@adacore.com>
343 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
344 a-undesu.adb: Minor reformatting.
346 2011-08-29 Ed Schonberg <schonberg@adacore.com>
348 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
349 table, accept an unfrozen untagged component if it is an actual for a
350 formal incomplete type.
351 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
352 provide new iterator forms over vectors.
353 Introduce type Iterator in package body to implement operations of
354 Reversible_Iterator interface.
355 * a-iteint.ads: Make package pure so it is usable with new container
356 packages, that are categorized Remote_Types.
358 2011-08-29 Robert Dewar <dewar@adacore.com>
360 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
362 2011-08-29 Bob Duff <duff@adacore.com>
364 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
365 of <>, because this is the routine that checks for dimensionality
366 errors (for example, for a two-dimensional array, (others => <>) should
367 be (others => (others => <>)).
369 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
371 * impunit.adb: Add new run-time units.
372 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
373 s-stposu.ads, s-stposu.adb: Code clean up.
374 Handle protected class-wide or task class-wide types
375 Handle C/C++/CIL/Java types.
376 * s-spsufi.adb, s-spsufi.ads: New files.
378 2011-08-29 Yannick Moy <moy@adacore.com>
380 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
381 library-level subprogram.
382 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
384 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
386 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
388 * gnat_rm.texi: Update doc for Test_Case pragma.
390 2011-08-29 Tristan Gingold <gingold@adacore.com>
392 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
394 (GCC_Exception_Access): New type.
395 (Unwind_DeleteException): New imported procedure
396 (Foreign_Exception): Import it.
397 (GNAT_GCC_Exception): Simply have the occurrence inside.
398 (To_GCC_Exception): New function.
399 (To_GNAT_GCC_Exception): New function.
400 (GNAT_GCC_Exception_Cleanup): New procedure..
401 (Propagate_GCC_Exception): New procedure.
402 (Reraise_GCC_Exception): New procedure.
403 (Setup_Current_Excep): New procedure.
404 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
405 (Unwind_RaiseException): Ditto.
406 (Unwind_ForcedUnwind): Ditto.
408 (Begin_Handler): Change type of parameter.
409 (End_Handler): Ditto. Now delete the exception if still present.
410 (Setup_Key): Removed.
411 (Is_Setup_And_Not_Propagated): Removed.
412 (Set_Setup_And_Not_Propagated): Ditto.
413 (Clear_Setup_And_Not_Propagated): Ditto.
414 (Save_Occurrence_And_Private): Ditto.
415 (EID_For): Add 'not null' constraint on parameter.
416 (Setup_Exception): Does nothing.
417 (Propagate_Exception): Simplified.
418 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
419 re-raise is not expanded anymore.
420 * s-except.ads (Foreign_Exception): New exception - placeholder for
422 * raise-gcc.c (__gnat_setup_current_excep): Declare
423 (CXX_EXCEPTION_CLASS): Define (not yet used)
424 (GNAT_EXCEPTION_CLASS): Define.
425 (is_handled_by): Handle foreign exceptions.
426 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
428 2011-08-29 Jose Ruiz <ruiz@adacore.com>
430 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
432 2011-08-29 Thomas Quinot <quinot@adacore.com>
434 * a-synbar-posix.adb: Minor reformatting.
436 2011-08-29 Jose Ruiz <ruiz@adacore.com>
438 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
439 a-exetim-default.ads (Interrupt_Clocks_Supported,
440 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
441 definitions to be compliant with AI-0171. The target systems do not
442 support separate account for the execution time of interrupt handlers.
444 2011-08-29 Jose Ruiz <ruiz@adacore.com>
446 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
447 in the barrier to put first the easiest to evaluate (and the one which
448 will be True more often). More efficient.
450 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
452 * s-atocou-x86.adb: Fix constraint in machine code insertion.
454 2011-08-29 Bob Duff <duff@adacore.com>
456 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
457 attributes that are now aspects, as specified by AI05-0229-1.
458 * sem_ch13.adb (Analyze_Aspect_Specifications,
459 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
460 pragmas or attribute references, as appropriate.
462 2011-08-29 Robert Dewar <dewar@adacore.com>
464 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
465 a-synbar-posix.ads: Minor reformatting.
467 2011-08-29 Yannick Moy <moy@adacore.com>
469 * snames.ads-tmpl: Add name Force.
471 2011-08-29 Pascal Obry <obry@adacore.com>
473 * prj-nmsc.adb: Minor reformatting.
475 2011-08-29 Jose Ruiz <ruiz@adacore.com>
477 * a-exetim.ads (Interrupt_Clocks_Supported,
478 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
479 definitions to be compliant with AI-0171.
481 2011-08-29 Robert Dewar <dewar@adacore.com>
483 * a-ngelfu.adb: Add comments.
485 2011-08-29 Geert Bosch <bosch@adacore.com>
487 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
488 the closest machine number to Pi / 2.0.
490 2011-08-29 Jose Ruiz <ruiz@adacore.com>
492 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
493 package Ada.Synchronous_Barriers.
494 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
495 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
496 default implementation using protected objects and another one
497 a-synbar-posix using POSIX barriers as the underlying support.
498 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
499 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
500 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
501 Clean up dependencies.
502 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
504 2011-08-29 Robert Dewar <dewar@adacore.com>
506 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
507 exp_dist.adb: Minor code reorganization.
510 2011-08-29 Thomas Quinot <quinot@adacore.com>
512 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
513 primitive operation must support external streaming if it is not a
514 controlling access result.
516 2011-08-29 Thomas Quinot <quinot@adacore.com>
518 * sinfo.ads, sem_ch7.adb: Minor reformatting.
520 2011-08-29 Bob Duff <duff@adacore.com>
522 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
523 restriction on allocators, as required by AI05-0013-1.
524 * restrict.ads: Minor comment fix.
526 2011-08-29 Tristan Gingold <gingold@adacore.com>
528 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
529 (To_Jmpbuf_Address): Ditto
530 (builtin_longjmp): Ditto
532 2011-08-29 Thomas Quinot <quinot@adacore.com>
534 * sem_res.adb: Minor reformatting.
536 2011-08-29 Vincent Celier <celier@adacore.com>
538 * make.adb (Gnatmake): Move special processing for VM targets after the
539 call to Get_Target_Parameters.
541 2011-08-29 Thomas Quinot <quinot@adacore.com>
543 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
545 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
547 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
548 where an anonymous access discriminant of a limited designated type
549 appears in a non-immutably limited discriminated type and issue an
550 error message. Add local variable Desig_T and replace all occurrences
553 2011-08-29 Jose Ruiz <ruiz@adacore.com>
555 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
556 implementation is compliant to RM D.15(15/2) after the modification
557 imposed by AI05-0094-1 (binding interpretation).
559 2011-08-29 Robert Dewar <dewar@adacore.com>
561 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
562 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
564 2011-08-29 Thomas Quinot <quinot@adacore.com>
566 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
567 the scope name, do not report a missing label as a style violation (it
568 will be diagnosed as an illegality).
569 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
570 variant records: Get_Enum_Lit_From_Pos already returns a usage
571 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
572 on Expr in Integer_Literal case so that it can be used by
575 2011-08-29 Tristan Gingold <gingold@adacore.com>
577 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
579 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
580 (Build_Abort_Block_Handler): New function to build an Abort_Signal
582 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
583 Build_Abort_Block_Handler to build the exception handler. Do not
584 undefer aborts for the Abort_Signal exception handler if back-end
586 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
587 back_end exceptions for all others and abort_signal.
588 * s-except.ads (ZCX_By_Default): New constant.
589 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
590 (Raise_Exception_Always): Ditto.
591 (Raise_From_Signal_Handler): Ditto.
592 (Raise_With_Location_And_Msg): Ditto.
593 (Raise_With_Msg): Ditto.
595 (Reraise_Occurence): Ditto.
596 (Reraise_Occurrence_Always): Ditto.
597 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
598 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
600 2011-08-29 Thomas Quinot <quinot@adacore.com>
602 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
604 2011-08-29 Robert Dewar <dewar@adacore.com>
606 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
607 Minor code reorganization.
609 2011-08-29 Bob Duff <duff@adacore.com>
611 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
612 2012, not just Ada 2005.
614 2011-08-29 Vincent Celier <celier@adacore.com>
616 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
617 with a project file or with gprbuid, if -gnatep= is specified, the
618 builder may need to be invoked with -x.
620 2011-08-29 Tristan Gingold <gingold@adacore.com>
622 * a-exexpr-gcc.adb: Minor comment fix.
624 2011-08-29 Robert Dewar <dewar@adacore.com>
626 * sem_ch8.adb: Minor reformatting.
628 2011-08-29 Bob Duff <duff@adacore.com>
630 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
631 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
632 treating "some" as unreserved in earlier Ada versions. This is now
633 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
634 rather than Name_Some, since Tok_Some is now recognized as reserved.
635 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
637 * scans.ads: Minor comment fixes.
638 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
639 for other language versions.
640 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
641 treating "some" as unreserved in earlier Ada versions. This is now
642 handled in Snames.Is_Keyword_Name.
643 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
645 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
646 unreserved in earlier Ada versions. This is now handled in
647 Snames.Is_Keyword_Name.
648 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
649 words as for other language versions.
650 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
651 Ada 2012, not just Ada 2005.
653 2011-08-29 Ed Schonberg <schonberg@adacore.com>
655 * sem_ch13.adb: Additional semantic checks for aspects involved in
658 2011-08-29 Matthew Heaney <heaney@adacore.com>
660 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
661 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
663 (Ancestor_Find): ditto.
665 2011-08-29 Thomas Quinot <quinot@adacore.com>
667 * par-endh.adb: Minor reformatting.
669 2011-08-29 Tristan Gingold <gingold@adacore.com>
671 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
672 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
673 (Adjust_N_CLeanups_For): Remove.
674 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
676 (Propgate_Exception): Adjust.
677 * raise-gcc.c: Add a few static/const.
678 (Adjust_N_Cleanups_For): Remove declaration.
679 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
681 2011-08-29 Ed Schonberg <schonberg@adacore.com>
683 * sem_ch8.adb: Use type of function return when rewriting as object
686 2011-08-29 Gary Dismukes <dismukes@adacore.com>
688 * sem_type.adb: Minor reformatting.
690 2011-08-29 Robert Dewar <dewar@adacore.com>
692 * makeutl.adb: Minor reformatting.
694 2011-08-29 Ed Schonberg <schonberg@adacore.com>
696 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
697 function call of a limited type, the expansion of the renaming is
698 complicated by the presence of various temporaries and subtypes that
699 capture constraints of the renamed object.
700 Rewrite node as an object declaration, whose expansion is simpler.
701 Given that the object is limited there is no copy involved and no
704 2011-08-29 Robert Dewar <dewar@adacore.com>
706 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
707 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
709 2011-08-29 Tristan Gingold <gingold@adacore.com>
711 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
712 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
713 system-linux-hppa.ads, system-linux-s390.ads,
714 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
715 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
716 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
717 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
718 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
719 system-solaris-sparc.ads, system-lynxos-x86.ads,
720 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
721 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
722 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
723 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
724 system-vxworks-x86.ads: Remove GCC_ZCX_Support
725 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
726 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
727 * opt.ads: Adjust comment.
728 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
729 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
730 * system.ads: Move GCC_ZCX_Support to obsolete entries.
732 2011-08-29 Emmanuel Briot <briot@adacore.com>
734 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
735 file name is specified on the gnatmake or gprbuild command line, and
736 before we search for that file in the project.
738 2011-08-29 Ed Schonberg <schonberg@adacore.com>
740 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
741 used to determine whether a possible interpretation for an overloadable
742 entity is declared within the current instantiation and should be
743 included in the candidate set.
745 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
747 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
749 2011-08-29 Ed Schonberg <schonberg@adacore.com>
751 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
752 access subtype is access_to_subprogram, when applying checks for
755 2011-08-29 Matthew Heaney <heaney@adacore.com>
757 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
758 for sibling when common parent.
760 2011-08-29 Thomas Quinot <quinot@adacore.com>
762 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
765 2011-08-29 Ed Schonberg <schonberg@adacore.com>
767 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
768 for the return type when in ASIS mode.
770 2011-08-29 Vincent Celier <celier@adacore.com>
772 * make.adb (Gnatmake): Get the default search dirs, then the target
773 parameters after getting the Builder switches, as the Builder switches
774 may include --RTS= and that could change the default search dirs.
776 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
778 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
779 Make_Final_Call. Move the processing for class-wide types before the
780 processing for derivations from [Limited_]Controlled.
781 (Make_Final_Call): Move the processing for class-wide types before the
782 processing for derivations from [Limited_]Controlled.
783 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
784 Add code to account for alignments larger than the list header. Add a
785 comment illustrating the structure of the allocated object + padding +
787 (Deallocate_Any_Controlled): Add code to account for alignments larger
788 than the list header.
790 2011-08-29 Ed Schonberg <schonberg@adacore.com>
792 * sinfo.ads, sinfo.adb: New node kind
793 N_Formal_Incomplete_Type_Definition, related flags.
794 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
795 Parse formal incomplete types.
796 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
798 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
799 Formal incomplete types do not need completion.
800 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
801 Validate_Incomplete_Type_Instance): New procedures to handle formal
803 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
804 that corresponds to a formal incomplete type.
805 * sprint.adb: Handle formal incomplete type declarations.
806 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
809 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
811 * a-fihema.ads, a-fihema.adb: Unit removed.
812 * a-undesu.ads, a-undesu.adb: New unit implementing
813 Ada.Unchecked_Deallocate_Subpool.
814 * einfo.adb: Remove Associated_Collection from the node usage.
815 Add Finalization_Master to the node usage.
816 (Associated_Collection): Removed.
817 (Finalization_Master): New routine.
818 (Set_Associated_Collection): Removed.
819 (Set_Finalization_Master): New routine.
820 (Write_Field23_Name): Remove Associated_Collection from the output. Add
821 Finalization_Master to the output.
822 * einfo.ads: Remove attribute Associated_Collection and its uses in
824 Add new attribute Finalization_Master along with its uses in entitites.
825 (Associated_Collection): Removed along with its pragma import.
826 (Finalization_Master): New routine along with a pragma import.
827 (Set_Associated_Collection): Removed along with its pragma import.
828 (Set_Finalization_Master): New routine along with a pragma import.
829 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
830 Build_Finalization_Collection with Build_Finalization_Master.
831 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
832 before the bodies of the predefined routines. Add comment explaining
833 this. Replace call to Build_Finalization_Collection with
834 Build_Finalization_Master.
835 (Freeze_Type): Replace call to Build_Finalization_Collection with
836 Build_Finalization_Master.
837 (Make_Finalize_Address_Body): Comment reformatting.
838 (Make_Predefined_Primitive_Specs): Code reformatting.
839 (Stream_Operation_OK): Update comment mentioning finalization
840 collections. Replace RE_Finalization_Collection with
841 RE_Finalization_Master.
842 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
843 Associated_Collection with Finalization_Master. Replace call to
844 Build_Finalization_Collection with Build_Finalization_Master.
845 (Expand_Allocator_Expression): Replace call to Associated_Collection
846 with Finalization_Master. Replace call to Set_Associated_Collection with
847 Set_Finalization_Master. Remove the generation of
848 Set_Finalize_Address_Ptr.
849 (Expand_N_Allocator): Replace call to Associated_Collection with
850 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
851 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
852 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
853 comment on usage. Replace call to Needs_BIP_Collection with
854 Needs_BIP_Finalization_Master Remplace BIP_Collection with
855 BIP_Finalization_Master. Update all comments which mention finalization
856 collections. Replace Associated_Collection with
857 Finalization_Master. Replace Build_Finalization_Collection with
858 Build_Finalization_Master.
859 (BIP_Formal_Suffix): Update BIP_Collection's case.
860 (Build_Heap_Allocator): Update the related comment. Rename local
861 variable Collect to Fin_Mas_Id and update its occurrences. Update
862 comments which mention finalization collections. Replace
863 Set_Associated_Collection with Set_Finalization_Master.
864 (Expand_Call): Update the code which detects a special piece of library
866 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
867 Add_Collection_Actual_To_Build_In_Place_Call with
868 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
869 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
870 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
871 Add_Collection_Actual_To_Build_In_Place_Call with
872 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
873 (Make_Build_In_Place_Call_In_Assignment): Replace call to
874 Add_Collection_Actual_To_Build_In_Place_Call with
875 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
876 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
877 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
878 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
879 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
880 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
881 Replace call to Set_Associated_Collection with Set_Finalization_Master.
882 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
883 Replace the call to Associated_Collection with Finalization_Master.
884 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
885 Update the way finalization master names are generated. Update the
886 retrieval of the correct access type which will carry the pool and
888 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
889 (Make_Finalize_Address_Body): Abstract types do not need
890 Finalize_Address. Code reformatting.
891 (Make_Finalize_Address_Stmts): Update comment on usage.
892 (Make_Set_Finalize_Address_Ptr_Call): Removed.
893 (Process_Declarations): Update comments.
894 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
895 Build_Finalization_Master. Update associated comment.
896 (Make_Set_Finalize_Address_Ptr_Call): Removed.
897 * exp_ch13.adb: Update comments which mention finalization collections.
898 (Expand_N_Free_Statement): Replace the call to Associated_Collection
899 with Finalization_Master.
900 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
901 create calls to routines Allocate_Any_Controlled and
902 Deallocate_Any_Controlled.
903 (Find_Finalize_Address): New routine.
904 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
906 (Requires_Cleanup_Actions): Update the comment on freeze node
908 * exp_util.ads: Remove comment on generated code for
909 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
910 is better to simply look in the body.
911 * freeze.adb (Freeze_All): Update the comment of finalization
912 collections. Replace the call to Associated_Collection with
913 Finalization_Master. Replace the call to Build_Finalization_Collection
914 with Build_Finalization_Master.
915 * impunit.adb: Add a-undesu and s-stposu to the list of units.
916 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
918 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
919 Ada.Finalization. Add processing for children of System.Storage_Pools.
920 * rtsfind.ads: Remove the naming of second level children of
922 Remove Ada_Finalization_Heap_Management from the list of units.
923 Remove subtype Ada_Finalization_Child.
924 Remove the following subprogram entities:
928 RE_Finalization_Collection
929 RE_Finalization_Collection_Ptr
930 RE_Set_Finalize_Address_Ptr
932 Add the naming of second level children of System.Storage_Pools.
933 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
935 Add subtype System_Storage_Pools_Child.
936 Add the following subprogram entities to System.Finalization_Masters:
938 RE_Finalization_Master
939 RE_Finalization_Master_Ptr
941 Add the following subprogram entities to System.Storage_Pools.Subpools:
943 RE_Allocate_Any_Controlled
944 RE_Deallocate_Any_Controlled
945 RE_Root_Storage_Pool_With_Subpools
949 Move the following subprogram entities from
950 Ada.Finalization.Heap_Management to System.Finalization_Masters:
952 RE_Add_Offset_To_Address
957 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
958 Set_Associated_Collection with Set_Finalization_Master.
959 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
960 BIP_Finalization_Master is created.
961 * s-finmas.adb: New unit System.Finalization_Masters.
962 * s-finmas.ads: New unit System.Finalization_Masters.
963 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
964 * s-stposu.ads, s-stposu.adb: New unit implementing
965 System.Storage_Pools.Subpools.
967 2011-08-29 Bob Duff <duff@adacore.com>
969 * tbuild.adb: Add assertion.
971 2011-08-29 Thomas Quinot <quinot@adacore.com>
973 * s-pooglo.adb: Minor reformatting.
975 2011-08-29 Ed Schonberg <schonberg@adacore.com>
977 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
978 an indexed component of a packed array whose element type is a record
979 with a representation clause different from that of the right-hand
980 side, generate a temporary to minimuze the number of bit-field
981 operations generated.
983 2011-08-29 Ed Schonberg <schonberg@adacore.com>
985 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
986 declarations, and thus are likely insertion points for actions.
988 2011-08-29 Bob Duff <duff@adacore.com>
990 * einfo.ads: Minor comment fix.
992 2011-08-29 Robert Dewar <dewar@adacore.com>
994 * frontend.adb, gnat1drv.adb: Minor reformatting.
996 2011-08-29 Tristan Gingold <gingold@adacore.com>
998 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
999 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
1000 space in front of the header.
1002 2011-08-29 Johannes Kanig <kanig@adacore.com>
1004 * frontend.adb (Frontend): Exit after creating Standard package when
1005 -gnatd.H is present.
1006 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1009 2011-08-29 Robert Dewar <dewar@adacore.com>
1011 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1012 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1013 snames.ads-tmpl: Minor reformatting.
1015 2011-08-29 Philippe Gil <gil@adacore.com>
1017 * prj.adb (Reset_Units_In_Table): New procedure.
1018 Reset units to avoid access to freed memory.
1020 2011-08-29 Thomas Quinot <quinot@adacore.com>
1022 * get_scos.adb: When reading a P statement SCO without a pragma name
1023 (from an older ALI file), ensure that the Pragma_Name component is set
1024 to Unknown_Pragma (not left uninitialized).
1026 2011-08-29 Vincent Celier <celier@adacore.com>
1028 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1029 modified to compute correctly the object path of a SAL project that is
1030 extending another library project.
1031 (Write_Path_File): New procedure.
1032 * makeutl.ads (Directories): New table moved from Buildgpr
1033 (Get_Directories): New procedure moved from Buildgpr
1034 (Write_Path_File): New procedure
1035 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1036 paths before binding SALs, instead of Set_Ada_Paths.
1037 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1039 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1040 (Current_Source_Path_File_Of): New function
1041 (Set_Current_Object_Path_File_Of): New procedure
1042 (Current_Source_Object_File_Of): New function
1043 (Set_Current_Object_Path_File_Of): New procedure
1044 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1045 (Current_Source_Path_File_Of): New function
1046 (Set_Current_Object_Path_File_Of): New procedure
1047 (Current_Source_Object_File_Of): New function
1048 (Set_Current_Object_Path_File_Of): New procedure
1050 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1052 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1053 packed entity, use a bit-field assignment only if there is no change of
1056 2011-08-29 Thomas Quinot <quinot@adacore.com>
1058 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1059 Is_RTU instead of using Chars comparisons.
1061 2011-08-29 Thomas Quinot <quinot@adacore.com>
1063 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1064 temporary object if the actual is constrained, and the discriminants
1065 read from the stream don't match.
1067 2011-08-29 Tristan Gingold <gingold@adacore.com>
1069 * sem_attr.adb, exp_attr.adb: Add handling of
1070 Attribute_System_Allocator_Alignment
1071 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1072 Attribute_System_Allocator_Alignment.
1073 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1074 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1075 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1076 get_target_system_allocator_alignment.
1078 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1080 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1083 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1085 * exp_ch3.adb (In_Runtime): Fix typo.
1087 2011-08-29 Bob Duff <duff@adacore.com>
1089 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1091 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1093 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1094 and a separate tag assignment is generated, ensure that the tag
1095 assignment is analyzed.
1097 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1099 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1100 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1101 of statement lists that may contain local declarations.
1102 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1103 duplicate the triggering statements needed for the expansion of this
1104 construct, when the trigger is a dispatching call to a synchronized
1107 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1109 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1110 * bindgen.adb: Add comments.
1111 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1114 2011-08-29 Robert Dewar <dewar@adacore.com>
1116 * exp_attr.adb: Minor reformatting.
1117 Minor code reorganization and commenting.
1118 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1121 2011-08-29 Thomas Quinot <quinot@adacore.com>
1123 * get_scos.adb: Ignore chaining indicators not currently supported
1126 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1128 * system.ads: Minor editing.
1130 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1132 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1134 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1135 Attribute_Elab_Subp_Body.
1136 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1137 * sem_util.adb: Update comments.
1139 2011-08-29 Thomas Quinot <quinot@adacore.com>
1141 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1142 pragma name for each SCO statement corresponding to a pragma.
1144 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1146 * opt.ads: Minor editing.
1148 2011-08-29 Yannick Moy <moy@adacore.com>
1150 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1151 that only made sense for CodePeer mode.
1153 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1155 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1156 which is no longer used.
1157 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1158 handling of the 64-bit division check.
1159 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1161 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1164 2011-08-29 Thomas Quinot <quinot@adacore.com>
1166 * get_scos.adb: Minor reformatting.
1168 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1170 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
1171 statement list is wrapped in a block, the block is explicitly analyzed
1172 in order to properly redecorate the entities and create a servicing
1175 2011-08-29 Tristan Gingold <gingold@adacore.com>
1177 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1178 (Set_Zero_Cost_Handling): Remove.
1180 2011-08-29 Thomas Quinot <quinot@adacore.com>
1182 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1184 2011-08-29 Geert Bosch <bosch@adacore.com>
1186 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1187 instruction, as the latter may produce -0.0, which is not a valid VAX
1189 (Neg_G): Likewise for VAX F float.
1191 2011-08-29 Robert Dewar <dewar@adacore.com>
1193 * exp_util.adb: Minor reformatting.
1195 2011-08-29 Yannick Moy <moy@adacore.com>
1197 * sem_ch3.adb: Minor comment update.
1199 2011-08-29 Thomas Quinot <quinot@adacore.com>
1201 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1204 2011-08-29 Thomas Quinot <quinot@adacore.com>
1206 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1207 current statement sequence on a generic instantiation or a subprogram
1210 2011-08-29 Robert Dewar <dewar@adacore.com>
1212 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1215 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1217 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1218 Correct the check which involves the freeze node of a controlled or
1219 access-to-controlled type.
1221 2011-08-29 Geert Bosch <bosch@adacore.com>
1223 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1225 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1228 2011-08-29 Yannick Moy <moy@adacore.com>
1230 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1231 for every index type and component type that is not a subtype_mark.
1232 (Process_Subtype): Set Etype of subtype.
1234 2011-08-29 Robert Dewar <dewar@adacore.com>
1236 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1237 reorganization. Minor reformatting.
1239 2011-08-29 Steve Baird <baird@adacore.com>
1241 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1242 for CodePeer and ALFA modes.
1244 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1246 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1247 that comes from an enclosing scope if it is not the renaming of an
1248 actual, to handle properly a spurious ambiguity in an instance.
1250 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
1252 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1253 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
1254 use it instead of the Esize of the first parameter.
1255 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1257 <Size>: Likewise. Call it for composite types on the RM size.
1259 2011-08-29 Yannick Moy <moy@adacore.com>
1261 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1262 * sem_util.adb (Unique_Name): Correct behaviour for names of
1265 2011-08-29 Yannick Moy <moy@adacore.com>
1267 * sem_prag.adb (Check_Precondition_Postcondition): In formal
1268 verification mode, analyze pragma expression for correctness, for
1269 pre/post on library-level subprogram, as it is not expanded later.
1271 2011-08-29 Yannick Moy <moy@adacore.com>
1273 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1274 in formal verification.
1276 2011-08-29 Thomas Quinot <quinot@adacore.com>
1278 * sem_util.adb: Minor reformatting.
1279 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1281 * par_sco.ads, par_sco.adb: Update comments.
1283 2011-08-29 Yannick Moy <moy@adacore.com>
1285 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1286 associated getter/setter.
1287 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1289 2011-08-29 Vincent Celier <celier@adacore.com>
1291 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1292 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1293 with declarations for Language_Kind and Dependency_Kind for Ada.
1294 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1295 (Process_Compiler): Take into account the new attributes Dependency_Kind
1297 (Check_Configuration): Check if language kind is unit based, not if the
1298 language name is Ada.
1299 (Process_Exceptions_Unit_Based): Ditto
1300 (Add_Language): Remove default additions of language and dependency kind
1301 * prj.ads: Minor comment change
1302 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1304 2011-08-29 Johannes Kanig <kanig@adacore.com>
1306 * debug.adb: Update comments.
1308 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1310 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1311 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1312 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1313 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1314 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1316 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1318 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1319 (GNATLIBCFLAGS_FOR_C): Replace
1320 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1321 (gnatlib-shared-default, gnatlib-shared-dual-win32)
1322 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1323 (gnatlib-sjlj, gnatlib-zcx): Likewise.
1325 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
1327 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1329 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1331 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1333 2011-08-05 Nicolas Roche <roche@adacore.com>
1335 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1336 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1338 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1340 2011-08-05 Matthew Heaney <heaney@adacore.com>
1342 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1343 subprogram bodies declared out-of-order.
1345 2011-08-05 Yannick Moy <moy@adacore.com>
1347 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1348 entities directly in package Standard, otherwise skip the standard
1351 2011-08-05 Robert Dewar <dewar@adacore.com>
1353 * a-cbmutr.adb: Minor reformatting
1354 (Allocate_Node): refactor node allocation algorithm
1356 2011-08-05 Robert Dewar <dewar@adacore.com>
1358 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1359 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1361 (Analyze_Pragma, case Check_Policy): Ditto.
1362 * sem_prag.ads (Check_Disabled): New function
1363 * snames.ads-tmpl: Add Name_Disable.
1365 2011-08-05 Robert Dewar <dewar@adacore.com>
1367 * gnat_rm.texi: Document implementation-defined policy DISABLE for
1368 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1370 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1372 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1373 that appears in a generic formal part and applies to a formal
1376 2011-08-05 Robert Dewar <dewar@adacore.com>
1378 * a-cbmutr.ads: Minor reformatting.
1380 2011-08-05 Matthew Heaney <heaney@adacore.com>
1382 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1383 to check count, check sign of value instead.
1384 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1385 (Copy_Subtree): allocate copy of source element
1386 (Equal_Subtree): compare elements, not access objects
1388 2011-08-05 Vincent Celier <celier@adacore.com>
1390 * gnat_ugn.texi: Fix VMS alternative.
1392 2011-08-05 Thomas Quinot <quinot@adacore.com>
1394 * sem_ch11.adb: Add comment.
1396 2011-08-05 Robert Dewar <dewar@adacore.com>
1398 * exp_util.adb: Minor comment fix.
1400 2011-08-05 Robert Dewar <dewar@adacore.com>
1402 * scng.adb (Error_Unterminated_String): Improve flag position when
1405 2011-08-05 Matthew Heaney <heaney@adacore.com>
1407 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1409 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1410 multiway tree containers.
1412 2011-08-05 Robert Dewar <dewar@adacore.com>
1414 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1415 * stylesw.adb: Implement -gnatyC to control comment spacing
1416 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1418 * usage.adb: Add line for -gnatyC.
1420 2011-08-05 Robert Dewar <dewar@adacore.com>
1422 * gnat_ugn.texi: Document -gnatyC.
1423 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1424 synonym for COMMENTS2).
1426 2011-08-05 Robert Dewar <dewar@adacore.com>
1428 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1429 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1430 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1431 a-comutr.ads, lib-xref.adb: Minor reformatting.
1433 2011-08-05 Robert Dewar <dewar@adacore.com>
1435 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1436 warning if there is an exception handler present.
1438 2011-08-05 Pascal Obry <obry@adacore.com>
1440 * a-iteint.ads: Fix copyright year.
1442 2011-08-05 Thomas Quinot <quinot@adacore.com>
1444 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1445 statement SCO for a USE clause or a representation clause.
1447 2011-08-05 Yannick Moy <moy@adacore.com>
1449 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1450 between body and spec for stub.
1451 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1452 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1453 pragma precondition or postcondition, for which the enclosing
1454 subprogram or package in the AST is not the desired one, return empty.
1456 2011-08-05 Thomas Quinot <quinot@adacore.com>
1458 * g-expect.adb: Minor reformatting.
1460 2011-08-05 Bob Duff <duff@adacore.com>
1462 * a-fihema.adb: Comment out OS_Lib.
1464 2011-08-05 Matthew Heaney <heaney@adacore.com>
1466 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1467 (unbounded multiway tree containers) and a-iteint.ads.
1468 * a-comutr.ads, a-comutr.adb:
1469 This is the new Ada 2012 unit for unbounded multiway tree containers
1470 * a-cimutr.ads, a-cimutr.adb
1471 This is the new Ada 2012 unit for indefinite multiway tree containers
1472 * a-iteint.ads: New file.
1474 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1476 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1478 2011-08-05 Bob Duff <duff@adacore.com>
1480 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1482 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1484 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1486 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1487 general indexing aspects of Ada2012. Called when analyzing indexed
1488 components when other interpretations fail.
1489 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1490 in an expression context where overloading is meaningful. This excludes
1491 the occurrence in an aspect specification (efficiency only).
1492 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1493 related to iterators can be set by an attribute specification, but
1495 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1496 Constant_Indexing and Variable_Indexing.
1497 (Check_Indexing_Functions): New procedure to perform legality checks.
1498 Additional semantic checks at end of declarations.
1500 2011-08-05 Sergey Rybin <rybin@adacore.com>
1502 * tree_io.ads: Update ASIS_Version_Number because of the change of the
1503 order of calling Tree_Write/Tree_Read routines made for aspects.
1505 2011-08-05 Bob Duff <duff@adacore.com>
1507 * a-fihema.adb (Finalize): Fix race condition.
1509 2011-08-05 Yannick Moy <moy@adacore.com>
1511 * sem_ch12.adb (Analyze_Package_Instantiation,
1512 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1515 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1517 * sem_type.adb (Specific_Type): in an instance, the type-specific
1518 operand of an equality check that involves null may have a private
1519 type. Use full view to determine legality of construct.
1521 2011-08-05 Vincent Celier <celier@adacore.com>
1523 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1524 delete or close the file when the call to gnatmake was successful.
1526 2011-08-05 Yannick Moy <moy@adacore.com>
1528 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1529 Global_Discard_Names.
1531 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1533 * sinfo.ads: comments on use of entity field for aspect specifications.
1535 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1537 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1538 node is not itself an entity but a selected component, it is a
1539 rewritten parameterless call to an en enclosing synchronized operation,
1540 and this expansion will be performed again in the instance, so there is
1541 no global information to preserve.
1543 2011-08-05 Javier Miranda <miranda@adacore.com>
1545 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1546 for renamings of predefined primitives.
1547 (In_Predef_Prims_DT): New subprogram.
1549 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1551 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1552 possible interpretation of name is a reference type, add an
1553 interpretation that is the designated type of the reference
1554 discriminant of that type.
1555 * sem_res.adb (resolve): If the interpretation imposed by context is an
1556 implicit dereference, rewrite the node as the deference of the
1557 reference discriminant.
1558 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1559 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1560 parent type or base type.
1561 * sem_ch4.adb (Process_Indexed_Component,
1562 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1563 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1564 Check for implicit dereference.
1565 (List_Operand_Interps): Indicate when an implicit dereference is
1567 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1569 2011-08-05 Thomas Quinot <quinot@adacore.com>
1571 * scos.ads: Update documentation of SCO table. Pragma statements can now
1572 be marked as disabled (using 'p' instead of 'P' as the statement kind).
1573 * par_sco.ads, par_sco.adb: Implement the above change.
1574 (Process_Decisions_Defer): Generate a P decision for the first parameter
1575 of a dyadic pragma Debug.
1576 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1578 * put_scos.adb: Code simplification based on above change.
1580 2011-08-05 Robert Dewar <dewar@adacore.com>
1582 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1583 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1584 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1585 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1587 2011-08-05 Bob Duff <duff@adacore.com>
1589 * a-stunau.ads, g-spipat.adb: Update comments.
1591 2011-08-05 Bob Duff <duff@adacore.com>
1593 * a-fihema.ads: Minor comment fix.
1594 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1596 (Attach, Detach): Remove some unnecessary code.
1597 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1599 2011-08-05 Bob Duff <duff@adacore.com>
1601 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1602 allocation for Objects component. This simplifies the code somewhat. It
1603 is also a little more efficient in the not-so-unusual case where there
1604 are no controlled objects allocated.
1605 Make Finalization_Started flag atomic.
1606 (Finalize): Avoid unnecessary detachment of items from the list.
1607 (pcol): Minor cleanup.
1609 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1611 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1612 package whose name is the same as that of the generic unit, or its
1615 2011-08-05 Bob Duff <duff@adacore.com>
1617 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1618 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1619 Minor comment fixes.
1621 2011-08-05 Arnaud Charlet <charlet@adacore.com>
1623 * make.adb (Linking_Phase): No longer need to set source search path
1624 before calling gnatlink in CodePeer mode.
1625 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1626 gcc in CodePeer mode, since the binder generated file no longer has a
1628 * switch.ads, switch.adb (Is_Language_Switch): Removed.
1629 * switch-c.adb: Update comment.
1631 2011-08-05 Thomas Quinot <quinot@adacore.com>
1633 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1635 2011-08-05 Nicolas Roche <roche@adacore.com>
1637 * gnat_ugn.texi: Fix minor syntax error issue.
1639 2011-08-05 Vincent Celier <celier@adacore.com>
1641 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1642 delete or close the file when the call to gnatmake returns a non
1643 successful return code.
1645 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1647 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1648 check, indicate that the copy of the original node does not come from
1649 source, to prevent an infinite recursion of the expansion.
1651 2011-08-05 Johannes Kanig <kanig@adacore.com>
1653 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1654 VC generation for subprogram bodies.
1656 2011-08-05 Yannick Moy <moy@adacore.com>
1659 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1660 the base type with the smallest allowed base type.
1662 2011-08-05 Sergey Rybin <rybin@adacore.com>
1664 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1667 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1669 * sem_ch12.ads: minor comment updates.
1671 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1673 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1674 instantiation and a formal package the compiler generates a package
1675 renaming declaration so that the generic name within the declaration
1676 is interpreted as a renaming of the instance. At the end of a formal
1677 package declaration, this renaming must become invisible.
1679 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1681 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1682 comparison and rely on concrete entities instead.
1684 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1686 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1687 and discriminants, to indicate that the type has an access discriminant
1688 that supports implicit dereference.
1689 * snames.ads-tmpl: Add names of aspects and attributes related to
1690 Ada2012 iterators: constant_indexing, default_iterator,
1691 iterator_element, implicit_dereference, variable_indexing.
1692 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1693 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1694 iterator-related aspects.
1695 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1697 2011-08-05 Sergey Rybin <rybin@adacore.com>
1699 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1700 metrics in gnatmetric to cover new kinds of coupling mentrics.
1702 2011-08-05 Steve Baird <baird@adacore.com>
1704 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1705 of calling the user-defined main subprogram.
1706 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1707 is set) Call_Main_Subprogram ahead of, as opposed to
1709 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1710 generation of a "with" of the user-defined main subprogram.
1711 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1712 (which is now called from Gen_Main instead).
1714 2011-08-05 Emmanuel Briot <briot@adacore.com>
1716 * projects.texi: Added reference to the Makefile package.
1718 2011-08-05 Thomas Quinot <quinot@adacore.com>
1720 * exp_ch7.adb: Minor comment rewording.
1722 2011-08-05 Ed Falis <falis@adacore.com>
1724 * env.c: Fix comment.
1726 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1728 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1729 character comparison and rely on concrete entities instead.
1731 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1733 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1734 suggested by AI95-0068.
1736 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1738 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1739 the two potential initialization calls. This accounts for any
1740 access-before-elaboration checks which may precede the initialization
1742 (Next_Suitable_Statement): New routine. Returns the next real statement
1743 after the input node while skipping generated checks.
1744 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1745 with comment on usage.
1746 Do not generate Elaborate_All when the trigger is a finalization call
1747 coming from a type init proc.
1748 (Check_Elab_Call): Propagate the initialization procedure context to
1749 subsequent calls to Check_A_Call.
1750 (Check_Internal_Call_Continue): Propagate the initialization procedure
1751 context to subsequent calls to Check_Elab_Call.
1752 (Is_Finalization_Procedure): New routine. Returns True if the input
1753 entity denotes a [Deep_]Finalize routine.
1754 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1755 along with comment on usage.
1757 2011-08-05 Vadim Godunko <godunko@adacore.com>
1759 * s-atocou.ads: Add list of supported platforms.
1761 2011-08-05 Yannick Moy <moy@adacore.com>
1763 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1765 * opt.ads (Disable_ALI_File): new Boolean flag
1766 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1768 2011-08-05 Ed Falis <falis@adacore.com>
1770 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1771 environ is properly defined.
1773 2011-08-05 Vincent Celier <celier@adacore.com>
1775 * make.adb (Compilation_Phase): Exit immediately when all objects have
1776 been found up to date, to avoid multiple exit messages.
1777 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1778 same project for languages with no compiler.
1779 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1781 2011-08-05 Robert Dewar <dewar@adacore.com>
1783 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1784 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1785 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1786 s-atocou-builtin.adb: Minor reformatting.
1788 2011-08-05 Yannick Moy <moy@adacore.com>
1790 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1791 if the node to wrap is a pragma check, this node and enclosed
1792 expression are not expanded, so do not apply any transformations here.
1793 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1794 introducing transient scopes.
1796 2011-08-05 Jose Ruiz <ruiz@adacore.com>
1798 * adaint.c (__gnat_set_writable, __gnat_set_readable,
1799 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1800 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1801 routine is available, so we use the default implementation of these
1803 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1804 support for copying attributes on VxWorks 6.
1806 2011-08-05 Yannick Moy <moy@adacore.com>
1808 * debug.adb: Remove use of -gnatd.D.
1809 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1810 * opt.ads: Simplify variables for ALFA mode, to keep one only
1811 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1814 2011-08-05 Vincent Celier <celier@adacore.com>
1816 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1817 Builder'Default_Switches.
1819 2011-08-05 Vincent Celier <celier@adacore.com>
1821 * makeusg.adb: Add lines for --create-map-file switches.
1823 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1825 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1826 profile is incomplete and the full view is available, replace it with
1828 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1829 incomplete, freezing the subprogram is delayed until the full view is
1831 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1832 fixed-point multiplication operator and the predefined operator is
1833 resolved in favor of the user-defined one.
1835 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1837 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1840 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1842 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1843 whether a type lacks user-defined Read or Write operations, or has a
1844 component that lacks them.
1845 * sem_attr.adb (Check_Stream_Attribute): if restriction
1846 No_Default_Stream_Attributes is active, verify that all subcomponent
1847 types of the target have user-defined stream operations, and report
1849 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1850 * exp_strm.adb: Build_Elementary_Input_Call,
1851 Build_Elementary_Write_Call): remove checks for restriction
1852 No_Default_Stream_Attributes, now checked in semantics.
1854 2011-08-04 Vincent Celier <celier@adacore.com>
1856 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1857 switches on the command line, look for all valid --RTS switches in the
1858 Builder switches and for each language use the first runtime name found
1859 to invoke gprconfig.
1860 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1861 command line and there is no auto-configuration.
1862 (Runtime_Name_Set_For): New function.
1864 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1866 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1867 elaborate initialization expression for variable Abort when processing
1868 a package body or a declaration.
1869 (Create_Finalizer): Propagate the package context when creating the
1870 exception-related variables.
1871 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1872 For_Package along with usage comment.
1874 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1876 * gcc-interface/Makefile.in: Clean up targets.
1877 Enable new package for atomic counters and copy-on-write implementation
1878 of unbounded strings on x86 platforms.
1879 * gcc-interface/Make-lang.in: Update dependencies.
1881 2011-08-04 Robert Dewar <dewar@adacore.com>
1883 * exp_ch7.adb: Minor reformatting.
1885 2011-08-04 Robert Dewar <dewar@adacore.com>
1887 * exp_strm.adb: Minor reformatting.
1889 2011-08-04 Vadim Godunko <godunko@adacore.com>
1891 * s-atocou.adb: Replace by dummy version and use on targets where atomic
1892 operations are not supported.
1893 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1894 * s-atocou-x86.adb: New file.
1895 * Makefile.rtl: Add s-atocou.o file
1897 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1899 * make.adb (Compile): Move setting of CodePeer_Mode to ...
1900 (Compilation_Phase): ... here.
1901 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1903 2011-08-04 Thomas Quinot <quinot@adacore.com>
1905 * Make-generated.in: Fix minor typo in comment.
1907 2011-08-04 Thomas Quinot <quinot@adacore.com>
1909 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1912 2011-08-04 Robert Dewar <dewar@adacore.com>
1914 * a-coinho.adb: Minor reformatting.
1916 2011-08-04 Robert Dewar <dewar@adacore.com>
1918 * a-coinho.ads: Minor reformatting.
1920 2011-08-04 Vadim Godunko <godunko@adacore.com>
1922 * s-atocou.ads, s-atocou.adb: New files.
1923 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1924 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1925 direct use of GCC's atomic builtins and replace them by use of new
1926 atomic counter package.
1928 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1930 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1932 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1934 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1935 with a call to Get_External_Tag.
1936 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1937 subprogram usage. Remove the guard against package declarations and
1938 bodies since Build_Cleanup_Statements is no longer invoked in that
1940 (Build_Components): Initialize Tagged_Type_Stmts when the context
1941 contains at least one library-level tagged type.
1942 (Build_Finalizer): New local variables Has_Tagged_Types and
1943 Tagged_Type_Stmts along with associated comments on usage. Update the
1944 logic to include tagged type processing.
1945 (Create_Finalizer): Insert all library-level tagged type unregistration
1946 code before the jump block circuitry.
1947 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1948 (Expand_N_Package_Declaration): Remove the call to
1949 Build_Cleanup_Statements.
1950 (Process_Tagged_Type_Declaration): New routine. Generate a call to
1951 unregister the external tag of a tagged type.
1952 (Processing_Actions): Reimplemented to handle tagged types.
1953 (Process_Declarations): Detect the declaration of a library-level
1954 tagged type and carry out the appropriate actions.
1955 (Unregister_Tagged_Types): Removed. The machinery has been directly
1956 merged with Build_Finalizer.
1958 2011-08-04 Robert Dewar <dewar@adacore.com>
1960 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1961 gnatls.adb, exp_ch3.adb: Minor reformatting.
1963 2011-08-04 Marc Sango <sango@adacore.com>
1965 * sem_attr.adb (Analyze_Attribute): Replace the message
1966 "invisible attribute of}" of the spark restriction violation in
1967 attribute reference by the simple message "invisible attribute of type".
1968 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1969 two insertion characters: '&' and '}'.
1971 2011-08-04 Vadim Godunko <godunko@adacore.com>
1973 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1974 * a-coinho.ads, a-coinho.adb: New file.
1975 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1977 2011-08-04 Nicolas Roche <roche@adacore.com>
1979 * alfa_test.adb: Not all ali files are containing alfa information even
1980 if compiled with -gnatd.F. So suppress warning about missing ALFA
1983 2011-08-04 Yannick Moy <moy@adacore.com>
1985 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1987 * put_alfa.adb: Check that scope name is not empty.
1989 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1991 * exp_ch3.adb (Stream_Operation_Ok): new predicate
1992 Needs_Elementary_Stream_Operation, to determine whether user-defined
1993 Read and Write attributes are available for the elementary components
1994 of the given type. If only the predefined attributes are available,
1995 then when restriction No_Default_Stream_Attributes is active the
1996 predefined stream attributes for the composite type cannot be created.
1998 2011-08-04 Robert Dewar <dewar@adacore.com>
2000 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2001 Put routines in alpha order
2003 2011-08-04 Jose Ruiz <ruiz@adacore.com>
2005 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2006 * gcc-interface/Make-lang.in: Update dependencies.
2008 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2010 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2011 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2014 2011-08-04 Robert Dewar <dewar@adacore.com>
2016 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2017 lib-xref-alfa.adb: Minor reformatting.
2019 2011-08-04 Marc Sango <sango@adacore.com>
2021 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2022 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2023 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2026 2011-08-04 Tristan Gingold <gingold@adacore.com>
2028 * bindgen.adb (Gen_Adainit_C): Remove.
2029 (Gen_Adafinal_C): Ditto.
2030 (Gen_Elab_Externals_C): Ditto.
2031 (Gen_Elab_Calls_C): Ditto.
2032 (Gen_Elab_Order_C): Ditto.
2033 (Gen_Elab_Defs_C): Ditto.
2034 (Gen_Finalize_Library_C): Ditto.
2035 (Gen_Finalize_Library_Defs_C): Ditto.
2036 (Gen_Main_C): Ditto.
2037 (Gen_Output_File_C): Ditto.
2038 (Gen_Restrictions_C): Ditto.
2039 (Gen_Versions_C): Ditto.
2040 (Write_Info_Ada_C): Ditto.
2041 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2042 (Gen_Output_File): Do not force Ada_Bind_File anymore.
2043 Always call Gen_Output_File_Ada.
2044 * gnatlink.adb (Begin_Info): Now a constant.
2046 (Ada_Bind_File): Remove
2047 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
2048 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2049 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2050 * opt.ads (Ada_Bind_File): Remove.
2052 2011-08-04 Thomas Quinot <quinot@adacore.com>
2054 * projects.texi: Document target-specific directory in default project
2057 2011-08-04 Thomas Quinot <quinot@adacore.com>
2059 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2062 2011-08-04 Yannick Moy <moy@adacore.com>
2064 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2065 opt.ads, lib-xref.ads: Code clean up.
2067 2011-08-04 Yannick Moy <moy@adacore.com>
2069 * gnat_rm.texi: Update description of Test_Case
2070 * gnat_ugn.texi: Typo.
2072 2011-08-04 Ed Falis <falis@adacore.com>
2074 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2076 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2078 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2079 it is of type Root_Controlled. This action eliminates fields Prev and
2080 Next from type equality.
2082 2011-08-04 Yannick Moy <moy@adacore.com>
2084 * lib-xref-alfa.adb: Correct typo.
2086 2011-08-04 Matthew Heaney <heaney@adacore.com>
2088 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2091 2011-08-04 Yannick Moy <moy@adacore.com>
2093 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2094 (Analyze_Pragma): allow static string expression for name of Test_Case,
2095 instead of simply string literals.
2096 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2099 2011-08-04 Vincent Celier <celier@adacore.com>
2101 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2102 case suffixes to find truncated main sources.
2104 2011-08-04 Tristan Gingold <gingold@adacore.com>
2106 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2107 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2108 (Compute_Current_Task): Ditto.
2110 2011-08-04 Tristan Gingold <gingold@adacore.com>
2112 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2114 2011-08-04 Yannick Moy <moy@adacore.com>
2116 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2117 library-level constant.
2118 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2119 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2120 used as selector of parameter association, in ALFA mode.
2122 2011-08-04 Robert Dewar <dewar@adacore.com>
2124 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2125 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2128 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2130 * make.adb (Linking_Phase): Set source search path before calling
2131 gnatlink in CodePeer mode.
2133 2011-08-04 Javier Miranda <miranda@adacore.com>
2135 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2136 Remove code which takes care of building TSDs.
2137 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2138 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2139 the accessibility check in VM targets.
2140 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2141 (Building_Static_DT): Now returns false for VM targets.
2142 (Build_VM_TSDs): Removed.
2143 (Expand_Interface_Conversion): Generate missing runtime check for
2144 conversions to interface types whose target type is unknown at compile
2146 (Make_VM_TSD): Add missing code to disable the generation of calls to
2147 Check_TSD if the tagged type is not defined at library level, or not
2148 has a representation clause specifying its external tag, or -gnatdQ is
2150 * exp_disp.ads (Build_VM_TSDs): Removed.
2151 (Make_VM_TSDs): Spec relocated from exp_disp.adb
2152 * sem_disp.adb (Check_Dispatching_Operation): No code required to
2153 register primitives in the dispatch tables in VM targets.
2154 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2155 initialization of class-wide interface objects in VM targets.
2156 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2159 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2161 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2162 when dotnet-ld cannot be found.
2164 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2166 * bindgen.adb: Simplify significantly generation of binder body file in
2168 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2169 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
2172 2011-08-04 Yannick Moy <moy@adacore.com>
2174 * sem_prag.adb, sem.ads: Code cleanup.
2176 2011-08-04 Tristan Gingold <gingold@adacore.com>
2178 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2179 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2180 results if possible.
2181 * s-stusta.adb (Print): Adjust after changes in s-stausa.
2182 * gnat_ugn.texi: Update dynamic stack usage section.
2184 2011-08-04 Steve Baird <baird@adacore.com>
2186 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2187 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2188 contains only a call to the user-defined main subprogram.
2189 (Gen_Main_Ada) - If CodePeer_Mode is set, then
2190 call the "wrapper" subprogram instead of directly
2191 calling the user-defined main subprogram.
2193 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2195 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2196 alternatives of a case statement for controlled objects. Rename local
2197 variable A to Dead_Alt.
2198 (Expand_N_If_Statement): Check the then and else statements of an if
2199 statement for controlled objects. Check the then statements of all
2200 elsif parts of an if statement for controlled objects.
2201 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2203 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2204 detects a loop associated with the expansion of an array object.
2205 Augment the processing of the loop statements to account for a possible
2206 wrap done by Process_Statements_For_Controlled_Objects.
2207 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2208 statements and abortable part of an asynchronous select for controlled
2210 (Expand_N_Conditional_Entry_Call): Check the else statements of a
2211 conditional entry call for controlled objects.
2212 (Expand_N_Selective_Accept): Check the alternatives of a selective
2213 accept for controlled objects.
2214 (Expand_N_Timed_Entry_Call): Check the entry call and delay
2215 alternatives of a timed entry call for controlled objects.
2216 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2217 exception handler for controlled objects.
2218 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2219 Add formal parameter Nested_Constructs along with its associated
2221 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2222 Requires_Cleanup_Actions.
2223 (Process_Statements_For_Controlled_Objects): New routine.
2224 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2225 routine. Inspect a node which contains a non-handled sequence of
2226 statements for controlled objects. If such an object is found, the
2227 statements are wrapped in a block.
2229 2011-08-04 Bob Duff <duff@adacore.com>
2231 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2232 need to compare with Class_Wide_Type (T2), in order to get at the
2233 original class-wide type node.
2234 * sem_type.ads (Covers): Improve the comment.
2235 * einfo.ads (Class_Wide_Type): Improve the comment.
2236 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2237 the type of the Deref.
2239 2011-08-04 Yannick Moy <moy@adacore.com>
2241 * gnat_rm.texi: Document that Test_Case pragma can only appear on
2242 separate declarations.
2243 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2244 check identifier of pragma argument.
2245 (Chain_TC): check that no other test case associated to the same entity
2246 share the same name.
2247 (Check_Test_Case): disallow test case inside subprogram body
2248 (Analyze_Pragma): correct call to check identifier and not argument
2249 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2250 function gets name from test case pragma.
2252 2011-08-04 Yannick Moy <moy@adacore.com>
2254 * gnat_rm.texi: Document new pragma and aspect.
2255 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2256 (No_Duplicates_Allowed): new constant array defining whether duplicates
2257 aspects of each kind can appear on the same declaration.
2258 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2259 field, which points to a node holding the previous Spec_PPC_List.
2260 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2261 through the indirection with Contract.
2262 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2263 * par-prag.adb (Prag): do nothing on Test_Case pragma
2264 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2266 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2267 component Ensures of Test_Case.
2268 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2269 (Analyze_Generic_Subprogram_Declaration,
2270 Analyze_Subprogram_Instantiation,
2271 Analyze_Abstract_Subprogram_Declaration,
2272 Analyze_Subprogram_Body_Helper,
2273 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2274 insert contract in subprogram node at point of definition
2276 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2277 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2278 corresponding pragma
2279 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2280 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2281 similar to the analysis of pre/post
2282 (Derive_Subprogram): insert contract in subprogram node at point of
2284 * sem_prag.adb, sem_prag.ads
2285 (Check_Arg_Is_String_Literal, Check_Identifier):
2286 new checking procedures to be called in treatment of pragmas
2287 (Check_Test_Case): new procedure to check that a Test_Case aspect or
2288 pragma is well-formed. This does not check currently that 'Result is
2289 used only in the Ensures component of a Test_Case.
2290 (Analyze_Pragma): add case for Test_Case
2291 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2292 components of a Test_Case.
2293 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2294 expressions in the 3rd (and 4th if present) arguments of a Test_Case
2295 pragma, treated as spec expressions.
2296 (Sig_Flags): add value -1 for Test_Case.
2297 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2298 Get_Requires_From_Test_Case_Pragma): getters for both expression
2299 components of a Test_Case.
2300 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2301 indirection between an entry or [generic] subprogram entity and its
2302 pre/post + test-cases.
2303 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2304 get/set for fields of an N_Contract node.
2305 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2306 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2307 names and pragma for Test_Case.
2308 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2310 2011-08-04 Vincent Celier <celier@adacore.com>
2312 * gnat_ugn.texi: Improve documentation of gnatmake switch
2313 --source-info-file=.
2315 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2317 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2318 type). Initialize Atyp to the appropriate type which is later checked
2319 for completion. Rewrite the assertion associated with private type
2322 2011-08-04 Ed Falis <falis@adacore.com>
2324 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2325 initialize the number of CPUs.
2327 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2329 * sem_type.adb (Disambiguate): New subsidiary routine
2330 In_Same_Declaration_List, to implement AI05-0020: a user-defined
2331 equality on an anonymous access type whose designated type is private
2332 does not lead to an ambiguity with the universal access equality
2333 operator in the body or child units of the defining package. The same
2334 is true for a multiplication operator on a private type completed with
2337 2011-08-04 Javier Miranda <miranda@adacore.com>
2339 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2340 (Normalize_Scalars_Config): Removed.
2342 (Register_Opt_Config_Switches): Remove registering config values of
2343 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2344 (Restore_Opt_Config_Switches): Remove code which restores the values of
2345 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2346 Init_Or_Norm_Scalars.
2347 (Save_Opt_Config_Switches): Remove code which saves values of
2348 Init_Or_Norm_Scalars and Normalize_Scalars.
2349 (Set_Opt_Config_Switches): Remove code which restores config values of
2350 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2351 Init_Or_Norm_Scalars.
2353 2011-08-04 Yannick Moy <moy@adacore.com>
2355 * frontend.adb (Frontend): remove previous patch to avoid full
2356 qualification in ALFA mode.
2357 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2358 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2359 unique name for an entity, which could be used to identify the entity
2360 across compilation units.
2362 2011-08-04 Thomas Quinot <quinot@adacore.com>
2365 (Initialize_Default_Project_Path): Add target specific directory
2366 ($prefix/$target/lib/gnat) in front of project path in all cases
2367 (making gnatmake's behaviour consistent with gprbuild).
2368 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2369 Pass target name from Sdefault to project subsystem.
2370 * gnatls.adb: Show new target specific default project directory.
2372 2011-08-04 Johannes Kanig <kanig@adacore.com>
2374 * cstand.adb: Add Information to Identifier in Standard
2375 (Identifer_For): Set Entity to the corresponding entity
2377 2011-08-04 Sergey Rybin <rybin@adacore.com>
2379 * gnat_ugn.texi: Update doc on gnatcheck.
2381 2011-08-04 Yannick Moy <moy@adacore.com>
2383 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2386 2011-08-04 Yannick Moy <moy@adacore.com>
2388 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2389 performing expansion.
2390 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2391 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2392 it is not called in ALFA mode.
2394 2011-08-04 Emmanuel Briot <briot@adacore.com>
2396 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2397 after all, so removed.
2399 2011-08-04 Sergey Rybin <rybin@adacore.com>
2401 * vms_data.ads: Add missing VMS qualifiers.
2403 2011-08-04 Emmanuel Briot <briot@adacore.com>
2405 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2406 the list of files on the command line after processing it through
2409 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2411 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2412 processing for .NET/JVM. These targets can now benefit from
2413 Raise_From_Controlled_Operation and they share the same processing with
2415 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2416 These targets need transient scopes in order to properly finalize short
2417 lived controlled objects.
2418 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2419 NET/JVM. These targets can now benefit from
2420 Raise_From_Controlled_Operation and they share the same processing with
2423 2011-08-04 Geert Bosch <bosch@adacore.com>
2425 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2427 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2429 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2430 Expand_Record_Aggregate, to determine whether aggregate must be
2431 expanded into assignments. This is the case if the ancestor part is
2432 private, regarless of the setting of the flag Has_Private_Ancestor.
2434 2011-08-04 Ed Falis <falis@adacore.com>
2436 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2438 2011-08-04 Bob Duff <duff@adacore.com>
2440 * sinfo.ads: Fix comment.
2442 2011-08-04 Steve Baird <baird@adacore.com>
2444 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2445 choose a package name in much the same way as is
2446 done for JGNAT when VM_Target /= No_VM, except that
2447 a slightly more distinctive prefix string is used.
2449 2011-08-04 Emmanuel Briot <briot@adacore.com>
2451 * makeutl.adb (Complete_Mains): no longer accept unit names on the
2452 gnatmake command line.
2453 This behavior was never documented (and was supported only because of
2454 an early bug in the code). This case might lead to ambiguous cases
2455 (between unit names and truncated base names without suffixes).
2457 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2459 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2460 Remove the external tag of a tagged type from the internal hash table.
2461 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2462 expanded usage of the routine. Strenghten the check for Is_Master. Add
2463 processing for tagged types.
2464 (Build_Finalizer): Create all the necessary lists used in finalizer
2465 creation when the processed context is a package that may contain
2467 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2468 Requires_Cleanup_Actions.
2469 (Expand_N_Package_Body): Package bodies may need clean up code
2470 depending on whether they contain tagged types.
2471 (Expand_N_Package_Declaration): Package declarations may need clean up
2472 code depending on whether they contain tagged types.
2473 (Unregister_Tagged_Types): New routine. Search through a list of
2474 declarations or statements, looking for non-abstract Ada tagged types.
2475 For each such type, generate code to unregister the external tag.
2476 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2477 Requires_Cleanup_Actions.
2478 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2479 through a list of declarations or statements looking for non-abstract
2480 Ada tagged types or controlled objects.
2481 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2482 Requires_Cleanup_Actions.
2483 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2484 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2487 2011-08-04 Vincent Celier <celier@adacore.com>
2489 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2490 has Ada sources, not project Project, because if the root project
2491 Project has no sources of its own, all projects will be deemed without
2494 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2496 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2497 of the No_Param_Proc acc-to-subp type used for initialization of
2498 __gnat_finalize_library_objects so that it's declared at library level
2499 rather than nested inside of the adainit routine.
2501 2011-08-04 Javier Miranda <miranda@adacore.com>
2503 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2504 if the tagged type has a representation clause which specifies its
2507 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2509 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2510 Remove previous procedure with that name.
2511 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2513 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2514 subtype mark, the ancestor cannot have unknown discriminants.
2515 (Resolve_Record_Aggregate): if the type has invisible components
2516 because of a private ancestor, the aggregate is illegal.
2518 2011-08-04 Vincent Celier <celier@adacore.com>
2520 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2521 account switches -gnat2005, -gnat12 and -gnat2012.
2523 2011-08-04 Bob Duff <duff@adacore.com>
2525 * s-tasdeb.ads: Minor comment fix.
2527 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2529 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2531 * switch.ads, switch.adb (Is_Language_Switch): New function.
2533 2011-08-04 Vincent Celier <celier@adacore.com>
2535 * switch-c.adb: Minor comment addition.
2537 2011-08-04 Vincent Celier <celier@adacore.com>
2539 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2540 ending with '=' is followed by a space (missing file name).
2542 2011-08-04 Pascal Obry <obry@adacore.com>
2544 * g-regist.ads: Fix size of HKEY on x86_64-windows.
2546 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2548 * sem_ch12.adb (Analyze_Associations): New routine
2549 Check_Overloaded_Formal_Subprogram to reject a formal package when
2550 there is a named association or a box initialisation for an overloaded
2551 formal subprogram of the corresponding generic.
2553 2011-08-04 Yannick Moy <moy@adacore.com>
2555 * alfa.ads (ALFA_Xref_Record): add component for type of entity
2556 * get_alfa.adb, put_alfa.adb: Read and write new component of
2558 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2560 2011-08-04 Pascal Obry <obry@adacore.com>
2562 * urealp.adb: Minor reformatting.
2564 2011-08-04 Tristan Gingold <gingold@adacore.com>
2566 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2567 Handle the case when Cleanup_Protected_Object returns Empty.
2569 2011-08-04 Yannick Moy <moy@adacore.com>
2571 * frontend.adb (Frontend): only qualify names in non-ALFA mode
2573 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2575 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2576 call, ignore functions.
2578 2011-08-04 Geert Bosch <bosch@adacore.com>
2580 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2583 2011-08-04 Emmanuel Briot <briot@adacore.com>
2585 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2586 as an index for Builder'Switches. This conforms to the documentation.
2587 * make.adb (Insert_Project_Sources): avoid duplicate code
2589 2011-08-04 Emmanuel Briot <briot@adacore.com>
2591 * makeutl.adb (Complete_Mains): if the user has passed a relative file
2592 name on the command line (for instance "../dummy"), never assume it can
2595 2011-08-04 Tristan Gingold <gingold@adacore.com>
2597 * bindgen.adb: Remove code the reference or create the
2598 Break_Start/__gnat_break_start procedure.
2599 * s-stalib.adb (Break_Start): Removed.
2601 2011-08-04 Emmanuel Briot <briot@adacore.com>
2603 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2604 shared with gprbuild.
2606 2011-08-04 Yannick Moy <moy@adacore.com>
2608 * par-ch4.adb (P_Primary): preferentially issue an error message about
2609 a missing parenthesis arount a conditional or case expression in Ada
2610 2012 mode, if we detect that the alignment is not correct for a
2613 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2615 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2616 tag-to-class-wide conversion as needing finalization actions.
2617 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2618 a tag-to-class-wide conversion as needing finalization actions.
2619 (Is_Finalizable_Transient): The result of a tag-to-class-wide
2620 conversion does not need finalization actions.
2621 (Is_Tag_To_CW_Conversion): New routine.
2622 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2623 whether an object is the result of a tag-to-class-wide conversion.
2625 2011-08-04 Yannick Moy <moy@adacore.com>
2627 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2628 the left-hand-side and right-hand-side of a conjunct are inserted when
2629 translating a pre- or postcondition
2630 * sem_ch6.adb: Correct typo in comment
2632 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2634 * gnat_rm.texi: Ravenscar does not prohibit dependence on
2635 Unchecked_Conversion and Unchecked_Deallocation.
2637 2011-08-04 Thomas Quinot <quinot@adacore.com>
2639 * make.adb: Minor reformatting.
2641 2011-08-04 Emmanuel Briot <briot@adacore.com>
2643 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2644 sources in the project and its imported projects, but not in the whole
2647 2011-08-04 Emmanuel Briot <briot@adacore.com>
2649 * make.adb: Remove debug trace.
2651 2011-08-04 Vincent Celier <celier@adacore.com>
2653 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2654 path in canonical form, to be able to compare path names on platforms
2655 such as Windows or Darwin.
2657 2011-08-04 Thomas Quinot <quinot@adacore.com>
2659 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2660 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2661 * scos.ads: Update documentation accordingly.
2662 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2665 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2667 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2668 attribute only if prefix type is scalar.
2670 2011-08-04 Emmanuel Briot <briot@adacore.com>
2672 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2673 in gnatmake for specifying mains on the command line that do not belong
2674 to the main project. These mains must currently all belong to the same
2676 (Ultimate_Extension_Of): removed, since duplicated
2677 Ultimate_Extending_Project.
2679 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2681 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2683 (CodePeer_Mode_String): New.
2684 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2686 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2687 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2688 mode, since no useful elaboration subprogram is needed by CodePeer.
2689 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2690 In this mode, compile binder file with -gnatC and do stop after this
2693 2011-08-04 Vincent Celier <celier@adacore.com>
2695 * exp_ch7.adb: Minor comment fix.
2697 2011-08-04 Robert Dewar <dewar@adacore.com>
2699 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2700 exp_ch4.adb, makeutl.adb: Minor reformatting.
2702 2011-08-04 Emmanuel Briot <briot@adacore.com>
2704 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2705 Create several new subprograms to move code out of Make. This makes the
2706 code more readable, removes code duplication, and is a preparation work
2707 for adding support for aggregate projects.
2709 2011-08-04 Tristan Gingold <gingold@adacore.com>
2711 * s-po32gl.ads, s-po32gl.adb: New files.
2712 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2713 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2714 (Build_Finalization_Collection): Use it.
2715 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2716 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2718 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2719 * gcc-interface/Make-lang.in: Update dependencies.
2721 2011-08-04 Emmanuel Briot <briot@adacore.com>
2723 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2726 2011-08-04 Emmanuel Briot <briot@adacore.com>
2728 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2729 command line is not a file name, also check whether it could be a unit
2732 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2734 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2735 the header of the finalization routine.
2736 If the unit has no finalizer but is a body whose spec has one, then
2737 generate the decrement of the elaboration entity only.
2738 If the unit has a finalizer and is a spec, then do not generate the
2739 decrement of the elaboration entity.
2740 (Gen_Finalize_Library_C): Likewise.
2742 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2744 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2745 (Bounds_Size_Expression): Removed.
2746 (Double_Alignment_Of): New subsidiary routine.
2747 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2748 for a hole in the dope vector of unconstrained arrays due to different
2749 index and element alignments.
2751 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2753 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2754 raise program_error because body has not been seen yet.
2756 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2758 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2761 2011-08-04 Vincent Celier <celier@adacore.com>
2763 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2765 2011-08-04 Yannick Moy <moy@adacore.com>
2767 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2768 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2770 2011-08-04 Thomas Quinot <quinot@adacore.com>
2772 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2773 instantiation in RCI.
2775 2011-08-04 Emmanuel Briot <briot@adacore.com>
2777 * make.adb: Share more code with gprbuild
2779 2011-08-04 Emmanuel Briot <briot@adacore.com>
2781 * projects.texi: Added documentation for the IDE'Gnat project file
2784 2011-08-04 Nicolas Roche <roche@adacore.com>
2786 * gnat_rm.texi: Minor editing.
2788 2011-08-04 Javier Miranda <miranda@adacore.com>
2790 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2791 and the library case for VM targets.
2792 (Gen_Adainit_Ada): Likewise.
2794 2011-08-04 Robert Dewar <dewar@adacore.com>
2796 * g-altive.ads: Minor comment updates.
2797 * prj-nmsc.adb: Minor reformatting.
2799 2011-08-04 Javier Miranda <miranda@adacore.com>
2802 (Normalize_Scalars_Config): Value of the configuration switch set by
2803 pragma Normalize_Scalars when it appears in the gnat.adc file.
2804 (Normalize_Scalars): New field for record Config_Switches_Type. Used
2805 to save and restore settings of this pragma.
2807 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2808 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2810 2011-08-04 Vincent Celier <celier@adacore.com>
2812 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2814 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2816 * makeutl.adb: Minor reformatting.
2818 2011-08-04 Olivier Hainque <hainque@adacore.com>
2820 * g-altive.ads: Update comments to reflect that only the soft
2821 binding is available today.
2823 2011-08-04 Robert Dewar <dewar@adacore.com>
2825 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2826 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2827 * gcc-interface/Make-lang.in: Update dependencies.
2829 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2831 * prj-env.adb: Remove local debug traces.
2833 2011-08-04 Yannick Moy <moy@adacore.com>
2835 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2836 was used instead of Hi_OK, which could cause a read of an uninitialized
2837 value later on. Detected while working on the new warning.
2838 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2840 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2841 in more cases, in order to detect more unreferenced values.
2842 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2843 object for expression, if any.
2845 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2847 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2848 the operand types instead of the Esize.
2850 2011-08-04 Steve Baird <baird@adacore.com>
2852 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2853 enable CodePeer_Mode.
2854 * bindusg.adb (Display): Add help message describing -P binder switch.
2855 * gnat_ugn.texi: Document -P binder switch.
2856 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2857 user-defined main program directly.
2858 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2859 user-defined main program in the context clause of the package body.
2861 2011-08-04 Yannick Moy <moy@adacore.com>
2863 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2864 duplicate of Defining_Entity
2865 (Get_Unique_Entity_For_Decl): rename function into
2866 Unique_Defining_Entity
2867 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2868 (Formal_Proof_On): remove synthesized flag
2869 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2870 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2871 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2872 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2873 Annotate (Formal_Proof)
2875 2011-08-04 Emmanuel Briot <briot@adacore.com>
2877 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2878 source files with non-standard naming schemes, in imported projects
2880 2011-08-04 Emmanuel Briot <briot@adacore.com>
2882 * makeutl.adb (Complete_Mains): when a multi-unit source file is
2883 specified on the gprbuild command line, we need to compile all units
2884 within that file, not just the first one we find
2885 Fix error message for mains that are not found.
2887 2011-08-04 Thomas Quinot <quinot@adacore.com>
2889 * sem_ch6.adb: Update comment.
2890 * sem_ch12.adb: Minor reformatting.
2892 2011-08-04 Bob Duff <duff@adacore.com>
2894 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2895 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2896 race condition whose symptom is to fail to lock Parent. That, in turn,
2897 causes Parent.Awake_Count to be accessed without locking Parent, which
2898 causes another race condition whose symptom is that Parent.Awake_Count
2899 can be off by 1 (either too high or too low). The solution is to lock
2900 Parent unconditionally, and then lock Acceptor, before reading
2901 Acceptor.Terminate_Alternative.
2903 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2905 * debug.adb: Update comment.
2907 2011-08-04 Robert Dewar <dewar@adacore.com>
2909 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2910 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2911 exp_ch6.adb: Minor reformatting.
2913 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2915 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2918 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2920 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2922 2011-08-04 Thomas Quinot <quinot@adacore.com>
2924 * sinfo.ads: Minor reformatting.
2926 2011-08-04 Emmanuel Briot <briot@adacore.com>
2928 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2929 even if there is no location.
2931 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2933 * sem_res.adb, sem_ch4.adb: move check for restriction
2934 No_Task_Hierarchy to resolve_allocator.
2936 2011-08-04 Thomas Quinot <quinot@adacore.com>
2938 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2939 This flag of N_Pragma nodes is not used, remove it as well as all of
2940 the associated circuitry.
2942 2011-08-04 Javier Miranda <miranda@adacore.com>
2944 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2945 runtime check on duplicated externa tags
2946 * debug.adb Document switch -gnatdQ.
2948 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2950 * a-fihema.ads: Minor typo fix.
2952 2011-08-04 Yannick Moy <moy@adacore.com>
2954 * sem_ch10.adb: Minor comment update.
2956 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2958 * einfo.adb: Update the node field usage to reflect the renaming of
2959 Return_Flag to Return_ Flag_Or_Transient_Decl.
2960 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2961 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2962 (Write_Field15_Name): Change Return_Flag to
2963 Return_Flag_Or_Transient_Decl.
2964 * einfo.ads: Rename node field Return_Flag to
2965 Return_Flag_Or_Transient_Decl. Update the associated comment and all
2966 occurrences in entities.
2967 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2968 associated Inline pragma.
2969 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2970 associated Inline pragma.
2971 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2973 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2974 Return_Flag and Set_Return_Flag.
2975 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2976 objects generated for controlled transients declared inside an
2977 Exception_With_Actions. Update the calls to Return_Flag.
2978 (Process_Object_Declaration): Add code to add a null guard for hook
2979 objects generated for controlled transients declared inside an
2980 Exception_With_Actions. Update related comment.
2981 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2982 objects generated for controlled transients declared inside an
2983 Exception_With_Actions. Update the calls to Return_Flag.
2984 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2986 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2988 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2989 positional aggregate.
2991 2011-08-04 Vincent Celier <celier@adacore.com>
2993 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2994 SLOC only for pragmas.
2996 2011-08-04 Emmanuel Briot <briot@adacore.com>
2998 * projects.texi: Minor typo fix.
3000 2011-08-04 Emmanuel Briot <briot@adacore.com>
3002 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3003 on case-sensitive file systems.
3005 2011-08-04 Thomas Quinot <quinot@adacore.com>
3007 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3008 nested in a disabled pragma.
3009 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3010 enclosing pragma, if any, for X decisions.
3012 2011-08-04 Thomas Quinot <quinot@adacore.com>
3014 * sem_prag.adb: Minor reformatting.
3016 2011-08-04 Vincent Celier <celier@adacore.com>
3018 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3019 allowed in no run time mode.
3021 2011-08-04 Vincent Celier <celier@adacore.com>
3023 * make.adb (Check): When -gnatc is used, check for the source file
3024 inside the ALI file with a canonical case file name.
3026 2011-08-04 Emmanuel Briot <briot@adacore.com>
3028 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3029 overriding the separator.
3031 2011-08-04 Robert Dewar <dewar@adacore.com>
3033 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3034 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3036 2011-08-04 Robert Dewar <dewar@adacore.com>
3038 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3040 2011-08-04 Yannick Moy <moy@adacore.com>
3042 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3043 'Result only appears in postcondition of function.
3045 2011-08-04 Thomas Quinot <quinot@adacore.com>
3047 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3048 external tag, include the value of the external tag in the exception
3051 2011-08-04 Yannick Moy <moy@adacore.com>
3053 * sem_attr.adb (Result): modify error message for misplaced 'Result
3055 2011-08-04 Sergey Rybin <rybin@adacore.com>
3057 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3058 clear that the second argument must be an identifier.
3060 2011-08-04 Thomas Quinot <quinot@adacore.com>
3062 * exp_ch9.adb (Build_Barrier_Function): When compiling with
3063 -fpreserve-control-flow, insert an IF statement on the barrier
3064 condition to ensure that a conditional branch instruction is generated.
3066 2011-08-04 Emmanuel Briot <briot@adacore.com>
3068 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3069 (Processing_Flags.Ignore_Missing_With): new flag.
3071 2011-08-04 Emmanuel Briot <briot@adacore.com>
3073 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3074 Source_List_File on case-insensitive systems where the file is actually
3075 on a case-sensitive file system (NFS,...).
3077 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3079 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3080 function return contains a controlled [extension] aggregate and the
3081 return statement is not part of a handled sequence of statements, wrap
3082 the return in a block. This ensures that all controlled temporaries
3083 generated during aggregate resolution will be picked up by the
3084 finalization machinery.
3086 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3088 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3089 components, freeze type before resolution, to ensure that default
3090 initializations are present for all components.
3091 * sem_res.adb (Resolve_Actuals): the designated object of an
3092 accces-to-constant type is a legal actual in a call to an
3093 initialization procedure.
3095 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3097 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3098 N_Unchecked_Type_Conversion to the possible containers of a renamed
3101 2011-08-04 Yannick Moy <moy@adacore.com>
3103 * par-ch13.adb (Aspect_Specifications_Present): recognize
3104 "with Identifier'Class =>" as an aspect, so that a meaningful warning
3105 is issued in Strict mode.
3106 * par.adb: Fix typos in comments.
3108 2011-08-04 Yannick Moy <moy@adacore.com>
3110 * sem_attr.adb (Result): modify error message to take into account Post
3111 aspect when compiling Ada 2012 (or newer) code.
3113 2011-08-04 Nicolas Roche <roche@adacore.com>
3115 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3116 remove need for GCC exceptions.
3118 2011-08-04 Vincent Celier <celier@adacore.com>
3120 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3121 project, not the source file name.
3122 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3123 excluded, continue looking. This excluded source will only be returned
3124 if there is no other source with the same base name that is not locally
3127 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3129 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3130 private and one of the operands is a real literal, use a qualified
3131 expression rather than a conversion which is not meaningful to the
3134 2011-08-04 Yannick Moy <moy@adacore.com>
3136 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3137 corresponding aspect X'Class are allowed, proceed with analysis of the
3138 aspect instead of skipping it.
3140 2011-08-04 Tristan Gingold <gingold@adacore.com>
3142 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3143 This will allow to have an Ada implementation for the subprogram.
3145 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3147 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3148 completion and aspects are present, apply them to the entity for the
3149 type which is currently the partial view, but which is the one that
3151 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3152 applies to a partial view, indicate that the full view has predicates
3153 and delayed aspects.
3154 (Replace_Type_Reference): Handle properly predicates that apply to the
3155 full view of a private completion.
3157 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3159 * layout.adb (Layout_Type): For composite types, do not set Esize.
3160 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3162 (Size_Known): Look at the RM size of components instead of the Esize.
3163 (Freeze_Record_Type): Look at the RM size instead of the Esize to
3164 issue warning and activate Implicit_Packing.
3165 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
3166 if the Esize is not known.
3167 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3168 for elementary types only.
3169 (Analyze_Record_Representation_Clause): Look at the RM size instead
3170 of the Esize to issue errors.
3171 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
3173 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
3175 Look at the RM size instead of the Esize for types if the latter is
3177 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3179 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3181 * sem_type.adb: proper handling of equality not involving anonymous
3184 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3186 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3187 Vis_Decls. When creating a library-level finalizer for a package spec,
3188 both the declaration and body of the finalizer are inserted either in
3189 the visible or private declarations of the package spec.
3191 2011-08-04 Javier Miranda <miranda@adacore.com>
3193 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3194 use of the full-view of a type when invoking Is_Ancestor.
3195 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3196 the full-view of private parents is requested, then use also the
3197 full-view of the parent of the first derivation.
3199 2011-08-04 Tristan Gingold <gingold@adacore.com>
3201 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3202 instead of the locally imported procedure.
3203 * s-taprop-mingw.adb (Enter_Task): Ditto.
3204 * s-valrea.adb (Scan_Real): Ditto.
3205 * s-imgrea.adb (Set_Image_Real): Ditto.
3206 * s-flocon.ads: Make the package pure.
3208 2011-08-04 Thomas Quinot <quinot@adacore.com>
3210 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3211 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3212 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3213 New subprogram, moved here from...
3214 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3215 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3216 rewriting of the last argument into a procedure call statement here...
3217 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3220 2011-08-04 Thomas Quinot <quinot@adacore.com>
3222 * par_sco.adb: Minor reformatting.
3224 2011-08-04 Robert Dewar <dewar@adacore.com>
3226 * erroutc.adb: Minor reformatting.
3228 2011-08-04 Thomas Quinot <quinot@adacore.com>
3230 * par_sco.adb: Comment update.
3232 2011-08-04 Tristan Gingold <gingold@adacore.com>
3234 * s-flocon.ads: New file.
3235 * g-flocon.ads: Now a renaming of s-flocon.
3236 * Makefile.rtl: Add s-flocon.o
3238 2011-08-04 Javier Miranda <miranda@adacore.com>
3240 * exp_strm.adb (Build_Array_Input_Function): if the array type is
3241 constrained, do not attempt to build a subtype of it.
3243 2011-08-04 Yannick Moy <moy@adacore.com>
3245 * errout.ads Change comments: remove 'R'M as an example where quotes
3246 are needed; add ALFA as another case where quotes are not needed
3247 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3248 case where quotes are not needed.
3249 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3250 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3251 Remove all occurrences of 'A'L'F'A
3253 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3255 * sem_ch13.adb: check legality of invariant pragma.
3257 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3259 * bindgen.adb: Add comments.
3261 2011-08-04 Yannick Moy <moy@adacore.com>
3263 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3265 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3266 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3268 2011-08-04 Robert Dewar <dewar@adacore.com>
3270 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3271 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3272 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3274 2011-08-04 Thomas Quinot <quinot@adacore.com>
3276 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3278 2011-08-04 Thomas Quinot <quinot@adacore.com>
3281 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3284 2011-08-04 Robert Dewar <dewar@adacore.com>
3286 * einfo.ads, exp_ch4.adb: Minor reformatting.
3288 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3290 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3292 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3294 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3295 type in all cases to compute list of primitive operations, because full
3296 view may be an itype that is not attached to the list of declarations.
3298 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3300 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3301 library has already been finalized.
3302 (Gen_Adafinal_C): Likewise.
3303 (Gen_Adainit_Ada): Generate an early return if the library has
3304 already been elaborated.
3305 (Gen_Adainit_C): Likewise.
3306 (Gen_Output_File_Ada): Generate an elaboration flag.
3307 (Gen_Output_File_C): Likewise.
3309 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3311 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3312 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3313 built in the first place.
3314 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3315 for CodePeer because Finalize_Address was not built to begin with.
3316 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3318 2011-08-04 Pascal Obry <obry@adacore.com>
3320 * adaint.c (__gnat_tmp_name): Use current process id to create temp
3321 filenames, this ensures unicity of filenames across processes.
3323 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3325 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3326 Raise_Controlled to Raise_From_Controlled_Operation. Update the
3327 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3328 Add False as the actual to From_Abort in the generated call to
3329 Raise_From_Controlled_Operation.
3331 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3333 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3334 so that the ali file name can be retrieved from outside of this package.
3335 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3336 doing nothing in the general case, but used to update the object file
3337 timestamp if directly generated by the backend.
3338 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3339 to a later time than the ali file one.
3341 2011-08-04 Yannick Moy <moy@adacore.com>
3343 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3344 entities whose body contains an Annotate pragma which forces formal
3346 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3347 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3348 Mark_Non_ALFA_Subprogram to pass in a message and node.
3349 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3350 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3351 surrounding subprogram.
3352 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3353 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3354 as not in ALFA is annotated with Formal_Proof being On, then an error
3355 is issued based on the additional parameters for message and node.
3356 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3357 * gcc-interface/Make-lang.in: Update dependencies.
3359 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3361 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3362 Finalize_Address when CodePeer is enabled.
3364 2011-08-04 Pascal Obry <obry@adacore.com>
3366 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3367 the latter returns a pointer to a static buffer which is deallocated
3368 at the end of the routine.
3370 2011-08-04 Yannick Moy <moy@adacore.com>
3372 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3373 after index creation; mark unconstrained base array type generated as
3374 being in/not in ALFA as well
3375 (Make_Index): mark subtype created as in/not in ALFA
3376 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3377 over a loop as in/not in ALFA, depending on its type and form of loop
3380 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3382 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3383 directly to False on .NET and JVM.
3385 2011-08-04 Yannick Moy <moy@adacore.com>
3387 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3388 constraint that subtype must come from source code to be in ALFA, so
3389 that anonymous subtypes can be in ALFA too.
3391 2011-08-04 Yannick Moy <moy@adacore.com>
3393 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3394 reference for ALFA mode.
3395 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3396 procedure public so as to use it from formal verification back-end.
3398 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3400 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3401 invalid checks of the Parameter, making Remove_Switch not working
3404 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3406 * targparm.ads: Update header: no run-time exception is needed on this
3409 2011-08-04 Vincent Celier <celier@adacore.com>
3411 * a-fihema.adb: Use System.IO instead of GNAT.IO
3413 2011-08-04 Thomas Quinot <quinot@adacore.com>
3415 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3416 are forbidden in Compiler_Unit mode.
3418 2011-08-04 Robert Dewar <dewar@adacore.com>
3420 * sem_util.adb: Minor reformatting.
3422 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3424 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3425 library-level finalizers.
3426 (Gen_Finalize_Library_C): Update the import string for library-level
3428 (Gen_Finalize_Library_Defs_C): Update the definition name of a
3429 library-level finalizer.
3430 * exp_ch7.adb: Remove with and use clauses for Stringt.
3431 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3432 Spec_Decl. Add local variable Body_Id. The names of library-level
3433 finalizers are now manually fully qualified and are no longer external.
3434 A single name is now capable of servicing .NET, JVM and non-VM targets.
3435 Pragma Export is no longer required to provide visibility for the name.
3436 (Create_Finalizer_String): Removed.
3437 (New_Finalizer_Name): New routine which mimics New_..._Name.
3439 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3441 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3442 elaboration counter to Standard_Short_Integer.
3443 * sem_util.adb (Build_Elaboration_Entity): Likewise.
3444 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3445 (Gen_Elab_Externals_C): Likewise.
3447 2011-08-04 Ed Falis <falis@adacore.com>
3449 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3450 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3451 system-vxworks-mips.ads, system-vxworks-x86.ads
3452 (Always_Compatible_Rep): set to False for all VxWorks targets.
3454 2011-08-04 Robert Dewar <dewar@adacore.com>
3456 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3457 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3458 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3459 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3460 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3461 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3462 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3463 Minor reformatting and code reorganization.
3465 2011-08-04 Emmanuel Briot <briot@adacore.com>
3467 * projects.texi: Added doc for aggregate projects.
3469 2011-08-04 Emmanuel Briot <briot@adacore.com>
3471 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3472 Add support for overriding the Project_Path in aggregate projects.
3474 2011-08-04 Robert Dewar <dewar@adacore.com>
3476 * a-cofove.ads: Minor reformatting.
3478 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3480 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3481 on the generated code.
3482 (Build_Finalize_Statements): Update the comment on the generated code.
3483 (Build_Initialize_Statements): Update the comment on the generated code.
3484 (Build_Object_Declarations): Add local variable Result. The object
3485 declarations are now built in sequence.
3486 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3489 2011-08-04 Robert Dewar <dewar@adacore.com>
3491 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3493 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3495 * einfo.ads (Elaboration_Entity): Document new definition and use.
3496 (Elaboration_Entity_Required): Adjust to above change.
3497 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3498 * exp_ch12.adb: And with and use for Snames.
3499 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3500 * exp_util.adb (Set_Elaboration_Flag): Likewise.
3501 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3502 <Check_Unit_Name>: Deal with N_Expanded_Name.
3503 <Attribute_Elaborated>: Extend to all unit names.
3504 * sem_elab.adb: And with and use for Uintp.
3505 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3506 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3507 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3508 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3509 from Gen_Adainit_Ada.
3510 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3511 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
3512 case, do not call System.Standard_Library.Adafinal; instead call
3513 finalize_library if needed.
3514 (Gen_Adafinal_C): Likewise.
3515 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3516 non-main program case.
3517 (Gen_Adainit_C): Generate a couple of external declarations here.
3518 In the main program case, set SSL.Finalize_Library_Objects.
3519 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3520 (Gen_Elab_Calls_C): Likewise.
3521 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
3522 (Gen_Finalize_Library_C): Likewise. Generate a full function.
3523 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3525 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3526 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
3528 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3529 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
3530 of external declarations. Call Gen_Finalize_Library_C.
3532 2011-08-04 Emmanuel Briot <briot@adacore.com>
3534 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3535 Compute_Compilation_Phases): new subprogram.
3536 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3537 The number of mains as well as the various compilation phases that
3538 need to be run are now project tree specific, since various
3539 aggregated trees might have different requirements. In particular,
3540 they do not all require bind or link phases.
3542 2011-08-04 Emmanuel Briot <briot@adacore.com>
3544 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3545 (Project_Tree_Appdata): New type.
3546 It is now possible to associate application-specific data to a project
3547 tree. In particular, this is used in the gprbuild builder to avoid a
3548 number of global tables and htables, especially now that there can be
3549 several project trees loaded at once because of aggregate projects.
3550 (Debug_Name): new procedure.
3551 * projects.texi: Clarify syntax of "**" for Source_Dirs
3553 2011-08-03 Emmanuel Briot <briot@adacore.com>
3555 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3556 the "roots" for a main.
3557 (Fill_From_Project): add support for aggregate projects. Main units
3558 in aggregated projects are now automatically added in the list of
3559 files to build (although this fails later on in gprbuild, because
3560 these files are not using the root proejct tree, so this needs
3562 * gcc-interface/Make-lang.in: Update dependencies.
3564 2011-08-03 Yannick Moy <moy@adacore.com>
3566 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3567 conditional expression in ALFA.
3568 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3569 expressions as not in ALFA.
3571 2011-08-03 Robert Dewar <dewar@adacore.com>
3573 * a-cofove.adb: Minor reformatting.
3575 2011-08-03 Emmanuel Briot <briot@adacore.com>
3577 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3578 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3580 These packages are more logically placed in the Queue package, since
3581 they manipulate the queue. It is also likely that they can be adapted
3582 for gnatmake, thus sharing more code.
3583 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3584 that we could move the above.
3586 2011-08-03 Emmanuel Briot <briot@adacore.com>
3588 * errutil.adb (Finalize): clean up the list of error messages on exit.
3589 Calling this subprogram multiple times will no longer show duplicate
3590 error messages on stderr.
3592 2011-08-03 Emmanuel Briot <briot@adacore.com>
3594 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3595 Getopt_Switches when we have already define a command line
3598 2011-08-03 Yannick Moy <moy@adacore.com>
3600 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3601 in ALFA. Instead, they are considered as assertions to prove.
3602 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3603 nodes as not in ALFA. Instead, include conditional expressions in ALFA
3604 if they have no ELSE part, or if they occur in pre- and postconditions,
3605 where the Condition cannot have side-effects in ALFA
3606 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3607 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3608 Instead, include type conversion between scalar types in ALFA.
3609 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3610 if-and-only-if its type is in ALFA.
3612 2011-08-03 Thomas Quinot <quinot@adacore.com>
3614 * scos.adb, get_scos.adb, put_scos.adb
3615 New code letter for decisions: G (entry guard)
3617 (Traverse_Subprogram_Body): Rename to...
3618 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3619 (Traverse_Protected_Body): New subprogram
3620 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3621 protected bodies and entry bodies.
3623 2011-08-03 Yannick Moy <moy@adacore.com>
3625 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3626 entities with get/set subprograms, which is set on procedure entities
3627 generated by the compiler for a postcondition.
3628 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3629 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3630 entity for a declaration
3631 (Get_Unique_Entity_For_Decl): new function returning an entity which
3632 represents a declaration, so that matching spec and body have the same
3635 2011-08-03 Robert Dewar <dewar@adacore.com>
3637 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3638 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3640 2011-08-03 Yannick Moy <moy@adacore.com>
3642 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3643 library-level because retriction No_Implicit_Dynamic_Code in the
3644 front-end prevents its definition as a local subprogram
3645 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3646 for reuse in other contexts
3647 (Traverse_Declarations_Or_Statements,
3648 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3649 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3650 procedures take a callback parameter to be called on all declarations
3652 (Traverse_All_Compilation_Units): new generic function to traverse a
3653 compilation unit and call a callback parameter on all declarations
3655 2011-08-03 Javier Miranda <miranda@adacore.com>
3657 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3658 in Java since they are always enclosed in a namespace that
3659 differentiates them, and overloaded entities are supported by the VM.
3661 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3663 * checks.adb (Determine_Range): If a computed bound of an operation is
3664 outside the range of the base type of the expression, and overflow
3665 checks are enabled, the result is unknown and cannot be used for any
3666 subsequent constant folding.
3667 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3668 unknown, so is the result of the comparison.
3670 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3672 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3673 From_Abort. When finalization was triggered by an abort, propagate
3674 Standard'Abort_Signal rather than Program_Error.
3675 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3677 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3678 From_Abort. When finalization was triggered by an abort, propagate
3679 Standard'Abort_Signal rather than Program_Error.
3680 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3682 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3683 Abort_Id. Update the calls to Build_Object_Declarations and
3684 Build_Raise_Statement to include Abort_Id.
3685 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3686 calls to Build_Object_Declarations and Build_Raise_Statement to include
3688 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3689 calls to Build_Object_Declarations and Build_Raise_Statement to include
3691 (Build_Components): Create an entity for Abort_Id when exceptions are
3692 allowed on the target.
3693 (Build_Finalizer): New local variable Abort_Id.
3694 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3695 calls to Build_Object_Declarations and Build_Raise_Statement to include
3697 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3698 declaration of flag Abort_Id to preserve the original abort status
3699 before finalization code is executed.
3700 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3701 runtime routine Raise_From_Controlled_Operation.
3702 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3703 Abort_Id. Update the call to Build_Object_Declarations to include
3704 Abort_Id. Update the layout of the finalizer body.
3705 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3706 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3707 clunky code to create all flags and objects related to
3708 exception propagation and replace it with a call to
3709 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3711 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3712 Add new formal Abort_Id and associated comment on its use.
3713 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3715 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3716 Remove the clunky code to create all flags and objects related to
3717 exception propagation and replace it with a call to
3718 Build_Object_Declarations. Update the call to Build_Raise_Statement.
3720 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3722 * s-tassta.adb: Fix minor typos.
3724 2011-08-03 Robert Dewar <dewar@adacore.com>
3726 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3727 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3729 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3731 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3732 to packages. This ensures that the finalizer body will not end up
3733 inside the freeze node.
3734 (Process_Declarations): Add code to detect whether a freeze node has a
3735 nested finalization collection.
3737 2011-08-03 Pascal Obry <obry@adacore.com>
3739 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3740 (Current_Session): Return a not null access to Session_Type.
3741 (Default_Session): Likewise.
3743 2011-08-03 Robert Dewar <dewar@adacore.com>
3745 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3746 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3748 2011-08-03 Pascal Obry <obry@adacore.com>
3750 * g-awk.ads: Minor comment fix.
3752 2011-08-03 Sergey Rybin <rybin@adacore.com>
3754 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3755 the tree structure related to discriminant constraints.
3756 Original_Discriminant cannot be used any more for computing the
3757 defining name for the reference to a discriminant.
3759 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3761 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3762 function is not visibly tagged, this is not a dispatching call and
3763 therfore is not Tag_Indeterminate, even if the function is marked as
3764 dispatching on result.
3766 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3768 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3769 (Expand_N_Free_Statement): Add a guard to protect against run-times
3770 which do not support controlled types.
3771 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3772 against run-times which do not support controlled types.
3773 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3774 against run-times which do not support controlled types.
3775 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3776 against run-times which do not support controlled types.
3777 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3778 protect against run-times which do not support controlled types.
3780 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3782 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3783 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3785 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3787 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3788 modified in the source, to prevent spurious warnings when compiling
3791 2011-08-03 Thomas Quinot <quinot@adacore.com>
3793 * a-except-2005.adb: Minor reformatting.
3795 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3797 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3798 is a renaming declaration in the private part of a package, do not emit
3799 a warning that the with_clause could be moved because the renaming may
3800 be used in the body or in a child unit.
3802 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3804 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3805 Propagate the Comes_From_Source attribute from the original return
3806 object to the renaming.
3808 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3810 * exp_ch7.adb (Build_Raise_Statement): Do not call
3811 Raise_From_Controlled_Operation when this routine is not present in
3812 the run-time library.
3813 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3814 libraries (Ravenscar), tasks are non-terminating, and protected objects
3815 and tasks can only appear at library level, so we do not want
3816 finalization of protected objects nor tasks.
3817 * exp_intr.adb: Minor clarification in comment.
3818 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3819 Gen_Output_File_C): Remove references to finalization of library-level
3820 objects when using restricted run-time libraries.
3822 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3824 * sem_ch3.adb (Build_Discriminant_Constraints): Set
3825 Original_Discriminant only if the parent type is a generic formal.
3827 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3829 * exp_ch13.adb: Add with and use clause for Targparm;
3830 (Expand_N_Free_Statement): Prevent the generation of a custom
3831 Deallocate on .NET/JVM targets since this requires pools and address
3833 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3834 .NET/JVM targets, attach the newly allocated object to the access
3835 type's finalization collection. Do not generate a call to
3836 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3837 exist in the runtime.
3838 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3839 create a custom Allocate for object that do not require initialization.
3840 Attach a newly allocated object to the access type's finalization
3841 collection on .NET/JVM.
3842 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3843 assignment of controlled types on .NET/JVM. The two hidden pointers
3844 Prev and Next and stored and later restored after the assignment takes
3846 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3847 kludge for .NET/JVM to recognize a particular piece of code coming from
3848 Heap_Management and change the call to Finalize into Deep_Finalize.
3849 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3850 finalization collections on .NET/JVM only for types derived from
3851 Controlled. Separate the association of storage pools with a collection
3852 and only allow it on non-.NET/JVM targets.
3853 (Make_Attach_Call): New routine.
3854 (Make_Detach_Call): New routine.
3855 (Process_Object_Declarations): Suppress the generation of
3856 build-in-place return object clean up code on .NET/JVM since it uses
3858 * exp_ch7.ads (Make_Attach_Call): New routine.
3859 (Make_Detach_Call): New routine.
3860 * exp_intr.adb Add with and use clause for Targparm.
3861 (Expand_Unc_Deallocation): Detach a controlled object from a collection
3862 on .NET/JVM targets.
3863 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3864 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3865 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3866 names used in finalization.
3868 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3870 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3871 (Attach, Detach): Lock the current task when chaining an object onto a
3874 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3876 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3877 Rewritten to create the message strings when the exception is not
3878 raised by an abort during finalization.
3879 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3880 Raise_From_Controlled_Operation and update its associated comment.
3881 * a-fihema.ads, a-fihema.adb: New GNAT unit.
3882 Ada.Finalization.Heap_Management provides key functionality
3883 associated with controlled objects on the heap, their creation,
3884 finalization and reclamation. Type Finalization_Collection is
3885 effectively a wrapper which sits ontop of a storage pool and performs
3886 all necessary bookkeeping for all the objects it contains. Each
3887 access-to-controlled or access-to-class-wide type receives a collection
3888 as part of its expansion. The compiler generates buffer code and
3889 invokes Allocate / Deallocate to create and destroy allocated
3891 * a-finali.adb ("="): Removed.
3892 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3893 fields Prev and Next.
3894 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3895 A library unit with at least one controlled object on the library level
3896 has a special finalizer which is invoked by the binder. To signal this,
3897 ali files carry field PF.
3898 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3899 associated comment on field usage.
3900 * a-tags.adb (Get_RC_Offset): Removed.
3901 (Needs_Finalization): New routine.
3902 * a-tags.ads: Update the structure of the GNAT dispatch tables.
3903 Dispatch tables now carry field Needs_Finalization which provides
3904 runtime indication whether a type is controlled or has controlled
3905 components or both. Remove field RC_Offset.
3906 (Get_RC_Offset): Removed along with its associated pragma Export.
3907 Since tagged types with controlled components no longer carry hidden
3908 field _controller, the special mechanism to retrieve its location is no
3910 (Needs_Finalization): New routine.
3911 * atree.ads, atree.adb (Elist24): New routine.
3912 (Set_Elist24): New routine.
3913 * atree.h: Add a define clause for Elist24.
3914 * bindgen.adb New library-level variable Lib_Final_Built.
3915 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3916 presence of a VM target, the routine generates calls to the proper
3917 library finalization routine.
3918 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3919 targets. Set the correct library finalization routine depending on
3920 whether the library has controlled objects or this is a VM compilation.
3921 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3922 to library-level finalizers of compiled units in reverse order of
3923 elaboration. It also produces exception management code and reraises a
3924 potential exception after all units have been finalized.
3925 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3926 library-level finalizers of compiled units in reverse order of
3928 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3929 definitions of all library-level finalizers available to the compilation
3930 (Gen_Main_Ada): Directly call Adafinal which now contails all target
3932 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3933 System.Standard_Library.Adafinal directly. If the library needs
3934 finalization actions, create the sequence of finalization calls.
3935 (Gen_Output_File_Ada): Alphabetize local variables and constants.
3936 Generate a with clause for System.Soft_Links when compiling for a VM.
3937 Remove the code which imports System.Standard_Library.Adafinal as
3938 Do_Finalize. Generate the library finalization routine.
3939 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3940 If the library needs finalization actions, create all the definitions
3941 of library- level finalizers.
3942 (Has_Finalizer): New routine. Determines whether at least one compiled
3943 unit has a library-level finalizer.
3944 Add type Qualification_Mode.
3945 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3946 * einfo.adb: New usage of field 15 as Return_Flag.
3947 Remove Finalization_Chain_Entity from the usages of field 19.
3948 Remove Associated_Final_Chain from the usages of field 23.
3949 New usage of field 23 as Associated_Collection.
3950 New usage of field 24 as Finalizer.
3951 New usage of flag 252 as Is_Processed_Transient.
3952 (Associated_Final_Chain): Removed.
3953 (Associated_Collection): New routine.
3954 (Finalization_Chain_Entity): Removed.
3955 (Finalizer): New routine.
3956 (Is_Finalizer): New routine.
3957 (Is_Processed_Transient): New routine.
3958 (Return_Flag): New routine.
3959 (Set_Associated_Final_Chain): Removed.
3960 (Set_Associated_Collection): New routine.
3961 (Set_Finalization_Chain_Entity): Removed.
3962 (Set_Finalizer): New routine.
3963 (Set_Is_Processed_Transient): New routine.
3964 (Set_Return_Flag): New routine.
3965 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3967 (Write_Field8_Name): Alphabetize the output.
3968 (Write_Field11_Name): Alphabetize the output.
3969 (Write_Field12_Name): Alphabetize the output.
3970 (Write_Field13_Name): Alphabetize the output.
3971 (Write_Field14_Name): Alphabetize the output.
3972 (Write_Field15_Name): Alphabetize the output.
3973 (Write_Field16_Name): Alphabetize the output.
3974 (Write_Field17_Name): Alphabetize the output.
3975 (Write_Field18_Name): Alphabetize the output.
3976 (Write_Field19_Name): Alphabetize the output. Remove the output of
3977 Finalization_Chain_Entity.
3978 (Write_Field20_Name): Alphabetize the output.
3979 (Write_Field21_Name): Alphabetize the output.
3980 (Write_Field22_Name): Alphabetize the output.
3981 (Write_Field23_Name): Alphabetize the output. Remove the output of
3982 Associated_Final_Chain. Add output for Associated_Collection.
3983 (Write_Field24_Name): Alphabetize the output.
3984 (Write_Field25_Name): Add output for Finalizer.
3985 (Write_Field26_Name): Alphabetize the output.
3986 (Write_Field27_Name): Alphabetize the output.
3987 (Write_Field28_Name): Alphabetize the output.
3988 * einfo.ads: Add new field description for Associated_Collection and
3990 Remove Associated_Final_Chain and its uses in nodes.
3991 Remove Finalization_Chain_Entity and its uses in nodes.
3992 Add new field description for Finalizer and its uses in nodes.
3993 Add new synthesized attribute Is_Finalizer.
3994 Add new flag description for Is_Processed_Transient and its uses in
3996 Add new field description for Return_Flag and its uses in nodes.
3997 (Associated_Final_Chain): Removed along with its pragma Inline.
3998 (Associated_Collection): New routine and pragma Inline.
3999 (Finalization_Chain_Entity): Removed along with its pragma Inline.
4000 (Finalizer): New routine and pragma Inline.
4001 (Is_Finalizer): New routine and pragma Inline.
4002 (Is_Processed_Transient): New routine and pragma Inline.
4003 (Return_Flag): New routine and pragma Inline.
4004 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4005 (Set_Associated_Collection): New routine and pragma Inline.
4006 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4007 (Set_Finalizer): New routine and pragma Inline.
4008 (Set_Is_Processed_Transient): New routine and pragma Inline.
4009 (Set_Return_Flag): New routine and pragma Inline.
4010 * exp_aggr.adb: Alphabetize subprograms.
4011 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4012 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4013 associated comments. Remove local variables External_Final_List and
4015 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4016 Ancestor. Remove the retrieval of finalization lists. Update the call to
4018 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4019 lists. Update the call to Late_Expansion.
4020 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4021 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4022 (Gen_Assign): Remove the retrieval of the finalization list used to
4023 build the assignment. Update the calls to Make_Init_Call and
4025 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4026 Remove the mechanism to determine attachment levels and finalization
4027 list retrieval. Remove the processing for coextensions.
4028 (Init_Controller): Removed. Controllers no longer exist.
4029 (Late_Expansion): Remove formals Flist and Obj along with their
4030 associated comments. Update the calls to Build_Record_Aggr_Code and
4031 Build_Array_Aggr_Code.
4032 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4033 (Expand_N_Freeze_Entity): Add special processing for finalizers which
4034 appear in entry bodies, protected subprograms and task bodies.
4035 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4036 * exp_ch3.adb (Add_Final_Chain): Removed.
4037 (Build_Array_Init_Proc): Alphabetize local variables.
4038 (Build_Assignment): Alphabetize local variables. Update the call to
4040 (Build_Class_Wide_Master): Rename local variables to better reflect
4042 (Build_Discriminant_Assignments): Code reformatting.
4043 (Build_Init_Call_Thru): Code reformatting.
4044 (Build_Init_Procedure): Code reformatting. Generate a special version
4045 of Deep_Finalize which is capable of finalizing all initialized
4046 components and ignore the rest.
4047 (Build_Init_Statements): Rename local variables to better reflect their
4049 Reimplement the mechanism to include the creation and update of an index
4050 variable called a "counter". It is used as a bookmark for tracing
4051 initialized and non-initialized components.
4052 (Build_Initialization_Call): Remove local variable Controller_Typ.
4053 Alphabetize all local variables. Remove the initialization of the
4054 record controller and update the call to Make_Init_Call.
4055 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4056 New local variable Counter.
4057 (Constrain_Array): Alphabetize.
4058 (Expand_Freeze_Array_Type): Create a collection instead of a
4060 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4061 Finalize_Address which is used in conjunction with allocated controlled
4063 (Expand_N_Object_Declaration): Remove the creation of a finalization
4064 list for anonymous access types. Update the calls to Make_Init_Call and
4066 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4067 retrieval of finalization lists. Remove the expansion of the record
4068 controller. Create TSS primitive Finalize_Address used in conjunction
4069 with controlled objects on the heap. Create finalization collections
4070 for access-to-controlled record components.
4071 (Expand_Record_Controller): Removed.
4072 (Freeze_Type): Remove the freezing of record controllers. Freezing of
4073 class-wide types now requires additional processing. Create
4074 finalization collections for access-to-controlled types.
4075 (Increment_Counter): New routine.
4076 (Make_Counter): New routine.
4077 (Make_Eq_If): Remove the mention of Name_uController.
4078 (Make_Predefined_Primitive_Specs): There is no longer need to skip
4079 types coming from System.Finalization_Root.
4080 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4081 (Predefined_Primitive_Bodies): There is no longer need to skip types
4082 coming from System.Finalization_Root.
4083 (Stream_Operation_OK): Do not generate stream routines for
4084 type Ada.Finalization.Heap_Management.Finalization_Collection.
4085 * exp_ch3.ads: Alphabetize subprograms.
4086 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4087 Add with and use clause for Lib.
4088 (Complete_Coextension_Finalization): Removed.
4089 (Complete_Controlled_Allocation): New routine. Create a finalization
4090 collection for anonymous access-to-controlled types. Create a custom
4091 Allocate which interfaces with the back end and the machinery in
4093 (Expand_Allocator_Expression): Add necessary calls to
4094 Complete_Controlled_Allocation. Remove the retrieval of finalization
4095 lists. Update the calls to Make_Adjust_Call. Generate a call to
4096 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4097 the associated collection.
4098 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4099 Code clean up. Remove the retrieval of finalization lists and
4101 Update the call to Make_Init_Call. Generate a call to
4102 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4103 the associated collection.
4104 (Get_Allocator_Final_List): Removed. Finalization lists are not
4106 (Suitable_Element): Remove the mention of Name_uController.
4107 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4108 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4109 the left hand side, carry out the assignment and adjust the left hand
4111 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4112 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4113 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4114 BIP_Collection and BIPcollection.
4115 (Build_Heap_Allocator): New routine used to allocate the return object
4116 of a build-in-place function onto a collection.
4117 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4118 (Expand_Call): Do not replace direct calls to Deep routines with their
4120 (Expand_N_Extended_Return_Statement): Give all variables shorter names
4121 and update their occurrences. Add a special return flag to monitor the
4122 [ab]normal execution of the function. The flag is set right before the
4124 Rewrite the mechanism used to allocate a build-in-place return object
4125 on the heap or on a storage pool.
4126 (Is_Direct_Deep_Call): New routine.
4127 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4128 build-in-place function call instead of a final list. Build a call to
4129 Set_Finalize_Address_Ptr to decorate the associated collection.
4130 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4131 order to name the build-in-place function call's result for later
4132 finalization. Add a collection to a build-in-place function call
4133 instead of a final list.
4134 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4135 build-in-place function call instead of a final list. Remove the code
4136 which moves one final list and transforms it into the actual in a
4137 nested build-in-place call.
4138 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4139 build-in-place function call instead of a final list.
4140 (Move_Final_List): Removed.
4141 (Needs_BIP_Collection): New routine.
4142 (Needs_BIP_Final_List): Removed.
4143 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4144 enumeration type BIP_Formal_Kind.
4145 Update the related comment.
4146 (Needs_BIP_Collection): New routine.
4147 (Needs_BIP_Final_List): Removed.
4148 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4149 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4150 majority of subprograms in this unit. Add Name_Finalize_Address to
4151 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4152 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4153 statements for an array type.
4154 (Build_Adjust_Statements): Create the adjust statements for a record
4156 (Build_Cleanup_Statements): New routine. A procedure which given any
4157 construct containing asynchronous calls, references to _master, or is a
4158 task body, a task allocation or a protected body produces the necessary
4159 runtime calls to clean up these constructs.
4160 (Build_Exception_Handler): New routine.
4161 (Build_Final_List): Removed.
4162 (Build_Finalization_Collection): New routine. A core procedure which
4163 creates a collection to service heap allocated controlled objects
4164 associated with an access-to-controlled type.
4165 (Build_Finalize_Statements): Create the finalization statements for a
4167 (Build_Finalizer): New routine. A core procedure which given any
4168 construct with declarations and/or statements detects all objects which
4169 need any type of clean up (controlled objects, protected objects) and
4170 generates all necessary code to clean up the said objects in the proper
4172 (Build_Finalizer_Call): New routine.
4173 (Build_Initialize_Statements): Create the initialization statements for
4174 an array type. The generated routine contains code to finalize partially
4176 (Build_Object_Declarations): New routine.
4177 (Build_Raise_Statement): New routine.
4178 (Clean_Simple_Protected_Objects): Removed.
4179 (Controller_Component): Removed.
4180 (Enclosing_Function): New routine.
4181 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4182 either declarations or statements or both.
4183 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4184 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4186 (Find_Final_List): Removed.
4187 (Global_Flist_Ref): Removed.
4188 (In_Finalization_Root): Removed.
4189 (Insert_Actions_In_Scope_Around): Determine the range of the transient
4190 scope in terms of tree nodes. Process all transient variables within
4192 (Make_Adjust_Call): Rewritten. There is no longer an attach call
4193 generated after the adjust.
4194 (Make_Attach_Call): Removed.
4195 (Make_Call): New routine.
4196 (Make_Clean): Removed.
4197 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4199 (Make_Deep_Proc): Rewritten to generate the new profile signature used
4201 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4203 (Make_Final_Call): Modified to simply create a call to either
4204 Deep_Finalize or Finalize.
4205 (Make_Finalize_Address_Body): New routine.
4206 (Make_Finalize_Address_Stmts): New routine. A function which produces
4207 TSS primitive Finalize_Address used in conjunction with heap allocated
4209 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4210 (Make_Init_Call): Rewritten. There is no longer an attach call
4211 generated after initialization.
4212 (Make_Local_Deep_Finalize): New routine.
4213 (Make_Set_Finalize_Address_Ptr_Call): New routine.
4214 (Make_Transient_Block): Remove the finalization list retrieval and
4216 (Needs_Finalization): Moved to Exp_Util.
4217 (Parent_Field_Type): New routine.
4218 (Preprocess_Components): New routine.
4219 (Process_Transient_Objects): New routine.
4220 (Wrap_HSS_In_Block): New routine.
4221 (Wrap_Transient_Declaration): Remove finalization list management and
4222 controller insertion.
4223 (Wrap_Transient_Expression): Code reformatting.
4224 (Wrap_Transient_Statement): Code reformatting.
4225 * exp_ch7.ads (Build_Final_List): Removed.
4226 (Build_Finalization_Collection): New routine.
4227 (Build_Raise_Statement): New routine.
4228 (Controller_Component): Removed.
4229 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4230 (Find_Final_List): Removed.
4231 (In_Finalization_Root): Removed.
4232 (Is_Simple_Protected_Type): Update related comment.
4233 (Make_Adjust_Call): New parameter profile and associated comments.
4234 (Make_Attach_Call): Removed.
4235 (Make_Final_Call): New parameter profile and associated comments.
4236 (Make_Finalize_Address_Body): New routine.
4237 (Make_Init_Call): New parameter profile and associated comments.
4238 (Make_Local_Deep_Finalize): New routine.
4239 (Make_Set_Finalize_Address_Ptr_Call): New routine.
4240 (Needs_Finalization): Moved to Exp_Util.
4241 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4242 (Expand_N_Protected_Body): Remove the handling of finalization lists.
4243 (Find_Protection_Type): Moved to Exp_Util.
4244 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4245 (Make_DT): Update sequence of dispatch table initialization. Remove the
4246 initialization of field RC_Offset. Add initialization of field Needs_
4248 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4249 Reimplement how an object is first finalized, then deallocated.
4250 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4252 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4253 Register TSS_Finalize_Address with type TSS_Names.
4254 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4255 procedure provides the interface between an allocation / deallocation
4256 and the support machinery in Ada.Finalization.Heap_Management.
4257 (Find_Init_Call): Code reformatting.
4258 (Find_Init_Call_In_List): Code reformatting.
4259 (Find_Protection_Type): Moved from Exp_Ch9.
4260 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4261 (Has_Controlled_Coextensions): Removed.
4262 (Has_Controlled_Objects): New routine.
4263 (In_Library_Level_Package_Body): New routine.
4264 (Insert_Action_After): New routine.
4265 (Is_Finalizable_Transient): New routine. This predicate determines
4266 whether an object declaration is one of the many variants of controlled
4268 (Is_Null_Access_BIP_Func_Call): New routine.
4269 (Is_Non_BIP_Func_Call): New routine.
4270 (Is_Related_To_Func_Return): New routine.
4271 (Needs_Finalization): Moved from Exp_Ch7.
4272 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4273 (Find_Protection_Type): Moved from Exp_Ch9.
4274 (Has_Controlled_Coextensions): Removed.
4275 (Has_Controlled_Objects): New routine.
4276 (In_Library_Level_Package_Body): New routine.
4277 (Insert_Action_After): New routine.
4278 (Is_Finalizable_Transient): New routine.
4279 (Is_Null_Access_BIP_Func_Call): New routine.
4280 (Is_Non_BIP_Func_Call): New routine.
4281 (Is_Related_To_Func_Return): New routine.
4282 (Needs_Finalization): Moved from Exp_ch7.
4283 * expander.adb (Expand): Add a case for N_Free_Statement.
4284 * freeze.adb (Freeze_All): Replace the generation of a finalization
4285 list with a collection for access-to-controlled types.
4286 (Freeze_Entity): Code reformatting.
4287 (Freeze_Record_Type): Remove the freezing of a record controller
4289 (Freeze_Subprogram): Code reformatting.
4290 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4292 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4293 has a library-level finalizer.
4294 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4295 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4296 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4297 files. Add a-fihema to the list of object files.
4299 Alphabetize the associations in type Is_Parameterless_Attribute.
4300 * rtsfind.ads: Ada.Finalization_List.Controller and
4301 System.Finalization_Implementation are no longer a GNAT unit.
4302 Update the range of type Ada_Finalization_Child. Remove the following
4303 recoverable entities:
4305 RE_Attach_To_Final_List
4309 RE_Finalizable_Ptr_Ptr
4310 RE_Global_Final_List
4311 RE_Limited_Record_Controller
4314 RE_Record_Controller
4315 RE_Simple_List_Controller
4317 Add the following recoverable entities:
4319 RE_Add_Offset_To_Address
4323 RE_Exception_Identity
4324 RE_Finalization_Collection
4325 RE_Finalization_Collection_Ptr
4326 RE_Needs_Finalization
4327 RE_Save_Library_Occurrence
4328 RE_Set_Finalize_Address_Ptr
4329 RE_Set_Storage_Pool_Ptr
4331 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4333 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4334 (First_Stored_Discriminant): Remove the mention of Name_uController.
4335 * sem_aux.ads: Comment reformatting.
4336 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4337 to redecorate an already existing class-wide type.
4338 (Decorate_Tagged_Type): New parameter profile and associated comment.
4339 Create a "shadow class-wide type" for a shadow entity.
4340 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4341 of the final chain along with the associated comment.
4342 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4343 Full_Desig and set it to the full view of the designated type.
4344 Initialize the finalization collection to empty.
4345 (Build_Derived_Record_Type): Alphabetize local variables. Code
4347 (Collect_Fixed_Components): Remove the mention of Name_uController.
4348 (Create_Constrained_Components): Remove the mention of Name_uController.
4349 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4350 class-wide type of a shadow entity.
4351 (Process_Full_View): Update the machinery which marks type
4352 Limited_Controlled's entity as limited.
4353 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4354 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4355 list, instead make a collection build-in-place formal.
4356 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4357 a designated type in order to establish a match between the renaming
4358 and the renamed entity.
4359 (Find_Selected_Component): Add guard to prevent spurious exceptions
4360 from being raised on .NET/JVM.
4361 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4362 to the list of primitive that need special processing. Update arrays
4363 C_Names and D_Names.
4364 (Replace_Types): Handle class-wide types.
4365 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4366 different parameter profile, look at the first formal.
4367 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4368 use clauses for Exp_Util.
4369 * sem_res.adb: Remove with and use clauses for Elists.
4370 (Propagate_Coextensions): Removed.
4371 (Resolve_Allocator): Do not propagate the list of coextensions from one
4372 allocator to another.
4373 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4374 Deaccessed_T to Desig_Typ.
4375 (Enter_Name): Remove the mention of Name_uController.
4376 (Gather_Components): Remove the mention of Name_uController.
4377 (Incomplete_Or_Private_View): New routine.
4378 (Is_Coextension_Root): Removed.
4379 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4380 * sem_util.ads (Incomplete_Or_Private_View): New routine.
4381 (Is_Coextension_Root): Removed.
4382 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4383 Controlled types are now derived from a null tagged record. Remove
4384 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4385 * sinfo.adb (Coextensions): Removed.
4386 (Set_Coextensions): Removed.
4387 * sinfo.ads: Remove Coextensions from the explanation of node fields
4388 and its uses in nodes.
4389 Update the field usage of N_Allocator.
4390 (Coextensions): Removed along with its pragma Inline.
4391 (Set_Coextensions): Removed along with its pragma Inline.
4392 * snames.ads-tmpl: Remove names
4397 Name_uLocal_Final_List
4398 Name_Finalization_Root
4405 Name_Finalize_Address
4406 * s-pooglo.adb (Allocate): Add overriding indicator.
4407 (Deallocate): Add overriding indicator.
4408 (Storage_Size): Add overriding indicator.
4409 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4410 than Finalize_Global_List.
4411 (Null_Finalize_Global_List): Removed.
4412 (Save_Library_Occurrence): New routine.
4413 * s-soflin.ads: Remove variable Finalize_Global_List along with its
4414 initialization. Add variable Finalize_Library_Objects along with its
4415 pragma Export. Add variables Library_Exception and
4416 Library_Exception_Set along with their pragma Export.
4417 (Null_Finalize_Global_List): Removed.
4418 (Save_Library_Occurrence): New routine.
4419 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4420 rather than Finalize_Global_List.
4421 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4422 of the constructed node.
4424 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4426 * link.c: Include "auto-host.h" before system headers.
4428 2011-08-03 Vincent Celier <celier@adacore.com>
4430 * make.adb (Gnatmake): Add to table Library_Projs only library projects
4431 that are not extended. Do not check if a library project that is
4432 extended should be regenerated. Do not add to table Library_Paths the
4433 libraries that are in extended projects. Link only with libraries that
4434 are in libray projects that are not extended.
4435 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4436 for a library project that is extended.
4438 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4440 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4441 conforming subprogram renamings that appear to be completions if they
4442 are not fully conformant.
4443 Such renamings are homographs but not completions.
4444 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4445 names in a subprogram renaming that appears in an instance.
4447 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4449 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4450 not immutably limited, build actual subtype from expression to provide
4451 proper bounds to caller.
4453 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4455 * sem_ch8.adb: Minor comment correction.
4457 2011-08-03 Thomas Quinot <quinot@adacore.com>
4459 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4460 returning a limited array, use an extended return statement.
4462 2011-08-03 Vincent Celier <celier@adacore.com>
4464 * make.adb (Initialize): If --subdirs= is used, but no project file is
4465 specified, attempt to create the specify subdir if it does not already
4466 exist and use it as the object directory as if -D had been specified.
4468 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4470 * s-tpopsp-vms.adb: New file.
4471 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4472 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4474 2011-08-03 Emmanuel Briot <briot@adacore.com>
4476 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4479 2011-08-03 Yannick Moy <moy@adacore.com>
4481 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4482 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4483 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4484 detect that an array has static bounds.
4486 2011-08-03 Thomas Quinot <quinot@adacore.com>
4488 * exp_dist.adb: Minor reformatting.
4490 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4492 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4493 (ATCB_Key): Removed, not always used.
4495 2011-08-03 Emmanuel Briot <briot@adacore.com>
4497 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4498 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4499 most remaining global variables.
4501 2011-08-03 Robert Dewar <dewar@adacore.com>
4503 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4504 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4507 2011-08-03 Javier Miranda <miranda@adacore.com>
4509 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4510 that must be passed by copy in VM targets.
4512 2011-08-03 Emmanuel Briot <briot@adacore.com>
4514 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4515 duplicates a similar htable now in the project tree.
4517 2011-08-03 Claire Dross <dross@adacore.com>
4519 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4520 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4521 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4522 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4523 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4524 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4525 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4528 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4530 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4531 (ATCB_Key): Removed, not always used.
4532 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4534 * s-tpopsp-tls.adb: New file.
4535 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4536 x86/x64/ia64/powerpc/sparc Linux.
4538 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4540 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4541 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4543 2011-08-03 Thomas Quinot <quinot@adacore.com>
4545 * rtsfind.ads, exp_dist.adb, exp_dist.ads
4546 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4547 Fix type selection for mapping integer types to PolyORB types.
4549 2011-08-03 Bob Duff <duff@adacore.com>
4551 * sem_ch7.adb: Minor comment clarification.
4553 2011-08-03 Bob Duff <duff@adacore.com>
4555 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4556 an error analyzing a choice, skip further processing. Further
4557 processing could cause a crash or cascade errors.
4559 2011-08-03 Emmanuel Briot <briot@adacore.com>
4561 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4562 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4563 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4564 prj-env.ads (Shared_Project_Tree_Data): new type
4565 An aggregate project and its aggregated trees need to share the common
4566 data structures used for lists of strings, packages,... This makes the
4567 code simpler since otherwise we have to pass the root tree (also used
4568 for the configuration file data) in addition to the current project
4569 tree. This also avoids ambiguities as to which tree should be used.
4570 And finally this saves a bit of memory.
4571 (For_Every_Project_Imported): new parameter Tree.
4572 Since aggregated projects are using a different tree, we need to let
4573 the caller know which tree to use to manipulate the returned project.
4575 2011-08-03 Robert Dewar <dewar@adacore.com>
4577 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4578 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4579 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4580 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4582 2011-08-03 Javier Miranda <miranda@adacore.com>
4584 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4585 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4587 2011-08-03 Bob Duff <duff@adacore.com>
4589 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4592 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
4594 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4595 g-sehash.ads: Fix typo. Update header.
4597 2011-08-03 Thomas Quinot <quinot@adacore.com>
4599 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4602 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4604 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4605 prefixes of private types along with records, since the selector may be
4607 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4608 private types along with records, since the selector may be a
4611 2011-08-03 Emmanuel Briot <briot@adacore.com>
4613 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4615 2011-08-03 Javier Miranda <miranda@adacore.com>
4617 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4618 Tagged_Type_Expansion.
4620 2011-08-03 Yannick Moy <moy@adacore.com>
4622 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4623 violation when the argument of concatenation is the name of a
4626 2011-08-03 Emmanuel Briot <briot@adacore.com>
4628 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4629 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4630 (Process_Declarative_Items): new parameter Child_Env.
4632 2011-08-03 Yannick Moy <moy@adacore.com>
4634 * alfa.ads: Update format of ALFA section in ALI file in order to
4635 add a mapping from bodies to specs when both are present.
4636 (ALFA_Scope_Record): Add components for spec file/scope.
4637 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4639 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4640 collected, fill in the spec information when relevant.
4641 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4644 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4646 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4647 code unit to decide whether to add internally generated subprograms.
4649 2011-08-03 Javier Miranda <miranda@adacore.com>
4651 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4652 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4653 be handled by copy in VM targets.
4655 2011-08-03 Emmanuel Briot <briot@adacore.com>
4657 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4658 code with Makeutl.Get_Switches.
4659 * prj-tree.adb: Update comment.
4661 2011-08-03 Thomas Quinot <quinot@adacore.com>
4663 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4664 subprogram with a limited formal that does not support external
4667 2011-08-03 Yannick Moy <moy@adacore.com>
4669 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4671 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4672 not from current unit in two phases, because it is not possible to
4673 change the table while iterating over its content.
4674 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4676 2011-08-03 Sergey Rybin <rybin@adacore.com>
4678 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4679 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4681 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4683 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4684 and the component type is composite, this is ambiguous for predefined
4685 concatenation, but if the node is not overloaded and the entity is a use
4686 -defined function its profile can be used to resolve that aggregate.
4688 2011-08-03 Robert Dewar <dewar@adacore.com>
4690 * exp_ch4.adb: Minor code cleanup.
4692 2011-08-03 Thomas Quinot <quinot@adacore.com>
4694 * exp_dist.adb: Do not generate distribution stubs if serious errors
4695 have been diagnosed.
4697 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4699 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4700 the first formal of a primitive operation, go to the base type to
4701 handle properly an access to a derived type with constrained
4703 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4704 user-defined function that is only use-visible.
4706 2011-08-03 Robert Dewar <dewar@adacore.com>
4708 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4709 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4710 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4711 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4712 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4713 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4714 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4715 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4717 2011-08-03 Robert Dewar <dewar@adacore.com>
4719 * repinfo.adb (List_Mechanism): Add handling of
4720 Convention_Ada_Pass_By_XXX.
4721 * sem_mech.adb (Set_Mechanism): Ditto.
4722 * sem_prag.adb (Process_Convention): Add entries for
4723 Convention_Ada_Pass_By_XXX.
4724 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4726 2011-08-03 Pascal Obry <obry@adacore.com>
4728 * makeutl.adb: Minor reformatting.
4730 2011-08-03 Vincent Celier <celier@adacore.com>
4733 (Get_File_Name) If the file cannot be found when there are no config
4734 pragmas file and May_Fail is True, return No_File instead of the file
4735 name, to be consistent.
4737 2011-08-03 Pascal Obry <obry@adacore.com>
4739 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4742 2011-08-03 Javier Miranda <miranda@adacore.com>
4745 (Same_Representation): In VM targets the representation of arrays with
4746 aliased components differs from arrays with non-aliased components.
4748 2011-08-03 Emmanuel Briot <briot@adacore.com>
4750 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4751 not systematically lower case attribute indexes that contain no "."
4752 Fix definition of several Naming attributes, which take
4753 a unit name as index and therefore should be case insensitive.
4754 Minor refactoring (reduce length of variable names).
4756 2011-08-03 Emmanuel Briot <briot@adacore.com>
4758 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4760 2011-08-03 Emmanuel Briot <briot@adacore.com>
4762 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4763 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4764 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4765 prj-tree.ads (Prj.Tree.Environment): new type.
4767 2011-08-03 Emmanuel Briot <briot@adacore.com>
4769 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4770 prj-tree.adb, prj-tree.ads (Environment): new type.
4772 2011-08-03 Emmanuel Briot <briot@adacore.com>
4774 * prj-tree.ads: Remove unused variable.
4776 2011-08-03 Yannick Moy <moy@adacore.com>
4778 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4779 issuing messages related to SPARK restriction violation.
4781 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4783 * sem_ch6.adb: guard against error nodes in return statements.
4785 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4787 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4788 a warning can only appear on a configuration file, so emit warning
4789 without further checks.
4791 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4793 * s-interr.ads: add overriding keyword.
4795 2011-08-03 Geert Bosch <bosch@adacore.com>
4797 * exp_attr.adb: Fix minor typo.
4799 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4801 * par-ch4.adb: improve error recovery.
4803 2011-08-03 Emmanuel Briot <briot@adacore.com>
4805 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4806 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4809 2011-08-03 Emmanuel Briot <briot@adacore.com>
4811 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4812 "external" as an attribute name in aggregate projects.
4814 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4816 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4817 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4818 from 0, so we need to adjust.
4820 2011-08-03 Emmanuel Briot <briot@adacore.com>
4822 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4823 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4825 2011-08-03 Yannick Moy <moy@adacore.com>
4827 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4828 restriction on overloaded entity if the entity is not an operator.
4830 2011-08-03 Yannick Moy <moy@adacore.com>
4832 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4833 restrict.ads: Rename remaining Check_Formal_Restriction* into
4834 Check_SPARK_Restriction*.
4836 2011-08-03 Emmanuel Briot <briot@adacore.com>
4838 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4839 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4841 (Project_Empty): removed
4842 (Empty_Project): new parameter Qualifier
4843 This is used to have fields specific to aggregate projects, cleaner
4844 New field to store the list of aggregated projects.
4845 (Check_Aggregate_Project): removed
4846 (Process_Aggregated_Projects, Free): new subprograms.
4848 2011-08-03 Olivier Hainque <hainque@adacore.com>
4850 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4852 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4854 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4855 explicit dereference of an unconstrained type, create a constrained
4856 subtype for it, as is done for function calls that return an
4859 2011-08-03 Thomas Quinot <quinot@adacore.com>
4861 * g-pehage.adb (Finalize): Avoid possible double-free.
4863 2011-08-03 Steve Baird <baird@adacore.com>
4865 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4866 Elab_Spec/Body attrs in CodePeer_Mode.
4868 2011-08-03 Javier Miranda <miranda@adacore.com>
4870 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4871 low bound is not known at compile time but they have no others choice.
4872 Done because in this case the bounds can be obtained directly from the
4875 2011-08-03 Ed Falis <falis@adacore.com>
4877 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4878 on VxWorks SMP. Remove unusable constant ANY_CPU.
4880 2011-08-03 Emmanuel Briot <briot@adacore.com>
4882 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4883 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4884 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4885 Prj.Env.Initialize_Empty): new subprograms
4886 (Get_Env, Find_Project): remove parameter Target_Name.
4888 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4890 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4891 as a condition for the delayed call to Derived_Subprograms done for the
4892 case of the rewriting of a derived type that constrains the
4893 discriminants of its parent type.
4894 Avoids redundant subprogram derivations for private subtype derivations.
4896 2011-08-03 Javier Miranda <miranda@adacore.com>
4898 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4899 Build_Record_Aggr_Code.
4900 (Build_Record_Aggr_Code): Add missing support to initialize hidden
4901 discriminants in extension aggregates.
4903 2011-08-03 Emmanuel Briot <briot@adacore.com>
4905 * prj-pp.adb (Print): also output project qualifiers, since in
4906 particular "aggregate" is mandatory in an aggregate project.
4908 2011-08-03 Emmanuel Briot <briot@adacore.com>
4910 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4911 (Debug_Output): new function.
4913 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4915 * gnat_ugn.texi: Document -Wstack-usage.
4916 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4918 2011-08-03 Thomas Quinot <quinot@adacore.com>
4920 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4921 have keyword LIMITED.
4923 2011-08-03 Yannick Moy <moy@adacore.com>
4925 * alfa.adb, alfa.ads, alfa_test.adb: New files.
4926 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4927 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4928 section (does not happen in compiler, only if code directly calls
4930 * get_alfa.adb, get_alfa.ads: New files.
4931 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4933 * lib-xref-alfa.adb: New file.
4934 * lib-xref.adb, lib-xref.ads
4935 (Xref_Entry): redefine information needed in cross-references for ALFA.
4936 Push ALFA treatments in separated local package.
4937 (Enclosing_Subpragram_Or_Package): treat specially subprogram
4938 identifiers. Return entity of package body instead of spec. Return
4939 Empty for a scope with no location.
4940 (Generate_Reference): adapt to new components for ALFA information.
4941 Remove the need for D references on definitions.
4942 (Is_Local_Reference): moved to ALFA local package
4943 (Output_References): extract subfunction as Extract_Source_Name
4944 (Output_Local_References): remove procedure, replaced by filtering of
4945 cross-references in package ALFA and printing in Put_ALFA.
4946 (Write_Entity_Name): remove procedure
4947 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4948 print exact name of entity as it appears in source file
4949 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4950 * put_alfa.adb, put_alfa.ads: New files.
4951 * xref_lib.adb (Search_Xref): protect read of cross-references against
4952 reading other sections of the ALI file, in gnatxref
4953 (Search): protect read of cross-references against reading other
4954 sections of the ALI file, in gnatfind.
4955 * gcc-interface/Make-lang.in: Update dependencies.
4957 2011-08-03 Thomas Quinot <quinot@adacore.com>
4959 * sem_ch3.adb: Minor reformatting.
4961 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4963 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4964 raising an exception.
4966 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4968 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4969 type, always use 1 as the lower bound or string, even if lower bound of
4970 context is not static, to handle properly null strings in a non-static
4973 2011-08-03 Bob Duff <duff@adacore.com>
4975 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4976 always legal on the right-hand side of an assignment statement; there
4977 is always an applicable index constraint in this case. Therefore, the
4978 check for Pkind = N_Assignment_Statement is now unconditional -- it
4979 doesn't depend on whether Is_Constrained (Typ).
4981 2011-08-03 Robert Dewar <dewar@adacore.com>
4983 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4985 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4987 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4988 for an itype created within a generic unit.
4990 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4992 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4993 suppresses all inlining.
4995 2011-08-03 Robert Dewar <dewar@adacore.com>
4997 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4998 exp_aggr.adb: Minor reformatting.
5000 2011-08-03 Thomas Quinot <quinot@adacore.com>
5002 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5003 tagged assignment when discriminant checks are suppressed. This is
5004 useless and extremely costly in terms of static stack usage.
5006 2011-08-03 Bob Duff <duff@adacore.com>
5008 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5009 of generics, because this leads to the wrong entity in the wrong scope,
5010 causing (e.g.) pragma Export_Procedure to get an error if the entity is
5012 (Process_Interface_Name): Follow Alias for instances of generics, to
5013 correct for the above change.
5015 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5017 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5018 is an integer literal it is always safe to replace the reference. In
5019 addition, if the reference appears in the generated code for an object
5020 declaration it is necessary to copy because otherwise the reference
5021 might be to the uninitilized value of the discriminant of the object
5024 2011-08-03 Pascal Obry <obry@adacore.com>
5026 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5027 ACL used, in this case we want to check for ending .exe, not .exe
5028 anywhere in the path.
5030 2011-08-03 Sergey Rybin <rybin@adacore.com>
5032 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5033 the tree structure (semantic decoration of references to record
5036 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5038 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5039 choices of a named array aggregate, bail out when any choices are
5040 marked as Errors_Posted.
5042 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5044 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5045 in which entity is frozen, to handle properly loop variables in
5048 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5050 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5051 subtype is not static, compute the upper bound using attributes, to
5052 handle properly index types that are not integer types.
5054 2011-08-03 Bob Duff <duff@adacore.com>
5056 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5057 Update copyright notice.
5059 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5061 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5062 Original_Discriminant if within an instance.
5063 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5065 2011-08-03 Thomas Quinot <quinot@adacore.com>
5067 * einfo.ads: Minor reformatting.
5069 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5071 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5072 composite type with an unfrozen subcomponent, in the profile of a
5073 primitive operation.
5075 2011-08-03 Robert Dewar <dewar@adacore.com>
5077 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5079 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5081 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5082 unconstrained type with discriminants is initialized with an aggregate,
5083 use the constrained subtype of the aggregate as the type of the object,
5084 because it is immutable, and this allows the back-end to generate no
5085 code for the object declaration.
5087 2011-08-03 Robert Dewar <dewar@adacore.com>
5089 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5090 comparison operand is variable, and turns out to be zero or negative.
5092 2011-08-03 Javier Miranda <miranda@adacore.com>
5095 (Expand_Dispatching_Constructor_Call): Disable expansion of
5096 code required for native targets. Done to avoid generating
5097 references to unavailable runtime entities in VM targets.
5099 (Expand_N_Object_Declaration): Add missing support to handle
5100 the explicit initialization of class-wide interface objects.
5103 2011-08-03 Matthew Heaney <heaney@adacore.com>
5105 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5107 2011-08-03 Matthew Heaney <heaney@adacore.com>
5109 * a-cbdlli.adb (Splice): move source items from first to last
5111 2011-08-03 Yannick Moy <moy@adacore.com>
5113 * sem_util.ads: comment added.
5115 2011-08-03 Javier Miranda <miranda@adacore.com>
5118 (Expand_Record_Aggregate): In VM targets disable the expansion into
5119 assignments of aggregates whose type is not known at compile time.
5121 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5123 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5124 protected entries and task entries, to build the proper renaming
5125 declaration for entry formals, used in debugging.
5126 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5127 parameters in the same way.
5129 2011-08-02 Robert Dewar <dewar@adacore.com>
5131 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5132 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5133 code reorganization.
5135 2011-08-02 Robert Dewar <dewar@adacore.com>
5137 * debug.adb: Debug flag d.P to suppress length comparison optimization
5138 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5139 comparison of Length by comparing First/Last instead.
5141 2011-08-02 Matthew Heaney <heaney@adacore.com>
5143 * a-cobove.ads: Code clean up.
5145 2011-08-02 Vincent Celier <celier@adacore.com>
5147 * adaint.c (file_names_case_sensitive_cache): New static int.
5148 (__gnat_get_file_names_case_sensitive): Cache the return value in
5149 file_names_case_sensitive_cache at the first invocation, to avoid
5150 multiple calls to getenv.
5152 2011-08-02 Bob Duff <duff@adacore.com>
5154 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5156 2011-08-02 Yannick Moy <moy@adacore.com>
5158 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5159 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5160 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5161 indicate that we are in a precondition or postcondition. This is used in
5162 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5163 decide whether to flag the spec or body of the current subprogram as
5166 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
5168 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
5170 * a-extiin.ads: New file.
5172 2011-08-02 Bob Duff <duff@adacore.com>
5174 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5175 now raises Name_Error instead of Use_Error in certain cases. The other
5176 parts of this AI were already implemented properly.
5178 2011-08-02 Vincent Celier <celier@adacore.com>
5180 * link.c: Only import "auto-host.h" when building the gnattools.
5182 2011-08-02 Yannick Moy <moy@adacore.com>
5184 * sem_util.adb: Inter-unit inlining does not work for a subprogram
5185 which calls a local subprogram, so extract subprogram
5186 from Mark_Non_ALFA_Subprogram_Body.
5188 2011-08-02 Javier Miranda <miranda@adacore.com>
5191 (Extract_Dispatching_Call): If the type of the dispatching object is an
5192 access type then return an explicit dereference in the Object out-mode
5195 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5197 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5198 compatibility checks for all indexes of an array subtype, not just the
5199 first. Reset Has_Dynamic_Range_Check on the subtype before each
5200 potential check to ensure that Insert_Range_Checks will not elide any
5201 of the dynamic checks.
5203 2011-08-02 Yannick Moy <moy@adacore.com>
5205 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5206 SPARK restriction at parsing time.
5207 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5208 directive only if the SPARK restriction is set for this unit.
5210 2011-08-02 Yannick Moy <moy@adacore.com>
5212 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5213 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5214 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5215 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5216 Mark_Non_ALFA_Subprogram_Body.
5217 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5220 2011-08-02 Yannick Moy <moy@adacore.com>
5222 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5225 2011-08-02 Robert Dewar <dewar@adacore.com>
5227 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5228 exp_ch3.adb: Minor reformatting.
5230 2011-08-02 Emmanuel Briot <briot@adacore.com>
5232 * adaint.c (__gnat_locate_exec_on_path): only returns executable
5233 files, not any regular file.
5234 (__gnat_locate_file_with_predicate): new subprogram.
5236 2011-08-02 Yannick Moy <moy@adacore.com>
5238 * sinfo.adb, sinfo.ads: Restrict the use of flags
5239 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5240 nodes, plus N_Subtype_Declaration for the 2nd one.
5242 2011-08-02 Sergey Rybin <rybin@adacore.com>
5244 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5245 - fix bugs in the description of Source_Trace;
5246 - get rid of UNIT_NAME;
5248 2011-08-02 Javier Miranda <miranda@adacore.com>
5251 (Build_Dispatching_Requeue): Adding support for VM targets
5252 since we cannot directly reference the Tag entity.
5253 * exp_sel.adb (Build_K): Adding support for VM targets.
5254 (Build_S_Assignment): Adding support for VM targets.
5256 (Default_Prim_Op_Position): In VM targets do not restrict availability
5257 of predefined interface primitives to compiling in Ada 2005 mode.
5258 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5259 restricted to compiling in Ada 2005 mode.
5260 (Make_VM_TSD): Generate code that declares and initializes the OSD
5261 record. Needed to support dispatching calls through synchronized
5264 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5265 primitives associated with synchronized interfaces.
5266 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5267 primitives associated with synchronized interfaces.
5269 2011-08-02 Yannick Moy <moy@adacore.com>
5271 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5272 statements hidden in SPARK if preceded by the HIDE directive
5273 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5274 exception handlers as hidden in SPARK if preceded by the HIDE directive
5275 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5276 if starting with the HIDE directive
5277 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5278 starting with the HIDE directive; mark the declarations in a private
5279 part as hidden in SPARK if the private part starts with the HIDE
5281 * restrict.adb, restrict.ads
5282 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5283 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5284 argument node belongs to a part which is hidden in SPARK
5285 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5286 parts in SPARK; protect the possibly costly call to
5287 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5288 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5289 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5290 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5292 (Scan): recognize special comment starting with '#' and followed by
5293 SPARK keyword "hide" as a HIDE directive.
5295 2011-08-02 Yannick Moy <moy@adacore.com>
5297 * types.ads, erroutc.ads: Minor reformatting.
5299 2011-08-02 Vincent Celier <celier@adacore.com>
5301 * link.c: Add response file support for cross platforms.
5303 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5305 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5306 in an association, set parent field of copy before partial analysis.
5307 * sem_res.adb (Resolve_Slice): create reference to itype only when
5308 expansion is enabled.
5310 2011-08-02 Yannick Moy <moy@adacore.com>
5312 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5313 for new flag denoting which subprogram bodies are in ALFA
5314 * restrict.adb, sem_ch7.adb: Update comment
5315 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5316 sem_ch9.adb, sem_res.adb: Add calls to
5317 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5318 * sem_ch6.adb (Analyze_Function_Return): add calls to
5319 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5320 middle of the body, and extended return.
5321 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5322 False when missing return.
5323 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5324 to True for subprograms whose spec is in ALFA. Remove later on the flag
5325 on the entity used for a subprogram body when there exists a separate
5327 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5328 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5329 False, otherwise do nothing.
5331 2011-08-02 Robert Dewar <dewar@adacore.com>
5333 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5335 2011-08-02 Yannick Moy <moy@adacore.com>
5337 * sem_ch4.ads: minor formatting.
5339 2011-08-02 Yannick Moy <moy@adacore.com>
5341 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5342 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5343 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5344 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5345 opt.ads: cleanup of SPARK mode
5347 2011-08-02 Yannick Moy <moy@adacore.com>
5349 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5351 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5352 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5354 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5355 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5356 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5357 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5359 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5361 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5362 functions whose return type is not in ALFA.
5363 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5365 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5366 parameter's type is not in ALFA.
5367 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5372 * sem_ch6 (Analyze_Expression_Function): treat the function as
5373 Inline_Always, and introduce a subprogram declaration for it when it is
5375 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5376 expression functions, so that the back-end can determine whether they
5377 can in fact be inlined.
5378 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5379 a function body comes from an expression function.
5381 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5383 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5384 null exclusions to test Can_Never_Be_Null on the anonymous access types
5385 of the formals rather than testing the formals themselves. Exclude this
5386 check in cases where the Old_Formal is marked as a controlling formal,
5387 to avoid issuing spurious errors for bodies completing dispatching
5388 operations (due to the flag not getting set on controlling access
5389 formals in body specs).
5390 (Find_Corresponding_Spec): When checking full and subtype conformance of
5391 subprogram bodies in instances, pass Designated and E in that order, for
5392 consistency with the expected order of the formals (New_Id followed by
5395 2011-08-02 Robert Dewar <dewar@adacore.com>
5397 * sem_ch8.adb: Minor reformatting.
5399 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5401 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5402 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5403 primitive operations of class-wide actuals.
5405 2011-08-02 Javier Miranda <miranda@adacore.com>
5407 * exp_atag.ads, exp_atag.adb
5408 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5409 since its value is implicitly passed in argument Typ.
5410 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5411 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5412 Build_Common_Dispatching_Select_Statements.
5414 2011-08-02 Robert Dewar <dewar@adacore.com>
5416 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5417 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5420 2011-08-02 Robert Dewar <dewar@adacore.com>
5422 * sem_res.adb: Minor reformatting.
5423 * sem_prag.adb: Minor reformatting.
5425 2011-08-02 Javier Miranda <miranda@adacore.com>
5427 * exp_atag.adb, exp_atags.ads
5428 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5429 by the tagged type Entity. Required to use this routine in the VM
5430 targets since we do not have available the Tag entity in the VM
5433 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5434 Ada.Tags has not been previously loaded.
5436 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5437 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5439 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5440 view of enclosing scopes. Required to handle enclosing scopes that
5441 are synchronized types whose full view is a task type.
5443 (Build_VM_TSDs): Minor code improvement to avoid generating and
5444 analyzing lists with empty nodes.
5445 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5446 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5447 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5448 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5449 (Make_Select_Specific_Data_Table): Add support for VM targets.
5450 (Make_VM_TSD): Generate code to initialize the SSD structure of
5453 2011-08-02 Yannick Moy <moy@adacore.com>
5455 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5456 cross-references section in ALI.
5457 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5458 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5460 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5461 subprogram or package entity of a node
5462 (Is_Local_Reference_Type): new function returns True for references
5463 selected in local cross-references.
5464 (Lt): function extracted from Lt in Output_References
5465 (Write_Entity_Name): function extracted from Output_References
5466 (Generate_Definition): generate reference with type 'D' for definition
5467 of objects (object declaration and parameter specification), with
5468 appropriate locations and units, for use in local cross-references.
5469 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5470 references of type 'I' for initialization in object definition.
5471 (Output_References): move part of function Lt and procedure
5472 Write_Entity_Name outside of the body. Ignore references of types 'D'
5473 and 'I' introduced for local cross-references.
5474 (Output_Local_References): new procedure to output the local
5475 cross-references sections.
5476 (Lref_Entity_Status): new array defining whether an entity is a local
5477 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5478 with 'I' type when initialization expression is present.
5479 * get_scos.adb, get_scos.ads: Correct comments and typos
5481 2011-08-02 Javier Miranda <miranda@adacore.com>
5483 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5485 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5487 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5490 2011-08-02 Vincent Celier <celier@adacore.com>
5492 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5493 (No_Space_Img): New function
5494 (Find_Excluded_Sources): When reading from a file, record the file name
5495 and the line number for each excluded source.
5496 (Mark_Excluded_Sources): When reporting an error, if the excluded
5497 sources were read from a file, include file name and line number in
5500 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5502 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5504 2011-08-02 Robert Dewar <dewar@adacore.com>
5506 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5508 2011-08-02 Javier Miranda <miranda@adacore.com>
5510 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5511 generation of TSDs to the DOTNET compiler.
5512 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5513 generation of TSDs to the DOTNET compiler.
5515 2011-08-02 Javier Miranda <miranda@adacore.com>
5517 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5518 record of all the tagged types declared inside library level package
5519 declarations, library level package bodies or library level subprograms.
5520 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5521 associated with a given tagged type.
5522 (Build_VM_TSDs): New subprogram.
5523 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5524 compilation units that are subprograms.
5525 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5526 compilation units that are package bodies.
5527 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5528 units that are a package declaration or a package instantiation.
5529 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5530 reorganization to improve the error generated by the frontend when the
5531 function Ada.Tags.Secondary_Tag is not available.
5532 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5533 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5535 2011-08-02 Javier Miranda <miranda@adacore.com>
5537 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5539 2011-08-02 Robert Dewar <dewar@adacore.com>
5541 * s-imenne.ads: Minor reformatting.
5543 2011-08-02 Robert Dewar <dewar@adacore.com>
5545 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5546 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5547 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5549 2011-08-02 Robert Dewar <dewar@adacore.com>
5551 * einfo.ads (Materialize_Entity): Document this is only for renamings
5552 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5553 required debug information in the case where we transform the object
5554 declaration into a renaming declaration.
5555 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5557 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5560 2011-08-02 Robert Dewar <dewar@adacore.com>
5562 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5563 Suppress_Init_Procs.
5564 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5565 Suppress_Initialization/Initialization_Suppressed.
5566 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5567 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5568 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5569 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5571 2011-08-02 Robert Dewar <dewar@adacore.com>
5573 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5576 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5578 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5579 only have inheritable classwide pre/postconditions.
5581 2011-08-02 Javier Miranda <miranda@adacore.com>
5583 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5584 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5585 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5586 checks if the external tag of a type is the same as the external tag
5587 of some other declaration.
5589 2011-08-02 Thomas Quinot <quinot@adacore.com>
5591 * s-taskin.ads: Minor reformatting.
5593 2011-08-02 Emmanuel Briot <briot@adacore.com>
5595 * g-comlin.adb (Display_Help): swap the order in which it prints the
5596 short help and the general usage.
5598 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5600 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5601 the aspect declarations and attach them to the generic copy for
5602 subsequent analysis.
5603 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5604 declarations of the generic tree to the new subprogram declarations.
5605 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5606 conditions that apply to a subprogram instance.
5608 2011-08-02 Robert Dewar <dewar@adacore.com>
5610 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5612 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5614 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5615 private type with a tagged full view is not derived in the immediate
5616 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5618 2011-08-02 Robert Dewar <dewar@adacore.com>
5620 * exp_ch4.adb: Minor reformatting.
5622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5624 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5625 Ada2012 iterator, the loop will be rewritten during expansion into a
5626 while loop with a cursor and an element declaration. Do not analyze the
5627 body in this case, because if the container is for indefinite types the
5628 actual subtype of the elements will only be determined when the cursor
5629 declaration is analyzed.
5631 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5633 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5634 size/alignment related attributes in CodePeer_Mode.
5636 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5638 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5639 Prepend_Element, since this can result in the operation getting the
5640 wrong slot in the full type's dispatch table if the full type has
5641 inherited operations. The incomplete type's operation will get added
5642 to the proper position in the full type's primitives
5643 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5644 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5645 dispatching operations, since there are cases where nonprimitive
5646 subprograms can get added to the list of incomplete dependents (such
5647 as subprograms in nested packages).
5648 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5649 private part when determining whether to add a primitive with a
5650 parameter of a tagged incomplete type to the Private_Dependents list.
5651 Such primitives can also occur in the visible part, and should not have
5652 been excluded from being private dependents.
5653 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5654 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5655 list of a Taft-amendment incomplete type is a primitive before issuing
5656 an error that the full type must appear in the same unit. There are
5657 cases where nonprimitives can be in the list (such as subprograms in
5659 * sem_disp.adb (Derives_From): Use correct condition for checking that
5660 a formal's type is derived from the type of the corresponding formal in
5661 the parent subprogram (the condition was completely wrong). Add
5662 checking that was missing for controlling result types being derived
5663 from the result type of the parent operation.
5665 2011-08-02 Yannick Moy <moy@adacore.com>
5667 * errout.adb (First_Node): minor renaming
5668 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5671 2011-08-02 Yannick Moy <moy@adacore.com>
5673 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5674 before accessing operands.
5675 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5676 decide whether an initialization expression respects SPARK rules, as
5677 the plain node is the expanded one. This allows for more valid warnings
5679 * gnat_rm.texi: Minor update.
5681 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5683 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5686 2011-08-02 Robert Dewar <dewar@adacore.com>
5688 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5690 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5692 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5693 loop statements and the element renaming declaration with a block when
5694 the element type is controlled.
5696 2011-08-02 Yannick Moy <moy@adacore.com>
5698 * sinfo.ads: Minor formatting.
5700 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5702 * sem_aggr.adb (Add_Association): if the association has a box and no
5703 expression, use the Sloc of the aggregate itself for the new
5705 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5708 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5710 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5711 When a container is provided via a function call, generate a renaming
5712 of the function result. This avoids the creation of a transient scope
5713 and the premature finalization of the container.
5714 * exp_ch7.adb (Is_Container_Cursor): Removed.
5715 (Wrap_Transient_Declaration): Remove the supression of the finalization
5716 of the list controller when the declaration denotes a container cursor,
5719 2011-08-02 Yannick Moy <moy@adacore.com>
5721 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5722 node is from source, instead of the original node being from source.
5724 (Resolve_Array_Aggregate): refine the check for a static expression, to
5725 recognize also static ranges
5726 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5727 Array_Type_Declaration): postpone the test for the type being a subtype
5728 mark after the type has been resolved, so that component-selection and
5729 expanded-name are discriminated.
5730 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5731 to distinguish the case of an iteration scheme, so that an error is
5732 issed on a non-static range in SPARK except in an iteration scheme.
5733 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5734 In_Iter_Schm = True.
5735 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5736 user-defined operators so that they are allowed in renaming
5738 (Find_Selected_Component): refine the check for prefixing of operators
5739 so that they are allowed in renaming. Move the checks for restrictions
5740 on selector name after analysis discriminated between
5741 component-selection and expanded-name.
5742 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5743 concatenation argument of string type if it is static.
5744 * sem_util.adb, sem_util.ads
5745 (Check_Later_Vs_Basic_Declarations): add a new function
5746 Is_Later_Declarative_Item to decice which declarations are allowed as
5747 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5748 mode, add that renamings are considered as later items.
5749 (Enclosing_Package): new function to return the enclosing package
5750 (Enter_Name): correct the rule for homonyms in SPARK
5751 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5752 from source (result of expansion) to avoid issuing wrong warnings.
5754 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5756 * errout.adb: On anything but an expression First_Node returns its
5759 2011-08-02 Pascal Obry <obry@adacore.com>
5761 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5763 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5765 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5766 Set the associated loop as the related expression of internally
5768 * exp_ch7.adb (Is_Container_Cursor): New routine.
5769 (Wrap_Transient_Declaration): Supress the finalization of the list
5770 controller when the declaration denotes a container cursor.
5772 2011-08-02 Yannick Moy <moy@adacore.com>
5774 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5776 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5777 expression is a simple expression. This check cannot be performed in
5778 the semantics, so just drop it.
5779 (P_Index_Or_Discriminant_Constraint): move check that the index or
5780 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5781 semantics. Other cases were previously checked in the semantics.
5782 * par-ch4.adb (P_Name): move checks that a selector name is not
5783 character literal or an operator symbol to Find_Selected_Component in
5785 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5786 declarations are not placed after later declarations in a separate
5787 procedure in Sem_Util (possibly not the best choice?), to be used both
5788 during parsing, for Ada 83 mode, and during semantic analysis, for
5790 * par-endh.adb (Check_End): move check that end label is not missing
5791 to Process_End_Label in the semantics
5792 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5793 the special case for SPARK restriction
5794 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5795 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5796 parameter Force to issue the error message even on internal node (used
5797 for generated end label). Call Check_Restriction to check when an error
5798 must be issued. In SPARK mode, issue an error message even if the
5799 restriction is not set.
5800 (Check_Restriction): new procedure with an additional out parameter to
5801 inform the caller that a message has been issued
5802 * sem_aggr.adb: Minor modification of message
5803 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5804 instead of issuing an error message directly
5805 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5806 declarations are not placed after later declarations, by calling
5807 Check_Later_Vs_Basic_Declarations
5808 (Analyze_Subtype_Declaration): move here the check that an index or
5809 discriminant constraint must be a subtype mark. Change the check that
5810 a subtype of String must start at one so that it works on subtype marks.
5811 * sem_ch4.adb (Analyze_Call): move here the check that a named
5812 association cannot follow a positional one in a call
5813 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5814 instead of issuing an error message directly
5815 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5816 selector name is not a character literal or an operator symbol. Move
5817 here the check that the prefix of an expanded name cannot be a
5818 subprogram or a loop statement.
5819 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5820 procedure called from parsing and semantics to check that basic
5821 declarations are not placed after later declarations
5822 (Process_End_Label): move here the check that end label is not missing
5824 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5826 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5827 representation clause in codepeer mode, since it confuses CodePeer and
5828 does not bring useful info.
5830 2011-08-02 Ed Falis <falis@adacore.com>
5832 * init.c: initialize fp hw on MILS.
5834 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5836 * errout.adb (First_Node): for bodies, return the node itself (small
5837 optimization). For other nodes, do not check source_unit if the node
5838 comes from Standard.
5840 2011-08-02 Robert Dewar <dewar@adacore.com>
5842 * exp_ch3.adb: Minor comment additions.
5843 * sem_ch13.adb: Minor reformatting.
5845 2011-08-02 Pascal Obry <obry@adacore.com>
5847 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5849 2011-08-02 Robert Dewar <dewar@adacore.com>
5851 * sem_attr.adb: Minor reformatting.
5853 2011-08-02 Robert Dewar <dewar@adacore.com>
5855 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5856 (Has_Default_Component_Value): Removed
5857 * einfo.ads Comment updates
5858 (Has_Default_Aspect): Replaces Has_Default_Value
5859 (Has_Default_Component_Value): Removed
5861 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5863 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5864 (Get_Simple_Init_Val): Handle Default_Value aspect
5865 (Needs_Simple_Initialization): Handle Default_Value aspect
5866 * exp_ch3.ads: Needs_Simple_Initialization
5867 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5868 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5870 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5871 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5872 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5874 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5876 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5877 package containing iteration primitives.
5878 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5880 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5882 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5883 "of", pre-analyze expression in case it is a function call with
5884 finalization actions that must be placed ahead of the loop.
5885 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5886 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5888 2011-08-02 Geert Bosch <bosch@adacore.com>
5890 * cstand.adb (Create_Float_Types): Only consider C's long double for
5891 Long_Long_Float, in addition to double.
5893 2011-08-02 Robert Dewar <dewar@adacore.com>
5895 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5896 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5897 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5902 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5905 2011-08-02 Javier Miranda <miranda@adacore.com>
5907 * einfo.ads, einfo.adb
5908 (Original_Access_Type): Move this attribute to Node26 since there was
5909 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5910 which causes conflicts and breaks the generation of the .NET compiler.
5911 (Interface_Name): Add missing documentation on JGNAT only uses of
5914 2011-08-02 Geert Bosch <bosch@adacore.com>
5916 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5917 (Find_Back_End_Float_Type): Likewise
5918 (Create_Back_End_Float_Types): Likewise
5919 (Create_Float_Types): Likewise
5920 (Register_Float_Type): Likewise
5921 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5922 Nlist and split out type selection in new local Find_Base_Type function.
5923 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5925 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5927 2011-08-02 Robert Dewar <dewar@adacore.com>
5929 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5931 * opt.ads: Minor comment change.
5932 * sem_ch12.adb: Minor code reorganization.
5934 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5936 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5937 subtype's list of rep items to the list on the full subtype in the case
5938 where the lists are the same.
5940 2011-08-02 Geert Bosch <bosch@adacore.com>
5942 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5943 using the one from System.Strings, which also deallocates all strings.
5945 2011-08-02 Geert Bosch <bosch@adacore.com>
5947 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5949 * gcc-interface/Make-lang.in: Update dependencies.
5951 2011-08-02 Olivier Hainque <hainque@adacore.com>
5953 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5956 2011-08-02 Javier Miranda <miranda@adacore.com>
5958 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5959 associated with anonymous access to subprograms.
5961 2011-08-02 Geert Bosch <bosch@adacore.com>
5964 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5965 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5966 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5967 (Add_Symbol_Definition): Move to switch-c.adb
5968 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5969 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5970 (Add_Symbol_Definition): Move to switch-c.adb.
5971 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5973 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5975 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5976 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5978 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5979 (Add_Symbol_Definition): Moved from Prepcomp.
5980 * switch-c.ads: Update copyright notice. Use String_List instead of
5981 Argument_List, removing dependency on System.OS_Lib.
5983 2011-08-02 Yannick Moy <moy@adacore.com>
5985 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5986 mode on initialization expression which does not respect SPARK
5988 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5989 if the tree referenced by its argument represents an initialization
5990 expression in SPARK, suitable for initializing an object in an object
5993 2011-08-02 Javier Miranda <miranda@adacore.com>
5995 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5996 internally generated access to subprogram with its associated protected
5998 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6000 2011-08-02 Geert Bosch <bosch@adacore.com>
6002 * cstand.adb (Register_Float_Type): Print information about type to
6003 register, if the Debug_Flag_Dot_B is set.
6004 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6005 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6006 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6007 with a requested precision of more than Max_Digits digits and no more
6008 than Max_Base_Digits digits, if a range specification is present and the
6009 Predefined_Float_Types list has a suitable type to derive from.
6010 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6011 case of type completion with pragma Import
6013 (Process_Import_Predefined_Type): Processing to complete a type
6014 with pragma Import. Currently supports floating point types only.
6015 (Set_Convention_From_Pragma): Do nothing without underlying type.
6016 (Process_Convention): Guard against absence of underlying type,
6017 which may happen when importing incomplete types.
6018 (Process_Import_Or_Interface): Handle case of importing predefined
6019 types. Tweak error message.
6021 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6023 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6024 functions to previous change. Reorganize code slightly.
6026 2011-08-02 Geert Bosch <bosch@adacore.com>
6028 * back_end.ads (Register_Type_Proc): New call back procedure type for
6029 allowing the back end to provide information about available types.
6030 (Register_Back_End_Types): New procedure to register back end types.
6031 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6033 * cstand.adb (Back_End_Float_Types): New list for floating point types
6034 supported by the back end.
6035 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6036 (Copy_Float_Type): New procedure to make new copies of predefined types.
6037 (Register_Float_Type): New call back procedure to populate the BEFT list
6038 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6039 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6040 (Create_Float_Types): New procedure to create entities for floating
6041 point types predefined in Standard, and put these and any remaining
6042 BEFTs on the Predefined_Float_Types list.
6043 * stand.ads (Predefined_Float_Types): New list for predefined floating
6044 point types that do not have declarations in package Standard.
6046 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6048 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6049 entity node for the unit containing the parameter.
6050 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6051 (Add_Inlined_Subprogram): Likewise.
6052 * gcc-interface/Make-lang.in: Update dependencies.
6054 2011-08-02 Thomas Quinot <quinot@adacore.com>
6056 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6059 2011-08-02 Geert Bosch <bosch@adacore.com>
6061 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6063 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6065 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6066 computed value of Base_Type.
6068 2011-08-02 Yannick Moy <moy@adacore.com>
6070 * restrict.adb (Check_Restriction): issue an error for any use of
6071 class-wide, even if the No_Dispatch restriction is not set.
6072 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6073 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6074 when completing a private extension, the type named in the private part
6075 is not the same as that named in the visible part.
6076 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6077 of an inherited primitive operations of a tagged type or type extension
6078 that returns the tagged type.
6079 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6080 function which returns True for an implicit operation inherited by the
6081 derived type declaration for the argument type.
6082 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6085 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6087 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6088 Process_Bounds, to perform analysis with expansion of a range or an
6089 expression that is the iteration scheme for a loop.
6090 (Analyze_Iterator_Specification): If domain of iteration is given by a
6091 function call with a controlled result, as is the case if call returns
6092 a predefined container, ensure that finalization actions are properly
6094 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6096 2011-08-02 Javier Miranda <miranda@adacore.com>
6098 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6099 * gcc-interface/Make-lang.in: Update dependencies.
6101 2011-08-02 Javier Miranda <miranda@adacore.com>
6103 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6104 determine if the analysis is performed using N or Original_Node (N).
6105 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6106 functionality of routine Is_Variable avoids code duplication.
6107 * checks.adb (Determine_Range): Handle temporaries generated by
6108 Remove_Side_Effects.
6110 2011-08-02 Javier Miranda <miranda@adacore.com>
6112 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6113 expansion of the condition. Required since the previous analysis was
6114 done with expansion disabled (see Resolve_Quantified_Expression) and
6115 hence checks were not inserted and record comparisons have not been
6118 2011-08-02 Ed Falis <falis@adacore.com>
6120 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6123 2011-08-02 Bob Duff <duff@adacore.com>
6125 * opt.ads: Minor comment fix.
6127 2011-08-02 Bob Duff <duff@adacore.com>
6129 * sem_ch12.adb (Analyze_Package_Instantiation,
6130 Analyze_Subprogram_Instantiation): Turn off style checking while
6131 analyzing an instance. Whatever style checks that apply to the generic
6132 unit should apply, so it makes no sense to apply them in an instance.
6133 This was causing trouble when compiling an instance of a runtime
6134 unit that violates the -gnatyO switch.
6135 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6136 one of the two case statements, causing spurious errors.
6138 2011-08-02 Robert Dewar <dewar@adacore.com>
6140 * uname.adb: Minor reformatting.
6141 * gnatcmd.adb: Minor reformatting.
6142 * exp_attr.adb: Minor reformatting.
6144 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6146 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6147 No_Dispatching_Calls, do not look for the Assign primitive, because
6148 predefined primitives are not created in this case.
6150 2011-08-02 Bob Duff <duff@adacore.com>
6152 * stylesw.ads: Minor comment fixes.
6154 2011-08-02 Robert Dewar <dewar@adacore.com>
6156 * freeze.adb (Add_To_Result): New procedure.
6158 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6160 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6161 time, if the specific run-time routines for handling streams of strings
6162 are not available, use the default mechanism.
6164 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6166 * s-regpat.ads: Fix typo.
6168 2011-08-02 Vincent Celier <celier@adacore.com>
6170 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6171 not null, call it to create the in memory config project file without
6172 parsing an existing default config project file.
6174 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6176 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6180 * sem_elim.adb: an abstract subprogram does not need an eliminate
6181 pragma for its descendant to be eliminable.
6183 2011-08-02 Ed Falis <falis@adacore.com>
6185 * init.c: revert to handling before previous checkin for VxWorks
6186 * s-intman-vxworks.adb: delete unnecessary declarations related to
6187 using Ada interrupt facilities for handling signals.
6188 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6189 * s-intman-vxworks.ads: Import __gnat_install_handler as
6190 Initialize_Interrupts.
6191 * s-taprop-vxworks.adb: Delete Signal_Mask.
6192 (Abort_Handler): change construction of mask to unblock exception
6195 2011-08-02 Jerome Guitton <guitton@adacore.com>
6197 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6198 Debug_Raise_Exception before propagation starts.
6200 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6202 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6203 to Restriction_Check_Required.
6204 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6205 * sem_res.adb (Resolve_Call): Likewise.
6206 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6208 2011-08-02 Bob Duff <duff@adacore.com>
6210 * stylesw.ads: Update comment.
6211 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6212 * errout.ads: Remove obsolete comment.
6214 2011-08-02 Javier Miranda <miranda@adacore.com>
6216 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6217 (Set_Is_Safe_To_Reevaluate): new procedure.
6218 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6219 assignment is allowed on safe-to-reevaluate variables.
6220 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6221 temporary created to remove side effects in expressions that use
6222 the secondary stack as safe-to-reevaluate.
6223 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6224 variables that are not true constants.
6226 2011-08-02 Robert Dewar <dewar@adacore.com>
6228 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6229 sem_res.adb, sem_ch6.adb: Minor reformatting.
6231 2011-08-02 Jerome Guitton <guitton@adacore.com>
6233 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6235 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6237 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6238 not set Overridden_Operation if subprogram is an initialization
6241 2011-08-02 Yannick Moy <moy@adacore.com>
6243 * par-ch6.adb: Correct obsolete name in comments
6244 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6245 which takes two message arguments (existing function takes one), with
6246 second message used for continuation.
6247 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6248 block statements that originate from a source block statement, not
6249 generated block statements
6250 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6251 symmetry with procedure case
6252 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6253 function to issue an error in formal mode if a package specification
6254 contains more than one tagged type or type extension.
6255 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6256 parameters matching formals of tagged types are objects (or ancestor
6257 type conversions of objects), not general expressions. Issue an error
6258 on view conversions that are not involving ancestor conversion of an
6260 (Resolve_Type_Conversion): in formal mode, issue an error on the
6261 operand of an ancestor type conversion which is not an object
6262 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6263 procedure so that it works also for actuals of function calls
6264 (Is_Actual_Tagged_Parameter): new function which determines if its
6265 argument is an actual parameter of a formal of tagged type in a
6267 (Is_SPARK_Object_Reference): new function which determines if the tree
6268 referenced by its argument represents an object in SPARK
6270 2011-08-02 Robert Dewar <dewar@adacore.com>
6272 * sem_ch3.adb: Minor reformatting
6273 Minor comment addition
6274 Minor error msg text change
6276 2011-08-02 Javier Miranda <miranda@adacore.com>
6278 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6279 function. Used to be more precise when we generate a variable plus one
6280 assignment to remove side effects in the evaluation of the Bound
6282 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6283 of the bound expression to force its re-analysis and thus expand the
6284 associated transient scope (if required). Code cleanup replacing the
6285 previous code that declared the constant entity by an invocation to
6286 routine Force_Evaluation which centralizes this work in the frontend.
6288 2011-08-02 Robert Dewar <dewar@adacore.com>
6290 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6291 (Base_Type): Now uses improved Is_Base_Type function
6292 * einfo.ads (Base_Type): Inline this function
6294 2011-08-02 Robert Dewar <dewar@adacore.com>
6296 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6297 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6299 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6301 * gcc-interface/Make-lang.in: Update dependencies.
6302 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6305 2011-08-02 Yannick Moy <moy@adacore.com>
6307 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6308 non-simple expression used in delta constraint
6309 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6310 index constraint which is not a subtype mark
6311 * par.adb: With and use Restrict
6312 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6313 mode on component type which is not a subtype mark and default
6314 expression on component
6315 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6316 of string which does not have a lower index bound equal to 1
6317 (Array_Type_Declaration): issue an error in formal mode on index or
6318 component type which is not a subtype mark, and on aliased keyword on
6320 (Derived_Type_Declaration): issue an error in formal mode on interface,
6321 limited or abstract type
6322 (Record_Type_Declaration): issue an error in formal mode on interface
6323 (Record_Type_Definition): issue an error in formal mode on tagged types
6324 and type extensions not declared in the specification of a library unit
6325 package; on null non-tagged record; on variant part
6327 2011-08-02 Vincent Celier <celier@adacore.com>
6329 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6330 not declared for qualified library project when Library_Name is not
6331 declared, but Library_Dir is.
6333 2011-08-02 Robert Dewar <dewar@adacore.com>
6335 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6336 pragmas (affects aspects [Component_]Default_Value
6337 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6338 component type for the resolution
6340 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6342 * einfo.adb (Base_Type): Tune implementation for speed.
6344 2011-08-02 Robert Dewar <dewar@adacore.com>
6346 * freeze.adb: Minor reformatting.
6348 2011-08-02 Thomas Quinot <quinot@adacore.com>
6350 * scos.ads: Update comments.
6352 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6354 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6355 base type, because the parent may be a subtype of a private type whose
6356 convention is established in a private part.
6358 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6360 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6361 statement in a block when the expansion of the return expression has
6362 created a finalization chain.
6363 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6364 with the parent node.
6365 Add N_Extended_Return_Statement to handle the case where a transient
6366 object declaration appears in the Return_Object_Declarations list of
6367 an extended return statement.
6369 2011-08-02 Matthew Gingell <gingell@adacore.com>
6371 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6372 unused parameter 'name'.
6374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6376 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6377 inherited operation, check whether its alias, which is the source
6378 operastion that it renames, has been marked eliminated.
6380 2011-08-02 Javier Miranda <miranda@adacore.com>
6382 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6383 in-mode parameter whose type is an access type since it can be used to
6384 modify its designated object. Enforce code that handles as safe an
6385 access type that is not access-to-constant but it is the result of a
6386 previous removal of side-effects.
6387 (Remove_Side_Effects): Minor code reorganization of cases which require
6388 no action. Done to incorporate documentation on new cases uncovered
6389 working in this ticket: no action needed if this routine was invoked
6390 too early and the nodes are not yet decorated.
6391 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6392 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6393 were issued with actuals that are implicitly provided by
6396 2011-08-02 Robert Dewar <dewar@adacore.com>
6398 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6400 2011-08-02 Yannick Moy <moy@adacore.com>
6402 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6403 to issue an error in formal mode on attribute not supported in this mode
6404 (Analyze_Attribute): issue errors on standard attributes not supported
6406 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6407 comment, and issue error in formal mode on modulus which is not a power
6409 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6411 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6413 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6414 operator on modular type (except 'not').
6416 2011-08-02 Robert Dewar <dewar@adacore.com>
6418 * gnat_rm.texi: Minor reformatting.
6420 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6422 * s-osinte-linux.ads: Minor comment update and reformatting.
6423 * i-cexten.ads: Make this unit pure, as for its parent.
6424 Will allow its usage in more contexts if needed.
6426 2011-08-02 Robert Dewar <dewar@adacore.com>
6428 * s-utf_32.ads: Minor comment fix.
6430 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6432 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6433 operation of a tagged synchronized type, handle the case where the
6434 controlling argument is overloaded.
6436 2011-08-02 Yannick Moy <moy@adacore.com>
6438 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6439 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6440 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6441 SPARK mode and formal verification mode on processing SPARK restriction
6442 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6443 requiring consistency checking.
6445 2011-08-02 Robert Dewar <dewar@adacore.com>
6447 * sem_res.adb: Minor reformatting.
6449 2011-08-02 Robert Dewar <dewar@adacore.com>
6451 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6452 a-cforse.ads: Remove unneeded with of Ada.Containers
6453 Remove commented out pragma Inline's
6454 Move specifications of new subprograms to the actual specs
6456 2011-08-02 Yannick Moy <moy@adacore.com>
6458 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6459 a-cforse.ads: Update comments.
6461 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6463 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6465 2011-08-02 Robert Dewar <dewar@adacore.com>
6467 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6468 a-cforse.ads, a-cofove.ads: Minor reformatting.
6470 2011-08-02 Claire Dross <dross@adacore.com>
6472 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6473 a-cofove.ads: Add comments.
6475 2011-08-02 Yannick Moy <moy@adacore.com>
6477 * gnat_rm.texi: Document formal containers.
6479 2011-08-02 Emmanuel Briot <briot@adacore.com>
6481 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6484 2011-08-02 Robert Dewar <dewar@adacore.com>
6486 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6489 2011-08-02 Robert Dewar <dewar@adacore.com>
6491 * aspects.adb: New aspects Default_Value and Default_Component_Value
6492 New format of Aspect_Names table checks for omitted entries
6493 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6494 handling of boolean aspects for derived types.
6495 New aspects Default_Value and Default_Component_Value
6496 New format of Aspect_Names table checks for omitted entries
6497 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6498 (Has_Default_Value): New flag
6499 (Has_Default_Component_Value): New flag
6500 (Has_Default_Value): New flag
6501 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6503 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6504 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6505 Default_Value and Default_Component_Value
6506 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6507 New aspects Default_Value and Default_Component_Value
6508 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6509 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6511 2011-08-02 Vincent Celier <celier@adacore.com>
6513 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6514 inherit library kind.
6516 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6518 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6521 2011-08-02 Robert Dewar <dewar@adacore.com>
6523 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6525 2011-08-02 Yannick Moy <moy@adacore.com>
6527 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6529 2011-08-02 Robert Dewar <dewar@adacore.com>
6531 * impunit.adb: Add comment.
6533 2011-08-02 Yannick Moy <moy@adacore.com>
6535 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6536 qualification of aggregates in formal mode
6537 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6539 (Resolve_Aggregate): complete the test that an aggregate is adequately
6540 qualified in formal mode
6542 2011-08-02 Pascal Obry <obry@adacore.com>
6544 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6545 * mlib-prj.adb: Supress warning when compiling binder generated file.
6546 (Build_Library): Supress all warnings when compiling the binder
6549 2011-08-02 Yannick Moy <moy@adacore.com>
6551 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6553 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6554 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6555 Add with/use clauses to make Check_Formal_Restriction visible
6557 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6559 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6560 in-parameters when type of the generic formal is private in the generic
6561 spec and non-private in the body.
6563 2011-08-02 Claire Dross <dross@adacore.com>
6565 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6566 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6567 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6568 * impunit.adb, Makefile.rtl: Take new files into account.
6570 2011-08-02 Robert Dewar <dewar@adacore.com>
6572 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6573 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6575 2011-08-02 Yannick Moy <moy@adacore.com>
6577 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6579 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6580 matching static array bounds, taking into account the special case of
6582 * sem_ch3.adb: Typo in comment.
6584 2011-08-02 Yannick Moy <moy@adacore.com>
6586 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6587 which issues an error in formal mode if its argument node is originally
6589 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6590 has a discriminant specification so that it does not include the case
6592 (Derived_Type_Declaration): move here the test that a derived type has a
6593 discriminant specification
6594 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6595 first element of a component association before accessing its choices
6596 (presence of component association is not enough)
6597 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6598 declaration is a library item before accessing the next element in a
6599 list, as library items are not member of lists
6600 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6601 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6602 Check_Formal_Restriction whenever possible.
6604 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6606 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6607 reference when needed.
6609 2011-08-02 Bob Duff <duff@adacore.com>
6611 * gnat_ugn.texi: Fix typo.
6613 2011-08-02 Vincent Celier <celier@adacore.com>
6615 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6616 archive file name. Do not use the full path name of archives for Open
6619 2011-08-02 Robert Dewar <dewar@adacore.com>
6621 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6622 Analyze_Aspect_Specifications
6624 (Analyze_Aspect_Specifications): New handling for boolean aspects
6625 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6626 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6627 sequence for Analyze_Aspect_Specifications
6628 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6629 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6631 2011-08-02 Robert Dewar <dewar@adacore.com>
6633 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6634 aspects, since these no longer exist.
6636 2011-08-02 Robert Dewar <dewar@adacore.com>
6638 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6639 semicolon, do not try to see if there are aspects following it.
6640 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6643 2011-08-02 Robert Dewar <dewar@adacore.com>
6645 * sem_ch8.adb, aspects.ads: Minor reformatting.
6647 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6649 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6650 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6652 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6654 2011-08-02 Yannick Moy <moy@adacore.com>
6656 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6657 mode on subprogram declaration outside of package specification, unless
6658 it is followed by a pragma Import
6659 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6660 Access_Type_Declaration): issue error in formal mode on access type
6661 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6663 (Analyze_Object_Declaration): issue error in formal mode on object
6664 declaration which does not respect SPARK restrictions
6665 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6666 declaration which does not respect SPARK restrictions
6667 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6668 error in formal mode on digits or delta constraint
6669 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6670 decimal fixed point type
6671 (Derived_Type_Declaration): issue error in formal mode on derived type
6672 other than type extensions of tagged record types
6673 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6674 with check on access definition
6675 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6676 mode on protected definition.
6677 (Analyze_Task_Definition): issue error in formal mode on task definition
6679 2011-08-02 Robert Dewar <dewar@adacore.com>
6681 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6683 2011-08-02 Javier Miranda <miranda@adacore.com>
6685 * sem_ch6.adb (Can_Override_Operator): New function.
6686 (Verify_Overriding_Indicator): Add missing code to check overriding
6687 indicator in operators. Fixes regression.
6688 (Check_Overriding_Indicator): Minor reformating after replacing the
6689 code that evaluates if the subprogram can override an operator by
6690 invocations to the above new function.
6692 (Write_Field26_Name): Add missing code to ensure that, following
6693 the documentation in einfo.ads, this field is not shown as attribute
6694 "Static_Initialization" on non-dispatching functions.
6696 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6698 * sem_res.adb (Resolve_Call): A call to
6699 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6700 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6701 i.e., when the second parameter is of type Time_Span.
6703 2011-08-02 Vincent Celier <celier@adacore.com>
6705 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6706 with an archive instead of -L<library dir> -l<library name>.
6708 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6710 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6711 mark the base types In_Use in addition to making the operations
6714 2011-08-02 Ed Falis <falis@adacore.com>
6716 * init.c: add and setup __gnat_signal_mask for the exception signals
6717 * s-inmaop-vxworks.adb: new file.
6718 * s-intman-vxworks.adb: remove unnecessary initializations and
6720 * s-intman-vxworks.ads: remove unnecessary variable
6721 * s-taprop-vxworks.adb: simplify signal initialization
6723 2011-08-02 Robert Dewar <dewar@adacore.com>
6725 * sem_ch8.adb: Minor code reorganization, comment updates.
6727 2011-08-02 Robert Dewar <dewar@adacore.com>
6729 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6730 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6732 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6733 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6735 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6737 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6738 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6739 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6740 use_type_clauses, to handle more efficiently use_type and use_all_type
6742 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6743 Ada2012 Use_All_Type clause.
6744 (Use_Class_Wide_Operations): new procedure.
6746 2011-08-02 Robert Dewar <dewar@adacore.com>
6748 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6749 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6750 expression to expression function.
6752 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6754 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6755 if types are compatible.
6757 2011-08-02 Yannick Moy <moy@adacore.com>
6759 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6760 returns True if its argument array types have same dimension and same
6761 static bounds at each index.
6762 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6763 OUT or IN OUT paramaters which are not view conversions in SPARK.
6764 (Resolve_Arithmetic_Op): issue an error in formal mode on
6765 multiplication or division with operands of fixed point types which are
6766 not qualified or explicitly converted.
6767 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6768 Boolean or array type (except String) operands.
6769 (Resolve_Equality_Op): issue an error in formal mode on equality
6770 operators for array types other than String with non-matching static
6772 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6773 for array types with non-matching static bounds. Factorize the code in
6774 Matching_Static_Array_Bounds.
6775 (Resolve_Qualified_Expression): issue an error in formal mode on
6776 qualified expressions for array types with non-matching static bounds.
6777 (Resolve_Type_Conversion): issue an error in formal mode on type
6778 conversion for array types with non-matching static bounds
6780 2011-08-02 Robert Dewar <dewar@adacore.com>
6782 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6784 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6786 * par-ch9.adb: save location of entry for proper error message.
6788 2011-08-02 Javier Miranda <miranda@adacore.com>
6790 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6791 (Use_Full_View) which permits this routine to climb through the
6792 ancestors using the full-view of private parents.
6793 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6794 Use_Full_View to true in calls to Is_Ancestor.
6795 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6796 true in call to Is_Ancestor.
6797 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6798 Use_Full_View to true in call to Is_Ancestor.
6799 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6800 call to Is_Ancestor.
6801 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6802 Use_Full_View to true in calls to Is_Ancestor.
6803 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6804 Make_Select_Specific_Data_Table, Register_Primitive,
6805 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6806 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6807 to true in call to Is_Ancestor.
6808 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6809 Use_Full_View to true in calls to Is_Ancestor.
6811 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6812 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6814 2011-08-02 Robert Dewar <dewar@adacore.com>
6816 * gnat_rm.texi: Minor reformatting.
6817 * sem_prag.adb: Minor reformatting.
6819 2011-08-02 Tristan Gingold <gingold@adacore.com>
6821 * vms_data.ads: Add VMS qualifier for -gnateP.
6823 2011-08-02 Robert Dewar <dewar@adacore.com>
6825 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6826 * par-ch7.adb (P_Package): Proper placement of aspects for package
6828 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6829 (End_Statements): Add Is_Sloc parameterr
6830 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6831 (Check_End): Ad Is_Sloc parameter
6832 (End_Statements): Add Is_Sloc parameterr
6834 2011-08-02 Vincent Celier <celier@adacore.com>
6836 * ug_words: Add VMS qualifier equivalent to -gnateP:
6837 /SYMBOL_PREPROCESSING.
6839 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6841 * gnat-style.texi: For hexadecimal numeric literals the typical
6842 grouping of digits is 4 to represent 2 bytes.
6843 A procedure spec which is split into several lines is indented two
6846 2011-08-02 Yannick Moy <moy@adacore.com>
6848 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6849 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6850 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6852 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6853 choice in array aggregate
6854 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6856 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6857 positional and named aggregate for record, or others in record
6858 aggregate, or multiple choice in record aggregate
6859 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6860 array operands to logical operations AND, OR and XOR do not have the
6861 same static lower and higher bounds
6862 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6864 2011-08-01 Robert Dewar <dewar@adacore.com>
6866 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6867 Replaces Last_Source_Node_In_Sequence.
6868 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6869 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6870 parens and blank in string (this was inconsistently implemented).
6872 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6873 blank in string (this was inconsistently implemented).
6875 (Set_Global_Switches): Set formal mode switches appropriately
6876 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6878 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6879 call Set_Error_Msg_Lang to set "spark" as language name.
6880 * par.adb: Remove unnecessary call to set formal language for errout
6881 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6882 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6884 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6885 calls to it, moved after resolution so that types are known
6886 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6887 result of concatenation is not of type String
6888 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6889 concatenation is not properly restricted
6890 * gnat_rm.texi: Add doc on pragma Spark_95.
6891 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6892 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6893 * gcc-interface/Make-lang.in: Update dependencies.
6895 2011-08-01 Javier Miranda <miranda@adacore.com>
6897 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6898 condition that detects if the overridden operation must replace an
6901 2011-08-01 Javier Miranda <miranda@adacore.com>
6903 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6904 code declarations inserted by Insert_Actions in each alternative of the
6905 N_Case_Expression node.
6907 2011-08-01 Robert Dewar <dewar@adacore.com>
6909 * sem_ch6.adb: Minor code reorganization.
6910 * sem_util.adb: Minor reformatting.
6912 2011-08-01 Pascal Obry <obry@adacore.com>
6914 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6915 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6917 2011-08-01 Yannick Moy <moy@adacore.com>
6919 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6920 literal or operator symbol which is prefixed
6921 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6922 mode on access attributes.
6923 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6924 that concatenation operands are properly restricted in formal mode
6925 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6926 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6927 result of the concatenation has a type different from String.
6928 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6929 Analyze_Quantified_Expression, Analyze_Slice,
6930 Analyze_Null): issue an error in formal mode on unsupported constructs
6932 (Analyze_Block_Statement): only issue error on source block statement
6933 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6934 function which returns the last node in a list of nodes for which
6935 Comes_From_Source returns True, if any
6936 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6937 Last_Source_Node_In_Sequence
6938 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6939 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6940 mode on unsupported constructs
6941 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6942 rest of the actions may be needed later on since the error is marked as
6944 * sinfo.ads: Typos in comments.
6946 2011-08-01 Pascal Obry <obry@adacore.com>
6948 * projects.texi: Minor editing.
6950 2011-08-01 Yannick Moy <moy@adacore.com>
6952 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6953 insertion character ~~
6954 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6955 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6956 with insertion character ~~
6957 (Set_Msg_Text): treat insertion character ~~
6958 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6959 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6960 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6961 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6962 errors related to the formal language restriction not serious
6963 (insertion character |).
6964 * par.adb (Par): set formal language for error messages if needed
6965 * sem_ch6.adb (Check_Missing_Return): take into account possible
6966 generated statements at the end of the function
6967 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6968 enumeration value to define a new pragma SPARK_95
6969 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6970 SPARK_Version): new type and variables to store the SPARK version
6972 (SPARK_Mode): return True when SPARK_Version is set
6973 * par-prag.adb: Correct indentation
6974 (Prag): take Pragma_SPARK_95 into account
6975 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6978 2011-08-01 Robert Dewar <dewar@adacore.com>
6980 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6981 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6982 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6984 2011-08-01 Pascal Obry <obry@adacore.com>
6986 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6987 Target_Name to Get_Path call.
6988 (Parse_Single_Project): Likewise.
6989 (Post_Parse_Context_Clause): Likewise.
6990 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6991 Call Initialise_Project_Path with the proper Target_Name.
6992 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6994 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6995 with the proper Target_Name.
6996 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6998 (Parse_Project_And_Apply_Config): Likewise.
6999 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7000 This is fine as this part of the code is supporting only native
7002 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7003 is fine as this part of the code is supporting only native compilation.
7005 2011-08-01 Yannick Moy <moy@adacore.com>
7007 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7008 of homonym, unless the homonym is one of the cases allowed in SPARK
7009 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7010 package declaration occurring after a body.
7012 2011-08-01 Robert Dewar <dewar@adacore.com>
7014 * checks.adb, exp_ch4.adb: Minor reformatting.
7016 2011-08-01 Javier Miranda <miranda@adacore.com>
7018 * einfo.ads (Access_Disp_Table): Fix documentation.
7019 (Dispatch_Table_Wrappers): Fix documentation.
7021 2011-08-01 Pascal Obry <obry@adacore.com>
7023 * prj-env.adb, prj-env.ads: Minor reformatting.
7025 2011-08-01 Yannick Moy <moy@adacore.com>
7027 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7028 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7029 procedures out of these packages.
7030 * errout.ads, errout.adb
7031 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7032 procedures in of this package
7033 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7034 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7035 on misplaced later vs initial declarations, like in Ada 83
7036 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7037 formal mode on attribute of private type whose full type declaration
7039 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7040 package declaration inside a package specification
7041 (Analyze_Full_Type_Declaration): issue error in formal mode on
7042 controlled type or discriminant type
7043 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7044 user-defined operator means that it should come from the source
7045 (New_Overloaded_Entity): issue error in formal mode on overloaded
7047 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7049 2011-08-01 Thomas Quinot <quinot@adacore.com>
7051 * atree.adb: Minor reformatting.
7052 * checks.adb: Minor reformatting.
7054 2011-08-01 Vincent Celier <celier@adacore.com>
7056 * s-parame-vms-ia64.ads: Fix typo in comment
7058 * s-parame-vms-restrict.ads: Removed, unused.
7060 2011-08-01 Javier Miranda <miranda@adacore.com>
7063 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7065 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7066 * sem_ch3.ads, sem_ch3.adb
7067 (Is_Constant_Bound): New extended version of the subprogram that was
7068 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7069 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7070 * sem_aux.ads (Constant_Value): Fix typo in comment.
7071 * checks.adb (Generate_Index_Checks): New implementation which, for
7072 array objects with constant bounds, generates the runtime check
7073 referencing the bounds of the array type. For other cases this routine
7074 provides its previous behavior obtaining such values from the array
7076 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7078 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7079 we cannot have semantic interpretations of the new node.
7081 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7083 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7086 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7088 * sem_ch8.adb: Minor code editing.
7089 * s-vxwext.adb: Remove trailing space.
7090 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7091 consistency with other files.
7093 2011-08-01 Thomas Quinot <quinot@adacore.com>
7095 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7097 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7099 * par-ch10.adb: reject parameterized expressions as compilation unit.
7100 * sem_ch4.adb: handle properly conditional expression with overloaded
7101 then_clause and no else_clause.
7103 2011-08-01 Tristan Gingold <gingold@adacore.com>
7105 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7106 like done by System.Aux_DEC.
7107 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7109 2011-08-01 Yannick Moy <moy@adacore.com>
7111 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7112 missing label at end of declaration (subprogram or package)
7113 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7114 of positional and named parameter association
7115 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7116 Error_Msg_SP which adds a prefix to the error message giving the name
7117 of the formal language analyzed
7118 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7119 access result type in subprogram, unconstrained array as result type,.
7120 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7122 * sem_ch8.adb: Code clean up.
7124 2011-08-01 Javier Miranda <miranda@adacore.com>
7126 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7127 * einfo.ads (Access_Disp_Table): Fix documentation.
7128 (Dispatch_Table_Wrappers): Fix documentation.
7129 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7130 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7131 to enforce the documentation of this attribute.
7132 (Set_Is_Interface): Cleanup the assertion.
7133 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7134 the Underlying_Type entity before reading attribute Access_Disp_Table.
7135 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7136 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7137 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7138 the Underlying_Type entity before reading attribute Access_Disp_Table.
7139 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7140 Locate the Underlying_Type entity before reading attribute
7143 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7145 * s-poosiz.ads: Additional overriding indicators.
7147 2011-08-01 Yannick Moy <moy@adacore.com>
7149 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7151 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7152 parameter specification does not include a subtype mark.
7153 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7154 formal mode on abstract subprogram.
7155 (Analyze_Subprogram_Specification): issue error in formal mode on
7156 user-defined operator.
7157 (Process_Formals): issue error in formal mode on access parameter and
7159 * sem_ch9.adb (Analyze_Abort_Statement,
7160 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7161 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7162 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7163 Analyze_Requeue, Analyze_Selective_Accept,
7164 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7165 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7166 issue error in formal mode on user-defined raise statement.
7168 2011-08-01 Thomas Quinot <quinot@adacore.com>
7170 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7171 declaration being hidden when overriding an implicit inherited
7173 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7174 (-gnats), do not complain about a source file that contains only a
7177 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7179 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7180 variable if already set.
7182 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7184 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7185 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7186 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7187 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7188 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7189 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7190 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7191 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7192 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7193 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7194 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7195 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7196 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7197 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7198 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7199 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7200 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7201 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7202 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7203 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7204 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7205 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7206 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7207 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7208 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7209 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7210 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7211 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7212 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7213 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7214 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7215 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7216 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7217 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7218 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7219 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7220 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7221 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7222 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7223 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7224 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7225 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7226 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7227 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7228 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7229 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7230 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7231 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7232 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7233 Use GNAT instead of GNARL.
7235 2011-08-01 Bob Duff <duff@adacore.com>
7237 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7238 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7239 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7242 2011-08-01 Yannick Moy <moy@adacore.com>
7244 * debug.adb (d.D) reverve flag for the SPARK mode
7245 (d.E) reverve flag for SPARK generation mode
7246 (d.F) reverve flag for Why generation mode
7247 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7248 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7249 functions which return True when the corresponding modes are set
7250 (Formal_Language): return "spark" or "alfa" when in formal verification
7252 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7253 Error_Msg to prefix the error message with a tag giving the formal
7255 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7256 message with a tag giving the formal language
7257 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7259 (Analyze_Case_Statement): issue error in formal mode on case statement
7260 with a single "others" case alternative
7261 (Analyze_Exit_Statement): issue errors in formal mode on exit
7262 statements which do not respect SPARK restrictions
7263 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7264 (Check_Unreachable_Code): always issue an error (not a warning) in
7265 formal mode on unreachable code (concerns both code after an infinite
7266 loop and after an unconditional jump, both not allowed in SPARK)
7267 * sem_ch6.adb (Analyze_Return_Statement): add call to
7268 Set_Return_Present for a procedure containing a return statement
7269 (already done for functions in Analyze_Function_Return)
7270 (Analyze_Function_Return): issue error in formal mode on extended
7271 return or if return is not last statement in function
7272 (Check_Missing_Return): issue error in formal mode if function does
7273 not end with return or if procedure contains a return
7274 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7275 function to detect if there is an inner scope of its parameter S which
7278 2011-08-01 Thomas Quinot <quinot@adacore.com>
7280 * sem_ch6.ads: Minor reformatting.
7282 2011-08-01 Javier Miranda <miranda@adacore.com>
7284 * sem_util.adb (Abstract_Interface_List): Complete condition when
7285 processing private type declarations to avoid reading unavailable
7287 (Is_Synchronized_Tagged_Type): Complete condition when processing
7288 private extension declaration nodes to avoid reading unavailable
7291 2011-08-01 Thomas Quinot <quinot@adacore.com>
7293 * sem_ch3.adb: Minor reformatting.
7295 2011-08-01 Thomas Quinot <quinot@adacore.com>
7297 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7298 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7299 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7300 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7301 for VMS, instead parametrize the common implementation with
7302 System.Parameters declarations.
7304 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7306 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7308 2011-08-01 Tristan Gingold <gingold@adacore.com>
7310 * seh_init.c: Fix SEH handler installation on win64.
7312 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7314 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7315 double analysis of an anonymous access to subprogram, because it can
7316 lead to improper sharing of profiles and a back-end crash.
7318 2011-08-01 Robert Dewar <dewar@adacore.com>
7320 * make.adb, sem_ch4.adb: Minor reformatting.
7321 * gcc-interface/Make-lang.in: Update dependencies.
7322 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7324 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7326 * gnat_rm.texi: Fix definition of Long_Integer.
7328 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7330 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7331 to prevent storage exhaustion.
7332 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7333 finalized is a function body, insert the cleanup code before the final
7334 return statement, to prevent spurious warnings.
7335 * s-pooglo.ads: add overriding indicator.
7337 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7339 * sem_ch4.adb (Operator_Check): improve error message when both a
7340 with_clause and a use_clause are needed to make operator usage legal.
7341 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7342 determine whether a compilation unit is visible within an other,
7343 either through a with_clause in the current unit, or a with_clause in
7344 its library unit or one one of its parents.
7346 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7348 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7349 over an arbitrary expression of an array or container type.
7350 * lib-xref.adb: clarify comment.
7352 2011-08-01 Bob Duff <duff@adacore.com>
7354 * einfo.ads: Minor reformatting.
7355 * debug.adb: Minor comment improvement.
7357 2011-08-01 Javier Miranda <miranda@adacore.com>
7359 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7360 consider hidden subprograms as valid candidates.
7362 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7364 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7366 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7368 * gnat_ugn.texi: Fix typo.
7370 2011-08-01 Robert Dewar <dewar@adacore.com>
7372 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7373 lib-xref.adb: Minor reformatting
7375 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7377 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7378 when to generate a call to Move_Final_List.
7379 (Has_Controlled_Parts): Remove this function.
7381 2011-08-01 Geert Bosch <bosch@adacore.com>
7383 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7386 2011-08-01 Thomas Quinot <quinot@adacore.com>
7388 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7389 explicit raise of a predefined exception as Comes_From_Source if the
7390 original N_Raise_Statement comes from source.
7392 2011-08-01 Robert Dewar <dewar@adacore.com>
7394 * sinfo.ads: Add comment.
7395 * sem_ch6.adb: Minor reformatting.
7397 2011-08-01 Robert Dewar <dewar@adacore.com>
7399 * freeze.adb (Freeze_Entity): Refine check for bad component size
7400 clause to avoid rejecting confirming clause when atomic/aliased present.
7402 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7404 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7405 better determine whether an entity reference is a write.
7406 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7408 * lib-xref.adb (Output_References): Do no suppress a read reference at
7409 the same location as an immediately preceeding modify-reference, to
7410 handle properly in-out actuals.
7412 2011-08-01 Tristan Gingold <gingold@adacore.com>
7414 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7416 2011-08-01 Quentin Ochem <ochem@adacore.com>
7418 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7419 heap to compute the result.
7421 2011-08-01 Robert Dewar <dewar@adacore.com>
7423 * atree.ads: Minor reformatting.
7425 2011-08-01 Emmanuel Briot <briot@adacore.com>
7427 * g-expect.adb (Get_Command_Output): Fix memory leak.
7429 2011-08-01 Geert Bosch <bosch@adacore.com>
7431 * cstand.adb (P_Float_Type): New procedure to print the definition of
7432 predefined fpt types.
7433 (P_Mixed_Name): New procedure to print a name using mixed case
7434 (Print_Standard): Use P_Float_Type for printing floating point types
7435 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7436 precision IEEE float.
7438 2011-08-01 Thomas Quinot <quinot@adacore.com>
7440 * sem_ch3.adb: Minor reformatting.
7442 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7444 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7445 the completion of a generic function, insert the new body rather than
7446 rewriting the original.
7448 2011-08-01 Yannick Moy <moy@adacore.com>
7450 * sinfo.ads, errout.ads: Typos in comments.
7452 2011-08-01 Robert Dewar <dewar@adacore.com>
7454 * par-endh.adb: Minor reformatting.
7456 2011-08-01 Robert Dewar <dewar@adacore.com>
7458 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7459 (Pre_Post_Aspects): New subtype.
7460 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7461 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7462 * par-ch7.adb (P_Package): Remove Decl parameter
7463 (P_Package): Handle new syntax for aspects (before IS)
7464 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7466 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7467 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7468 (P_Package): Remove Decl parameter
7469 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7471 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7473 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7474 * sinfo.ads: Document new syntax for aspects in packages etc.
7475 * sprint.adb: Handle new syntax of aspects before IS in package
7477 2011-08-01 Thomas Quinot <quinot@adacore.com>
7479 * atree.ads: Minor reformatting.
7480 * sem_prag.adb: Minor reformatting.
7482 2011-08-01 Robert Dewar <dewar@adacore.com>
7484 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7485 case expr alternative.
7487 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7489 * sem_ch12.adb: Fix typo.
7491 2011-08-01 Geert Bosch <bosch@adacore.com>
7493 * sem_prag.adb (Check_No_Link_Name): New procedure.
7494 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7495 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7496 instead of Standard_Long_Long_Float_Size global. Preparation for
7497 eventual removal of per type constants.
7498 * exp_util.ads (Get_Stream_Size): New function returning the stream
7499 size value of subtype E.
7500 * exp_util.adb (Get_Stream_Size): Implement new function.
7501 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7503 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7505 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7507 2011-08-01 Geert Bosch <bosch@adacore.com>
7509 * cstand.adb: Fix comments.
7510 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7513 2011-08-01 Robert Dewar <dewar@adacore.com>
7515 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7517 2011-08-01 Geert Bosch <bosch@adacore.com>
7519 * atree.ads: Fix comment.
7521 2011-08-01 Robert Dewar <dewar@adacore.com>
7523 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7524 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7525 * par.adb: Add with for Namet.Sp.
7526 * par-tchk.adb: Minor reformatting.
7528 2011-08-01 Vincent Celier <celier@adacore.com>
7530 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7531 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7532 of the init procedure of a SAL.
7533 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7536 2011-08-01 Thomas Quinot <quinot@adacore.com>
7538 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7541 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7543 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7545 2011-08-01 Thomas Quinot <quinot@adacore.com>
7547 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7548 conformant with its spec (return True only for types that have
7549 an overriding Initialize primitive operation that prevents them from
7550 having preelaborable initialization).
7551 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7552 initialization for controlled types in Ada 2005 or later mode.
7554 2011-08-01 Robert Dewar <dewar@adacore.com>
7556 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7558 (Same_Aspect): New function.
7559 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7560 Type_Invariant, Precondition, Postcondition.
7561 * snames.ads-tmpl: Add Name_Type_Invariant.
7563 2011-08-01 Robert Dewar <dewar@adacore.com>
7565 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7567 (Freeze_All_Ent): Fix error in handling inherited aspects.
7568 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7569 already analyzed, but don't skip entire processing of a declaration,
7570 that's wrong in some cases of declarations being rewritten.
7571 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7572 Don't delay for integer, string literals
7573 Treat predicates in usual manner for delay, remove special case code,
7575 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7576 (Build_Predicate_Function): Update saved expression in aspect
7577 (Build_Invariant_Procedure): Update saved expression in aspect
7578 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7579 of replacement of discriminant references if the reference is simple.
7581 2011-08-01 Robert Dewar <dewar@adacore.com>
7583 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7584 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7585 Static_Predicate and Dynamic_Predicate.
7586 (Build_Predicate_Function): Add processing for Static_Predicate
7587 and Dynamic_Predicate.
7588 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7589 (From_Static_Predicate): New flag
7590 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7592 2011-08-01 Robert Dewar <dewar@adacore.com>
7594 * usage.adb: Documentation cleanup for Ada version modes in usage.
7595 * expander.adb: Minor reformatting.
7597 2011-08-01 Robert Dewar <dewar@adacore.com>
7599 * atree.ads: Minor comment fix.
7600 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7601 a-witeio.ads, sem_prag.adb: Minor reformatting.
7603 2011-08-01 Doug Rupp <rupp@adacore.com>
7605 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7606 pointers. Use descrip.h header file for convenience. Add some
7609 2011-08-01 Robert Dewar <dewar@adacore.com>
7611 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7612 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7613 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7615 (Check_Aspect_At_End_Of_Declarations): New procedure
7616 (Analye_Aspect_Specification): Minor changes for above procedures
7617 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7618 specification node as well.
7620 2011-08-01 Pascal Obry <obry@adacore.com>
7622 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7623 Windows files. Use GetFilesAttributes() in this case to check for file
7624 existence instead of returning with an error code.
7626 2011-08-01 Vincent Celier <celier@adacore.com>
7628 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7629 High is above Source length.
7631 2011-08-01 Robert Dewar <dewar@adacore.com>
7633 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7635 2011-08-01 Robert Dewar <dewar@adacore.com>
7637 * aspects.ads (Boolean_Aspects): New subtype.
7638 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7639 for derived types in cases where the parent type and derived type have
7641 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7642 with aspects when parent type also has aspects.
7643 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7644 boolean expression at this point).
7645 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7646 accordance with final decision on the Ada 2012 feature.
7647 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7649 2011-08-01 Matthew Heaney <heaney@adacore.com>
7651 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7653 2011-08-01 Pascal Obry <obry@adacore.com>
7655 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7656 Fix Replace_Slice when High is above current string size.
7657 (Replace_Slice): Fix DL computation when High is above current
7660 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7662 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7664 2011-08-01 Matthew Heaney <heaney@adacore.com>
7666 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7669 2011-08-01 Pascal Obry <obry@adacore.com>
7671 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7674 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7676 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7677 access to protected subprograms in generic bodies.
7678 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7679 protected type, indicate that the convention of the subprogram is
7680 Convention_Protected, because it may be used in subsequent declarations
7681 within the protected declaration.
7683 2011-08-01 Vincent Celier <celier@adacore.com>
7685 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7686 and "final" procedures when the name of the library is "ada", to avoid
7687 duplicate symbols "adainit" and "adafinal" in executables.
7689 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7691 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7692 quantified expression that appears within a postcondition and uses the
7693 Ada2012 'Result attribute.
7695 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7697 * init.c (__gnat_error_handler): Cast reason to int.
7698 (__gnat_install_handler): Explain sa_sigaction use.
7700 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7702 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7703 subprogram has copy-in copy-out parameters, try to promote the mode of
7704 the return type if it is passed in registers.
7706 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7708 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7709 left operand as addressable.
7711 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7713 * gcc-interface/gigi.h (build_function_stub): Remove.
7714 (build_return_expr): Likewise.
7715 (convert_vms_descriptor): Declare.
7716 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7717 (build_function_stub): Move to...
7718 * gcc-interface/utils2.c (build_return_expr): Move to...
7719 * gcc-interface/trans.c (build_function_stub): ...here.
7720 (build_return_expr): ...here.
7721 (Subprogram_Body_to_gnu): Add local variable for language_function.
7722 Disconnect the parameter attributes cache, if any, once done with it.
7723 Call end_subprog_body only after setting the end_locus.
7724 Build the stub associated with the function, if any, at the very end.
7725 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7726 variables and streamline control flow.
7728 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7731 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7734 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7737 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7738 Assign to act.sa_sigaction.
7739 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7740 current->return_address to char * before arithmetic.
7742 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7744 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7745 Correct argument types.
7746 Extract code from reason.
7747 (__gnat_install_handler): Assign to act.sa_sigaction.
7749 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7751 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7752 (GNAT1_OBJS): ...here.
7754 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7757 * g-socthi-mingw.adb (Fill): Fix formatting.
7759 * gcc-interface/gigi.h: Move around comment.
7761 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7764 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7766 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7769 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7771 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7773 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7774 range comparison if Pmode is SImode.
7776 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7777 Eric Botcazou <ebotcazou@adacore.com>
7779 * adadecode.c: Wrap up in extern "C" block.
7780 * adadecode.h: Likewise.
7781 * adaint.c: Likewise. Remove 'const' keyword.
7782 * adaint.h: Likewise.
7784 * atree.h: Likewise.
7786 * cstreams.c: Likewise.
7790 * final.c: Likewise.
7792 * initialize.c: Likewise.
7794 * namet.h: Likewise.
7795 * nlists.h: Likewise.
7796 * raise.c: Likewise.
7797 * raise.h: Likewise.
7798 * repinfo.h: Likewise.
7799 * seh_init.c: Likewise.
7800 * targext.c: Likewise.
7801 * tracebak.c: Likewise.
7802 * uintp.h: Likewise.
7803 * urealp.h: Likewise.
7804 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7805 * xsinfo.adb: Likewise.
7806 * xsnamest.adb: Likewise.
7807 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7808 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7809 * gcc-interface/misc.c: Likewise.
7810 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7811 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7812 ada/targext.o here...
7813 (GNAT_ADA_OBJS): ...and not here.
7814 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7815 (GNATBIND_OBJS): Reorder.
7817 2011-07-07 Richard Henderson <rth@redhat.com>
7819 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7820 dwarf2out_frame_init.
7822 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7824 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7826 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7829 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7831 2011-07-06 Richard Guenther <rguenther@suse.de>
7833 * gcc-interface/misc.c (gnat_init): Merge calls to
7834 build_common_tree_nodes and build_common_tree_nodes_2.
7835 Re-initialize boolean_false_node.
7837 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7838 Olivier Hainque <hainque@adacore.com>
7839 Nicolas Setton <setton@adacore.com>
7841 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7842 the type according to the ARTIFICIAL_P parameter.
7843 (create_type_decl): Likewise.
7844 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7846 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7848 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7849 (gnatbind): Likewise.
7851 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7853 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7855 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7857 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7858 local variable throughout. Remove useless call to Base_Type.
7859 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7860 Take it also into account for the volatileness of the field. Set the
7861 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7863 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7865 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7866 on a dereference built for a by-ref object if it has an address clause.
7868 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7870 * einfo.ads (Address_Taken): Document use for the second argument of
7871 Asm_Input and Asm_Output attributes.
7872 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7873 argument is an entity name, then set Address_Taken on it.
7874 <Attribute_Asm_Output>: Likewise.
7875 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7876 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7877 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7878 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7880 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7883 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7885 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7887 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7888 (ada/utils.o): Update dependencies.
7889 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7890 ../../../libcpp/libcpp.a.
7891 * gcc-interface/utils.c: Include common/common-target.h.
7892 (process_attributes): Use targetm_common.have_named_sections.
7894 2011-06-07 Richard Guenther <rguenther@suse.de>
7896 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7899 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7901 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7902 TREE_THIS_NOTRAP flag.
7904 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7906 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7909 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7911 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7912 constants whose full view has discriminants specially.
7914 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7916 * gcc-interface/utils.c: Include diagnostic.h.
7917 (gnat_write_global_declarations): Output debug information for all
7918 global type declarations before finalizing the compilation unit.
7919 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7921 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7923 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7925 2011-05-25 Kai Tietz <ktietz@redhat.com>
7927 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7928 initialization instead of const/none-const pointer assignment.
7930 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7932 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7933 $(EXTRA_GNAT1_OBJS).
7934 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7935 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7936 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7937 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7938 libcommon-target.a instead of prefix.o.
7940 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7943 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7945 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7947 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7948 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7949 instead of version.o.
7951 2011-05-18 Kai Tietz <ktietz@redhat.com>
7953 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7954 boolean_false_node instead of integer_zero_node.
7955 (convert_with_check): Likewise.
7956 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7958 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7960 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7961 type of the parameter is an unconstrained array, convert the actual to
7962 the type of the formal in the In Out and Out cases as well.
7964 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7966 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7967 call build_function_type_array or build_varargs_function_type_array
7969 (create_subprog_type): Don't call build_function_type; call
7970 build_function_type_vec instead.
7972 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7974 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7975 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7976 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7978 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7980 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7982 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7983 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7985 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7987 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7989 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7991 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7992 instead of accessing TYPE_ARG_TYPES directly.
7993 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7995 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7998 * gcc-interface/gigi.h (get_variant_part): Declare.
7999 * gcc-interface/decl.c (get_variant_part): Make global.
8000 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8001 types have the same constant size, are record types and T1 has a
8002 variant part while T2 doesn't.
8004 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8006 * gcc-interface/utils.c (begin_subprog_body): Do not call
8008 (end_subprog_body): Likewise.
8010 2011-05-04 Richard Guenther <rguenther@suse.de>
8012 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8014 (pos_to_constructor): Likewise.
8016 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8017 Eric Botcazou <ebotcazou@adacore.com>
8019 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8020 of build_function_type. Adjust calls to...
8021 (build_raise_check): ...this. Do not take a void_tree parameter.
8022 Call build_function_type_list instead of build_function_type.
8023 Fix head comment and swap couple of conditional blocks.
8025 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8027 * gnatvsn.ads (Library_Version): Bump to 4.7.
8028 (Current_Year): Bump to 2011.
8030 2011-04-29 Michael Matz <matz@suse.de>
8032 * gcc-interface/misc.c (gnat_handle_option): Set
8033 warn_maybe_uninitialized.
8035 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8037 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8038 the Watson/McCabe paper.
8040 2011-04-23 Jim Meyering <meyering@redhat.com>
8042 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8044 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8046 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8049 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8051 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8053 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8054 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8055 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8056 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8057 <all>: Do not set flags on the reused DECL node coming from an alias.
8058 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8059 don't need debug info here...
8060 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8061 (gigi): Adjust calls to create_subprog_decl.
8062 (build_raise_check): Likewise.
8063 (establish_gnat_vms_condition_handler): Likewise.
8064 (Compilation_Unit_to_gnu): Likewise.
8065 (gnat_to_gnu): Likewise.
8067 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8069 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8070 (NO_REORDER_ADAFLAGS): New variable.
8071 (EXTRA_GNATTOOLS): Always define.
8072 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8073 Clean up and adjust list of files compiled with special options.
8074 * gcc-interface/Make-lang.in: Likewise.
8075 (ada/decl.o): Cosmetical change.
8076 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8078 2011-04-20 Jim Meyering <meyering@redhat.com>
8080 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8082 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8084 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8085 $(CFLAGS) on the link line.
8087 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8089 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8090 padded type built for the return type if it is unconstrained.
8092 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8094 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8096 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8098 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8099 before calling TREE_CHAIN.
8100 * gcc-interface/misc.c (gnat_init_ts): New function.
8101 (LANG_HOOKS_INIT_TS): Define.
8103 2011-04-12 Martin Jambor <mjambor@suse.cz>
8105 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8106 instead of cgraph_node.
8108 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8110 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8111 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8114 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8116 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8117 of aggregate types that contain a placeholder.
8119 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8121 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8123 (handle_type_generic_attribute): Likewise.
8125 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8128 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8130 2011-04-04 Kai Tietz <ktietz@redhat.com>
8133 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8136 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8138 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8139 type case, do not strip a padding type around the array type.
8141 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8143 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8146 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8148 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8149 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8150 code for -feliminate-unused-debug-types.
8151 (gnat_post_options): Likewise.
8153 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8155 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8156 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8159 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8161 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8162 DECL_ARTIFICIAL flag on enumeration types.
8164 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8166 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8167 fat pointer types artificial unconditionally.
8168 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8171 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8173 * gcc-interface/gigi.h (get_dummy_type): Declare.
8174 (build_dummy_unc_pointer_types): Likewise.
8175 (finish_fat_pointer_type): Likewise.
8176 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8177 fat pointer type has been built, complete it in place.
8178 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8179 and thin pointers. Remove useless variable.
8180 (finish_fat_pointer_type): Make global and move to...
8181 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8182 (get_dummy_type): New function.
8183 (build_dummy_unc_pointer_types): Likewise.
8184 (gnat_pushdecl): Propage the name to the anonymous variants only.
8185 (update_pointer_to): Only adjust the pointer types in the unconstrained
8188 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8190 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8191 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8192 if this is a Taft amendment type and the full declaration is available.
8193 * gcc-interface/trans.c (process_type): Likewise.
8194 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8195 (process_freeze_entity): Likewise.
8196 * gcc-interface/utils.c (dummy_global): New static variable.
8197 (gnat_write_global_declarations): If there are types declared as used
8198 at the global level, insert them in the global hash table.
8200 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8202 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8203 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8204 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8206 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8207 flag of the type accordingly.
8208 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8210 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8212 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8213 finalizing types when updating the pointers to the designated type.
8214 <all>: Finalize the deferred types even if we didn't defer processing
8215 of incomplete types in this invocation.
8217 2011-04-01 Olivier Hainque <hainque@adacore.com>
8218 Nicolas Setton <setton@adacore.com>
8219 Eric Botcazou <ebotcazou@adacore.com>
8221 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8222 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8224 2011-03-28 Kai Tietz <ktietz@redhat.com>
8226 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8228 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8229 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8231 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8233 2011-03-28 Tristan Gingold <gingold@adacore.com>
8236 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8237 Use ada output of gnatbind.
8238 (ada/b_gnatb.adb): Ditto.
8239 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8240 (ada.mostlyclean, ada.stage1)
8241 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8242 (ada.stagefeedback): Adjust.
8243 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8244 Use ada output of gnatbind.
8245 (b_gnatm.adb): Ditto.
8246 (b_gnatl.o, b_gnatm.o): New rules.
8248 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8250 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8251 for the padded type built to support a specified size or alignment.
8253 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8255 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8256 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8257 unconditionally to the end of the unit when the designated type is
8259 <all>: Rename local variable. Attempt to un-defer types only and do it
8260 for limited_with'ed types as well.
8261 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8262 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8263 consistently and remove redundant call to finalize_from_with_types.
8265 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8267 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8268 subprograms without a previous spec declared in the same unit.
8269 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8270 subprograms at the end of the unit instead of at the beginning.
8271 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8272 isn't public for the special handling of non-inline functions nested
8273 inside inline external functions.
8275 2011-03-25 Jeff Law <law@redhat.com>
8277 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8279 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8281 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8282 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8283 to compute Set_Size_Depends_On_Discriminant.
8284 (Layout_Type): Call it on array types in back-end layout mode.
8285 * sem_util.adb (Requires_Transient_Scope): Return true for array
8286 types only if the size depends on the value of discriminants.
8287 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8288 type if the RHS is a call to a function that returns an unconstrained
8289 type with default discriminant.
8291 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8293 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8294 non-conversion to the nominal result type at the end.
8296 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8298 * gcc-interface/trans.c (create_temporary): New function taken from...
8299 (create_init_temporary): ...here. Call it.
8300 (call_to_gnu): Create the temporary for the return value early, if any.
8301 Create it for a function with copy-in/copy-out parameters if there is
8302 no target; in other cases of copy-in/copy-out, use another temporary.
8303 Push the new binding level lazily. Add and rename local variables.
8305 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8307 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8309 (set_rm_size): Likewise.
8311 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8313 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8314 for the padded type built in order to support a specified alignment.
8315 Fix incorrect formatting.
8317 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8320 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8322 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8324 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8325 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8326 to the end of the list. Adjust recursive call. Rename local variable.
8327 If REORDER is true, reorder components of the record type.
8328 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8329 components_to_record and adjust the parameter list.
8331 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8333 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8334 disabled, use the variable for bounds of loop iteration scheme.
8336 2011-03-21 Kai Tietz <ktietz@redhat.com>
8339 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8341 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8343 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8344 out whether the expression is read-only. Short-circuit placeholder
8345 case and rename a couple of local variables.
8347 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8349 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8350 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8351 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8352 (convert): Deal with conversions from a smaller form type specially.
8354 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8356 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8357 its argument, except for the special -I- switch.
8359 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8361 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8364 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8366 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8368 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8370 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8372 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8373 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8374 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8375 Do not generate the check directly, instead instantiate the template
8376 check present in the descriptor.
8377 (make_descriptor_field): Move around.
8378 (build_vms_descriptor32): Build a template check in the POINTER field.
8379 (build_vms_descriptor): Remove useless suffixes.
8380 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8382 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8385 * targext.c: Include target files if IN_RTS is defined.
8387 2011-01-26 Richard Guenther <rguenther@suse.de>
8390 * targext.c: Include config.h.
8391 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8394 2011-01-04 Pascal Obry <obry@adacore.com>
8395 Eric Botcazou <ebotcazou@adacore.com>
8397 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8399 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8401 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8402 end-of-case on the end label and its associated gotos, if any.
8404 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8406 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8407 expressions of the parameter cache within the statement group of
8410 2011-01-04 Olivier Hainque <hainque@adacore.com>
8411 Eric Botcazou <ebotcazou@adacore.com>
8413 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8414 (set_end_locus_from_node): New function.
8415 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8416 make and the function end_locus.
8417 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8418 for the elaboration subprogram.
8419 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8420 set the end_locus of the expression as well.
8422 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8425 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8426 variables that are referenced in exception handlers volatile.
8430 Copyright (C) 2011 Free Software Foundation, Inc.
8432 Copying and distribution of this file, with or without modification,
8433 are permitted in any medium without royalty provided the copyright
8434 notice and this notice are preserved.
8436 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8437 - fix bugs in the description of Source_Trace;
8438 - get rid of UNIT_NAME;
8440 2011-08-02 Javier Miranda <miranda@adacore.com>
8443 (Build_Dispatching_Requeue): Adding support for VM targets
8444 since we cannot directly reference the Tag entity.
8445 * exp_sel.adb (Build_K): Adding support for VM targets.
8446 (Build_S_Assignment): Adding support for VM targets.
8448 (Default_Prim_Op_Position): In VM targets do not restrict availability
8449 of predefined interface primitives to compiling in Ada 2005 mode.
8450 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8451 restricted to compiling in Ada 2005 mode.
8452 (Make_VM_TSD): Generate code that declares and initializes the OSD
8453 record. Needed to support dispatching calls through synchronized
8456 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8457 primitives associated with synchronized interfaces.
8458 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8459 primitives associated with synchronized interfaces.
8461 2011-08-02 Yannick Moy <moy@adacore.com>
8463 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8464 statements hidden in SPARK if preceded by the HIDE directive
8465 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8466 exception handlers as hidden in SPARK if preceded by the HIDE directive
8467 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8468 if starting with the HIDE directive
8469 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8470 starting with the HIDE directive; mark the declarations in a private
8471 part as hidden in SPARK if the private part starts with the HIDE
8473 * restrict.adb, restrict.ads
8474 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8475 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8476 argument node belongs to a part which is hidden in SPARK
8477 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8478 parts in SPARK; protect the possibly costly call to
8479 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8480 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8481 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8482 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8484 (Scan): recognize special comment starting with '#' and followed by
8485 SPARK keyword "hide" as a HIDE directive.
8487 2011-08-02 Yannick Moy <moy@adacore.com>
8489 * types.ads, erroutc.ads: Minor reformatting.
8491 2011-08-02 Vincent Celier <celier@adacore.com>
8493 * link.c: Add response file support for cross platforms.
8495 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8497 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8498 in an association, set parent field of copy before partial analysis.
8499 * sem_res.adb (Resolve_Slice): create reference to itype only when
8500 expansion is enabled.
8502 2011-08-02 Yannick Moy <moy@adacore.com>
8504 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8505 for new flag denoting which subprogram bodies are in ALFA
8506 * restrict.adb, sem_ch7.adb: Update comment
8507 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8508 sem_ch9.adb, sem_res.adb: Add calls to
8509 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8510 * sem_ch6.adb (Analyze_Function_Return): add calls to
8511 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8512 middle of the body, and extended return.
8513 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8514 False when missing return.
8515 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8516 to True for subprograms whose spec is in ALFA. Remove later on the flag
8517 on the entity used for a subprogram body when there exists a separate
8519 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8520 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8521 False, otherwise do nothing.
8523 2011-08-02 Robert Dewar <dewar@adacore.com>
8525 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8527 2011-08-02 Yannick Moy <moy@adacore.com>
8529 * sem_ch4.ads: minor formatting.
8531 2011-08-02 Yannick Moy <moy@adacore.com>
8533 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8534 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8535 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8536 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8537 opt.ads: cleanup of SPARK mode
8539 2011-08-02 Yannick Moy <moy@adacore.com>
8541 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8543 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8544 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8546 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8547 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8548 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8549 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8551 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8553 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8554 functions whose return type is not in ALFA.
8555 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8557 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8558 parameter's type is not in ALFA.
8559 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8562 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8564 * sem_ch6 (Analyze_Expression_Function): treat the function as
8565 Inline_Always, and introduce a subprogram declaration for it when it is
8567 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8568 expression functions, so that the back-end can determine whether they
8569 can in fact be inlined.
8570 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8571 a function body comes from an expression function.
8573 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8575 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8576 null exclusions to test Can_Never_Be_Null on the anonymous access types
8577 of the formals rather than testing the formals themselves. Exclude this
8578 check in cases where the Old_Formal is marked as a controlling formal,
8579 to avoid issuing spurious errors for bodies completing dispatching
8580 operations (due to the flag not getting set on controlling access
8581 formals in body specs).
8582 (Find_Corresponding_Spec): When checking full and subtype conformance of
8583 subprogram bodies in instances, pass Designated and E in that order, for
8584 consistency with the expected order of the formals (New_Id followed by
8587 2011-08-02 Robert Dewar <dewar@adacore.com>
8589 * sem_ch8.adb: Minor reformatting.
8591 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8593 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8594 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8595 primitive operations of class-wide actuals.
8597 2011-08-02 Javier Miranda <miranda@adacore.com>
8599 * exp_atag.ads, exp_atag.adb
8600 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8601 since its value is implicitly passed in argument Typ.
8602 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8603 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8604 Build_Common_Dispatching_Select_Statements.
8606 2011-08-02 Robert Dewar <dewar@adacore.com>
8608 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8609 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8612 2011-08-02 Robert Dewar <dewar@adacore.com>
8614 * sem_res.adb: Minor reformatting.
8615 * sem_prag.adb: Minor reformatting.
8617 2011-08-02 Javier Miranda <miranda@adacore.com>
8619 * exp_atag.adb, exp_atags.ads
8620 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8621 by the tagged type Entity. Required to use this routine in the VM
8622 targets since we do not have available the Tag entity in the VM
8625 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8626 Ada.Tags has not been previously loaded.
8628 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8629 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8631 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8632 view of enclosing scopes. Required to handle enclosing scopes that
8633 are synchronized types whose full view is a task type.
8635 (Build_VM_TSDs): Minor code improvement to avoid generating and
8636 analyzing lists with empty nodes.
8637 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8638 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8639 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8640 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8641 (Make_Select_Specific_Data_Table): Add support for VM targets.
8642 (Make_VM_TSD): Generate code to initialize the SSD structure of
8645 2011-08-02 Yannick Moy <moy@adacore.com>
8647 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8648 cross-references section in ALI.
8649 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8650 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8652 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8653 subprogram or package entity of a node
8654 (Is_Local_Reference_Type): new function returns True for references
8655 selected in local cross-references.
8656 (Lt): function extracted from Lt in Output_References
8657 (Write_Entity_Name): function extracted from Output_References
8658 (Generate_Definition): generate reference with type 'D' for definition
8659 of objects (object declaration and parameter specification), with
8660 appropriate locations and units, for use in local cross-references.
8661 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8662 references of type 'I' for initialization in object definition.
8663 (Output_References): move part of function Lt and procedure
8664 Write_Entity_Name outside of the body. Ignore references of types 'D'
8665 and 'I' introduced for local cross-references.
8666 (Output_Local_References): new procedure to output the local
8667 cross-references sections.
8668 (Lref_Entity_Status): new array defining whether an entity is a local
8669 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8670 with 'I' type when initialization expression is present.
8671 * get_scos.adb, get_scos.ads: Correct comments and typos
8673 2011-08-02 Javier Miranda <miranda@adacore.com>
8675 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8677 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8679 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8682 2011-08-02 Vincent Celier <celier@adacore.com>
8684 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8685 (No_Space_Img): New function
8686 (Find_Excluded_Sources): When reading from a file, record the file name
8687 and the line number for each excluded source.
8688 (Mark_Excluded_Sources): When reporting an error, if the excluded
8689 sources were read from a file, include file name and line number in
8692 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8694 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8696 2011-08-02 Robert Dewar <dewar@adacore.com>
8698 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8700 2011-08-02 Javier Miranda <miranda@adacore.com>
8702 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8703 generation of TSDs to the DOTNET compiler.
8704 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8705 generation of TSDs to the DOTNET compiler.
8707 2011-08-02 Javier Miranda <miranda@adacore.com>
8709 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8710 record of all the tagged types declared inside library level package
8711 declarations, library level package bodies or library level subprograms.
8712 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8713 associated with a given tagged type.
8714 (Build_VM_TSDs): New subprogram.
8715 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8716 compilation units that are subprograms.
8717 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8718 compilation units that are package bodies.
8719 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8720 units that are a package declaration or a package instantiation.
8721 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8722 reorganization to improve the error generated by the frontend when the
8723 function Ada.Tags.Secondary_Tag is not available.
8724 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8725 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8727 2011-08-02 Javier Miranda <miranda@adacore.com>
8729 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8731 2011-08-02 Robert Dewar <dewar@adacore.com>
8733 * s-imenne.ads: Minor reformatting.
8735 2011-08-02 Robert Dewar <dewar@adacore.com>
8737 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8738 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8739 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8741 2011-08-02 Robert Dewar <dewar@adacore.com>
8743 * einfo.ads (Materialize_Entity): Document this is only for renamings
8744 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8745 required debug information in the case where we transform the object
8746 declaration into a renaming declaration.
8747 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8749 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8752 2011-08-02 Robert Dewar <dewar@adacore.com>
8754 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8755 Suppress_Init_Procs.
8756 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8757 Suppress_Initialization/Initialization_Suppressed.
8758 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8759 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8760 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8761 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8763 2011-08-02 Robert Dewar <dewar@adacore.com>
8765 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8768 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8770 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8771 only have inheritable classwide pre/postconditions.
8773 2011-08-02 Javier Miranda <miranda@adacore.com>
8775 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8776 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8777 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8778 checks if the external tag of a type is the same as the external tag
8779 of some other declaration.
8781 2011-08-02 Thomas Quinot <quinot@adacore.com>
8783 * s-taskin.ads: Minor reformatting.
8785 2011-08-02 Emmanuel Briot <briot@adacore.com>
8787 * g-comlin.adb (Display_Help): swap the order in which it prints the
8788 short help and the general usage.
8790 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8792 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8793 the aspect declarations and attach them to the generic copy for
8794 subsequent analysis.
8795 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8796 declarations of the generic tree to the new subprogram declarations.
8797 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8798 conditions that apply to a subprogram instance.
8800 2011-08-02 Robert Dewar <dewar@adacore.com>
8802 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8804 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8806 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8807 private type with a tagged full view is not derived in the immediate
8808 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8810 2011-08-02 Robert Dewar <dewar@adacore.com>
8812 * exp_ch4.adb: Minor reformatting.
8814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8816 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8817 Ada2012 iterator, the loop will be rewritten during expansion into a
8818 while loop with a cursor and an element declaration. Do not analyze the
8819 body in this case, because if the container is for indefinite types the
8820 actual subtype of the elements will only be determined when the cursor
8821 declaration is analyzed.
8823 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8825 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8826 size/alignment related attributes in CodePeer_Mode.
8828 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8830 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8831 Prepend_Element, since this can result in the operation getting the
8832 wrong slot in the full type's dispatch table if the full type has
8833 inherited operations. The incomplete type's operation will get added
8834 to the proper position in the full type's primitives
8835 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8836 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8837 dispatching operations, since there are cases where nonprimitive
8838 subprograms can get added to the list of incomplete dependents (such
8839 as subprograms in nested packages).
8840 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8841 private part when determining whether to add a primitive with a
8842 parameter of a tagged incomplete type to the Private_Dependents list.
8843 Such primitives can also occur in the visible part, and should not have
8844 been excluded from being private dependents.
8845 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8846 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8847 list of a Taft-amendment incomplete type is a primitive before issuing
8848 an error that the full type must appear in the same unit. There are
8849 cases where nonprimitives can be in the list (such as subprograms in
8851 * sem_disp.adb (Derives_From): Use correct condition for checking that
8852 a formal's type is derived from the type of the corresponding formal in
8853 the parent subprogram (the condition was completely wrong). Add
8854 checking that was missing for controlling result types being derived
8855 from the result type of the parent operation.
8857 2011-08-02 Yannick Moy <moy@adacore.com>
8859 * errout.adb (First_Node): minor renaming
8860 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8863 2011-08-02 Yannick Moy <moy@adacore.com>
8865 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8866 before accessing operands.
8867 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8868 decide whether an initialization expression respects SPARK rules, as
8869 the plain node is the expanded one. This allows for more valid warnings
8871 * gnat_rm.texi: Minor update.
8873 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8875 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8878 2011-08-02 Robert Dewar <dewar@adacore.com>
8880 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8882 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8884 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8885 loop statements and the element renaming declaration with a block when
8886 the element type is controlled.
8888 2011-08-02 Yannick Moy <moy@adacore.com>
8890 * sinfo.ads: Minor formatting.
8892 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8894 * sem_aggr.adb (Add_Association): if the association has a box and no
8895 expression, use the Sloc of the aggregate itself for the new
8897 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8900 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8902 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8903 When a container is provided via a function call, generate a renaming
8904 of the function result. This avoids the creation of a transient scope
8905 and the premature finalization of the container.
8906 * exp_ch7.adb (Is_Container_Cursor): Removed.
8907 (Wrap_Transient_Declaration): Remove the supression of the finalization
8908 of the list controller when the declaration denotes a container cursor,
8911 2011-08-02 Yannick Moy <moy@adacore.com>
8913 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8914 node is from source, instead of the original node being from source.
8916 (Resolve_Array_Aggregate): refine the check for a static expression, to
8917 recognize also static ranges
8918 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8919 Array_Type_Declaration): postpone the test for the type being a subtype
8920 mark after the type has been resolved, so that component-selection and
8921 expanded-name are discriminated.
8922 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8923 to distinguish the case of an iteration scheme, so that an error is
8924 issed on a non-static range in SPARK except in an iteration scheme.
8925 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8926 In_Iter_Schm = True.
8927 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8928 user-defined operators so that they are allowed in renaming
8930 (Find_Selected_Component): refine the check for prefixing of operators
8931 so that they are allowed in renaming. Move the checks for restrictions
8932 on selector name after analysis discriminated between
8933 component-selection and expanded-name.
8934 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8935 concatenation argument of string type if it is static.
8936 * sem_util.adb, sem_util.ads
8937 (Check_Later_Vs_Basic_Declarations): add a new function
8938 Is_Later_Declarative_Item to decice which declarations are allowed as
8939 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8940 mode, add that renamings are considered as later items.
8941 (Enclosing_Package): new function to return the enclosing package
8942 (Enter_Name): correct the rule for homonyms in SPARK
8943 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8944 from source (result of expansion) to avoid issuing wrong warnings.
8946 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8948 * errout.adb: On anything but an expression First_Node returns its
8951 2011-08-02 Pascal Obry <obry@adacore.com>
8953 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8955 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8957 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8958 Set the associated loop as the related expression of internally
8960 * exp_ch7.adb (Is_Container_Cursor): New routine.
8961 (Wrap_Transient_Declaration): Supress the finalization of the list
8962 controller when the declaration denotes a container cursor.
8964 2011-08-02 Yannick Moy <moy@adacore.com>
8966 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8968 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8969 expression is a simple expression. This check cannot be performed in
8970 the semantics, so just drop it.
8971 (P_Index_Or_Discriminant_Constraint): move check that the index or
8972 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8973 semantics. Other cases were previously checked in the semantics.
8974 * par-ch4.adb (P_Name): move checks that a selector name is not
8975 character literal or an operator symbol to Find_Selected_Component in
8977 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8978 declarations are not placed after later declarations in a separate
8979 procedure in Sem_Util (possibly not the best choice?), to be used both
8980 during parsing, for Ada 83 mode, and during semantic analysis, for
8982 * par-endh.adb (Check_End): move check that end label is not missing
8983 to Process_End_Label in the semantics
8984 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8985 the special case for SPARK restriction
8986 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8987 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8988 parameter Force to issue the error message even on internal node (used
8989 for generated end label). Call Check_Restriction to check when an error
8990 must be issued. In SPARK mode, issue an error message even if the
8991 restriction is not set.
8992 (Check_Restriction): new procedure with an additional out parameter to
8993 inform the caller that a message has been issued
8994 * sem_aggr.adb: Minor modification of message
8995 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8996 instead of issuing an error message directly
8997 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8998 declarations are not placed after later declarations, by calling
8999 Check_Later_Vs_Basic_Declarations
9000 (Analyze_Subtype_Declaration): move here the check that an index or
9001 discriminant constraint must be a subtype mark. Change the check that
9002 a subtype of String must start at one so that it works on subtype marks.
9003 * sem_ch4.adb (Analyze_Call): move here the check that a named
9004 association cannot follow a positional one in a call
9005 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9006 instead of issuing an error message directly
9007 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9008 selector name is not a character literal or an operator symbol. Move
9009 here the check that the prefix of an expanded name cannot be a
9010 subprogram or a loop statement.
9011 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9012 procedure called from parsing and semantics to check that basic
9013 declarations are not placed after later declarations
9014 (Process_End_Label): move here the check that end label is not missing
9016 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9018 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9019 representation clause in codepeer mode, since it confuses CodePeer and
9020 does not bring useful info.
9022 2011-08-02 Ed Falis <falis@adacore.com>
9024 * init.c: initialize fp hw on MILS.
9026 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9028 * errout.adb (First_Node): for bodies, return the node itself (small
9029 optimization). For other nodes, do not check source_unit if the node
9030 comes from Standard.
9032 2011-08-02 Robert Dewar <dewar@adacore.com>
9034 * exp_ch3.adb: Minor comment additions.
9035 * sem_ch13.adb: Minor reformatting.
9037 2011-08-02 Pascal Obry <obry@adacore.com>
9039 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9041 2011-08-02 Robert Dewar <dewar@adacore.com>
9043 * sem_attr.adb: Minor reformatting.
9045 2011-08-02 Robert Dewar <dewar@adacore.com>
9047 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9048 (Has_Default_Component_Value): Removed
9049 * einfo.ads Comment updates
9050 (Has_Default_Aspect): Replaces Has_Default_Value
9051 (Has_Default_Component_Value): Removed
9053 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9055 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9056 (Get_Simple_Init_Val): Handle Default_Value aspect
9057 (Needs_Simple_Initialization): Handle Default_Value aspect
9058 * exp_ch3.ads: Needs_Simple_Initialization
9059 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9060 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9062 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9063 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9064 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9066 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9068 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9069 package containing iteration primitives.
9070 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9072 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9074 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9075 "of", pre-analyze expression in case it is a function call with
9076 finalization actions that must be placed ahead of the loop.
9077 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9078 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9080 2011-08-02 Geert Bosch <bosch@adacore.com>
9082 * cstand.adb (Create_Float_Types): Only consider C's long double for
9083 Long_Long_Float, in addition to double.
9085 2011-08-02 Robert Dewar <dewar@adacore.com>
9087 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9088 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9089 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9094 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9097 2011-08-02 Javier Miranda <miranda@adacore.com>
9099 * einfo.ads, einfo.adb
9100 (Original_Access_Type): Move this attribute to Node26 since there was
9101 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9102 which causes conflicts and breaks the generation of the .NET compiler.
9103 (Interface_Name): Add missing documentation on JGNAT only uses of
9106 2011-08-02 Geert Bosch <bosch@adacore.com>
9108 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9109 (Find_Back_End_Float_Type): Likewise
9110 (Create_Back_End_Float_Types): Likewise
9111 (Create_Float_Types): Likewise
9112 (Register_Float_Type): Likewise
9113 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9114 Nlist and split out type selection in new local Find_Base_Type function.
9115 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9117 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9119 2011-08-02 Robert Dewar <dewar@adacore.com>
9121 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9123 * opt.ads: Minor comment change.
9124 * sem_ch12.adb: Minor code reorganization.
9126 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9128 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9129 subtype's list of rep items to the list on the full subtype in the case
9130 where the lists are the same.
9132 2011-08-02 Geert Bosch <bosch@adacore.com>
9134 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9135 using the one from System.Strings, which also deallocates all strings.
9137 2011-08-02 Geert Bosch <bosch@adacore.com>
9139 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9141 * gcc-interface/Make-lang.in: Update dependencies.
9143 2011-08-02 Olivier Hainque <hainque@adacore.com>
9145 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9148 2011-08-02 Javier Miranda <miranda@adacore.com>
9150 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9151 associated with anonymous access to subprograms.
9153 2011-08-02 Geert Bosch <bosch@adacore.com>
9156 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9157 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9158 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9159 (Add_Symbol_Definition): Move to switch-c.adb
9160 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9161 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9162 (Add_Symbol_Definition): Move to switch-c.adb.
9163 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9165 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9167 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9168 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9170 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9171 (Add_Symbol_Definition): Moved from Prepcomp.
9172 * switch-c.ads: Update copyright notice. Use String_List instead of
9173 Argument_List, removing dependency on System.OS_Lib.
9175 2011-08-02 Yannick Moy <moy@adacore.com>
9177 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9178 mode on initialization expression which does not respect SPARK
9180 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9181 if the tree referenced by its argument represents an initialization
9182 expression in SPARK, suitable for initializing an object in an object
9185 2011-08-02 Javier Miranda <miranda@adacore.com>
9187 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9188 internally generated access to subprogram with its associated protected
9190 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9192 2011-08-02 Geert Bosch <bosch@adacore.com>
9194 * cstand.adb (Register_Float_Type): Print information about type to
9195 register, if the Debug_Flag_Dot_B is set.
9196 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9197 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9198 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9199 with a requested precision of more than Max_Digits digits and no more
9200 than Max_Base_Digits digits, if a range specification is present and the
9201 Predefined_Float_Types list has a suitable type to derive from.
9202 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9203 case of type completion with pragma Import
9205 (Process_Import_Predefined_Type): Processing to complete a type
9206 with pragma Import. Currently supports floating point types only.
9207 (Set_Convention_From_Pragma): Do nothing without underlying type.
9208 (Process_Convention): Guard against absence of underlying type,
9209 which may happen when importing incomplete types.
9210 (Process_Import_Or_Interface): Handle case of importing predefined
9211 types. Tweak error message.
9213 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9215 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9216 functions to previous change. Reorganize code slightly.
9218 2011-08-02 Geert Bosch <bosch@adacore.com>
9220 * back_end.ads (Register_Type_Proc): New call back procedure type for
9221 allowing the back end to provide information about available types.
9222 (Register_Back_End_Types): New procedure to register back end types.
9223 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9225 * cstand.adb (Back_End_Float_Types): New list for floating point types
9226 supported by the back end.
9227 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9228 (Copy_Float_Type): New procedure to make new copies of predefined types.
9229 (Register_Float_Type): New call back procedure to populate the BEFT list
9230 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9231 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9232 (Create_Float_Types): New procedure to create entities for floating
9233 point types predefined in Standard, and put these and any remaining
9234 BEFTs on the Predefined_Float_Types list.
9235 * stand.ads (Predefined_Float_Types): New list for predefined floating
9236 point types that do not have declarations in package Standard.
9238 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9240 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9241 entity node for the unit containing the parameter.
9242 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9243 (Add_Inlined_Subprogram): Likewise.
9244 * gcc-interface/Make-lang.in: Update dependencies.
9246 2011-08-02 Thomas Quinot <quinot@adacore.com>
9248 * s-stusta.adb (Print): Make sure Pos is always initialized to a
9251 2011-08-02 Geert Bosch <bosch@adacore.com>
9253 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9255 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9257 * sem_type.adb (Covers): Move trivial case to the top and reuse the
9258 computed value of Base_Type.
9260 2011-08-02 Yannick Moy <moy@adacore.com>
9262 * restrict.adb (Check_Restriction): issue an error for any use of
9263 class-wide, even if the No_Dispatch restriction is not set.
9264 * sem_aggr.adb: Correct typos in comments and messages in formal mode
9265 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9266 when completing a private extension, the type named in the private part
9267 is not the same as that named in the visible part.
9268 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9269 of an inherited primitive operations of a tagged type or type extension
9270 that returns the tagged type.
9271 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9272 function which returns True for an implicit operation inherited by the
9273 derived type declaration for the argument type.
9274 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9279 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9280 Process_Bounds, to perform analysis with expansion of a range or an
9281 expression that is the iteration scheme for a loop.
9282 (Analyze_Iterator_Specification): If domain of iteration is given by a
9283 function call with a controlled result, as is the case if call returns
9284 a predefined container, ensure that finalization actions are properly
9286 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9288 2011-08-02 Javier Miranda <miranda@adacore.com>
9290 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9291 * gcc-interface/Make-lang.in: Update dependencies.
9293 2011-08-02 Javier Miranda <miranda@adacore.com>
9295 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9296 determine if the analysis is performed using N or Original_Node (N).
9297 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9298 functionality of routine Is_Variable avoids code duplication.
9299 * checks.adb (Determine_Range): Handle temporaries generated by
9300 Remove_Side_Effects.
9302 2011-08-02 Javier Miranda <miranda@adacore.com>
9304 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9305 expansion of the condition. Required since the previous analysis was
9306 done with expansion disabled (see Resolve_Quantified_Expression) and
9307 hence checks were not inserted and record comparisons have not been
9310 2011-08-02 Ed Falis <falis@adacore.com>
9312 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9315 2011-08-02 Bob Duff <duff@adacore.com>
9317 * opt.ads: Minor comment fix.
9319 2011-08-02 Bob Duff <duff@adacore.com>
9321 * sem_ch12.adb (Analyze_Package_Instantiation,
9322 Analyze_Subprogram_Instantiation): Turn off style checking while
9323 analyzing an instance. Whatever style checks that apply to the generic
9324 unit should apply, so it makes no sense to apply them in an instance.
9325 This was causing trouble when compiling an instance of a runtime
9326 unit that violates the -gnatyO switch.
9327 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9328 one of the two case statements, causing spurious errors.
9330 2011-08-02 Robert Dewar <dewar@adacore.com>
9332 * uname.adb: Minor reformatting.
9333 * gnatcmd.adb: Minor reformatting.
9334 * exp_attr.adb: Minor reformatting.
9336 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9338 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9339 No_Dispatching_Calls, do not look for the Assign primitive, because
9340 predefined primitives are not created in this case.
9342 2011-08-02 Bob Duff <duff@adacore.com>
9344 * stylesw.ads: Minor comment fixes.
9346 2011-08-02 Robert Dewar <dewar@adacore.com>
9348 * freeze.adb (Add_To_Result): New procedure.
9350 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9352 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9353 time, if the specific run-time routines for handling streams of strings
9354 are not available, use the default mechanism.
9356 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9358 * s-regpat.ads: Fix typo.
9360 2011-08-02 Vincent Celier <celier@adacore.com>
9362 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9363 not null, call it to create the in memory config project file without
9364 parsing an existing default config project file.
9366 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9368 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9372 * sem_elim.adb: an abstract subprogram does not need an eliminate
9373 pragma for its descendant to be eliminable.
9375 2011-08-02 Ed Falis <falis@adacore.com>
9377 * init.c: revert to handling before previous checkin for VxWorks
9378 * s-intman-vxworks.adb: delete unnecessary declarations related to
9379 using Ada interrupt facilities for handling signals.
9380 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9381 * s-intman-vxworks.ads: Import __gnat_install_handler as
9382 Initialize_Interrupts.
9383 * s-taprop-vxworks.adb: Delete Signal_Mask.
9384 (Abort_Handler): change construction of mask to unblock exception
9387 2011-08-02 Jerome Guitton <guitton@adacore.com>
9389 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9390 Debug_Raise_Exception before propagation starts.
9392 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9394 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9395 to Restriction_Check_Required.
9396 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9397 * sem_res.adb (Resolve_Call): Likewise.
9398 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9400 2011-08-02 Bob Duff <duff@adacore.com>
9402 * stylesw.ads: Update comment.
9403 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9404 * errout.ads: Remove obsolete comment.
9406 2011-08-02 Javier Miranda <miranda@adacore.com>
9408 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9409 (Set_Is_Safe_To_Reevaluate): new procedure.
9410 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9411 assignment is allowed on safe-to-reevaluate variables.
9412 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9413 temporary created to remove side effects in expressions that use
9414 the secondary stack as safe-to-reevaluate.
9415 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9416 variables that are not true constants.
9418 2011-08-02 Robert Dewar <dewar@adacore.com>
9420 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9421 sem_res.adb, sem_ch6.adb: Minor reformatting.
9423 2011-08-02 Jerome Guitton <guitton@adacore.com>
9425 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9427 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9429 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9430 not set Overridden_Operation if subprogram is an initialization
9433 2011-08-02 Yannick Moy <moy@adacore.com>
9435 * par-ch6.adb: Correct obsolete name in comments
9436 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9437 which takes two message arguments (existing function takes one), with
9438 second message used for continuation.
9439 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9440 block statements that originate from a source block statement, not
9441 generated block statements
9442 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9443 symmetry with procedure case
9444 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9445 function to issue an error in formal mode if a package specification
9446 contains more than one tagged type or type extension.
9447 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9448 parameters matching formals of tagged types are objects (or ancestor
9449 type conversions of objects), not general expressions. Issue an error
9450 on view conversions that are not involving ancestor conversion of an
9452 (Resolve_Type_Conversion): in formal mode, issue an error on the
9453 operand of an ancestor type conversion which is not an object
9454 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9455 procedure so that it works also for actuals of function calls
9456 (Is_Actual_Tagged_Parameter): new function which determines if its
9457 argument is an actual parameter of a formal of tagged type in a
9459 (Is_SPARK_Object_Reference): new function which determines if the tree
9460 referenced by its argument represents an object in SPARK
9462 2011-08-02 Robert Dewar <dewar@adacore.com>
9464 * sem_ch3.adb: Minor reformatting
9465 Minor comment addition
9466 Minor error msg text change
9468 2011-08-02 Javier Miranda <miranda@adacore.com>
9470 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9471 function. Used to be more precise when we generate a variable plus one
9472 assignment to remove side effects in the evaluation of the Bound
9474 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9475 of the bound expression to force its re-analysis and thus expand the
9476 associated transient scope (if required). Code cleanup replacing the
9477 previous code that declared the constant entity by an invocation to
9478 routine Force_Evaluation which centralizes this work in the frontend.
9480 2011-08-02 Robert Dewar <dewar@adacore.com>
9482 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9483 (Base_Type): Now uses improved Is_Base_Type function
9484 * einfo.ads (Base_Type): Inline this function
9486 2011-08-02 Robert Dewar <dewar@adacore.com>
9488 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9489 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9491 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9493 * gcc-interface/Make-lang.in: Update dependencies.
9494 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9497 2011-08-02 Yannick Moy <moy@adacore.com>
9499 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9500 non-simple expression used in delta constraint
9501 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9502 index constraint which is not a subtype mark
9503 * par.adb: With and use Restrict
9504 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9505 mode on component type which is not a subtype mark and default
9506 expression on component
9507 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9508 of string which does not have a lower index bound equal to 1
9509 (Array_Type_Declaration): issue an error in formal mode on index or
9510 component type which is not a subtype mark, and on aliased keyword on
9512 (Derived_Type_Declaration): issue an error in formal mode on interface,
9513 limited or abstract type
9514 (Record_Type_Declaration): issue an error in formal mode on interface
9515 (Record_Type_Definition): issue an error in formal mode on tagged types
9516 and type extensions not declared in the specification of a library unit
9517 package; on null non-tagged record; on variant part
9519 2011-08-02 Vincent Celier <celier@adacore.com>
9521 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9522 not declared for qualified library project when Library_Name is not
9523 declared, but Library_Dir is.
9525 2011-08-02 Robert Dewar <dewar@adacore.com>
9527 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9528 pragmas (affects aspects [Component_]Default_Value
9529 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9530 component type for the resolution
9532 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9534 * einfo.adb (Base_Type): Tune implementation for speed.
9536 2011-08-02 Robert Dewar <dewar@adacore.com>
9538 * freeze.adb: Minor reformatting.
9540 2011-08-02 Thomas Quinot <quinot@adacore.com>
9542 * scos.ads: Update comments.
9544 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9546 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9547 base type, because the parent may be a subtype of a private type whose
9548 convention is established in a private part.
9550 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9552 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9553 statement in a block when the expansion of the return expression has
9554 created a finalization chain.
9555 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9556 with the parent node.
9557 Add N_Extended_Return_Statement to handle the case where a transient
9558 object declaration appears in the Return_Object_Declarations list of
9559 an extended return statement.
9561 2011-08-02 Matthew Gingell <gingell@adacore.com>
9563 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9564 unused parameter 'name'.
9566 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9568 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9569 inherited operation, check whether its alias, which is the source
9570 operastion that it renames, has been marked eliminated.
9572 2011-08-02 Javier Miranda <miranda@adacore.com>
9574 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9575 in-mode parameter whose type is an access type since it can be used to
9576 modify its designated object. Enforce code that handles as safe an
9577 access type that is not access-to-constant but it is the result of a
9578 previous removal of side-effects.
9579 (Remove_Side_Effects): Minor code reorganization of cases which require
9580 no action. Done to incorporate documentation on new cases uncovered
9581 working in this ticket: no action needed if this routine was invoked
9582 too early and the nodes are not yet decorated.
9583 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9584 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9585 were issued with actuals that are implicitly provided by
9588 2011-08-02 Robert Dewar <dewar@adacore.com>
9590 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9592 2011-08-02 Yannick Moy <moy@adacore.com>
9594 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9595 to issue an error in formal mode on attribute not supported in this mode
9596 (Analyze_Attribute): issue errors on standard attributes not supported
9598 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9599 comment, and issue error in formal mode on modulus which is not a power
9601 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9603 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9605 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9606 operator on modular type (except 'not').
9608 2011-08-02 Robert Dewar <dewar@adacore.com>
9610 * gnat_rm.texi: Minor reformatting.
9612 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9614 * s-osinte-linux.ads: Minor comment update and reformatting.
9615 * i-cexten.ads: Make this unit pure, as for its parent.
9616 Will allow its usage in more contexts if needed.
9618 2011-08-02 Robert Dewar <dewar@adacore.com>
9620 * s-utf_32.ads: Minor comment fix.
9622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9624 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9625 operation of a tagged synchronized type, handle the case where the
9626 controlling argument is overloaded.
9628 2011-08-02 Yannick Moy <moy@adacore.com>
9630 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9631 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9632 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9633 SPARK mode and formal verification mode on processing SPARK restriction
9634 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9635 requiring consistency checking.
9637 2011-08-02 Robert Dewar <dewar@adacore.com>
9639 * sem_res.adb: Minor reformatting.
9641 2011-08-02 Robert Dewar <dewar@adacore.com>
9643 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9644 a-cforse.ads: Remove unneeded with of Ada.Containers
9645 Remove commented out pragma Inline's
9646 Move specifications of new subprograms to the actual specs
9648 2011-08-02 Yannick Moy <moy@adacore.com>
9650 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9651 a-cforse.ads: Update comments.
9653 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9655 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9657 2011-08-02 Robert Dewar <dewar@adacore.com>
9659 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9660 a-cforse.ads, a-cofove.ads: Minor reformatting.
9662 2011-08-02 Claire Dross <dross@adacore.com>
9664 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9665 a-cofove.ads: Add comments.
9667 2011-08-02 Yannick Moy <moy@adacore.com>
9669 * gnat_rm.texi: Document formal containers.
9671 2011-08-02 Emmanuel Briot <briot@adacore.com>
9673 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9676 2011-08-02 Robert Dewar <dewar@adacore.com>
9678 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9681 2011-08-02 Robert Dewar <dewar@adacore.com>
9683 * aspects.adb: New aspects Default_Value and Default_Component_Value
9684 New format of Aspect_Names table checks for omitted entries
9685 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9686 handling of boolean aspects for derived types.
9687 New aspects Default_Value and Default_Component_Value
9688 New format of Aspect_Names table checks for omitted entries
9689 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9690 (Has_Default_Value): New flag
9691 (Has_Default_Component_Value): New flag
9692 (Has_Default_Value): New flag
9693 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9695 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9696 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9697 Default_Value and Default_Component_Value
9698 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9699 New aspects Default_Value and Default_Component_Value
9700 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9701 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9703 2011-08-02 Vincent Celier <celier@adacore.com>
9705 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9706 inherit library kind.
9708 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9710 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9713 2011-08-02 Robert Dewar <dewar@adacore.com>
9715 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9717 2011-08-02 Yannick Moy <moy@adacore.com>
9719 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9721 2011-08-02 Robert Dewar <dewar@adacore.com>
9723 * impunit.adb: Add comment.
9725 2011-08-02 Yannick Moy <moy@adacore.com>
9727 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9728 qualification of aggregates in formal mode
9729 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9731 (Resolve_Aggregate): complete the test that an aggregate is adequately
9732 qualified in formal mode
9734 2011-08-02 Pascal Obry <obry@adacore.com>
9736 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9737 * mlib-prj.adb: Supress warning when compiling binder generated file.
9738 (Build_Library): Supress all warnings when compiling the binder
9741 2011-08-02 Yannick Moy <moy@adacore.com>
9743 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9745 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9746 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9747 Add with/use clauses to make Check_Formal_Restriction visible
9749 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9751 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9752 in-parameters when type of the generic formal is private in the generic
9753 spec and non-private in the body.
9755 2011-08-02 Claire Dross <dross@adacore.com>
9757 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9758 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9759 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9760 * impunit.adb, Makefile.rtl: Take new files into account.
9762 2011-08-02 Robert Dewar <dewar@adacore.com>
9764 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9765 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9767 2011-08-02 Yannick Moy <moy@adacore.com>
9769 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9771 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9772 matching static array bounds, taking into account the special case of
9774 * sem_ch3.adb: Typo in comment.
9776 2011-08-02 Yannick Moy <moy@adacore.com>
9778 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9779 which issues an error in formal mode if its argument node is originally
9781 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9782 has a discriminant specification so that it does not include the case
9784 (Derived_Type_Declaration): move here the test that a derived type has a
9785 discriminant specification
9786 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9787 first element of a component association before accessing its choices
9788 (presence of component association is not enough)
9789 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9790 declaration is a library item before accessing the next element in a
9791 list, as library items are not member of lists
9792 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9793 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9794 Check_Formal_Restriction whenever possible.
9796 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9798 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9799 reference when needed.
9801 2011-08-02 Bob Duff <duff@adacore.com>
9803 * gnat_ugn.texi: Fix typo.
9805 2011-08-02 Vincent Celier <celier@adacore.com>
9807 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9808 archive file name. Do not use the full path name of archives for Open
9811 2011-08-02 Robert Dewar <dewar@adacore.com>
9813 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9814 Analyze_Aspect_Specifications
9816 (Analyze_Aspect_Specifications): New handling for boolean aspects
9817 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9818 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9819 sequence for Analyze_Aspect_Specifications
9820 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9821 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9823 2011-08-02 Robert Dewar <dewar@adacore.com>
9825 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9826 aspects, since these no longer exist.
9828 2011-08-02 Robert Dewar <dewar@adacore.com>
9830 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9831 semicolon, do not try to see if there are aspects following it.
9832 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9835 2011-08-02 Robert Dewar <dewar@adacore.com>
9837 * sem_ch8.adb, aspects.ads: Minor reformatting.
9839 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9841 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9842 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9844 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9846 2011-08-02 Yannick Moy <moy@adacore.com>
9848 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9849 mode on subprogram declaration outside of package specification, unless
9850 it is followed by a pragma Import
9851 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9852 Access_Type_Declaration): issue error in formal mode on access type
9853 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9855 (Analyze_Object_Declaration): issue error in formal mode on object
9856 declaration which does not respect SPARK restrictions
9857 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9858 declaration which does not respect SPARK restrictions
9859 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9860 error in formal mode on digits or delta constraint
9861 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9862 decimal fixed point type
9863 (Derived_Type_Declaration): issue error in formal mode on derived type
9864 other than type extensions of tagged record types
9865 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9866 with check on access definition
9867 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9868 mode on protected definition.
9869 (Analyze_Task_Definition): issue error in formal mode on task definition
9871 2011-08-02 Robert Dewar <dewar@adacore.com>
9873 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9875 2011-08-02 Javier Miranda <miranda@adacore.com>
9877 * sem_ch6.adb (Can_Override_Operator): New function.
9878 (Verify_Overriding_Indicator): Add missing code to check overriding
9879 indicator in operators. Fixes regression.
9880 (Check_Overriding_Indicator): Minor reformating after replacing the
9881 code that evaluates if the subprogram can override an operator by
9882 invocations to the above new function.
9884 (Write_Field26_Name): Add missing code to ensure that, following
9885 the documentation in einfo.ads, this field is not shown as attribute
9886 "Static_Initialization" on non-dispatching functions.
9888 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9890 * sem_res.adb (Resolve_Call): A call to
9891 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9892 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9893 i.e., when the second parameter is of type Time_Span.
9895 2011-08-02 Vincent Celier <celier@adacore.com>
9897 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9898 with an archive instead of -L<library dir> -l<library name>.
9900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9902 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9903 mark the base types In_Use in addition to making the operations
9906 2011-08-02 Ed Falis <falis@adacore.com>
9908 * init.c: add and setup __gnat_signal_mask for the exception signals
9909 * s-inmaop-vxworks.adb: new file.
9910 * s-intman-vxworks.adb: remove unnecessary initializations and
9912 * s-intman-vxworks.ads: remove unnecessary variable
9913 * s-taprop-vxworks.adb: simplify signal initialization
9915 2011-08-02 Robert Dewar <dewar@adacore.com>
9917 * sem_ch8.adb: Minor code reorganization, comment updates.
9919 2011-08-02 Robert Dewar <dewar@adacore.com>
9921 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9922 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9924 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9925 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9927 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9929 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9930 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9931 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9932 use_type_clauses, to handle more efficiently use_type and use_all_type
9934 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9935 Ada2012 Use_All_Type clause.
9936 (Use_Class_Wide_Operations): new procedure.
9938 2011-08-02 Robert Dewar <dewar@adacore.com>
9940 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9941 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9942 expression to expression function.
9944 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9946 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9947 if types are compatible.
9949 2011-08-02 Yannick Moy <moy@adacore.com>
9951 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9952 returns True if its argument array types have same dimension and same
9953 static bounds at each index.
9954 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9955 OUT or IN OUT paramaters which are not view conversions in SPARK.
9956 (Resolve_Arithmetic_Op): issue an error in formal mode on
9957 multiplication or division with operands of fixed point types which are
9958 not qualified or explicitly converted.
9959 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9960 Boolean or array type (except String) operands.
9961 (Resolve_Equality_Op): issue an error in formal mode on equality
9962 operators for array types other than String with non-matching static
9964 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9965 for array types with non-matching static bounds. Factorize the code in
9966 Matching_Static_Array_Bounds.
9967 (Resolve_Qualified_Expression): issue an error in formal mode on
9968 qualified expressions for array types with non-matching static bounds.
9969 (Resolve_Type_Conversion): issue an error in formal mode on type
9970 conversion for array types with non-matching static bounds
9972 2011-08-02 Robert Dewar <dewar@adacore.com>
9974 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9976 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9978 * par-ch9.adb: save location of entry for proper error message.
9980 2011-08-02 Javier Miranda <miranda@adacore.com>
9982 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9983 (Use_Full_View) which permits this routine to climb through the
9984 ancestors using the full-view of private parents.
9985 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9986 Use_Full_View to true in calls to Is_Ancestor.
9987 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9988 true in call to Is_Ancestor.
9989 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9990 Use_Full_View to true in call to Is_Ancestor.
9991 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9992 call to Is_Ancestor.
9993 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9994 Use_Full_View to true in calls to Is_Ancestor.
9995 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9996 Make_Select_Specific_Data_Table, Register_Primitive,
9997 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9998 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9999 to true in call to Is_Ancestor.
10000 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10001 Use_Full_View to true in calls to Is_Ancestor.
10003 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10004 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10006 2011-08-02 Robert Dewar <dewar@adacore.com>
10008 * gnat_rm.texi: Minor reformatting.
10009 * sem_prag.adb: Minor reformatting.
10011 2011-08-02 Tristan Gingold <gingold@adacore.com>
10013 * vms_data.ads: Add VMS qualifier for -gnateP.
10015 2011-08-02 Robert Dewar <dewar@adacore.com>
10017 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10018 * par-ch7.adb (P_Package): Proper placement of aspects for package
10019 decl/instantiation.
10020 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10021 (End_Statements): Add Is_Sloc parameterr
10022 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10023 (Check_End): Ad Is_Sloc parameter
10024 (End_Statements): Add Is_Sloc parameterr
10026 2011-08-02 Vincent Celier <celier@adacore.com>
10028 * ug_words: Add VMS qualifier equivalent to -gnateP:
10029 /SYMBOL_PREPROCESSING.
10031 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10033 * gnat-style.texi: For hexadecimal numeric literals the typical
10034 grouping of digits is 4 to represent 2 bytes.
10035 A procedure spec which is split into several lines is indented two
10038 2011-08-02 Yannick Moy <moy@adacore.com>
10040 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10041 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10042 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10044 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10045 choice in array aggregate
10046 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10048 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10049 positional and named aggregate for record, or others in record
10050 aggregate, or multiple choice in record aggregate
10051 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10052 array operands to logical operations AND, OR and XOR do not have the
10053 same static lower and higher bounds
10054 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10056 2011-08-01 Robert Dewar <dewar@adacore.com>
10058 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10059 Replaces Last_Source_Node_In_Sequence.
10060 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10061 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10062 parens and blank in string (this was inconsistently implemented).
10064 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10065 blank in string (this was inconsistently implemented).
10067 (Set_Global_Switches): Set formal mode switches appropriately
10068 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10070 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10071 call Set_Error_Msg_Lang to set "spark" as language name.
10072 * par.adb: Remove unnecessary call to set formal language for errout
10073 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10074 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10076 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10077 calls to it, moved after resolution so that types are known
10078 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10079 result of concatenation is not of type String
10080 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10081 concatenation is not properly restricted
10082 * gnat_rm.texi: Add doc on pragma Spark_95.
10083 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10084 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10085 * gcc-interface/Make-lang.in: Update dependencies.
10087 2011-08-01 Javier Miranda <miranda@adacore.com>
10089 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10090 condition that detects if the overridden operation must replace an
10093 2011-08-01 Javier Miranda <miranda@adacore.com>
10095 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10096 code declarations inserted by Insert_Actions in each alternative of the
10097 N_Case_Expression node.
10099 2011-08-01 Robert Dewar <dewar@adacore.com>
10101 * sem_ch6.adb: Minor code reorganization.
10102 * sem_util.adb: Minor reformatting.
10104 2011-08-01 Pascal Obry <obry@adacore.com>
10106 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10107 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10109 2011-08-01 Yannick Moy <moy@adacore.com>
10111 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10112 literal or operator symbol which is prefixed
10113 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10114 mode on access attributes.
10115 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10116 that concatenation operands are properly restricted in formal mode
10117 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10118 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10119 result of the concatenation has a type different from String.
10120 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10121 Analyze_Quantified_Expression, Analyze_Slice,
10122 Analyze_Null): issue an error in formal mode on unsupported constructs
10124 (Analyze_Block_Statement): only issue error on source block statement
10125 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10126 function which returns the last node in a list of nodes for which
10127 Comes_From_Source returns True, if any
10128 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10129 Last_Source_Node_In_Sequence
10130 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10131 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10132 mode on unsupported constructs
10133 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10134 rest of the actions may be needed later on since the error is marked as
10136 * sinfo.ads: Typos in comments.
10138 2011-08-01 Pascal Obry <obry@adacore.com>
10140 * projects.texi: Minor editing.
10142 2011-08-01 Yannick Moy <moy@adacore.com>
10144 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10145 insertion character ~~
10146 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10147 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10148 with insertion character ~~
10149 (Set_Msg_Text): treat insertion character ~~
10150 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10151 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10152 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10153 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10154 errors related to the formal language restriction not serious
10155 (insertion character |).
10156 * par.adb (Par): set formal language for error messages if needed
10157 * sem_ch6.adb (Check_Missing_Return): take into account possible
10158 generated statements at the end of the function
10159 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10160 enumeration value to define a new pragma SPARK_95
10161 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10162 SPARK_Version): new type and variables to store the SPARK version
10164 (SPARK_Mode): return True when SPARK_Version is set
10165 * par-prag.adb: Correct indentation
10166 (Prag): take Pragma_SPARK_95 into account
10167 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10170 2011-08-01 Robert Dewar <dewar@adacore.com>
10172 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10173 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10174 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10176 2011-08-01 Pascal Obry <obry@adacore.com>
10178 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10179 Target_Name to Get_Path call.
10180 (Parse_Single_Project): Likewise.
10181 (Post_Parse_Context_Clause): Likewise.
10182 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10183 Call Initialise_Project_Path with the proper Target_Name.
10184 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10186 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10187 with the proper Target_Name.
10188 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10189 Part.Parse routine.
10190 (Parse_Project_And_Apply_Config): Likewise.
10191 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10192 This is fine as this part of the code is supporting only native
10194 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10195 is fine as this part of the code is supporting only native compilation.
10197 2011-08-01 Yannick Moy <moy@adacore.com>
10199 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10200 of homonym, unless the homonym is one of the cases allowed in SPARK
10201 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10202 package declaration occurring after a body.
10204 2011-08-01 Robert Dewar <dewar@adacore.com>
10206 * checks.adb, exp_ch4.adb: Minor reformatting.
10208 2011-08-01 Javier Miranda <miranda@adacore.com>
10210 * einfo.ads (Access_Disp_Table): Fix documentation.
10211 (Dispatch_Table_Wrappers): Fix documentation.
10213 2011-08-01 Pascal Obry <obry@adacore.com>
10215 * prj-env.adb, prj-env.ads: Minor reformatting.
10217 2011-08-01 Yannick Moy <moy@adacore.com>
10219 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10220 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10221 procedures out of these packages.
10222 * errout.ads, errout.adb
10223 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10224 procedures in of this package
10225 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10226 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10227 on misplaced later vs initial declarations, like in Ada 83
10228 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10229 formal mode on attribute of private type whose full type declaration
10231 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10232 package declaration inside a package specification
10233 (Analyze_Full_Type_Declaration): issue error in formal mode on
10234 controlled type or discriminant type
10235 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10236 user-defined operator means that it should come from the source
10237 (New_Overloaded_Entity): issue error in formal mode on overloaded
10239 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10241 2011-08-01 Thomas Quinot <quinot@adacore.com>
10243 * atree.adb: Minor reformatting.
10244 * checks.adb: Minor reformatting.
10246 2011-08-01 Vincent Celier <celier@adacore.com>
10248 * s-parame-vms-ia64.ads: Fix typo in comment
10250 * s-parame-vms-restrict.ads: Removed, unused.
10252 2011-08-01 Javier Miranda <miranda@adacore.com>
10255 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10257 (Constrain_Index): Remove side effects in the evaluation of the bounds.
10258 * sem_ch3.ads, sem_ch3.adb
10259 (Is_Constant_Bound): New extended version of the subprogram that was
10260 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10261 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10262 * sem_aux.ads (Constant_Value): Fix typo in comment.
10263 * checks.adb (Generate_Index_Checks): New implementation which, for
10264 array objects with constant bounds, generates the runtime check
10265 referencing the bounds of the array type. For other cases this routine
10266 provides its previous behavior obtaining such values from the array
10268 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10270 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10271 we cannot have semantic interpretations of the new node.
10273 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10275 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10278 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10280 * sem_ch8.adb: Minor code editing.
10281 * s-vxwext.adb: Remove trailing space.
10282 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10283 consistency with other files.
10285 2011-08-01 Thomas Quinot <quinot@adacore.com>
10287 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10289 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10291 * par-ch10.adb: reject parameterized expressions as compilation unit.
10292 * sem_ch4.adb: handle properly conditional expression with overloaded
10293 then_clause and no else_clause.
10295 2011-08-01 Tristan Gingold <gingold@adacore.com>
10297 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10298 like done by System.Aux_DEC.
10299 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10301 2011-08-01 Yannick Moy <moy@adacore.com>
10303 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10304 missing label at end of declaration (subprogram or package)
10305 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10306 of positional and named parameter association
10307 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10308 Error_Msg_SP which adds a prefix to the error message giving the name
10309 of the formal language analyzed
10310 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10311 access result type in subprogram, unconstrained array as result type,.
10312 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10314 * sem_ch8.adb: Code clean up.
10316 2011-08-01 Javier Miranda <miranda@adacore.com>
10318 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10319 * einfo.ads (Access_Disp_Table): Fix documentation.
10320 (Dispatch_Table_Wrappers): Fix documentation.
10321 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10322 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10323 to enforce the documentation of this attribute.
10324 (Set_Is_Interface): Cleanup the assertion.
10325 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10326 the Underlying_Type entity before reading attribute Access_Disp_Table.
10327 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10328 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10329 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10330 the Underlying_Type entity before reading attribute Access_Disp_Table.
10331 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10332 Locate the Underlying_Type entity before reading attribute
10335 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10337 * s-poosiz.ads: Additional overriding indicators.
10339 2011-08-01 Yannick Moy <moy@adacore.com>
10341 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10343 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10344 parameter specification does not include a subtype mark.
10345 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10346 formal mode on abstract subprogram.
10347 (Analyze_Subprogram_Specification): issue error in formal mode on
10348 user-defined operator.
10349 (Process_Formals): issue error in formal mode on access parameter and
10350 default expression.
10351 * sem_ch9.adb (Analyze_Abort_Statement,
10352 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10353 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10354 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10355 Analyze_Requeue, Analyze_Selective_Accept,
10356 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10357 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10358 issue error in formal mode on user-defined raise statement.
10360 2011-08-01 Thomas Quinot <quinot@adacore.com>
10362 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10363 declaration being hidden when overriding an implicit inherited
10365 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10366 (-gnats), do not complain about a source file that contains only a
10369 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10371 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10372 variable if already set.
10374 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10376 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10377 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10378 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10379 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10380 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10381 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10382 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10383 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10384 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10385 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10386 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10387 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10388 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10389 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10390 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10391 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10392 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10393 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10394 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10395 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10396 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10397 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10398 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10399 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10400 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10401 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10402 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10403 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10404 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10405 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10406 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10407 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10408 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10409 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10410 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10411 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10412 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10413 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10414 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10415 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10416 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10417 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10418 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10419 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10420 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10421 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10422 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10423 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10424 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10425 Use GNAT instead of GNARL.
10427 2011-08-01 Bob Duff <duff@adacore.com>
10429 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10430 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10431 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10434 2011-08-01 Yannick Moy <moy@adacore.com>
10436 * debug.adb (d.D) reverve flag for the SPARK mode
10437 (d.E) reverve flag for SPARK generation mode
10438 (d.F) reverve flag for Why generation mode
10439 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10440 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10441 functions which return True when the corresponding modes are set
10442 (Formal_Language): return "spark" or "alfa" when in formal verification
10444 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10445 Error_Msg to prefix the error message with a tag giving the formal
10447 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10448 message with a tag giving the formal language
10449 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10451 (Analyze_Case_Statement): issue error in formal mode on case statement
10452 with a single "others" case alternative
10453 (Analyze_Exit_Statement): issue errors in formal mode on exit
10454 statements which do not respect SPARK restrictions
10455 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10456 (Check_Unreachable_Code): always issue an error (not a warning) in
10457 formal mode on unreachable code (concerns both code after an infinite
10458 loop and after an unconditional jump, both not allowed in SPARK)
10459 * sem_ch6.adb (Analyze_Return_Statement): add call to
10460 Set_Return_Present for a procedure containing a return statement
10461 (already done for functions in Analyze_Function_Return)
10462 (Analyze_Function_Return): issue error in formal mode on extended
10463 return or if return is not last statement in function
10464 (Check_Missing_Return): issue error in formal mode if function does
10465 not end with return or if procedure contains a return
10466 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10467 function to detect if there is an inner scope of its parameter S which
10470 2011-08-01 Thomas Quinot <quinot@adacore.com>
10472 * sem_ch6.ads: Minor reformatting.
10474 2011-08-01 Javier Miranda <miranda@adacore.com>
10476 * sem_util.adb (Abstract_Interface_List): Complete condition when
10477 processing private type declarations to avoid reading unavailable
10479 (Is_Synchronized_Tagged_Type): Complete condition when processing
10480 private extension declaration nodes to avoid reading unavailable
10483 2011-08-01 Thomas Quinot <quinot@adacore.com>
10485 * sem_ch3.adb: Minor reformatting.
10487 2011-08-01 Thomas Quinot <quinot@adacore.com>
10489 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10490 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10491 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10492 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10493 for VMS, instead parametrize the common implementation with
10494 System.Parameters declarations.
10496 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10498 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10500 2011-08-01 Tristan Gingold <gingold@adacore.com>
10502 * seh_init.c: Fix SEH handler installation on win64.
10504 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10506 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10507 double analysis of an anonymous access to subprogram, because it can
10508 lead to improper sharing of profiles and a back-end crash.
10510 2011-08-01 Robert Dewar <dewar@adacore.com>
10512 * make.adb, sem_ch4.adb: Minor reformatting.
10513 * gcc-interface/Make-lang.in: Update dependencies.
10514 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10516 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10518 * gnat_rm.texi: Fix definition of Long_Integer.
10520 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10522 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10523 to prevent storage exhaustion.
10524 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10525 finalized is a function body, insert the cleanup code before the final
10526 return statement, to prevent spurious warnings.
10527 * s-pooglo.ads: add overriding indicator.
10529 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10531 * sem_ch4.adb (Operator_Check): improve error message when both a
10532 with_clause and a use_clause are needed to make operator usage legal.
10533 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10534 determine whether a compilation unit is visible within an other,
10535 either through a with_clause in the current unit, or a with_clause in
10536 its library unit or one one of its parents.
10538 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10540 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10541 over an arbitrary expression of an array or container type.
10542 * lib-xref.adb: clarify comment.
10544 2011-08-01 Bob Duff <duff@adacore.com>
10546 * einfo.ads: Minor reformatting.
10547 * debug.adb: Minor comment improvement.
10549 2011-08-01 Javier Miranda <miranda@adacore.com>
10551 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10552 consider hidden subprograms as valid candidates.
10554 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10556 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10558 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10560 * gnat_ugn.texi: Fix typo.
10562 2011-08-01 Robert Dewar <dewar@adacore.com>
10564 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10565 lib-xref.adb: Minor reformatting
10567 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10569 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10570 when to generate a call to Move_Final_List.
10571 (Has_Controlled_Parts): Remove this function.
10573 2011-08-01 Geert Bosch <bosch@adacore.com>
10575 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10576 "," in choice list.
10578 2011-08-01 Thomas Quinot <quinot@adacore.com>
10580 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10581 explicit raise of a predefined exception as Comes_From_Source if the
10582 original N_Raise_Statement comes from source.
10584 2011-08-01 Robert Dewar <dewar@adacore.com>
10586 * sinfo.ads: Add comment.
10587 * sem_ch6.adb: Minor reformatting.
10589 2011-08-01 Robert Dewar <dewar@adacore.com>
10591 * freeze.adb (Freeze_Entity): Refine check for bad component size
10592 clause to avoid rejecting confirming clause when atomic/aliased present.
10594 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10596 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10597 better determine whether an entity reference is a write.
10598 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10600 * lib-xref.adb (Output_References): Do no suppress a read reference at
10601 the same location as an immediately preceeding modify-reference, to
10602 handle properly in-out actuals.
10604 2011-08-01 Tristan Gingold <gingold@adacore.com>
10606 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10608 2011-08-01 Quentin Ochem <ochem@adacore.com>
10610 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10611 heap to compute the result.
10613 2011-08-01 Robert Dewar <dewar@adacore.com>
10615 * atree.ads: Minor reformatting.
10617 2011-08-01 Emmanuel Briot <briot@adacore.com>
10619 * g-expect.adb (Get_Command_Output): Fix memory leak.
10621 2011-08-01 Geert Bosch <bosch@adacore.com>
10623 * cstand.adb (P_Float_Type): New procedure to print the definition of
10624 predefined fpt types.
10625 (P_Mixed_Name): New procedure to print a name using mixed case
10626 (Print_Standard): Use P_Float_Type for printing floating point types
10627 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10628 precision IEEE float.
10630 2011-08-01 Thomas Quinot <quinot@adacore.com>
10632 * sem_ch3.adb: Minor reformatting.
10634 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10636 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10637 the completion of a generic function, insert the new body rather than
10638 rewriting the original.
10640 2011-08-01 Yannick Moy <moy@adacore.com>
10642 * sinfo.ads, errout.ads: Typos in comments.
10644 2011-08-01 Robert Dewar <dewar@adacore.com>
10646 * par-endh.adb: Minor reformatting.
10648 2011-08-01 Robert Dewar <dewar@adacore.com>
10650 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10651 (Pre_Post_Aspects): New subtype.
10652 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10653 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10654 * par-ch7.adb (P_Package): Remove Decl parameter
10655 (P_Package): Handle new syntax for aspects (before IS)
10656 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10658 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10659 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10660 (P_Package): Remove Decl parameter
10661 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10663 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10665 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10666 * sinfo.ads: Document new syntax for aspects in packages etc.
10667 * sprint.adb: Handle new syntax of aspects before IS in package
10669 2011-08-01 Thomas Quinot <quinot@adacore.com>
10671 * atree.ads: Minor reformatting.
10672 * sem_prag.adb: Minor reformatting.
10674 2011-08-01 Robert Dewar <dewar@adacore.com>
10676 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10677 case expr alternative.
10679 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10681 * sem_ch12.adb: Fix typo.
10683 2011-08-01 Geert Bosch <bosch@adacore.com>
10685 * sem_prag.adb (Check_No_Link_Name): New procedure.
10686 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10687 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10688 instead of Standard_Long_Long_Float_Size global. Preparation for
10689 eventual removal of per type constants.
10690 * exp_util.ads (Get_Stream_Size): New function returning the stream
10691 size value of subtype E.
10692 * exp_util.adb (Get_Stream_Size): Implement new function.
10693 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10695 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10697 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10699 2011-08-01 Geert Bosch <bosch@adacore.com>
10701 * cstand.adb: Fix comments.
10702 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10703 count of arguments.
10705 2011-08-01 Robert Dewar <dewar@adacore.com>
10707 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10709 2011-08-01 Geert Bosch <bosch@adacore.com>
10711 * atree.ads: Fix comment.
10713 2011-08-01 Robert Dewar <dewar@adacore.com>
10715 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10716 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10717 * par.adb: Add with for Namet.Sp.
10718 * par-tchk.adb: Minor reformatting.
10720 2011-08-01 Vincent Celier <celier@adacore.com>
10722 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10723 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10724 of the init procedure of a SAL.
10725 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10728 2011-08-01 Thomas Quinot <quinot@adacore.com>
10730 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10733 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10735 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10737 2011-08-01 Thomas Quinot <quinot@adacore.com>
10739 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10740 conformant with its spec (return True only for types that have
10741 an overriding Initialize primitive operation that prevents them from
10742 having preelaborable initialization).
10743 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10744 initialization for controlled types in Ada 2005 or later mode.
10746 2011-08-01 Robert Dewar <dewar@adacore.com>
10748 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10750 (Same_Aspect): New function.
10751 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10752 Type_Invariant, Precondition, Postcondition.
10753 * snames.ads-tmpl: Add Name_Type_Invariant.
10755 2011-08-01 Robert Dewar <dewar@adacore.com>
10757 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10759 (Freeze_All_Ent): Fix error in handling inherited aspects.
10760 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10761 already analyzed, but don't skip entire processing of a declaration,
10762 that's wrong in some cases of declarations being rewritten.
10763 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10764 Don't delay for integer, string literals
10765 Treat predicates in usual manner for delay, remove special case code,
10767 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10768 (Build_Predicate_Function): Update saved expression in aspect
10769 (Build_Invariant_Procedure): Update saved expression in aspect
10770 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10771 of replacement of discriminant references if the reference is simple.
10773 2011-08-01 Robert Dewar <dewar@adacore.com>
10775 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10776 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10777 Static_Predicate and Dynamic_Predicate.
10778 (Build_Predicate_Function): Add processing for Static_Predicate
10779 and Dynamic_Predicate.
10780 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10781 (From_Static_Predicate): New flag
10782 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10784 2011-08-01 Robert Dewar <dewar@adacore.com>
10786 * usage.adb: Documentation cleanup for Ada version modes in usage.
10787 * expander.adb: Minor reformatting.
10789 2011-08-01 Robert Dewar <dewar@adacore.com>
10791 * atree.ads: Minor comment fix.
10792 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10793 a-witeio.ads, sem_prag.adb: Minor reformatting.
10795 2011-08-01 Doug Rupp <rupp@adacore.com>
10797 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10798 pointers. Use descrip.h header file for convenience. Add some
10801 2011-08-01 Robert Dewar <dewar@adacore.com>
10803 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10804 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10805 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10807 (Check_Aspect_At_End_Of_Declarations): New procedure
10808 (Analye_Aspect_Specification): Minor changes for above procedures
10809 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10810 specification node as well.
10812 2011-08-01 Pascal Obry <obry@adacore.com>
10814 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10815 Windows files. Use GetFilesAttributes() in this case to check for file
10816 existence instead of returning with an error code.
10818 2011-08-01 Vincent Celier <celier@adacore.com>
10820 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10821 High is above Source length.
10823 2011-08-01 Robert Dewar <dewar@adacore.com>
10825 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10827 2011-08-01 Robert Dewar <dewar@adacore.com>
10829 * aspects.ads (Boolean_Aspects): New subtype.
10830 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10831 for derived types in cases where the parent type and derived type have
10833 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10834 with aspects when parent type also has aspects.
10835 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10836 boolean expression at this point).
10837 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10838 accordance with final decision on the Ada 2012 feature.
10839 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10841 2011-08-01 Matthew Heaney <heaney@adacore.com>
10843 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10845 2011-08-01 Pascal Obry <obry@adacore.com>
10847 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10848 Fix Replace_Slice when High is above current string size.
10849 (Replace_Slice): Fix DL computation when High is above current
10852 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10854 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10856 2011-08-01 Matthew Heaney <heaney@adacore.com>
10858 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10861 2011-08-01 Pascal Obry <obry@adacore.com>
10863 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10866 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10868 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10869 access to protected subprograms in generic bodies.
10870 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10871 protected type, indicate that the convention of the subprogram is
10872 Convention_Protected, because it may be used in subsequent declarations
10873 within the protected declaration.
10875 2011-08-01 Vincent Celier <celier@adacore.com>
10877 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10878 and "final" procedures when the name of the library is "ada", to avoid
10879 duplicate symbols "adainit" and "adafinal" in executables.
10881 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10883 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10884 quantified expression that appears within a postcondition and uses the
10885 Ada2012 'Result attribute.
10887 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10889 * init.c (__gnat_error_handler): Cast reason to int.
10890 (__gnat_install_handler): Explain sa_sigaction use.
10892 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10894 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10895 subprogram has copy-in copy-out parameters, try to promote the mode of
10896 the return type if it is passed in registers.
10898 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10900 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10901 left operand as addressable.
10903 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10905 * gcc-interface/gigi.h (build_function_stub): Remove.
10906 (build_return_expr): Likewise.
10907 (convert_vms_descriptor): Declare.
10908 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10909 (build_function_stub): Move to...
10910 * gcc-interface/utils2.c (build_return_expr): Move to...
10911 * gcc-interface/trans.c (build_function_stub): ...here.
10912 (build_return_expr): ...here.
10913 (Subprogram_Body_to_gnu): Add local variable for language_function.
10914 Disconnect the parameter attributes cache, if any, once done with it.
10915 Call end_subprog_body only after setting the end_locus.
10916 Build the stub associated with the function, if any, at the very end.
10917 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10918 variables and streamline control flow.
10920 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10923 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10924 g-trasym-dwarf.adb.
10926 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10929 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10930 Assign to act.sa_sigaction.
10931 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10932 current->return_address to char * before arithmetic.
10934 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10936 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10937 Correct argument types.
10938 Extract code from reason.
10939 (__gnat_install_handler): Assign to act.sa_sigaction.
10941 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10943 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10944 (GNAT1_OBJS): ...here.
10946 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10949 * g-socthi-mingw.adb (Fill): Fix formatting.
10951 * gcc-interface/gigi.h: Move around comment.
10953 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10956 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10958 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10961 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10963 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10965 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10966 range comparison if Pmode is SImode.
10968 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10969 Eric Botcazou <ebotcazou@adacore.com>
10971 * adadecode.c: Wrap up in extern "C" block.
10972 * adadecode.h: Likewise.
10973 * adaint.c: Likewise. Remove 'const' keyword.
10974 * adaint.h: Likewise.
10975 * argv.c: Likewise.
10976 * atree.h: Likewise.
10978 * cstreams.c: Likewise.
10980 * exit.c: Likewise.
10982 * final.c: Likewise.
10983 * init.c: Likewise.
10984 * initialize.c: Likewise.
10985 * link.c: Likewise.
10986 * namet.h: Likewise.
10987 * nlists.h: Likewise.
10988 * raise.c: Likewise.
10989 * raise.h: Likewise.
10990 * repinfo.h: Likewise.
10991 * seh_init.c: Likewise.
10992 * targext.c: Likewise.
10993 * tracebak.c: Likewise.
10994 * uintp.h: Likewise.
10995 * urealp.h: Likewise.
10996 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10997 * xsinfo.adb: Likewise.
10998 * xsnamest.adb: Likewise.
10999 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11000 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11001 * gcc-interface/misc.c: Likewise.
11002 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11003 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11004 ada/targext.o here...
11005 (GNAT_ADA_OBJS): ...and not here.
11006 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11007 (GNATBIND_OBJS): Reorder.
11009 2011-07-07 Richard Henderson <rth@redhat.com>
11011 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11012 dwarf2out_frame_init.
11014 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11016 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11018 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11021 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11023 2011-07-06 Richard Guenther <rguenther@suse.de>
11025 * gcc-interface/misc.c (gnat_init): Merge calls to
11026 build_common_tree_nodes and build_common_tree_nodes_2.
11027 Re-initialize boolean_false_node.
11029 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11030 Olivier Hainque <hainque@adacore.com>
11031 Nicolas Setton <setton@adacore.com>
11033 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11034 the type according to the ARTIFICIAL_P parameter.
11035 (create_type_decl): Likewise.
11036 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11038 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11040 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11041 (gnatbind): Likewise.
11043 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11045 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11047 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11049 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11050 local variable throughout. Remove useless call to Base_Type.
11051 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11052 Take it also into account for the volatileness of the field. Set the
11053 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11055 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11057 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11058 on a dereference built for a by-ref object if it has an address clause.
11060 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11062 * einfo.ads (Address_Taken): Document use for the second argument of
11063 Asm_Input and Asm_Output attributes.
11064 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11065 argument is an entity name, then set Address_Taken on it.
11066 <Attribute_Asm_Output>: Likewise.
11067 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11068 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11069 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11070 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11072 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11074 PR middle-end/46500
11075 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11077 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11079 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11080 (ada/utils.o): Update dependencies.
11081 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11082 ../../../libcpp/libcpp.a.
11083 * gcc-interface/utils.c: Include common/common-target.h.
11084 (process_attributes): Use targetm_common.have_named_sections.
11086 2011-06-07 Richard Guenther <rguenther@suse.de>
11088 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11091 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11093 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11094 TREE_THIS_NOTRAP flag.
11096 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11098 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11101 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11103 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11104 constants whose full view has discriminants specially.
11106 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11108 * gcc-interface/utils.c: Include diagnostic.h.
11109 (gnat_write_global_declarations): Output debug information for all
11110 global type declarations before finalizing the compilation unit.
11111 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11113 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11115 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11117 2011-05-25 Kai Tietz <ktietz@redhat.com>
11119 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11120 initialization instead of const/none-const pointer assignment.
11122 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11124 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11125 $(EXTRA_GNAT1_OBJS).
11126 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11127 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11128 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11129 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11130 libcommon-target.a instead of prefix.o.
11132 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11135 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11137 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11139 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11140 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11141 instead of version.o.
11143 2011-05-18 Kai Tietz <ktietz@redhat.com>
11145 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11146 boolean_false_node instead of integer_zero_node.
11147 (convert_with_check): Likewise.
11148 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11150 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11152 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11153 type of the parameter is an unconstrained array, convert the actual to
11154 the type of the formal in the In Out and Out cases as well.
11156 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11158 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11159 call build_function_type_array or build_varargs_function_type_array
11161 (create_subprog_type): Don't call build_function_type; call
11162 build_function_type_vec instead.
11164 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11166 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11167 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11168 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11170 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11172 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11174 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11175 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11177 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11179 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11181 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11183 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11184 instead of accessing TYPE_ARG_TYPES directly.
11185 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11187 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11190 * gcc-interface/gigi.h (get_variant_part): Declare.
11191 * gcc-interface/decl.c (get_variant_part): Make global.
11192 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11193 types have the same constant size, are record types and T1 has a
11194 variant part while T2 doesn't.
11196 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11198 * gcc-interface/utils.c (begin_subprog_body): Do not call
11200 (end_subprog_body): Likewise.
11202 2011-05-04 Richard Guenther <rguenther@suse.de>
11204 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11206 (pos_to_constructor): Likewise.
11208 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
11209 Eric Botcazou <ebotcazou@adacore.com>
11211 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11212 of build_function_type. Adjust calls to...
11213 (build_raise_check): ...this. Do not take a void_tree parameter.
11214 Call build_function_type_list instead of build_function_type.
11215 Fix head comment and swap couple of conditional blocks.
11217 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11219 * gnatvsn.ads (Library_Version): Bump to 4.7.
11220 (Current_Year): Bump to 2011.
11222 2011-04-29 Michael Matz <matz@suse.de>
11224 * gcc-interface/misc.c (gnat_handle_option): Set
11225 warn_maybe_uninitialized.
11227 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11229 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11230 the Watson/McCabe paper.
11232 2011-04-23 Jim Meyering <meyering@redhat.com>
11234 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11236 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11238 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11241 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11243 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11245 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
11246 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11247 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11248 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11249 <all>: Do not set flags on the reused DECL node coming from an alias.
11250 Set DECL_IGNORED_P on the DECL node built for subprograms if they
11251 don't need debug info here...
11252 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11253 (gigi): Adjust calls to create_subprog_decl.
11254 (build_raise_check): Likewise.
11255 (establish_gnat_vms_condition_handler): Likewise.
11256 (Compilation_Unit_to_gnu): Likewise.
11257 (gnat_to_gnu): Likewise.
11259 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
11261 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11262 (NO_REORDER_ADAFLAGS): New variable.
11263 (EXTRA_GNATTOOLS): Always define.
11264 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11265 Clean up and adjust list of files compiled with special options.
11266 * gcc-interface/Make-lang.in: Likewise.
11267 (ada/decl.o): Cosmetical change.
11268 (ada/misc.o): Remove dependency on $(PLUGIN_H).
11270 2011-04-20 Jim Meyering <meyering@redhat.com>
11272 * initialize.c (__gnat_initialize): Remove useless if-before-free.
11274 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11276 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11277 $(CFLAGS) on the link line.
11279 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11281 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11282 padded type built for the return type if it is unconstrained.
11284 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
11286 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11288 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11290 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11291 before calling TREE_CHAIN.
11292 * gcc-interface/misc.c (gnat_init_ts): New function.
11293 (LANG_HOOKS_INIT_TS): Define.
11295 2011-04-12 Martin Jambor <mjambor@suse.cz>
11297 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11298 instead of cgraph_node.
11300 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11302 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11303 alignment on fields of the RETURN type built for the Copy-In Copy-Out
11306 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11308 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11309 of aggregate types that contain a placeholder.
11311 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11313 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11315 (handle_type_generic_attribute): Likewise.
11317 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11320 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11322 2011-04-04 Kai Tietz <ktietz@redhat.com>
11325 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11328 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11330 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11331 type case, do not strip a padding type around the array type.
11333 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11335 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11338 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11340 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11341 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11342 code for -feliminate-unused-debug-types.
11343 (gnat_post_options): Likewise.
11345 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11347 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11348 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11351 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11353 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11354 DECL_ARTIFICIAL flag on enumeration types.
11356 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11358 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11359 fat pointer types artificial unconditionally.
11360 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11363 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11365 * gcc-interface/gigi.h (get_dummy_type): Declare.
11366 (build_dummy_unc_pointer_types): Likewise.
11367 (finish_fat_pointer_type): Likewise.
11368 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11369 fat pointer type has been built, complete it in place.
11370 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11371 and thin pointers. Remove useless variable.
11372 (finish_fat_pointer_type): Make global and move to...
11373 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11374 (get_dummy_type): New function.
11375 (build_dummy_unc_pointer_types): Likewise.
11376 (gnat_pushdecl): Propage the name to the anonymous variants only.
11377 (update_pointer_to): Only adjust the pointer types in the unconstrained
11380 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11382 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11383 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11384 if this is a Taft amendment type and the full declaration is available.
11385 * gcc-interface/trans.c (process_type): Likewise.
11386 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11387 (process_freeze_entity): Likewise.
11388 * gcc-interface/utils.c (dummy_global): New static variable.
11389 (gnat_write_global_declarations): If there are types declared as used
11390 at the global level, insert them in the global hash table.
11392 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11394 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11395 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11396 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11398 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11399 flag of the type accordingly.
11400 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11402 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11404 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11405 finalizing types when updating the pointers to the designated type.
11406 <all>: Finalize the deferred types even if we didn't defer processing
11407 of incomplete types in this invocation.
11409 2011-04-01 Olivier Hainque <hainque@adacore.com>
11410 Nicolas Setton <setton@adacore.com>
11411 Eric Botcazou <ebotcazou@adacore.com>
11413 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11414 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11416 2011-03-28 Kai Tietz <ktietz@redhat.com>
11418 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11420 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11421 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11423 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11425 2011-03-28 Tristan Gingold <gingold@adacore.com>
11428 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11429 Use ada output of gnatbind.
11430 (ada/b_gnatb.adb): Ditto.
11431 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11432 (ada.mostlyclean, ada.stage1)
11433 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11434 (ada.stagefeedback): Adjust.
11435 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11436 Use ada output of gnatbind.
11437 (b_gnatm.adb): Ditto.
11438 (b_gnatl.o, b_gnatm.o): New rules.
11440 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11442 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11443 for the padded type built to support a specified size or alignment.
11445 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11447 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11448 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11449 unconditionally to the end of the unit when the designated type is
11451 <all>: Rename local variable. Attempt to un-defer types only and do it
11452 for limited_with'ed types as well.
11453 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11454 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11455 consistently and remove redundant call to finalize_from_with_types.
11457 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11459 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11460 subprograms without a previous spec declared in the same unit.
11461 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11462 subprograms at the end of the unit instead of at the beginning.
11463 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11464 isn't public for the special handling of non-inline functions nested
11465 inside inline external functions.
11467 2011-03-25 Jeff Law <law@redhat.com>
11469 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11471 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11473 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11474 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11475 to compute Set_Size_Depends_On_Discriminant.
11476 (Layout_Type): Call it on array types in back-end layout mode.
11477 * sem_util.adb (Requires_Transient_Scope): Return true for array
11478 types only if the size depends on the value of discriminants.
11479 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11480 type if the RHS is a call to a function that returns an unconstrained
11481 type with default discriminant.
11483 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11485 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11486 non-conversion to the nominal result type at the end.
11488 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11490 * gcc-interface/trans.c (create_temporary): New function taken from...
11491 (create_init_temporary): ...here. Call it.
11492 (call_to_gnu): Create the temporary for the return value early, if any.
11493 Create it for a function with copy-in/copy-out parameters if there is
11494 no target; in other cases of copy-in/copy-out, use another temporary.
11495 Push the new binding level lazily. Add and rename local variables.
11497 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11499 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11501 (set_rm_size): Likewise.
11503 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11505 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11506 for the padded type built in order to support a specified alignment.
11507 Fix incorrect formatting.
11509 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11512 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11514 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11516 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11517 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11518 to the end of the list. Adjust recursive call. Rename local variable.
11519 If REORDER is true, reorder components of the record type.
11520 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11521 components_to_record and adjust the parameter list.
11523 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11525 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11526 disabled, use the variable for bounds of loop iteration scheme.
11528 2011-03-21 Kai Tietz <ktietz@redhat.com>
11531 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11533 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11535 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11536 out whether the expression is read-only. Short-circuit placeholder
11537 case and rename a couple of local variables.
11539 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11541 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11542 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11543 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11544 (convert): Deal with conversions from a smaller form type specially.
11546 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11548 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11549 its argument, except for the special -I- switch.
11551 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11553 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11556 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11558 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11560 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11562 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11564 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11565 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11566 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11567 Do not generate the check directly, instead instantiate the template
11568 check present in the descriptor.
11569 (make_descriptor_field): Move around.
11570 (build_vms_descriptor32): Build a template check in the POINTER field.
11571 (build_vms_descriptor): Remove useless suffixes.
11572 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11574 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11577 * targext.c: Include target files if IN_RTS is defined.
11579 2011-01-26 Richard Guenther <rguenther@suse.de>
11582 * targext.c: Include config.h.
11583 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11586 2011-01-04 Pascal Obry <obry@adacore.com>
11587 Eric Botcazou <ebotcazou@adacore.com>
11589 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11591 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11593 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11594 end-of-case on the end label and its associated gotos, if any.
11596 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11598 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11599 expressions of the parameter cache within the statement group of
11600 the CICO mechanism.
11602 2011-01-04 Olivier Hainque <hainque@adacore.com>
11603 Eric Botcazou <ebotcazou@adacore.com>
11605 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11606 (set_end_locus_from_node): New function.
11607 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11608 make and the function end_locus.
11609 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11610 for the elaboration subprogram.
11611 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11612 set the end_locus of the expression as well.
11614 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11617 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11618 variables that are referenced in exception handlers volatile.
11622 Copyright (C) 2011 Free Software Foundation, Inc.
11624 Copying and distribution of this file, with or without modification,
11625 are permitted in any medium without royalty provided the copyright
11626 notice and this notice are preserved.