1 2011-08-04 Emmanuel Briot <briot@adacore.com>
3 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4 Compute_Compilation_Phases): new subprogram.
5 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
6 The number of mains as well as the various compilation phases that
7 need to be run are now project tree specific, since various
8 aggregated trees might have different requirements. In particular,
9 they do not all require bind or link phases.
11 2011-08-04 Emmanuel Briot <briot@adacore.com>
13 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
14 (Project_Tree_Appdata): New type.
15 It is now possible to associate application-specific data to a project
16 tree. In particular, this is used in the gprbuild builder to avoid a
17 number of global tables and htables, especially now that there can be
18 several project trees loaded at once because of aggregate projects.
19 (Debug_Name): new procedure.
20 * projects.texi: Clarify syntax of "**" for Source_Dirs
22 2011-08-03 Emmanuel Briot <briot@adacore.com>
24 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
25 the "roots" for a main.
26 (Fill_From_Project): add support for aggregate projects. Main units
27 in aggregated projects are now automatically added in the list of
28 files to build (although this fails later on in gprbuild, because
29 these files are not using the root proejct tree, so this needs
31 * gcc-interface/Make-lang.in: Update dependencies.
33 2011-08-03 Yannick Moy <moy@adacore.com>
35 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
36 conditional expression in ALFA.
37 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
38 expressions as not in ALFA.
40 2011-08-03 Robert Dewar <dewar@adacore.com>
42 * a-cofove.adb: Minor reformatting.
44 2011-08-03 Emmanuel Briot <briot@adacore.com>
46 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
47 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
49 These packages are more logically placed in the Queue package, since
50 they manipulate the queue. It is also likely that they can be adapted
51 for gnatmake, thus sharing more code.
52 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
53 that we could move the above.
55 2011-08-03 Emmanuel Briot <briot@adacore.com>
57 * errutil.adb (Finalize): clean up the list of error messages on exit.
58 Calling this subprogram multiple times will no longer show duplicate
59 error messages on stderr.
61 2011-08-03 Emmanuel Briot <briot@adacore.com>
63 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
64 Getopt_Switches when we have already define a command line
67 2011-08-03 Yannick Moy <moy@adacore.com>
69 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
70 in ALFA. Instead, they are considered as assertions to prove.
71 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
72 nodes as not in ALFA. Instead, include conditional expressions in ALFA
73 if they have no ELSE part, or if they occur in pre- and postconditions,
74 where the Condition cannot have side-effects in ALFA
75 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
76 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
77 Instead, include type conversion between scalar types in ALFA.
78 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
79 if-and-only-if its type is in ALFA.
81 2011-08-03 Thomas Quinot <quinot@adacore.com>
83 * scos.adb, get_scos.adb, put_scos.adb
84 New code letter for decisions: G (entry guard)
86 (Traverse_Subprogram_Body): Rename to...
87 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
88 (Traverse_Protected_Body): New subprogram
89 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
90 protected bodies and entry bodies.
92 2011-08-03 Yannick Moy <moy@adacore.com>
94 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
95 entities with get/set subprograms, which is set on procedure entities
96 generated by the compiler for a postcondition.
97 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
98 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
99 entity for a declaration
100 (Get_Unique_Entity_For_Decl): new function returning an entity which
101 represents a declaration, so that matching spec and body have the same
104 2011-08-03 Robert Dewar <dewar@adacore.com>
106 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
107 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
109 2011-08-03 Yannick Moy <moy@adacore.com>
111 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
112 library-level because retriction No_Implicit_Dynamic_Code in the
113 front-end prevents its definition as a local subprogram
114 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
115 for reuse in other contexts
116 (Traverse_Declarations_Or_Statements,
117 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
118 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
119 procedures take a callback parameter to be called on all declarations
121 (Traverse_All_Compilation_Units): new generic function to traverse a
122 compilation unit and call a callback parameter on all declarations
124 2011-08-03 Javier Miranda <miranda@adacore.com>
126 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
127 in Java since they are always enclosed in a namespace that
128 differentiates them, and overloaded entities are supported by the VM.
130 2011-08-03 Ed Schonberg <schonberg@adacore.com>
132 * checks.adb (Determine_Range): If a computed bound of an operation is
133 outside the range of the base type of the expression, and overflow
134 checks are enabled, the result is unknown and cannot be used for any
135 subsequent constant folding.
136 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
137 unknown, so is the result of the comparison.
139 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
141 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
142 From_Abort. When finalization was triggered by an abort, propagate
143 Standard'Abort_Signal rather than Program_Error.
144 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
146 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
147 From_Abort. When finalization was triggered by an abort, propagate
148 Standard'Abort_Signal rather than Program_Error.
149 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
151 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
152 Abort_Id. Update the calls to Build_Object_Declarations and
153 Build_Raise_Statement to include Abort_Id.
154 (Build_Adjust_Statements): New local variable Abort_Id. Update the
155 calls to Build_Object_Declarations and Build_Raise_Statement to include
157 (Build_Finalize_Statements): New local variable Abort_Id. Update the
158 calls to Build_Object_Declarations and Build_Raise_Statement to include
160 (Build_Components): Create an entity for Abort_Id when exceptions are
161 allowed on the target.
162 (Build_Finalizer): New local variable Abort_Id.
163 (Build_Initialize_Statements): New local variable Abort_Id. Update the
164 calls to Build_Object_Declarations and Build_Raise_Statement to include
166 (Build_Object_Declarations): Add new formal Abort_Id. Create the
167 declaration of flag Abort_Id to preserve the original abort status
168 before finalization code is executed.
169 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
170 runtime routine Raise_From_Controlled_Operation.
171 (Create_Finalizer): Update the call to Build_Raise_Statement to include
172 Abort_Id. Update the call to Build_Object_Declarations to include
173 Abort_Id. Update the layout of the finalizer body.
174 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
175 (Process_Transient_Objects): New local variable Abort_Id. Remove the
176 clunky code to create all flags and objects related to
177 exception propagation and replace it with a call to
178 Build_Object_Declarations. Update the call to Build_Raise_Statement to
180 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
181 Add new formal Abort_Id and associated comment on its use.
182 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
184 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
185 Remove the clunky code to create all flags and objects related to
186 exception propagation and replace it with a call to
187 Build_Object_Declarations. Update the call to Build_Raise_Statement.
189 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
191 * s-tassta.adb: Fix minor typos.
193 2011-08-03 Robert Dewar <dewar@adacore.com>
195 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
196 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
198 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
200 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
201 to packages. This ensures that the finalizer body will not end up
202 inside the freeze node.
203 (Process_Declarations): Add code to detect whether a freeze node has a
204 nested finalization collection.
206 2011-08-03 Pascal Obry <obry@adacore.com>
208 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
209 (Current_Session): Return a not null access to Session_Type.
210 (Default_Session): Likewise.
212 2011-08-03 Robert Dewar <dewar@adacore.com>
214 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
215 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
217 2011-08-03 Pascal Obry <obry@adacore.com>
219 * g-awk.ads: Minor comment fix.
221 2011-08-03 Sergey Rybin <rybin@adacore.com>
223 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
224 the tree structure related to discriminant constraints.
225 Original_Discriminant cannot be used any more for computing the
226 defining name for the reference to a discriminant.
228 2011-08-03 Ed Schonberg <schonberg@adacore.com>
230 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
231 function is not visibly tagged, this is not a dispatching call and
232 therfore is not Tag_Indeterminate, even if the function is marked as
233 dispatching on result.
235 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
237 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
238 (Expand_N_Free_Statement): Add a guard to protect against run-times
239 which do not support controlled types.
240 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
241 against run-times which do not support controlled types.
242 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
243 against run-times which do not support controlled types.
244 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
245 against run-times which do not support controlled types.
246 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
247 protect against run-times which do not support controlled types.
249 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
251 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
252 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
254 2011-08-03 Ed Schonberg <schonberg@adacore.com>
256 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
257 modified in the source, to prevent spurious warnings when compiling
260 2011-08-03 Thomas Quinot <quinot@adacore.com>
262 * a-except-2005.adb: Minor reformatting.
264 2011-08-03 Ed Schonberg <schonberg@adacore.com>
266 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
267 is a renaming declaration in the private part of a package, do not emit
268 a warning that the with_clause could be moved because the renaming may
269 be used in the body or in a child unit.
271 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
273 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
274 Propagate the Comes_From_Source attribute from the original return
275 object to the renaming.
277 2011-08-03 Jose Ruiz <ruiz@adacore.com>
279 * exp_ch7.adb (Build_Raise_Statement): Do not call
280 Raise_From_Controlled_Operation when this routine is not present in
281 the run-time library.
282 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
283 libraries (Ravenscar), tasks are non-terminating, and protected objects
284 and tasks can only appear at library level, so we do not want
285 finalization of protected objects nor tasks.
286 * exp_intr.adb: Minor clarification in comment.
287 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
288 Gen_Output_File_C): Remove references to finalization of library-level
289 objects when using restricted run-time libraries.
291 2011-08-03 Ed Schonberg <schonberg@adacore.com>
293 * sem_ch3.adb (Build_Discriminant_Constraints): Set
294 Original_Discriminant only if the parent type is a generic formal.
296 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
298 * exp_ch13.adb: Add with and use clause for Targparm;
299 (Expand_N_Free_Statement): Prevent the generation of a custom
300 Deallocate on .NET/JVM targets since this requires pools and address
302 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
303 .NET/JVM targets, attach the newly allocated object to the access
304 type's finalization collection. Do not generate a call to
305 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
306 exist in the runtime.
307 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
308 create a custom Allocate for object that do not require initialization.
309 Attach a newly allocated object to the access type's finalization
310 collection on .NET/JVM.
311 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
312 assignment of controlled types on .NET/JVM. The two hidden pointers
313 Prev and Next and stored and later restored after the assignment takes
315 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
316 kludge for .NET/JVM to recognize a particular piece of code coming from
317 Heap_Management and change the call to Finalize into Deep_Finalize.
318 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
319 finalization collections on .NET/JVM only for types derived from
320 Controlled. Separate the association of storage pools with a collection
321 and only allow it on non-.NET/JVM targets.
322 (Make_Attach_Call): New routine.
323 (Make_Detach_Call): New routine.
324 (Process_Object_Declarations): Suppress the generation of
325 build-in-place return object clean up code on .NET/JVM since it uses
327 * exp_ch7.ads (Make_Attach_Call): New routine.
328 (Make_Detach_Call): New routine.
329 * exp_intr.adb Add with and use clause for Targparm.
330 (Expand_Unc_Deallocation): Detach a controlled object from a collection
332 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
333 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
334 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
335 names used in finalization.
337 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
339 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
340 (Attach, Detach): Lock the current task when chaining an object onto a
343 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
345 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
346 Rewritten to create the message strings when the exception is not
347 raised by an abort during finalization.
348 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
349 Raise_From_Controlled_Operation and update its associated comment.
350 * a-fihema.ads, a-fihema.adb: New GNAT unit.
351 Ada.Finalization.Heap_Management provides key functionality
352 associated with controlled objects on the heap, their creation,
353 finalization and reclamation. Type Finalization_Collection is
354 effectively a wrapper which sits ontop of a storage pool and performs
355 all necessary bookkeeping for all the objects it contains. Each
356 access-to-controlled or access-to-class-wide type receives a collection
357 as part of its expansion. The compiler generates buffer code and
358 invokes Allocate / Deallocate to create and destroy allocated
360 * a-finali.adb ("="): Removed.
361 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
362 fields Prev and Next.
363 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
364 A library unit with at least one controlled object on the library level
365 has a special finalizer which is invoked by the binder. To signal this,
366 ali files carry field PF.
367 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
368 associated comment on field usage.
369 * a-tags.adb (Get_RC_Offset): Removed.
370 (Needs_Finalization): New routine.
371 * a-tags.ads: Update the structure of the GNAT dispatch tables.
372 Dispatch tables now carry field Needs_Finalization which provides
373 runtime indication whether a type is controlled or has controlled
374 components or both. Remove field RC_Offset.
375 (Get_RC_Offset): Removed along with its associated pragma Export.
376 Since tagged types with controlled components no longer carry hidden
377 field _controller, the special mechanism to retrieve its location is no
379 (Needs_Finalization): New routine.
380 * atree.ads, atree.adb (Elist24): New routine.
381 (Set_Elist24): New routine.
382 * atree.h: Add a define clause for Elist24.
383 * bindgen.adb New library-level variable Lib_Final_Built.
384 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
385 presence of a VM target, the routine generates calls to the proper
386 library finalization routine.
387 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
388 targets. Set the correct library finalization routine depending on
389 whether the library has controlled objects or this is a VM compilation.
390 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
391 to library-level finalizers of compiled units in reverse order of
392 elaboration. It also produces exception management code and reraises a
393 potential exception after all units have been finalized.
394 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
395 library-level finalizers of compiled units in reverse order of
397 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
398 definitions of all library-level finalizers available to the compilation
399 (Gen_Main_Ada): Directly call Adafinal which now contails all target
401 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
402 System.Standard_Library.Adafinal directly. If the library needs
403 finalization actions, create the sequence of finalization calls.
404 (Gen_Output_File_Ada): Alphabetize local variables and constants.
405 Generate a with clause for System.Soft_Links when compiling for a VM.
406 Remove the code which imports System.Standard_Library.Adafinal as
407 Do_Finalize. Generate the library finalization routine.
408 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
409 If the library needs finalization actions, create all the definitions
410 of library- level finalizers.
411 (Has_Finalizer): New routine. Determines whether at least one compiled
412 unit has a library-level finalizer.
413 Add type Qualification_Mode.
414 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
415 * einfo.adb: New usage of field 15 as Return_Flag.
416 Remove Finalization_Chain_Entity from the usages of field 19.
417 Remove Associated_Final_Chain from the usages of field 23.
418 New usage of field 23 as Associated_Collection.
419 New usage of field 24 as Finalizer.
420 New usage of flag 252 as Is_Processed_Transient.
421 (Associated_Final_Chain): Removed.
422 (Associated_Collection): New routine.
423 (Finalization_Chain_Entity): Removed.
424 (Finalizer): New routine.
425 (Is_Finalizer): New routine.
426 (Is_Processed_Transient): New routine.
427 (Return_Flag): New routine.
428 (Set_Associated_Final_Chain): Removed.
429 (Set_Associated_Collection): New routine.
430 (Set_Finalization_Chain_Entity): Removed.
431 (Set_Finalizer): New routine.
432 (Set_Is_Processed_Transient): New routine.
433 (Set_Return_Flag): New routine.
434 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
436 (Write_Field8_Name): Alphabetize the output.
437 (Write_Field11_Name): Alphabetize the output.
438 (Write_Field12_Name): Alphabetize the output.
439 (Write_Field13_Name): Alphabetize the output.
440 (Write_Field14_Name): Alphabetize the output.
441 (Write_Field15_Name): Alphabetize the output.
442 (Write_Field16_Name): Alphabetize the output.
443 (Write_Field17_Name): Alphabetize the output.
444 (Write_Field18_Name): Alphabetize the output.
445 (Write_Field19_Name): Alphabetize the output. Remove the output of
446 Finalization_Chain_Entity.
447 (Write_Field20_Name): Alphabetize the output.
448 (Write_Field21_Name): Alphabetize the output.
449 (Write_Field22_Name): Alphabetize the output.
450 (Write_Field23_Name): Alphabetize the output. Remove the output of
451 Associated_Final_Chain. Add output for Associated_Collection.
452 (Write_Field24_Name): Alphabetize the output.
453 (Write_Field25_Name): Add output for Finalizer.
454 (Write_Field26_Name): Alphabetize the output.
455 (Write_Field27_Name): Alphabetize the output.
456 (Write_Field28_Name): Alphabetize the output.
457 * einfo.ads: Add new field description for Associated_Collection and
459 Remove Associated_Final_Chain and its uses in nodes.
460 Remove Finalization_Chain_Entity and its uses in nodes.
461 Add new field description for Finalizer and its uses in nodes.
462 Add new synthesized attribute Is_Finalizer.
463 Add new flag description for Is_Processed_Transient and its uses in
465 Add new field description for Return_Flag and its uses in nodes.
466 (Associated_Final_Chain): Removed along with its pragma Inline.
467 (Associated_Collection): New routine and pragma Inline.
468 (Finalization_Chain_Entity): Removed along with its pragma Inline.
469 (Finalizer): New routine and pragma Inline.
470 (Is_Finalizer): New routine and pragma Inline.
471 (Is_Processed_Transient): New routine and pragma Inline.
472 (Return_Flag): New routine and pragma Inline.
473 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
474 (Set_Associated_Collection): New routine and pragma Inline.
475 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
476 (Set_Finalizer): New routine and pragma Inline.
477 (Set_Is_Processed_Transient): New routine and pragma Inline.
478 (Set_Return_Flag): New routine and pragma Inline.
479 * exp_aggr.adb: Alphabetize subprograms.
480 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
481 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
482 associated comments. Remove local variables External_Final_List and
484 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
485 Ancestor. Remove the retrieval of finalization lists. Update the call to
487 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
488 lists. Update the call to Late_Expansion.
489 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
490 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
491 (Gen_Assign): Remove the retrieval of the finalization list used to
492 build the assignment. Update the calls to Make_Init_Call and
494 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
495 Remove the mechanism to determine attachment levels and finalization
496 list retrieval. Remove the processing for coextensions.
497 (Init_Controller): Removed. Controllers no longer exist.
498 (Late_Expansion): Remove formals Flist and Obj along with their
499 associated comments. Update the calls to Build_Record_Aggr_Code and
500 Build_Array_Aggr_Code.
501 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
502 (Expand_N_Freeze_Entity): Add special processing for finalizers which
503 appear in entry bodies, protected subprograms and task bodies.
504 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
505 * exp_ch3.adb (Add_Final_Chain): Removed.
506 (Build_Array_Init_Proc): Alphabetize local variables.
507 (Build_Assignment): Alphabetize local variables. Update the call to
509 (Build_Class_Wide_Master): Rename local variables to better reflect
511 (Build_Discriminant_Assignments): Code reformatting.
512 (Build_Init_Call_Thru): Code reformatting.
513 (Build_Init_Procedure): Code reformatting. Generate a special version
514 of Deep_Finalize which is capable of finalizing all initialized
515 components and ignore the rest.
516 (Build_Init_Statements): Rename local variables to better reflect their
518 Reimplement the mechanism to include the creation and update of an index
519 variable called a "counter". It is used as a bookmark for tracing
520 initialized and non-initialized components.
521 (Build_Initialization_Call): Remove local variable Controller_Typ.
522 Alphabetize all local variables. Remove the initialization of the
523 record controller and update the call to Make_Init_Call.
524 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
525 New local variable Counter.
526 (Constrain_Array): Alphabetize.
527 (Expand_Freeze_Array_Type): Create a collection instead of a
529 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
530 Finalize_Address which is used in conjunction with allocated controlled
532 (Expand_N_Object_Declaration): Remove the creation of a finalization
533 list for anonymous access types. Update the calls to Make_Init_Call and
535 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
536 retrieval of finalization lists. Remove the expansion of the record
537 controller. Create TSS primitive Finalize_Address used in conjunction
538 with controlled objects on the heap. Create finalization collections
539 for access-to-controlled record components.
540 (Expand_Record_Controller): Removed.
541 (Freeze_Type): Remove the freezing of record controllers. Freezing of
542 class-wide types now requires additional processing. Create
543 finalization collections for access-to-controlled types.
544 (Increment_Counter): New routine.
545 (Make_Counter): New routine.
546 (Make_Eq_If): Remove the mention of Name_uController.
547 (Make_Predefined_Primitive_Specs): There is no longer need to skip
548 types coming from System.Finalization_Root.
549 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
550 (Predefined_Primitive_Bodies): There is no longer need to skip types
551 coming from System.Finalization_Root.
552 (Stream_Operation_OK): Do not generate stream routines for
553 type Ada.Finalization.Heap_Management.Finalization_Collection.
554 * exp_ch3.ads: Alphabetize subprograms.
555 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
556 Add with and use clause for Lib.
557 (Complete_Coextension_Finalization): Removed.
558 (Complete_Controlled_Allocation): New routine. Create a finalization
559 collection for anonymous access-to-controlled types. Create a custom
560 Allocate which interfaces with the back end and the machinery in
562 (Expand_Allocator_Expression): Add necessary calls to
563 Complete_Controlled_Allocation. Remove the retrieval of finalization
564 lists. Update the calls to Make_Adjust_Call. Generate a call to
565 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
566 the associated collection.
567 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
568 Code clean up. Remove the retrieval of finalization lists and
570 Update the call to Make_Init_Call. Generate a call to
571 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
572 the associated collection.
573 (Get_Allocator_Final_List): Removed. Finalization lists are not
575 (Suitable_Element): Remove the mention of Name_uController.
576 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
577 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
578 the left hand side, carry out the assignment and adjust the left hand
580 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
581 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
582 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
583 BIP_Collection and BIPcollection.
584 (Build_Heap_Allocator): New routine used to allocate the return object
585 of a build-in-place function onto a collection.
586 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
587 (Expand_Call): Do not replace direct calls to Deep routines with their
589 (Expand_N_Extended_Return_Statement): Give all variables shorter names
590 and update their occurrences. Add a special return flag to monitor the
591 [ab]normal execution of the function. The flag is set right before the
593 Rewrite the mechanism used to allocate a build-in-place return object
594 on the heap or on a storage pool.
595 (Is_Direct_Deep_Call): New routine.
596 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
597 build-in-place function call instead of a final list. Build a call to
598 Set_Finalize_Address_Ptr to decorate the associated collection.
599 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
600 order to name the build-in-place function call's result for later
601 finalization. Add a collection to a build-in-place function call
602 instead of a final list.
603 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
604 build-in-place function call instead of a final list. Remove the code
605 which moves one final list and transforms it into the actual in a
606 nested build-in-place call.
607 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
608 build-in-place function call instead of a final list.
609 (Move_Final_List): Removed.
610 (Needs_BIP_Collection): New routine.
611 (Needs_BIP_Final_List): Removed.
612 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
613 enumeration type BIP_Formal_Kind.
614 Update the related comment.
615 (Needs_BIP_Collection): New routine.
616 (Needs_BIP_Final_List): Removed.
617 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
618 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
619 majority of subprograms in this unit. Add Name_Finalize_Address to
620 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
621 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
622 statements for an array type.
623 (Build_Adjust_Statements): Create the adjust statements for a record
625 (Build_Cleanup_Statements): New routine. A procedure which given any
626 construct containing asynchronous calls, references to _master, or is a
627 task body, a task allocation or a protected body produces the necessary
628 runtime calls to clean up these constructs.
629 (Build_Exception_Handler): New routine.
630 (Build_Final_List): Removed.
631 (Build_Finalization_Collection): New routine. A core procedure which
632 creates a collection to service heap allocated controlled objects
633 associated with an access-to-controlled type.
634 (Build_Finalize_Statements): Create the finalization statements for a
636 (Build_Finalizer): New routine. A core procedure which given any
637 construct with declarations and/or statements detects all objects which
638 need any type of clean up (controlled objects, protected objects) and
639 generates all necessary code to clean up the said objects in the proper
641 (Build_Finalizer_Call): New routine.
642 (Build_Initialize_Statements): Create the initialization statements for
643 an array type. The generated routine contains code to finalize partially
645 (Build_Object_Declarations): New routine.
646 (Build_Raise_Statement): New routine.
647 (Clean_Simple_Protected_Objects): Removed.
648 (Controller_Component): Removed.
649 (Enclosing_Function): New routine.
650 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
651 either declarations or statements or both.
652 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
653 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
655 (Find_Final_List): Removed.
656 (Global_Flist_Ref): Removed.
657 (In_Finalization_Root): Removed.
658 (Insert_Actions_In_Scope_Around): Determine the range of the transient
659 scope in terms of tree nodes. Process all transient variables within
661 (Make_Adjust_Call): Rewritten. There is no longer an attach call
662 generated after the adjust.
663 (Make_Attach_Call): Removed.
664 (Make_Call): New routine.
665 (Make_Clean): Removed.
666 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
668 (Make_Deep_Proc): Rewritten to generate the new profile signature used
670 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
672 (Make_Final_Call): Modified to simply create a call to either
673 Deep_Finalize or Finalize.
674 (Make_Finalize_Address_Body): New routine.
675 (Make_Finalize_Address_Stmts): New routine. A function which produces
676 TSS primitive Finalize_Address used in conjunction with heap allocated
678 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
679 (Make_Init_Call): Rewritten. There is no longer an attach call
680 generated after initialization.
681 (Make_Local_Deep_Finalize): New routine.
682 (Make_Set_Finalize_Address_Ptr_Call): New routine.
683 (Make_Transient_Block): Remove the finalization list retrieval and
685 (Needs_Finalization): Moved to Exp_Util.
686 (Parent_Field_Type): New routine.
687 (Preprocess_Components): New routine.
688 (Process_Transient_Objects): New routine.
689 (Wrap_HSS_In_Block): New routine.
690 (Wrap_Transient_Declaration): Remove finalization list management and
691 controller insertion.
692 (Wrap_Transient_Expression): Code reformatting.
693 (Wrap_Transient_Statement): Code reformatting.
694 * exp_ch7.ads (Build_Final_List): Removed.
695 (Build_Finalization_Collection): New routine.
696 (Build_Raise_Statement): New routine.
697 (Controller_Component): Removed.
698 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
699 (Find_Final_List): Removed.
700 (In_Finalization_Root): Removed.
701 (Is_Simple_Protected_Type): Update related comment.
702 (Make_Adjust_Call): New parameter profile and associated comments.
703 (Make_Attach_Call): Removed.
704 (Make_Final_Call): New parameter profile and associated comments.
705 (Make_Finalize_Address_Body): New routine.
706 (Make_Init_Call): New parameter profile and associated comments.
707 (Make_Local_Deep_Finalize): New routine.
708 (Make_Set_Finalize_Address_Ptr_Call): New routine.
709 (Needs_Finalization): Moved to Exp_Util.
710 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
711 (Expand_N_Protected_Body): Remove the handling of finalization lists.
712 (Find_Protection_Type): Moved to Exp_Util.
713 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
714 (Make_DT): Update sequence of dispatch table initialization. Remove the
715 initialization of field RC_Offset. Add initialization of field Needs_
717 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
718 Reimplement how an object is first finalized, then deallocated.
719 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
721 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
722 Register TSS_Finalize_Address with type TSS_Names.
723 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
724 procedure provides the interface between an allocation / deallocation
725 and the support machinery in Ada.Finalization.Heap_Management.
726 (Find_Init_Call): Code reformatting.
727 (Find_Init_Call_In_List): Code reformatting.
728 (Find_Protection_Type): Moved from Exp_Ch9.
729 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
730 (Has_Controlled_Coextensions): Removed.
731 (Has_Controlled_Objects): New routine.
732 (In_Library_Level_Package_Body): New routine.
733 (Insert_Action_After): New routine.
734 (Is_Finalizable_Transient): New routine. This predicate determines
735 whether an object declaration is one of the many variants of controlled
737 (Is_Null_Access_BIP_Func_Call): New routine.
738 (Is_Non_BIP_Func_Call): New routine.
739 (Is_Related_To_Func_Return): New routine.
740 (Needs_Finalization): Moved from Exp_Ch7.
741 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
742 (Find_Protection_Type): Moved from Exp_Ch9.
743 (Has_Controlled_Coextensions): Removed.
744 (Has_Controlled_Objects): New routine.
745 (In_Library_Level_Package_Body): New routine.
746 (Insert_Action_After): New routine.
747 (Is_Finalizable_Transient): New routine.
748 (Is_Null_Access_BIP_Func_Call): New routine.
749 (Is_Non_BIP_Func_Call): New routine.
750 (Is_Related_To_Func_Return): New routine.
751 (Needs_Finalization): Moved from Exp_ch7.
752 * expander.adb (Expand): Add a case for N_Free_Statement.
753 * freeze.adb (Freeze_All): Replace the generation of a finalization
754 list with a collection for access-to-controlled types.
755 (Freeze_Entity): Code reformatting.
756 (Freeze_Record_Type): Remove the freezing of a record controller
758 (Freeze_Subprogram): Code reformatting.
759 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
761 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
762 has a library-level finalizer.
763 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
764 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
765 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
766 files. Add a-fihema to the list of object files.
768 Alphabetize the associations in type Is_Parameterless_Attribute.
769 * rtsfind.ads: Ada.Finalization_List.Controller and
770 System.Finalization_Implementation are no longer a GNAT unit.
771 Update the range of type Ada_Finalization_Child. Remove the following
772 recoverable entities:
774 RE_Attach_To_Final_List
778 RE_Finalizable_Ptr_Ptr
780 RE_Limited_Record_Controller
784 RE_Simple_List_Controller
786 Add the following recoverable entities:
788 RE_Add_Offset_To_Address
792 RE_Exception_Identity
793 RE_Finalization_Collection
794 RE_Finalization_Collection_Ptr
795 RE_Needs_Finalization
796 RE_Save_Library_Occurrence
797 RE_Set_Finalize_Address_Ptr
798 RE_Set_Storage_Pool_Ptr
800 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
802 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
803 (First_Stored_Discriminant): Remove the mention of Name_uController.
804 * sem_aux.ads: Comment reformatting.
805 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
806 to redecorate an already existing class-wide type.
807 (Decorate_Tagged_Type): New parameter profile and associated comment.
808 Create a "shadow class-wide type" for a shadow entity.
809 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
810 of the final chain along with the associated comment.
811 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
812 Full_Desig and set it to the full view of the designated type.
813 Initialize the finalization collection to empty.
814 (Build_Derived_Record_Type): Alphabetize local variables. Code
816 (Collect_Fixed_Components): Remove the mention of Name_uController.
817 (Create_Constrained_Components): Remove the mention of Name_uController.
818 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
819 class-wide type of a shadow entity.
820 (Process_Full_View): Update the machinery which marks type
821 Limited_Controlled's entity as limited.
822 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
823 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
824 list, instead make a collection build-in-place formal.
825 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
826 a designated type in order to establish a match between the renaming
827 and the renamed entity.
828 (Find_Selected_Component): Add guard to prevent spurious exceptions
829 from being raised on .NET/JVM.
830 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
831 to the list of primitive that need special processing. Update arrays
833 (Replace_Types): Handle class-wide types.
834 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
835 different parameter profile, look at the first formal.
836 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
837 use clauses for Exp_Util.
838 * sem_res.adb: Remove with and use clauses for Elists.
839 (Propagate_Coextensions): Removed.
840 (Resolve_Allocator): Do not propagate the list of coextensions from one
841 allocator to another.
842 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
843 Deaccessed_T to Desig_Typ.
844 (Enter_Name): Remove the mention of Name_uController.
845 (Gather_Components): Remove the mention of Name_uController.
846 (Incomplete_Or_Private_View): New routine.
847 (Is_Coextension_Root): Removed.
848 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
849 * sem_util.ads (Incomplete_Or_Private_View): New routine.
850 (Is_Coextension_Root): Removed.
851 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
852 Controlled types are now derived from a null tagged record. Remove
853 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
854 * sinfo.adb (Coextensions): Removed.
855 (Set_Coextensions): Removed.
856 * sinfo.ads: Remove Coextensions from the explanation of node fields
857 and its uses in nodes.
858 Update the field usage of N_Allocator.
859 (Coextensions): Removed along with its pragma Inline.
860 (Set_Coextensions): Removed along with its pragma Inline.
861 * snames.ads-tmpl: Remove names
866 Name_uLocal_Final_List
867 Name_Finalization_Root
874 Name_Finalize_Address
875 * s-pooglo.adb (Allocate): Add overriding indicator.
876 (Deallocate): Add overriding indicator.
877 (Storage_Size): Add overriding indicator.
878 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
879 than Finalize_Global_List.
880 (Null_Finalize_Global_List): Removed.
881 (Save_Library_Occurrence): New routine.
882 * s-soflin.ads: Remove variable Finalize_Global_List along with its
883 initialization. Add variable Finalize_Library_Objects along with its
884 pragma Export. Add variables Library_Exception and
885 Library_Exception_Set along with their pragma Export.
886 (Null_Finalize_Global_List): Removed.
887 (Save_Library_Occurrence): New routine.
888 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
889 rather than Finalize_Global_List.
890 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
891 of the constructed node.
893 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
895 * link.c: Include "auto-host.h" before system headers.
897 2011-08-03 Vincent Celier <celier@adacore.com>
899 * make.adb (Gnatmake): Add to table Library_Projs only library projects
900 that are not extended. Do not check if a library project that is
901 extended should be regenerated. Do not add to table Library_Paths the
902 libraries that are in extended projects. Link only with libraries that
903 are in libray projects that are not extended.
904 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
905 for a library project that is extended.
907 2011-08-03 Gary Dismukes <dismukes@adacore.com>
909 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
910 conforming subprogram renamings that appear to be completions if they
911 are not fully conformant.
912 Such renamings are homographs but not completions.
913 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
914 names in a subprogram renaming that appears in an instance.
916 2011-08-03 Ed Schonberg <schonberg@adacore.com>
918 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
919 not immutably limited, build actual subtype from expression to provide
920 proper bounds to caller.
922 2011-08-03 Gary Dismukes <dismukes@adacore.com>
924 * sem_ch8.adb: Minor comment correction.
926 2011-08-03 Thomas Quinot <quinot@adacore.com>
928 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
929 returning a limited array, use an extended return statement.
931 2011-08-03 Vincent Celier <celier@adacore.com>
933 * make.adb (Initialize): If --subdirs= is used, but no project file is
934 specified, attempt to create the specify subdir if it does not already
935 exist and use it as the object directory as if -D had been specified.
937 2011-08-03 Arnaud Charlet <charlet@adacore.com>
939 * s-tpopsp-vms.adb: New file.
940 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
941 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
943 2011-08-03 Emmanuel Briot <briot@adacore.com>
945 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
948 2011-08-03 Yannick Moy <moy@adacore.com>
950 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
951 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
952 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
953 detect that an array has static bounds.
955 2011-08-03 Thomas Quinot <quinot@adacore.com>
957 * exp_dist.adb: Minor reformatting.
959 2011-08-03 Arnaud Charlet <charlet@adacore.com>
961 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
962 (ATCB_Key): Removed, not always used.
964 2011-08-03 Emmanuel Briot <briot@adacore.com>
966 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
967 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
968 most remaining global variables.
970 2011-08-03 Robert Dewar <dewar@adacore.com>
972 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
973 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
976 2011-08-03 Javier Miranda <miranda@adacore.com>
978 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
979 that must be passed by copy in VM targets.
981 2011-08-03 Emmanuel Briot <briot@adacore.com>
983 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
984 duplicates a similar htable now in the project tree.
986 2011-08-03 Claire Dross <dross@adacore.com>
988 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
989 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
990 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
991 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
992 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
993 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
994 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
997 2011-08-03 Arnaud Charlet <charlet@adacore.com>
999 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
1000 (ATCB_Key): Removed, not always used.
1001 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
1003 * s-tpopsp-tls.adb: New file.
1004 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
1005 x86/x64/ia64/powerpc/sparc Linux.
1007 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1009 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
1010 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
1012 2011-08-03 Thomas Quinot <quinot@adacore.com>
1014 * rtsfind.ads, exp_dist.adb, exp_dist.ads
1015 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1016 Fix type selection for mapping integer types to PolyORB types.
1018 2011-08-03 Bob Duff <duff@adacore.com>
1020 * sem_ch7.adb: Minor comment clarification.
1022 2011-08-03 Bob Duff <duff@adacore.com>
1024 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
1025 an error analyzing a choice, skip further processing. Further
1026 processing could cause a crash or cascade errors.
1028 2011-08-03 Emmanuel Briot <briot@adacore.com>
1030 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
1031 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
1032 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
1033 prj-env.ads (Shared_Project_Tree_Data): new type
1034 An aggregate project and its aggregated trees need to share the common
1035 data structures used for lists of strings, packages,... This makes the
1036 code simpler since otherwise we have to pass the root tree (also used
1037 for the configuration file data) in addition to the current project
1038 tree. This also avoids ambiguities as to which tree should be used.
1039 And finally this saves a bit of memory.
1040 (For_Every_Project_Imported): new parameter Tree.
1041 Since aggregated projects are using a different tree, we need to let
1042 the caller know which tree to use to manipulate the returned project.
1044 2011-08-03 Robert Dewar <dewar@adacore.com>
1046 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
1047 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
1048 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
1049 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
1051 2011-08-03 Javier Miranda <miranda@adacore.com>
1053 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
1054 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
1056 2011-08-03 Bob Duff <duff@adacore.com>
1058 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
1061 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
1063 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
1064 g-sehash.ads: Fix typo. Update header.
1066 2011-08-03 Thomas Quinot <quinot@adacore.com>
1068 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
1071 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1073 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
1074 prefixes of private types along with records, since the selector may be
1076 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
1077 private types along with records, since the selector may be a
1080 2011-08-03 Emmanuel Briot <briot@adacore.com>
1082 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
1084 2011-08-03 Javier Miranda <miranda@adacore.com>
1086 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
1087 Tagged_Type_Expansion.
1089 2011-08-03 Yannick Moy <moy@adacore.com>
1092 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
1093 concatenation is the name of a constant
1095 2011-08-03 Emmanuel Briot <briot@adacore.com>
1097 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
1098 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
1099 (Process_Declarative_Items): new parameter Child_Env.
1101 2011-08-03 Yannick Moy <moy@adacore.com>
1103 * alfa.ads Update format of ALFA section in ALI file in order to add a
1104 mapping from bodies to specs when both are present
1105 (ALFA_Scope_Record): add components for spec file/scope
1106 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
1108 (Collect_ALFA): after all scopes have been collected, fill in the spec
1109 information when relevant
1110 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
1113 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1115 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
1116 code unit to decide whether to add internally generated subprograms.
1118 2011-08-03 Javier Miranda <miranda@adacore.com>
1120 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
1122 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
1125 2011-08-03 Emmanuel Briot <briot@adacore.com>
1127 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
1128 code with Makeutl.Get_Switches.
1129 * prj-tree.adb: Update comment.
1131 2011-08-03 Thomas Quinot <quinot@adacore.com>
1133 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
1134 subprogram with a limited formal that does not support external
1137 2011-08-03 Yannick Moy <moy@adacore.com>
1139 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
1141 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
1142 not from current unit in two phases, because it is not possible to
1143 change the table while iterating over its content.
1144 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
1146 2011-08-03 Sergey Rybin <rybin@adacore.com>
1148 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
1149 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
1151 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1153 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
1154 and the component type is composite, this is ambiguous for predefined
1155 concatenation, but if the node is not overloaded and the entity is a use
1156 -defined function its profile can be used to resolve that aggregate.
1158 2011-08-03 Robert Dewar <dewar@adacore.com>
1160 * exp_ch4.adb: Minor code cleanup.
1162 2011-08-03 Thomas Quinot <quinot@adacore.com>
1164 * exp_dist.adb: Do not generate distribution stubs if serious errors
1165 have been diagnosed.
1167 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1169 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
1170 the first formal of a primitive operation, go to the base type to
1171 handle properly an access to a derived type with constrained
1173 * sem_type.adb (Disambiguate): an immediately visible operator hides a
1174 user-defined function that is only use-visible.
1176 2011-08-03 Robert Dewar <dewar@adacore.com>
1178 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
1179 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
1180 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
1181 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
1182 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
1183 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
1184 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
1185 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
1187 2011-08-03 Robert Dewar <dewar@adacore.com>
1189 * repinfo.adb (List_Mechanism): Add handling of
1190 Convention_Ada_Pass_By_XXX.
1191 * sem_mech.adb (Set_Mechanism): Ditto.
1192 * sem_prag.adb (Process_Convention): Add entries for
1193 Convention_Ada_Pass_By_XXX.
1194 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
1196 2011-08-03 Pascal Obry <obry@adacore.com>
1198 * makeutl.adb: Minor reformatting.
1200 2011-08-03 Vincent Celier <celier@adacore.com>
1203 (Get_File_Name) If the file cannot be found when there are no config
1204 pragmas file and May_Fail is True, return No_File instead of the file
1205 name, to be consistent.
1207 2011-08-03 Pascal Obry <obry@adacore.com>
1209 * adaint.c (__gnat_is_executable_file_attr): Avoid access
1212 2011-08-03 Javier Miranda <miranda@adacore.com>
1215 (Same_Representation): In VM targets the representation of arrays with
1216 aliased components differs from arrays with non-aliased components.
1218 2011-08-03 Emmanuel Briot <briot@adacore.com>
1220 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
1221 not systematically lower case attribute indexes that contain no "."
1222 Fix definition of several Naming attributes, which take
1223 a unit name as index and therefore should be case insensitive.
1224 Minor refactoring (reduce length of variable names).
1226 2011-08-03 Emmanuel Briot <briot@adacore.com>
1228 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
1230 2011-08-03 Emmanuel Briot <briot@adacore.com>
1232 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
1233 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
1234 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
1235 prj-tree.ads (Prj.Tree.Environment): new type.
1237 2011-08-03 Emmanuel Briot <briot@adacore.com>
1239 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
1240 prj-tree.adb, prj-tree.ads (Environment): new type.
1242 2011-08-03 Emmanuel Briot <briot@adacore.com>
1244 * prj-tree.ads: Remove unused variable.
1246 2011-08-03 Yannick Moy <moy@adacore.com>
1248 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
1249 issuing messages related to SPARK restriction violation.
1251 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1253 * sem_ch6.adb: guard against error nodes in return statements.
1255 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1257 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
1258 a warning can only appear on a configuration file, so emit warning
1259 without further checks.
1261 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1263 * s-interr.ads: add overriding keyword.
1265 2011-08-03 Geert Bosch <bosch@adacore.com>
1267 * exp_attr.adb: Fix minor typo.
1269 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1271 * par-ch4.adb: improve error recovery.
1273 2011-08-03 Emmanuel Briot <briot@adacore.com>
1275 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
1276 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
1279 2011-08-03 Emmanuel Briot <briot@adacore.com>
1281 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
1282 "external" as an attribute name in aggregate projects.
1284 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1286 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
1287 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
1288 from 0, so we need to adjust.
1290 2011-08-03 Emmanuel Briot <briot@adacore.com>
1292 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
1293 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
1295 2011-08-03 Yannick Moy <moy@adacore.com>
1297 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
1298 restriction on overloaded entity if the entity is not an operator.
1300 2011-08-03 Yannick Moy <moy@adacore.com>
1302 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
1303 restrict.ads: Rename remaining Check_Formal_Restriction* into
1304 Check_SPARK_Restriction*.
1306 2011-08-03 Emmanuel Briot <briot@adacore.com>
1308 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
1309 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
1311 (Project_Empty): removed
1312 (Empty_Project): new parameter Qualifier
1313 This is used to have fields specific to aggregate projects, cleaner
1314 New field to store the list of aggregated projects.
1315 (Check_Aggregate_Project): removed
1316 (Process_Aggregated_Projects, Free): new subprograms.
1318 2011-08-03 Olivier Hainque <hainque@adacore.com>
1320 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
1322 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1324 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
1325 explicit dereference of an unconstrained type, create a constrained
1326 subtype for it, as is done for function calls that return an
1329 2011-08-03 Thomas Quinot <quinot@adacore.com>
1331 * g-pehage.adb (Finalize): Avoid possible double-free.
1333 2011-08-03 Steve Baird <baird@adacore.com>
1335 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
1336 Elab_Spec/Body attrs in CodePeer_Mode.
1338 2011-08-03 Javier Miranda <miranda@adacore.com>
1340 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
1341 low bound is not known at compile time but they have no others choice.
1342 Done because in this case the bounds can be obtained directly from the
1345 2011-08-03 Ed Falis <falis@adacore.com>
1347 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
1348 on VxWorks SMP. Remove unusable constant ANY_CPU.
1350 2011-08-03 Emmanuel Briot <briot@adacore.com>
1352 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
1353 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
1354 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
1355 Prj.Env.Initialize_Empty): new subprograms
1356 (Get_Env, Find_Project): remove parameter Target_Name.
1358 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1360 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
1361 as a condition for the delayed call to Derived_Subprograms done for the
1362 case of the rewriting of a derived type that constrains the
1363 discriminants of its parent type.
1364 Avoids redundant subprogram derivations for private subtype derivations.
1366 2011-08-03 Javier Miranda <miranda@adacore.com>
1368 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
1369 Build_Record_Aggr_Code.
1370 (Build_Record_Aggr_Code): Add missing support to initialize hidden
1371 discriminants in extension aggregates.
1373 2011-08-03 Emmanuel Briot <briot@adacore.com>
1375 * prj-pp.adb (Print): also output project qualifiers, since in
1376 particular "aggregate" is mandatory in an aggregate project.
1378 2011-08-03 Emmanuel Briot <briot@adacore.com>
1380 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
1381 (Debug_Output): new function.
1383 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1385 * gnat_ugn.texi: Document -Wstack-usage.
1386 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
1388 2011-08-03 Thomas Quinot <quinot@adacore.com>
1390 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
1391 have keyword LIMITED.
1393 2011-08-03 Yannick Moy <moy@adacore.com>
1395 * alfa.adb, alfa.ads, alfa_test.adb: New files.
1396 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
1397 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
1398 section (does not happen in compiler, only if code directly calls
1400 * get_alfa.adb, get_alfa.ads: New files.
1401 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
1403 * lib-xref-alfa.adb: New file.
1404 * lib-xref.adb, lib-xref.ads
1405 (Xref_Entry): redefine information needed in cross-references for ALFA.
1406 Push ALFA treatments in separated local package.
1407 (Enclosing_Subpragram_Or_Package): treat specially subprogram
1408 identifiers. Return entity of package body instead of spec. Return
1409 Empty for a scope with no location.
1410 (Generate_Reference): adapt to new components for ALFA information.
1411 Remove the need for D references on definitions.
1412 (Is_Local_Reference): moved to ALFA local package
1413 (Output_References): extract subfunction as Extract_Source_Name
1414 (Output_Local_References): remove procedure, replaced by filtering of
1415 cross-references in package ALFA and printing in Put_ALFA.
1416 (Write_Entity_Name): remove procedure
1417 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
1418 print exact name of entity as it appears in source file
1419 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
1420 * put_alfa.adb, put_alfa.ads: New files.
1421 * xref_lib.adb (Search_Xref): protect read of cross-references against
1422 reading other sections of the ALI file, in gnatxref
1423 (Search): protect read of cross-references against reading other
1424 sections of the ALI file, in gnatfind.
1425 * gcc-interface/Make-lang.in: Update dependencies.
1427 2011-08-03 Thomas Quinot <quinot@adacore.com>
1429 * sem_ch3.adb: Minor reformatting.
1431 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1433 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
1434 raising an exception.
1436 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1438 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
1439 type, always use 1 as the lower bound or string, even if lower bound of
1440 context is not static, to handle properly null strings in a non-static
1443 2011-08-03 Bob Duff <duff@adacore.com>
1445 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
1446 always legal on the right-hand side of an assignment statement; there
1447 is always an applicable index constraint in this case. Therefore, the
1448 check for Pkind = N_Assignment_Statement is now unconditional -- it
1449 doesn't depend on whether Is_Constrained (Typ).
1451 2011-08-03 Robert Dewar <dewar@adacore.com>
1453 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
1455 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1457 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
1458 for an itype created within a generic unit.
1460 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1462 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
1463 suppresses all inlining.
1465 2011-08-03 Robert Dewar <dewar@adacore.com>
1467 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
1468 exp_aggr.adb: Minor reformatting.
1470 2011-08-03 Thomas Quinot <quinot@adacore.com>
1472 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
1473 tagged assignment when discriminant checks are suppressed. This is
1474 useless and extremely costly in terms of static stack usage.
1476 2011-08-03 Bob Duff <duff@adacore.com>
1478 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
1479 of generics, because this leads to the wrong entity in the wrong scope,
1480 causing (e.g.) pragma Export_Procedure to get an error if the entity is
1482 (Process_Interface_Name): Follow Alias for instances of generics, to
1483 correct for the above change.
1485 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1487 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
1488 is an integer literal it is always safe to replace the reference. In
1489 addition, if the reference appears in the generated code for an object
1490 declaration it is necessary to copy because otherwise the reference
1491 might be to the uninitilized value of the discriminant of the object
1494 2011-08-03 Pascal Obry <obry@adacore.com>
1496 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
1497 ACL used, in this case we want to check for ending .exe, not .exe
1498 anywhere in the path.
1500 2011-08-03 Sergey Rybin <rybin@adacore.com>
1502 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
1503 the tree structure (semantic decoration of references to record
1506 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1508 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
1509 choices of a named array aggregate, bail out when any choices are
1510 marked as Errors_Posted.
1512 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1514 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
1515 in which entity is frozen, to handle properly loop variables in
1518 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1520 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
1521 subtype is not static, compute the upper bound using attributes, to
1522 handle properly index types that are not integer types.
1524 2011-08-03 Bob Duff <duff@adacore.com>
1526 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
1527 Update copyright notice.
1529 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1531 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
1532 Original_Discriminant if within an instance.
1533 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
1535 2011-08-03 Thomas Quinot <quinot@adacore.com>
1537 * einfo.ads: Minor reformatting.
1539 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1541 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
1542 composite type with an unfrozen subcomponent, in the profile of a
1543 primitive operation.
1545 2011-08-03 Robert Dewar <dewar@adacore.com>
1547 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
1549 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1551 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
1552 unconstrained type with discriminants is initialized with an aggregate,
1553 use the constrained subtype of the aggregate as the type of the object,
1554 because it is immutable, and this allows the back-end to generate no
1555 code for the object declaration.
1557 2011-08-03 Robert Dewar <dewar@adacore.com>
1559 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
1560 comparison operand is variable, and turns out to be zero or negative.
1562 2011-08-03 Javier Miranda <miranda@adacore.com>
1565 (Expand_Dispatching_Constructor_Call): Disable expansion of
1566 code required for native targets. Done to avoid generating
1567 references to unavailable runtime entities in VM targets.
1569 (Expand_N_Object_Declaration): Add missing support to handle
1570 the explicit initialization of class-wide interface objects.
1573 2011-08-03 Matthew Heaney <heaney@adacore.com>
1575 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
1577 2011-08-03 Matthew Heaney <heaney@adacore.com>
1579 * a-cbdlli.adb (Splice): move source items from first to last
1581 2011-08-03 Yannick Moy <moy@adacore.com>
1583 * sem_util.ads: comment added.
1585 2011-08-03 Javier Miranda <miranda@adacore.com>
1588 (Expand_Record_Aggregate): In VM targets disable the expansion into
1589 assignments of aggregates whose type is not known at compile time.
1591 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1593 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
1594 protected entries and task entries, to build the proper renaming
1595 declaration for entry formals, used in debugging.
1596 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
1597 parameters in the same way.
1599 2011-08-02 Robert Dewar <dewar@adacore.com>
1601 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
1602 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
1603 code reorganization.
1605 2011-08-02 Robert Dewar <dewar@adacore.com>
1607 * debug.adb: Debug flag d.P to suppress length comparison optimization
1608 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
1609 comparison of Length by comparing First/Last instead.
1611 2011-08-02 Matthew Heaney <heaney@adacore.com>
1613 * a-cobove.ads: Code clean up.
1615 2011-08-02 Vincent Celier <celier@adacore.com>
1617 * adaint.c (file_names_case_sensitive_cache): New static int.
1618 (__gnat_get_file_names_case_sensitive): Cache the return value in
1619 file_names_case_sensitive_cache at the first invocation, to avoid
1620 multiple calls to getenv.
1622 2011-08-02 Bob Duff <duff@adacore.com>
1624 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
1626 2011-08-02 Yannick Moy <moy@adacore.com>
1628 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
1629 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
1630 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
1631 indicate that we are in a precondition or postcondition. This is used in
1632 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
1633 decide whether to flag the spec or body of the current subprogram as
1636 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
1638 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
1640 * a-extiin.ads: New file.
1642 2011-08-02 Bob Duff <duff@adacore.com>
1644 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
1645 now raises Name_Error instead of Use_Error in certain cases. The other
1646 parts of this AI were already implemented properly.
1648 2011-08-02 Vincent Celier <celier@adacore.com>
1650 * link.c: Only import "auto-host.h" when building the gnattools.
1652 2011-08-02 Yannick Moy <moy@adacore.com>
1654 * sem_util.adb: Inter-unit inlining does not work for a subprogram
1655 which calls a local subprogram, so extract subprogram
1656 from Mark_Non_ALFA_Subprogram_Body.
1658 2011-08-02 Javier Miranda <miranda@adacore.com>
1661 (Extract_Dispatching_Call): If the type of the dispatching object is an
1662 access type then return an explicit dereference in the Object out-mode
1665 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1667 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
1668 compatibility checks for all indexes of an array subtype, not just the
1669 first. Reset Has_Dynamic_Range_Check on the subtype before each
1670 potential check to ensure that Insert_Range_Checks will not elide any
1671 of the dynamic checks.
1673 2011-08-02 Yannick Moy <moy@adacore.com>
1675 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
1676 SPARK restriction at parsing time.
1677 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
1678 directive only if the SPARK restriction is set for this unit.
1680 2011-08-02 Yannick Moy <moy@adacore.com>
1682 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
1683 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
1684 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
1685 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
1686 Mark_Non_ALFA_Subprogram_Body.
1687 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
1690 2011-08-02 Yannick Moy <moy@adacore.com>
1692 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
1695 2011-08-02 Robert Dewar <dewar@adacore.com>
1697 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
1698 exp_ch3.adb: Minor reformatting.
1700 2011-08-02 Emmanuel Briot <briot@adacore.com>
1702 * adaint.c (__gnat_locate_exec_on_path): only returns executable
1703 files, not any regular file.
1704 (__gnat_locate_file_with_predicate): new subprogram.
1706 2011-08-02 Yannick Moy <moy@adacore.com>
1708 * sinfo.adb, sinfo.ads: Restrict the use of flags
1709 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
1710 nodes, plus N_Subtype_Declaration for the 2nd one.
1712 2011-08-02 Sergey Rybin <rybin@adacore.com>
1714 * gnat_rm.texi: Ramification of pragma Eliminate documentation
1715 - fix bugs in the description of Source_Trace;
1716 - get rid of UNIT_NAME;
1718 2011-08-02 Javier Miranda <miranda@adacore.com>
1721 (Build_Dispatching_Requeue): Adding support for VM targets
1722 since we cannot directly reference the Tag entity.
1723 * exp_sel.adb (Build_K): Adding support for VM targets.
1724 (Build_S_Assignment): Adding support for VM targets.
1726 (Default_Prim_Op_Position): In VM targets do not restrict availability
1727 of predefined interface primitives to compiling in Ada 2005 mode.
1728 (Is_Predefined_Interface_Primitive): In VM targets this service is not
1729 restricted to compiling in Ada 2005 mode.
1730 (Make_VM_TSD): Generate code that declares and initializes the OSD
1731 record. Needed to support dispatching calls through synchronized
1734 (Make_Predefined_Primitive_Specs): Enable generation of predefined
1735 primitives associated with synchronized interfaces.
1736 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
1737 primitives associated with synchronized interfaces.
1739 2011-08-02 Yannick Moy <moy@adacore.com>
1741 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
1742 statements hidden in SPARK if preceded by the HIDE directive
1743 (Parse_Exception_Handlers): mark each exception handler in a sequence of
1744 exception handlers as hidden in SPARK if preceded by the HIDE directive
1745 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
1746 if starting with the HIDE directive
1747 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
1748 starting with the HIDE directive; mark the declarations in a private
1749 part as hidden in SPARK if the private part starts with the HIDE
1751 * restrict.adb, restrict.ads
1752 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
1753 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
1754 argument node belongs to a part which is hidden in SPARK
1755 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
1756 parts in SPARK; protect the possibly costly call to
1757 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
1758 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
1759 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
1760 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
1762 (Scan): recognize special comment starting with '#' and followed by
1763 SPARK keyword "hide" as a HIDE directive.
1765 2011-08-02 Yannick Moy <moy@adacore.com>
1767 * types.ads, erroutc.ads: Minor reformatting.
1769 2011-08-02 Vincent Celier <celier@adacore.com>
1771 * link.c: Add response file support for cross platforms.
1773 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1775 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
1776 in an association, set parent field of copy before partial analysis.
1777 * sem_res.adb (Resolve_Slice): create reference to itype only when
1778 expansion is enabled.
1780 2011-08-02 Yannick Moy <moy@adacore.com>
1782 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
1783 for new flag denoting which subprogram bodies are in ALFA
1784 * restrict.adb, sem_ch7.adb: Update comment
1785 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1786 sem_ch9.adb, sem_res.adb: Add calls to
1787 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
1788 * sem_ch6.adb (Analyze_Function_Return): add calls to
1789 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
1790 middle of the body, and extended return.
1791 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
1792 False when missing return.
1793 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
1794 to True for subprograms whose spec is in ALFA. Remove later on the flag
1795 on the entity used for a subprogram body when there exists a separate
1797 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
1798 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
1799 False, otherwise do nothing.
1801 2011-08-02 Robert Dewar <dewar@adacore.com>
1803 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
1805 2011-08-02 Yannick Moy <moy@adacore.com>
1807 * sem_ch4.ads: minor formatting.
1809 2011-08-02 Yannick Moy <moy@adacore.com>
1811 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
1812 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
1813 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
1814 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
1815 opt.ads: cleanup of SPARK mode
1817 2011-08-02 Yannick Moy <moy@adacore.com>
1819 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
1821 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
1822 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
1824 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
1825 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
1826 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
1827 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
1829 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
1831 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
1832 functions whose return type is not in ALFA.
1833 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
1835 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
1836 parameter's type is not in ALFA.
1837 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
1840 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1842 * sem_ch6 (Analyze_Expression_Function): treat the function as
1843 Inline_Always, and introduce a subprogram declaration for it when it is
1845 * inline.adb (Add_Inlined_Body): recognize bodies that come from
1846 expression functions, so that the back-end can determine whether they
1847 can in fact be inlined.
1848 * sem_util.adb (Is_Expression_Function): predicate to determine whether
1849 a function body comes from an expression function.
1851 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1853 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
1854 null exclusions to test Can_Never_Be_Null on the anonymous access types
1855 of the formals rather than testing the formals themselves. Exclude this
1856 check in cases where the Old_Formal is marked as a controlling formal,
1857 to avoid issuing spurious errors for bodies completing dispatching
1858 operations (due to the flag not getting set on controlling access
1859 formals in body specs).
1860 (Find_Corresponding_Spec): When checking full and subtype conformance of
1861 subprogram bodies in instances, pass Designated and E in that order, for
1862 consistency with the expected order of the formals (New_Id followed by
1865 2011-08-02 Robert Dewar <dewar@adacore.com>
1867 * sem_ch8.adb: Minor reformatting.
1869 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1871 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
1872 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
1873 primitive operations of class-wide actuals.
1875 2011-08-02 Javier Miranda <miranda@adacore.com>
1877 * exp_atag.ads, exp_atag.adb
1878 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
1879 since its value is implicitly passed in argument Typ.
1880 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
1881 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
1882 Build_Common_Dispatching_Select_Statements.
1884 2011-08-02 Robert Dewar <dewar@adacore.com>
1886 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
1887 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
1890 2011-08-02 Robert Dewar <dewar@adacore.com>
1892 * sem_res.adb: Minor reformatting.
1893 * sem_prag.adb: Minor reformatting.
1895 2011-08-02 Javier Miranda <miranda@adacore.com>
1897 * exp_atag.adb, exp_atags.ads
1898 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
1899 by the tagged type Entity. Required to use this routine in the VM
1900 targets since we do not have available the Tag entity in the VM
1903 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
1904 Ada.Tags has not been previously loaded.
1906 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
1907 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
1909 (Enclosing_Dynamic_Scope): Add missing support to handle the full
1910 view of enclosing scopes. Required to handle enclosing scopes that
1911 are synchronized types whose full view is a task type.
1913 (Build_VM_TSDs): Minor code improvement to avoid generating and
1914 analyzing lists with empty nodes.
1915 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
1916 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
1917 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
1918 (Make_Disp_Timed_Select_Body): Add support for VM targets.
1919 (Make_Select_Specific_Data_Table): Add support for VM targets.
1920 (Make_VM_TSD): Generate code to initialize the SSD structure of
1923 2011-08-02 Yannick Moy <moy@adacore.com>
1925 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
1926 cross-references section in ALI.
1927 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
1928 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
1930 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
1931 subprogram or package entity of a node
1932 (Is_Local_Reference_Type): new function returns True for references
1933 selected in local cross-references.
1934 (Lt): function extracted from Lt in Output_References
1935 (Write_Entity_Name): function extracted from Output_References
1936 (Generate_Definition): generate reference with type 'D' for definition
1937 of objects (object declaration and parameter specification), with
1938 appropriate locations and units, for use in local cross-references.
1939 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
1940 references of type 'I' for initialization in object definition.
1941 (Output_References): move part of function Lt and procedure
1942 Write_Entity_Name outside of the body. Ignore references of types 'D'
1943 and 'I' introduced for local cross-references.
1944 (Output_Local_References): new procedure to output the local
1945 cross-references sections.
1946 (Lref_Entity_Status): new array defining whether an entity is a local
1947 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
1948 with 'I' type when initialization expression is present.
1949 * get_scos.adb, get_scos.ads: Correct comments and typos
1951 2011-08-02 Javier Miranda <miranda@adacore.com>
1953 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
1955 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
1957 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
1960 2011-08-02 Vincent Celier <celier@adacore.com>
1962 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
1963 (No_Space_Img): New function
1964 (Find_Excluded_Sources): When reading from a file, record the file name
1965 and the line number for each excluded source.
1966 (Mark_Excluded_Sources): When reporting an error, if the excluded
1967 sources were read from a file, include file name and line number in
1970 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1972 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
1974 2011-08-02 Robert Dewar <dewar@adacore.com>
1976 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
1978 2011-08-02 Javier Miranda <miranda@adacore.com>
1980 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
1981 generation of TSDs to the DOTNET compiler.
1982 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
1983 generation of TSDs to the DOTNET compiler.
1985 2011-08-02 Javier Miranda <miranda@adacore.com>
1987 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
1988 record of all the tagged types declared inside library level package
1989 declarations, library level package bodies or library level subprograms.
1990 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
1991 associated with a given tagged type.
1992 (Build_VM_TSDs): New subprogram.
1993 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
1994 compilation units that are subprograms.
1995 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
1996 compilation units that are package bodies.
1997 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
1998 units that are a package declaration or a package instantiation.
1999 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
2000 reorganization to improve the error generated by the frontend when the
2001 function Ada.Tags.Secondary_Tag is not available.
2002 * rtsfind.ads (RE_Register_TSD): New runtime entity.
2003 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
2005 2011-08-02 Javier Miranda <miranda@adacore.com>
2007 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
2009 2011-08-02 Robert Dewar <dewar@adacore.com>
2011 * s-imenne.ads: Minor reformatting.
2013 2011-08-02 Robert Dewar <dewar@adacore.com>
2015 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
2016 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
2017 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
2019 2011-08-02 Robert Dewar <dewar@adacore.com>
2021 * einfo.ads (Materialize_Entity): Document this is only for renamings
2022 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
2023 required debug information in the case where we transform the object
2024 declaration into a renaming declaration.
2025 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
2027 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
2030 2011-08-02 Robert Dewar <dewar@adacore.com>
2032 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
2033 Suppress_Init_Procs.
2034 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
2035 Suppress_Initialization/Initialization_Suppressed.
2036 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
2037 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
2038 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
2039 * sem_prag.adb: New processing for pragma Suppress_Initialization.
2041 2011-08-02 Robert Dewar <dewar@adacore.com>
2043 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
2046 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2048 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
2049 only have inheritable classwide pre/postconditions.
2051 2011-08-02 Javier Miranda <miranda@adacore.com>
2053 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
2054 * rtsfind.ads (RE_Check_TSD): New runtime entity.
2055 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
2056 checks if the external tag of a type is the same as the external tag
2057 of some other declaration.
2059 2011-08-02 Thomas Quinot <quinot@adacore.com>
2061 * s-taskin.ads: Minor reformatting.
2063 2011-08-02 Emmanuel Briot <briot@adacore.com>
2065 * g-comlin.adb (Display_Help): swap the order in which it prints the
2066 short help and the general usage.
2068 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2070 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
2071 the aspect declarations and attach them to the generic copy for
2072 subsequent analysis.
2073 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
2074 declarations of the generic tree to the new subprogram declarations.
2075 * sem_attr.adb (Check_Precondition_Postcondition): recognize
2076 conditions that apply to a subprogram instance.
2078 2011-08-02 Robert Dewar <dewar@adacore.com>
2080 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
2082 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2084 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
2085 private type with a tagged full view is not derived in the immediate
2086 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
2088 2011-08-02 Robert Dewar <dewar@adacore.com>
2090 * exp_ch4.adb: Minor reformatting.
2092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2094 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
2095 Ada2012 iterator, the loop will be rewritten during expansion into a
2096 while loop with a cursor and an element declaration. Do not analyze the
2097 body in this case, because if the container is for indefinite types the
2098 actual subtype of the elements will only be determined when the cursor
2099 declaration is analyzed.
2101 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2103 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
2104 size/alignment related attributes in CodePeer_Mode.
2106 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2108 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
2109 Prepend_Element, since this can result in the operation getting the
2110 wrong slot in the full type's dispatch table if the full type has
2111 inherited operations. The incomplete type's operation will get added
2112 to the proper position in the full type's primitives
2113 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
2114 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
2115 dispatching operations, since there are cases where nonprimitive
2116 subprograms can get added to the list of incomplete dependents (such
2117 as subprograms in nested packages).
2118 * sem_ch6.adb (Process_Formals): First, remove test for being in a
2119 private part when determining whether to add a primitive with a
2120 parameter of a tagged incomplete type to the Private_Dependents list.
2121 Such primitives can also occur in the visible part, and should not have
2122 been excluded from being private dependents.
2123 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
2124 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
2125 list of a Taft-amendment incomplete type is a primitive before issuing
2126 an error that the full type must appear in the same unit. There are
2127 cases where nonprimitives can be in the list (such as subprograms in
2129 * sem_disp.adb (Derives_From): Use correct condition for checking that
2130 a formal's type is derived from the type of the corresponding formal in
2131 the parent subprogram (the condition was completely wrong). Add
2132 checking that was missing for controlling result types being derived
2133 from the result type of the parent operation.
2135 2011-08-02 Yannick Moy <moy@adacore.com>
2137 * errout.adb (First_Node): minor renaming
2138 * restrict.adb (Check_Formal_Restriction): put restriction warning on
2141 2011-08-02 Yannick Moy <moy@adacore.com>
2143 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
2144 before accessing operands.
2145 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
2146 decide whether an initialization expression respects SPARK rules, as
2147 the plain node is the expanded one. This allows for more valid warnings
2149 * gnat_rm.texi: Minor update.
2151 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2153 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
2156 2011-08-02 Robert Dewar <dewar@adacore.com>
2158 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
2160 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2162 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
2163 loop statements and the element renaming declaration with a block when
2164 the element type is controlled.
2166 2011-08-02 Yannick Moy <moy@adacore.com>
2168 * sinfo.ads: Minor formatting.
2170 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2172 * sem_aggr.adb (Add_Association): if the association has a box and no
2173 expression, use the Sloc of the aggregate itself for the new
2175 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
2178 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2180 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
2181 When a container is provided via a function call, generate a renaming
2182 of the function result. This avoids the creation of a transient scope
2183 and the premature finalization of the container.
2184 * exp_ch7.adb (Is_Container_Cursor): Removed.
2185 (Wrap_Transient_Declaration): Remove the supression of the finalization
2186 of the list controller when the declaration denotes a container cursor,
2189 2011-08-02 Yannick Moy <moy@adacore.com>
2191 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
2192 node is from source, instead of the original node being from source.
2194 (Resolve_Array_Aggregate): refine the check for a static expression, to
2195 recognize also static ranges
2196 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
2197 Array_Type_Declaration): postpone the test for the type being a subtype
2198 mark after the type has been resolved, so that component-selection and
2199 expanded-name are discriminated.
2200 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
2201 to distinguish the case of an iteration scheme, so that an error is
2202 issed on a non-static range in SPARK except in an iteration scheme.
2203 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
2204 In_Iter_Schm = True.
2205 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
2206 user-defined operators so that they are allowed in renaming
2208 (Find_Selected_Component): refine the check for prefixing of operators
2209 so that they are allowed in renaming. Move the checks for restrictions
2210 on selector name after analysis discriminated between
2211 component-selection and expanded-name.
2212 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
2213 concatenation argument of string type if it is static.
2214 * sem_util.adb, sem_util.ads
2215 (Check_Later_Vs_Basic_Declarations): add a new function
2216 Is_Later_Declarative_Item to decice which declarations are allowed as
2217 later items, in the two different modes Ada 83 and SPARK. In the SPARK
2218 mode, add that renamings are considered as later items.
2219 (Enclosing_Package): new function to return the enclosing package
2220 (Enter_Name): correct the rule for homonyms in SPARK
2221 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
2222 from source (result of expansion) to avoid issuing wrong warnings.
2224 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2226 * errout.adb: On anything but an expression First_Node returns its
2229 2011-08-02 Pascal Obry <obry@adacore.com>
2231 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
2233 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2235 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
2236 Set the associated loop as the related expression of internally
2238 * exp_ch7.adb (Is_Container_Cursor): New routine.
2239 (Wrap_Transient_Declaration): Supress the finalization of the list
2240 controller when the declaration denotes a container cursor.
2242 2011-08-02 Yannick Moy <moy@adacore.com>
2244 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
2246 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
2247 expression is a simple expression. This check cannot be performed in
2248 the semantics, so just drop it.
2249 (P_Index_Or_Discriminant_Constraint): move check that the index or
2250 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
2251 semantics. Other cases were previously checked in the semantics.
2252 * par-ch4.adb (P_Name): move checks that a selector name is not
2253 character literal or an operator symbol to Find_Selected_Component in
2255 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
2256 declarations are not placed after later declarations in a separate
2257 procedure in Sem_Util (possibly not the best choice?), to be used both
2258 during parsing, for Ada 83 mode, and during semantic analysis, for
2260 * par-endh.adb (Check_End): move check that end label is not missing
2261 to Process_End_Label in the semantics
2262 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
2263 the special case for SPARK restriction
2264 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
2265 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
2266 parameter Force to issue the error message even on internal node (used
2267 for generated end label). Call Check_Restriction to check when an error
2268 must be issued. In SPARK mode, issue an error message even if the
2269 restriction is not set.
2270 (Check_Restriction): new procedure with an additional out parameter to
2271 inform the caller that a message has been issued
2272 * sem_aggr.adb: Minor modification of message
2273 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
2274 instead of issuing an error message directly
2275 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
2276 declarations are not placed after later declarations, by calling
2277 Check_Later_Vs_Basic_Declarations
2278 (Analyze_Subtype_Declaration): move here the check that an index or
2279 discriminant constraint must be a subtype mark. Change the check that
2280 a subtype of String must start at one so that it works on subtype marks.
2281 * sem_ch4.adb (Analyze_Call): move here the check that a named
2282 association cannot follow a positional one in a call
2283 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
2284 instead of issuing an error message directly
2285 * sem_ch8.adb (Find_Selected_Component): move here the check that a
2286 selector name is not a character literal or an operator symbol. Move
2287 here the check that the prefix of an expanded name cannot be a
2288 subprogram or a loop statement.
2289 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
2290 procedure called from parsing and semantics to check that basic
2291 declarations are not placed after later declarations
2292 (Process_End_Label): move here the check that end label is not missing
2294 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2296 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
2297 representation clause in codepeer mode, since it confuses CodePeer and
2298 does not bring useful info.
2300 2011-08-02 Ed Falis <falis@adacore.com>
2302 * init.c: initialize fp hw on MILS.
2304 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2306 * errout.adb (First_Node): for bodies, return the node itself (small
2307 optimization). For other nodes, do not check source_unit if the node
2308 comes from Standard.
2310 2011-08-02 Robert Dewar <dewar@adacore.com>
2312 * exp_ch3.adb: Minor comment additions.
2313 * sem_ch13.adb: Minor reformatting.
2315 2011-08-02 Pascal Obry <obry@adacore.com>
2317 * make.adb, makeutl.adb: Removes some superfluous directory separator.
2319 2011-08-02 Robert Dewar <dewar@adacore.com>
2321 * sem_attr.adb: Minor reformatting.
2323 2011-08-02 Robert Dewar <dewar@adacore.com>
2325 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
2326 (Has_Default_Component_Value): Removed
2327 * einfo.ads Comment updates
2328 (Has_Default_Aspect): Replaces Has_Default_Value
2329 (Has_Default_Component_Value): Removed
2331 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
2333 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
2334 (Get_Simple_Init_Val): Handle Default_Value aspect
2335 (Needs_Simple_Initialization): Handle Default_Value aspect
2336 * exp_ch3.ads: Needs_Simple_Initialization
2337 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
2338 * par-prag.adb (Pragma_Default[_Component]Value) Removed
2340 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
2341 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
2342 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
2344 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2346 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
2347 package containing iteration primitives.
2348 exp_ch5.adb (Expand_Iterator_Loop): ditto.
2350 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2352 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
2353 "of", pre-analyze expression in case it is a function call with
2354 finalization actions that must be placed ahead of the loop.
2355 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
2356 on an Ada2012 iterator, insert them ahead of the rewritten loop.
2358 2011-08-02 Geert Bosch <bosch@adacore.com>
2360 * cstand.adb (Create_Float_Types): Only consider C's long double for
2361 Long_Long_Float, in addition to double.
2363 2011-08-02 Robert Dewar <dewar@adacore.com>
2365 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
2366 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
2367 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
2370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2372 * sem_attr.adb: handle properly 'Result when it is a prefix of an
2375 2011-08-02 Javier Miranda <miranda@adacore.com>
2377 * einfo.ads, einfo.adb
2378 (Original_Access_Type): Move this attribute to Node26 since there was
2379 an undocumented use of Node21 in E_Access_Subprogram_Type entities
2380 which causes conflicts and breaks the generation of the .NET compiler.
2381 (Interface_Name): Add missing documentation on JGNAT only uses of
2384 2011-08-02 Geert Bosch <bosch@adacore.com>
2386 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
2387 (Find_Back_End_Float_Type): Likewise
2388 (Create_Back_End_Float_Types): Likewise
2389 (Create_Float_Types): Likewise
2390 (Register_Float_Type): Likewise
2391 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
2392 Nlist and split out type selection in new local Find_Base_Type function.
2393 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
2395 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
2397 2011-08-02 Robert Dewar <dewar@adacore.com>
2399 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
2401 * opt.ads: Minor comment change.
2402 * sem_ch12.adb: Minor code reorganization.
2404 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2406 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
2407 subtype's list of rep items to the list on the full subtype in the case
2408 where the lists are the same.
2410 2011-08-02 Geert Bosch <bosch@adacore.com>
2412 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
2413 using the one from System.Strings, which also deallocates all strings.
2415 2011-08-02 Geert Bosch <bosch@adacore.com>
2417 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
2419 * gcc-interface/Make-lang.in: Update dependencies.
2421 2011-08-02 Olivier Hainque <hainque@adacore.com>
2423 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
2426 2011-08-02 Javier Miranda <miranda@adacore.com>
2428 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
2429 associated with anonymous access to subprograms.
2431 2011-08-02 Geert Bosch <bosch@adacore.com>
2434 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
2435 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
2436 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
2437 (Add_Symbol_Definition): Move to switch-c.adb
2438 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
2439 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
2440 (Add_Symbol_Definition): Move to switch-c.adb.
2441 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
2443 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
2445 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
2446 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
2448 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
2449 (Add_Symbol_Definition): Moved from Prepcomp.
2450 * switch-c.ads: Update copyright notice. Use String_List instead of
2451 Argument_List, removing dependency on System.OS_Lib.
2453 2011-08-02 Yannick Moy <moy@adacore.com>
2455 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
2456 mode on initialization expression which does not respect SPARK
2458 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
2459 if the tree referenced by its argument represents an initialization
2460 expression in SPARK, suitable for initializing an object in an object
2463 2011-08-02 Javier Miranda <miranda@adacore.com>
2465 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
2466 internally generated access to subprogram with its associated protected
2468 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
2470 2011-08-02 Geert Bosch <bosch@adacore.com>
2472 * cstand.adb (Register_Float_Type): Print information about type to
2473 register, if the Debug_Flag_Dot_B is set.
2474 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
2475 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
2476 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
2477 with a requested precision of more than Max_Digits digits and no more
2478 than Max_Base_Digits digits, if a range specification is present and the
2479 Predefined_Float_Types list has a suitable type to derive from.
2480 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
2481 case of type completion with pragma Import
2483 (Process_Import_Predefined_Type): Processing to complete a type
2484 with pragma Import. Currently supports floating point types only.
2485 (Set_Convention_From_Pragma): Do nothing without underlying type.
2486 (Process_Convention): Guard against absence of underlying type,
2487 which may happen when importing incomplete types.
2488 (Process_Import_Or_Interface): Handle case of importing predefined
2489 types. Tweak error message.
2491 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2493 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
2494 functions to previous change. Reorganize code slightly.
2496 2011-08-02 Geert Bosch <bosch@adacore.com>
2498 * back_end.ads (Register_Type_Proc): New call back procedure type for
2499 allowing the back end to provide information about available types.
2500 (Register_Back_End_Types): New procedure to register back end types.
2501 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
2503 * cstand.adb (Back_End_Float_Types): New list for floating point types
2504 supported by the back end.
2505 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
2506 (Copy_Float_Type): New procedure to make new copies of predefined types.
2507 (Register_Float_Type): New call back procedure to populate the BEFT list
2508 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
2509 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
2510 (Create_Float_Types): New procedure to create entities for floating
2511 point types predefined in Standard, and put these and any remaining
2512 BEFTs on the Predefined_Float_Types list.
2513 * stand.ads (Predefined_Float_Types): New list for predefined floating
2514 point types that do not have declarations in package Standard.
2516 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2518 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
2519 entity node for the unit containing the parameter.
2520 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
2521 (Add_Inlined_Subprogram): Likewise.
2522 * gcc-interface/Make-lang.in: Update dependencies.
2524 2011-08-02 Thomas Quinot <quinot@adacore.com>
2526 * s-stusta.adb (Print): Make sure Pos is always initialized to a
2529 2011-08-02 Geert Bosch <bosch@adacore.com>
2531 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
2533 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2535 * sem_type.adb (Covers): Move trivial case to the top and reuse the
2536 computed value of Base_Type.
2538 2011-08-02 Yannick Moy <moy@adacore.com>
2540 * restrict.adb (Check_Restriction): issue an error for any use of
2541 class-wide, even if the No_Dispatch restriction is not set.
2542 * sem_aggr.adb: Correct typos in comments and messages in formal mode
2543 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
2544 when completing a private extension, the type named in the private part
2545 is not the same as that named in the visible part.
2546 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
2547 of an inherited primitive operations of a tagged type or type extension
2548 that returns the tagged type.
2549 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
2550 function which returns True for an implicit operation inherited by the
2551 derived type declaration for the argument type.
2552 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
2555 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2557 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
2558 Process_Bounds, to perform analysis with expansion of a range or an
2559 expression that is the iteration scheme for a loop.
2560 (Analyze_Iterator_Specification): If domain of iteration is given by a
2561 function call with a controlled result, as is the case if call returns
2562 a predefined container, ensure that finalization actions are properly
2564 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
2566 2011-08-02 Javier Miranda <miranda@adacore.com>
2568 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
2569 * gcc-interface/Make-lang.in: Update dependencies.
2571 2011-08-02 Javier Miranda <miranda@adacore.com>
2573 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
2574 determine if the analysis is performed using N or Original_Node (N).
2575 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
2576 functionality of routine Is_Variable avoids code duplication.
2577 * checks.adb (Determine_Range): Handle temporaries generated by
2578 Remove_Side_Effects.
2580 2011-08-02 Javier Miranda <miranda@adacore.com>
2582 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
2583 expansion of the condition. Required since the previous analysis was
2584 done with expansion disabled (see Resolve_Quantified_Expression) and
2585 hence checks were not inserted and record comparisons have not been
2588 2011-08-02 Ed Falis <falis@adacore.com>
2590 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
2593 2011-08-02 Bob Duff <duff@adacore.com>
2595 * opt.ads: Minor comment fix.
2597 2011-08-02 Bob Duff <duff@adacore.com>
2599 * sem_ch12.adb (Analyze_Package_Instantiation,
2600 Analyze_Subprogram_Instantiation): Turn off style checking while
2601 analyzing an instance. Whatever style checks that apply to the generic
2602 unit should apply, so it makes no sense to apply them in an instance.
2603 This was causing trouble when compiling an instance of a runtime
2604 unit that violates the -gnatyO switch.
2605 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
2606 one of the two case statements, causing spurious errors.
2608 2011-08-02 Robert Dewar <dewar@adacore.com>
2610 * uname.adb: Minor reformatting.
2611 * gnatcmd.adb: Minor reformatting.
2612 * exp_attr.adb: Minor reformatting.
2614 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2616 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
2617 No_Dispatching_Calls, do not look for the Assign primitive, because
2618 predefined primitives are not created in this case.
2620 2011-08-02 Bob Duff <duff@adacore.com>
2622 * stylesw.ads: Minor comment fixes.
2624 2011-08-02 Robert Dewar <dewar@adacore.com>
2626 * freeze.adb (Add_To_Result): New procedure.
2628 2011-08-02 Jose Ruiz <ruiz@adacore.com>
2630 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
2631 time, if the specific run-time routines for handling streams of strings
2632 are not available, use the default mechanism.
2634 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2636 * s-regpat.ads: Fix typo.
2638 2011-08-02 Vincent Celier <celier@adacore.com>
2640 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
2641 not null, call it to create the in memory config project file without
2642 parsing an existing default config project file.
2644 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2646 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
2648 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2650 * sem_elim.adb: an abstract subprogram does not need an eliminate
2651 pragma for its descendant to be eliminable.
2653 2011-08-02 Ed Falis <falis@adacore.com>
2655 * init.c: revert to handling before previous checkin for VxWorks
2656 * s-intman-vxworks.adb: delete unnecessary declarations related to
2657 using Ada interrupt facilities for handling signals.
2658 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
2659 * s-intman-vxworks.ads: Import __gnat_install_handler as
2660 Initialize_Interrupts.
2661 * s-taprop-vxworks.adb: Delete Signal_Mask.
2662 (Abort_Handler): change construction of mask to unblock exception
2665 2011-08-02 Jerome Guitton <guitton@adacore.com>
2667 * a-except-2005.adb (Raise_From_Signal_Handler): Call
2668 Debug_Raise_Exception before propagation starts.
2670 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2672 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
2673 to Restriction_Check_Required.
2674 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
2675 * sem_res.adb (Resolve_Call): Likewise.
2676 * sem_attr.adb (Check_Stream_Attribute): Likewise.
2678 2011-08-02 Bob Duff <duff@adacore.com>
2680 * stylesw.ads: Update comment.
2681 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
2682 * errout.ads: Remove obsolete comment.
2684 2011-08-02 Javier Miranda <miranda@adacore.com>
2686 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
2687 (Set_Is_Safe_To_Reevaluate): new procedure.
2688 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
2689 assignment is allowed on safe-to-reevaluate variables.
2690 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
2691 temporary created to remove side effects in expressions that use
2692 the secondary stack as safe-to-reevaluate.
2693 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
2694 variables that are not true constants.
2696 2011-08-02 Robert Dewar <dewar@adacore.com>
2698 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
2699 sem_res.adb, sem_ch6.adb: Minor reformatting.
2701 2011-08-02 Jerome Guitton <guitton@adacore.com>
2703 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
2705 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2707 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
2708 not set Overridden_Operation if subprogram is an initialization
2711 2011-08-02 Yannick Moy <moy@adacore.com>
2713 * par-ch6.adb: Correct obsolete name in comments
2714 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
2715 which takes two message arguments (existing function takes one), with
2716 second message used for continuation.
2717 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
2718 block statements that originate from a source block statement, not
2719 generated block statements
2720 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
2721 symmetry with procedure case
2722 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
2723 function to issue an error in formal mode if a package specification
2724 contains more than one tagged type or type extension.
2725 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
2726 parameters matching formals of tagged types are objects (or ancestor
2727 type conversions of objects), not general expressions. Issue an error
2728 on view conversions that are not involving ancestor conversion of an
2730 (Resolve_Type_Conversion): in formal mode, issue an error on the
2731 operand of an ancestor type conversion which is not an object
2732 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
2733 procedure so that it works also for actuals of function calls
2734 (Is_Actual_Tagged_Parameter): new function which determines if its
2735 argument is an actual parameter of a formal of tagged type in a
2737 (Is_SPARK_Object_Reference): new function which determines if the tree
2738 referenced by its argument represents an object in SPARK
2740 2011-08-02 Robert Dewar <dewar@adacore.com>
2742 * sem_ch3.adb: Minor reformatting
2743 Minor comment addition
2744 Minor error msg text change
2746 2011-08-02 Javier Miranda <miranda@adacore.com>
2748 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
2749 function. Used to be more precise when we generate a variable plus one
2750 assignment to remove side effects in the evaluation of the Bound
2752 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
2753 of the bound expression to force its re-analysis and thus expand the
2754 associated transient scope (if required). Code cleanup replacing the
2755 previous code that declared the constant entity by an invocation to
2756 routine Force_Evaluation which centralizes this work in the frontend.
2758 2011-08-02 Robert Dewar <dewar@adacore.com>
2760 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
2761 (Base_Type): Now uses improved Is_Base_Type function
2762 * einfo.ads (Base_Type): Inline this function
2764 2011-08-02 Robert Dewar <dewar@adacore.com>
2766 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
2767 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
2769 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2771 * gcc-interface/Make-lang.in: Update dependencies.
2772 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
2775 2011-08-02 Yannick Moy <moy@adacore.com>
2777 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
2778 non-simple expression used in delta constraint
2779 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
2780 index constraint which is not a subtype mark
2781 * par.adb: With and use Restrict
2782 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
2783 mode on component type which is not a subtype mark and default
2784 expression on component
2785 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
2786 of string which does not have a lower index bound equal to 1
2787 (Array_Type_Declaration): issue an error in formal mode on index or
2788 component type which is not a subtype mark, and on aliased keyword on
2790 (Derived_Type_Declaration): issue an error in formal mode on interface,
2791 limited or abstract type
2792 (Record_Type_Declaration): issue an error in formal mode on interface
2793 (Record_Type_Definition): issue an error in formal mode on tagged types
2794 and type extensions not declared in the specification of a library unit
2795 package; on null non-tagged record; on variant part
2797 2011-08-02 Vincent Celier <celier@adacore.com>
2799 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
2800 not declared for qualified library project when Library_Name is not
2801 declared, but Library_Dir is.
2803 2011-08-02 Robert Dewar <dewar@adacore.com>
2805 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
2806 pragmas (affects aspects [Component_]Default_Value
2807 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
2808 component type for the resolution
2810 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2812 * einfo.adb (Base_Type): Tune implementation for speed.
2814 2011-08-02 Robert Dewar <dewar@adacore.com>
2816 * freeze.adb: Minor reformatting.
2818 2011-08-02 Thomas Quinot <quinot@adacore.com>
2820 * scos.ads: Update comments.
2822 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2824 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
2825 base type, because the parent may be a subtype of a private type whose
2826 convention is established in a private part.
2828 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2830 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
2831 statement in a block when the expansion of the return expression has
2832 created a finalization chain.
2833 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
2834 with the parent node.
2835 Add N_Extended_Return_Statement to handle the case where a transient
2836 object declaration appears in the Return_Object_Declarations list of
2837 an extended return statement.
2839 2011-08-02 Matthew Gingell <gingell@adacore.com>
2841 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
2842 unused parameter 'name'.
2844 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2846 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
2847 inherited operation, check whether its alias, which is the source
2848 operastion that it renames, has been marked eliminated.
2850 2011-08-02 Javier Miranda <miranda@adacore.com>
2852 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
2853 in-mode parameter whose type is an access type since it can be used to
2854 modify its designated object. Enforce code that handles as safe an
2855 access type that is not access-to-constant but it is the result of a
2856 previous removal of side-effects.
2857 (Remove_Side_Effects): Minor code reorganization of cases which require
2858 no action. Done to incorporate documentation on new cases uncovered
2859 working in this ticket: no action needed if this routine was invoked
2860 too early and the nodes are not yet decorated.
2861 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
2862 to routine Remove_Side_Effects by calls to Force_Evaluation since they
2863 were issued with actuals that are implicitly provided by
2866 2011-08-02 Robert Dewar <dewar@adacore.com>
2868 * sem_ch3.adb, sem_res.adb: Minor reformatting.
2870 2011-08-02 Yannick Moy <moy@adacore.com>
2872 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
2873 to issue an error in formal mode on attribute not supported in this mode
2874 (Analyze_Attribute): issue errors on standard attributes not supported
2876 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
2877 comment, and issue error in formal mode on modulus which is not a power
2879 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
2881 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
2883 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
2884 operator on modular type (except 'not').
2886 2011-08-02 Robert Dewar <dewar@adacore.com>
2888 * gnat_rm.texi: Minor reformatting.
2890 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2892 * s-osinte-linux.ads: Minor comment update and reformatting.
2893 * i-cexten.ads: Make this unit pure, as for its parent.
2894 Will allow its usage in more contexts if needed.
2896 2011-08-02 Robert Dewar <dewar@adacore.com>
2898 * s-utf_32.ads: Minor comment fix.
2900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2902 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
2903 operation of a tagged synchronized type, handle the case where the
2904 controlling argument is overloaded.
2906 2011-08-02 Yannick Moy <moy@adacore.com>
2908 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
2909 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
2910 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
2911 SPARK mode and formal verification mode on processing SPARK restriction
2912 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
2913 requiring consistency checking.
2915 2011-08-02 Robert Dewar <dewar@adacore.com>
2917 * sem_res.adb: Minor reformatting.
2919 2011-08-02 Robert Dewar <dewar@adacore.com>
2921 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2922 a-cforse.ads: Remove unneeded with of Ada.Containers
2923 Remove commented out pragma Inline's
2924 Move specifications of new subprograms to the actual specs
2926 2011-08-02 Yannick Moy <moy@adacore.com>
2928 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2929 a-cforse.ads: Update comments.
2931 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2933 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
2935 2011-08-02 Robert Dewar <dewar@adacore.com>
2937 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2938 a-cforse.ads, a-cofove.ads: Minor reformatting.
2940 2011-08-02 Claire Dross <dross@adacore.com>
2942 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
2943 a-cofove.ads: Add comments.
2945 2011-08-02 Yannick Moy <moy@adacore.com>
2947 * gnat_rm.texi: Document formal containers.
2949 2011-08-02 Emmanuel Briot <briot@adacore.com>
2951 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
2954 2011-08-02 Robert Dewar <dewar@adacore.com>
2956 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
2959 2011-08-02 Robert Dewar <dewar@adacore.com>
2961 * aspects.adb: New aspects Default_Value and Default_Component_Value
2962 New format of Aspect_Names table checks for omitted entries
2963 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
2964 handling of boolean aspects for derived types.
2965 New aspects Default_Value and Default_Component_Value
2966 New format of Aspect_Names table checks for omitted entries
2967 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
2968 (Has_Default_Value): New flag
2969 (Has_Default_Component_Value): New flag
2970 (Has_Default_Value): New flag
2971 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
2973 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
2974 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
2975 Default_Value and Default_Component_Value
2976 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
2977 New aspects Default_Value and Default_Component_Value
2978 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
2979 * sprint.adb: Print N_Aspect_Specification node when called from gdb
2981 2011-08-02 Vincent Celier <celier@adacore.com>
2983 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
2984 inherit library kind.
2986 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2988 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
2991 2011-08-02 Robert Dewar <dewar@adacore.com>
2993 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
2995 2011-08-02 Yannick Moy <moy@adacore.com>
2997 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
2999 2011-08-02 Robert Dewar <dewar@adacore.com>
3001 * impunit.adb: Add comment.
3003 2011-08-02 Yannick Moy <moy@adacore.com>
3005 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
3006 qualification of aggregates in formal mode
3007 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
3009 (Resolve_Aggregate): complete the test that an aggregate is adequately
3010 qualified in formal mode
3012 2011-08-02 Pascal Obry <obry@adacore.com>
3014 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
3015 * mlib-prj.adb: Supress warning when compiling binder generated file.
3016 (Build_Library): Supress all warnings when compiling the binder
3019 2011-08-02 Yannick Moy <moy@adacore.com>
3021 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
3023 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
3024 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
3025 Add with/use clauses to make Check_Formal_Restriction visible
3027 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3029 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
3030 in-parameters when type of the generic formal is private in the generic
3031 spec and non-private in the body.
3033 2011-08-02 Claire Dross <dross@adacore.com>
3035 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
3036 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
3037 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
3038 * impunit.adb, Makefile.rtl: Take new files into account.
3040 2011-08-02 Robert Dewar <dewar@adacore.com>
3042 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
3043 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3045 2011-08-02 Yannick Moy <moy@adacore.com>
3047 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
3049 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
3050 matching static array bounds, taking into account the special case of
3052 * sem_ch3.adb: Typo in comment.
3054 2011-08-02 Yannick Moy <moy@adacore.com>
3056 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
3057 which issues an error in formal mode if its argument node is originally
3059 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
3060 has a discriminant specification so that it does not include the case
3062 (Derived_Type_Declaration): move here the test that a derived type has a
3063 discriminant specification
3064 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
3065 first element of a component association before accessing its choices
3066 (presence of component association is not enough)
3067 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
3068 declaration is a library item before accessing the next element in a
3069 list, as library items are not member of lists
3070 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3071 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
3072 Check_Formal_Restriction whenever possible.
3074 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3076 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
3077 reference when needed.
3079 2011-08-02 Bob Duff <duff@adacore.com>
3081 * gnat_ugn.texi: Fix typo.
3083 2011-08-02 Vincent Celier <celier@adacore.com>
3085 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
3086 archive file name. Do not use the full path name of archives for Open
3089 2011-08-02 Robert Dewar <dewar@adacore.com>
3091 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
3092 Analyze_Aspect_Specifications
3094 (Analyze_Aspect_Specifications): New handling for boolean aspects
3095 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
3096 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
3097 sequence for Analyze_Aspect_Specifications
3098 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
3099 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
3101 2011-08-02 Robert Dewar <dewar@adacore.com>
3103 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
3104 aspects, since these no longer exist.
3106 2011-08-02 Robert Dewar <dewar@adacore.com>
3108 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
3109 semicolon, do not try to see if there are aspects following it.
3110 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
3113 2011-08-02 Robert Dewar <dewar@adacore.com>
3115 * sem_ch8.adb, aspects.ads: Minor reformatting.
3117 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3119 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
3120 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
3122 (Analyze_Aspect_Specifications): ...here. Call above procedure.
3124 2011-08-02 Yannick Moy <moy@adacore.com>
3126 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
3127 mode on subprogram declaration outside of package specification, unless
3128 it is followed by a pragma Import
3129 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
3130 Access_Type_Declaration): issue error in formal mode on access type
3131 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
3133 (Analyze_Object_Declaration): issue error in formal mode on object
3134 declaration which does not respect SPARK restrictions
3135 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
3136 declaration which does not respect SPARK restrictions
3137 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
3138 error in formal mode on digits or delta constraint
3139 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
3140 decimal fixed point type
3141 (Derived_Type_Declaration): issue error in formal mode on derived type
3142 other than type extensions of tagged record types
3143 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
3144 with check on access definition
3145 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
3146 mode on protected definition.
3147 (Analyze_Task_Definition): issue error in formal mode on task definition
3149 2011-08-02 Robert Dewar <dewar@adacore.com>
3151 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
3153 2011-08-02 Javier Miranda <miranda@adacore.com>
3155 * sem_ch6.adb (Can_Override_Operator): New function.
3156 (Verify_Overriding_Indicator): Add missing code to check overriding
3157 indicator in operators. Fixes regression.
3158 (Check_Overriding_Indicator): Minor reformating after replacing the
3159 code that evaluates if the subprogram can override an operator by
3160 invocations to the above new function.
3162 (Write_Field26_Name): Add missing code to ensure that, following
3163 the documentation in einfo.ads, this field is not shown as attribute
3164 "Static_Initialization" on non-dispatching functions.
3166 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3168 * sem_res.adb (Resolve_Call): A call to
3169 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
3170 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
3171 i.e., when the second parameter is of type Time_Span.
3173 2011-08-02 Vincent Celier <celier@adacore.com>
3175 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
3176 with an archive instead of -L<library dir> -l<library name>.
3178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3180 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
3181 mark the base types In_Use in addition to making the operations
3184 2011-08-02 Ed Falis <falis@adacore.com>
3186 * init.c: add and setup __gnat_signal_mask for the exception signals
3187 * s-inmaop-vxworks.adb: new file.
3188 * s-intman-vxworks.adb: remove unnecessary initializations and
3190 * s-intman-vxworks.ads: remove unnecessary variable
3191 * s-taprop-vxworks.adb: simplify signal initialization
3193 2011-08-02 Robert Dewar <dewar@adacore.com>
3195 * sem_ch8.adb: Minor code reorganization, comment updates.
3197 2011-08-02 Robert Dewar <dewar@adacore.com>
3199 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
3200 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
3202 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
3203 (Matching_Static_Array_Bounds): Moved here from Sem_Res
3205 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3207 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
3208 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
3209 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
3210 use_type_clauses, to handle more efficiently use_type and use_all_type
3212 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
3213 Ada2012 Use_All_Type clause.
3214 (Use_Class_Wide_Operations): new procedure.
3216 2011-08-02 Robert Dewar <dewar@adacore.com>
3218 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
3219 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
3220 expression to expression function.
3222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3224 * sem_ch4.adb: transform simple Ada2012 membership into equality only
3225 if types are compatible.
3227 2011-08-02 Yannick Moy <moy@adacore.com>
3229 * sem_res.adb (Matching_Static_Array_Bounds): new function which
3230 returns True if its argument array types have same dimension and same
3231 static bounds at each index.
3232 (Resolve_Actuals): issue an error in formal mode on actuals passed as
3233 OUT or IN OUT paramaters which are not view conversions in SPARK.
3234 (Resolve_Arithmetic_Op): issue an error in formal mode on
3235 multiplication or division with operands of fixed point types which are
3236 not qualified or explicitly converted.
3237 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
3238 Boolean or array type (except String) operands.
3239 (Resolve_Equality_Op): issue an error in formal mode on equality
3240 operators for array types other than String with non-matching static
3242 (Resolve_Logical_Op): issue an error in formal mode on logical operators
3243 for array types with non-matching static bounds. Factorize the code in
3244 Matching_Static_Array_Bounds.
3245 (Resolve_Qualified_Expression): issue an error in formal mode on
3246 qualified expressions for array types with non-matching static bounds.
3247 (Resolve_Type_Conversion): issue an error in formal mode on type
3248 conversion for array types with non-matching static bounds
3250 2011-08-02 Robert Dewar <dewar@adacore.com>
3252 * par-ch10.adb: Minor code reorganization (use Nkind_In).
3254 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3256 * par-ch9.adb: save location of entry for proper error message.
3258 2011-08-02 Javier Miranda <miranda@adacore.com>
3260 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
3261 (Use_Full_View) which permits this routine to climb through the
3262 ancestors using the full-view of private parents.
3263 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
3264 Use_Full_View to true in calls to Is_Ancestor.
3265 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
3266 true in call to Is_Ancestor.
3267 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
3268 Use_Full_View to true in call to Is_Ancestor.
3269 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
3270 call to Is_Ancestor.
3271 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
3272 Use_Full_View to true in calls to Is_Ancestor.
3273 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
3274 Make_Select_Specific_Data_Table, Register_Primitive,
3275 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
3276 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
3277 to true in call to Is_Ancestor.
3278 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
3279 Use_Full_View to true in calls to Is_Ancestor.
3281 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
3282 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
3284 2011-08-02 Robert Dewar <dewar@adacore.com>
3286 * gnat_rm.texi: Minor reformatting.
3287 * sem_prag.adb: Minor reformatting.
3289 2011-08-02 Tristan Gingold <gingold@adacore.com>
3291 * vms_data.ads: Add VMS qualifier for -gnateP.
3293 2011-08-02 Robert Dewar <dewar@adacore.com>
3295 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
3296 * par-ch7.adb (P_Package): Proper placement of aspects for package
3298 * par-endh.adb (Check_End): Ad Is_Sloc parameter
3299 (End_Statements): Add Is_Sloc parameterr
3300 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
3301 (Check_End): Ad Is_Sloc parameter
3302 (End_Statements): Add Is_Sloc parameterr
3304 2011-08-02 Vincent Celier <celier@adacore.com>
3306 * ug_words: Add VMS qualifier equivalent to -gnateP:
3307 /SYMBOL_PREPROCESSING.
3309 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3311 * gnat-style.texi: For hexadecimal numeric literals the typical
3312 grouping of digits is 4 to represent 2 bytes.
3313 A procedure spec which is split into several lines is indented two
3316 2011-08-02 Yannick Moy <moy@adacore.com>
3318 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
3319 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
3320 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
3322 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
3323 choice in array aggregate
3324 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
3326 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
3327 positional and named aggregate for record, or others in record
3328 aggregate, or multiple choice in record aggregate
3329 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
3330 array operands to logical operations AND, OR and XOR do not have the
3331 same static lower and higher bounds
3332 * sem_ch5.adb, sinfo.ads: Correct typos in comments
3334 2011-08-01 Robert Dewar <dewar@adacore.com>
3336 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
3337 Replaces Last_Source_Node_In_Sequence.
3338 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
3339 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
3340 parens and blank in string (this was inconsistently implemented).
3342 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
3343 blank in string (this was inconsistently implemented).
3345 (Set_Global_Switches): Set formal mode switches appropriately
3346 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
3348 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
3349 call Set_Error_Msg_Lang to set "spark" as language name.
3350 * par.adb: Remove unnecessary call to set formal language for errout
3351 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
3352 appropriately and call Set_Error_Msg_Lang to set "spark" as language
3354 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
3355 calls to it, moved after resolution so that types are known
3356 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
3357 result of concatenation is not of type String
3358 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
3359 concatenation is not properly restricted
3360 * gnat_rm.texi: Add doc on pragma Spark_95.
3361 * gcc-interface/Makefile.in: Remove obsolete target pairs for
3362 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
3363 * gcc-interface/Make-lang.in: Update dependencies.
3365 2011-08-01 Javier Miranda <miranda@adacore.com>
3367 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
3368 condition that detects if the overridden operation must replace an
3371 2011-08-01 Javier Miranda <miranda@adacore.com>
3373 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
3374 code declarations inserted by Insert_Actions in each alternative of the
3375 N_Case_Expression node.
3377 2011-08-01 Robert Dewar <dewar@adacore.com>
3379 * sem_ch6.adb: Minor code reorganization.
3380 * sem_util.adb: Minor reformatting.
3382 2011-08-01 Pascal Obry <obry@adacore.com>
3384 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
3385 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
3387 2011-08-01 Yannick Moy <moy@adacore.com>
3389 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
3390 literal or operator symbol which is prefixed
3391 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
3392 mode on access attributes.
3393 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
3394 that concatenation operands are properly restricted in formal mode
3395 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
3396 Analyze_Concatenation_Operand. Issue an error in formal mode if the
3397 result of the concatenation has a type different from String.
3398 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
3399 Analyze_Quantified_Expression, Analyze_Slice,
3400 Analyze_Null): issue an error in formal mode on unsupported constructs
3402 (Analyze_Block_Statement): only issue error on source block statement
3403 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
3404 function which returns the last node in a list of nodes for which
3405 Comes_From_Source returns True, if any
3406 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
3407 Last_Source_Node_In_Sequence
3408 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
3409 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
3410 mode on unsupported constructs
3411 * sem_ch9.adb Do not return after issuing error in formal mode, as the
3412 rest of the actions may be needed later on since the error is marked as
3414 * sinfo.ads: Typos in comments.
3416 2011-08-01 Pascal Obry <obry@adacore.com>
3418 * projects.texi: Minor editing.
3420 2011-08-01 Yannick Moy <moy@adacore.com>
3422 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
3423 insertion character ~~
3424 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
3425 (Set_Error_Msg_Lang): new procedure which fixes the language for use
3426 with insertion character ~~
3427 (Set_Msg_Text): treat insertion character ~~
3428 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
3429 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
3430 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
3431 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
3432 errors related to the formal language restriction not serious
3433 (insertion character |).
3434 * par.adb (Par): set formal language for error messages if needed
3435 * sem_ch6.adb (Check_Missing_Return): take into account possible
3436 generated statements at the end of the function
3437 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
3438 enumeration value to define a new pragma SPARK_95
3439 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
3440 SPARK_Version): new type and variables to store the SPARK version
3442 (SPARK_Mode): return True when SPARK_Version is set
3443 * par-prag.adb: Correct indentation
3444 (Prag): take Pragma_SPARK_95 into account
3445 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
3448 2011-08-01 Robert Dewar <dewar@adacore.com>
3450 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
3451 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
3452 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
3454 2011-08-01 Pascal Obry <obry@adacore.com>
3456 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
3457 Target_Name to Get_Path call.
3458 (Parse_Single_Project): Likewise.
3459 (Post_Parse_Context_Clause): Likewise.
3460 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
3461 Call Initialise_Project_Path with the proper Target_Name.
3462 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
3464 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
3465 with the proper Target_Name.
3466 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
3468 (Parse_Project_And_Apply_Config): Likewise.
3469 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
3470 This is fine as this part of the code is supporting only native
3472 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
3473 is fine as this part of the code is supporting only native compilation.
3475 2011-08-01 Yannick Moy <moy@adacore.com>
3477 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
3478 of homonym, unless the homonym is one of the cases allowed in SPARK
3479 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
3480 package declaration occurring after a body.
3482 2011-08-01 Robert Dewar <dewar@adacore.com>
3484 * checks.adb, exp_ch4.adb: Minor reformatting.
3486 2011-08-01 Javier Miranda <miranda@adacore.com>
3488 * einfo.ads (Access_Disp_Table): Fix documentation.
3489 (Dispatch_Table_Wrappers): Fix documentation.
3491 2011-08-01 Pascal Obry <obry@adacore.com>
3493 * prj-env.adb, prj-env.ads: Minor reformatting.
3495 2011-08-01 Yannick Moy <moy@adacore.com>
3497 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
3498 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
3499 procedures out of these packages.
3500 * errout.ads, errout.adb
3501 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
3502 procedures in of this package
3503 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
3504 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
3505 on misplaced later vs initial declarations, like in Ada 83
3506 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
3507 formal mode on attribute of private type whose full type declaration
3509 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
3510 package declaration inside a package specification
3511 (Analyze_Full_Type_Declaration): issue error in formal mode on
3512 controlled type or discriminant type
3513 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
3514 user-defined operator means that it should come from the source
3515 (New_Overloaded_Entity): issue error in formal mode on overloaded
3517 * sem_ch6.ads, sem_ch13.ads: typos in comments.
3519 2011-08-01 Thomas Quinot <quinot@adacore.com>
3521 * atree.adb: Minor reformatting.
3522 * checks.adb: Minor reformatting.
3524 2011-08-01 Vincent Celier <celier@adacore.com>
3526 * s-parame-vms-ia64.ads: Fix typo in comment
3528 * s-parame-vms-restrict.ads: Removed, unused.
3530 2011-08-01 Javier Miranda <miranda@adacore.com>
3533 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
3535 (Constrain_Index): Remove side effects in the evaluation of the bounds.
3536 * sem_ch3.ads, sem_ch3.adb
3537 (Is_Constant_Bound): New extended version of the subprogram that was
3538 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
3539 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
3540 * sem_aux.ads (Constant_Value): Fix typo in comment.
3541 * checks.adb (Generate_Index_Checks): New implementation which, for
3542 array objects with constant bounds, generates the runtime check
3543 referencing the bounds of the array type. For other cases this routine
3544 provides its previous behavior obtaining such values from the array
3546 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
3548 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
3549 we cannot have semantic interpretations of the new node.
3551 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3553 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
3556 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3558 * sem_ch8.adb: Minor code editing.
3559 * s-vxwext.adb: Remove trailing space.
3560 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
3561 consistency with other files.
3563 2011-08-01 Thomas Quinot <quinot@adacore.com>
3565 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
3567 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3569 * par-ch10.adb: reject parameterized expressions as compilation unit.
3570 * sem_ch4.adb: handle properly conditional expression with overloaded
3571 then_clause and no else_clause.
3573 2011-08-01 Tristan Gingold <gingold@adacore.com>
3575 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
3576 like done by System.Aux_DEC.
3577 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
3579 2011-08-01 Yannick Moy <moy@adacore.com>
3581 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
3582 missing label at end of declaration (subprogram or package)
3583 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
3584 of positional and named parameter association
3585 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
3586 Error_Msg_SP which adds a prefix to the error message giving the name
3587 of the formal language analyzed
3588 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
3589 access result type in subprogram, unconstrained array as result type,.
3590 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
3592 * sem_ch8.adb: Code clean up.
3594 2011-08-01 Javier Miranda <miranda@adacore.com>
3596 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
3597 * einfo.ads (Access_Disp_Table): Fix documentation.
3598 (Dispatch_Table_Wrappers): Fix documentation.
3599 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
3600 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
3601 to enforce the documentation of this attribute.
3602 (Set_Is_Interface): Cleanup the assertion.
3603 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
3604 the Underlying_Type entity before reading attribute Access_Disp_Table.
3605 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
3606 Locate the Underlying_Type before reading attribute Access_Disp_Table.
3607 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
3608 the Underlying_Type entity before reading attribute Access_Disp_Table.
3609 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
3610 Locate the Underlying_Type entity before reading attribute
3613 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3615 * s-poosiz.ads: Additional overriding indicators.
3617 2011-08-01 Yannick Moy <moy@adacore.com>
3619 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
3621 (Analyze_Iteration_Scheme): issue error in formal mode when loop
3622 parameter specification does not include a subtype mark.
3623 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
3624 formal mode on abstract subprogram.
3625 (Analyze_Subprogram_Specification): issue error in formal mode on
3626 user-defined operator.
3627 (Process_Formals): issue error in formal mode on access parameter and
3629 * sem_ch9.adb (Analyze_Abort_Statement,
3630 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
3631 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
3632 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
3633 Analyze_Requeue, Analyze_Selective_Accept,
3634 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
3635 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
3636 issue error in formal mode on user-defined raise statement.
3638 2011-08-01 Thomas Quinot <quinot@adacore.com>
3640 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
3641 declaration being hidden when overriding an implicit inherited
3643 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
3644 (-gnats), do not complain about a source file that contains only a
3647 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3649 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
3650 variable if already set.
3652 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3654 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
3655 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
3656 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
3657 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
3658 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
3659 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
3660 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
3661 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
3662 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
3663 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
3664 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
3665 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
3666 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
3667 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
3668 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
3669 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
3670 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
3671 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
3672 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
3673 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
3674 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
3675 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
3676 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
3677 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
3678 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
3679 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
3680 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
3681 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
3682 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
3683 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
3684 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
3685 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
3686 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
3687 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
3688 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
3689 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
3690 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
3691 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
3692 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
3693 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
3694 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
3695 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
3696 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
3697 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
3698 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
3699 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
3700 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
3701 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
3702 s-osinte-mingw.ads: Update to GPLv3 run-time license.
3703 Use GNAT instead of GNARL.
3705 2011-08-01 Bob Duff <duff@adacore.com>
3707 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
3708 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
3709 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
3712 2011-08-01 Yannick Moy <moy@adacore.com>
3714 * debug.adb (d.D) reverve flag for the SPARK mode
3715 (d.E) reverve flag for SPARK generation mode
3716 (d.F) reverve flag for Why generation mode
3717 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
3718 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
3719 functions which return True when the corresponding modes are set
3720 (Formal_Language): return "spark" or "alfa" when in formal verification
3722 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
3723 Error_Msg to prefix the error message with a tag giving the formal
3725 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
3726 message with a tag giving the formal language
3727 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
3729 (Analyze_Case_Statement): issue error in formal mode on case statement
3730 with a single "others" case alternative
3731 (Analyze_Exit_Statement): issue errors in formal mode on exit
3732 statements which do not respect SPARK restrictions
3733 (Analyze_Goto_Statement): issue error in formal mode on goto statement
3734 (Check_Unreachable_Code): always issue an error (not a warning) in
3735 formal mode on unreachable code (concerns both code after an infinite
3736 loop and after an unconditional jump, both not allowed in SPARK)
3737 * sem_ch6.adb (Analyze_Return_Statement): add call to
3738 Set_Return_Present for a procedure containing a return statement
3739 (already done for functions in Analyze_Function_Return)
3740 (Analyze_Function_Return): issue error in formal mode on extended
3741 return or if return is not last statement in function
3742 (Check_Missing_Return): issue error in formal mode if function does
3743 not end with return or if procedure contains a return
3744 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
3745 function to detect if there is an inner scope of its parameter S which
3748 2011-08-01 Thomas Quinot <quinot@adacore.com>
3750 * sem_ch6.ads: Minor reformatting.
3752 2011-08-01 Javier Miranda <miranda@adacore.com>
3754 * sem_util.adb (Abstract_Interface_List): Complete condition when
3755 processing private type declarations to avoid reading unavailable
3757 (Is_Synchronized_Tagged_Type): Complete condition when processing
3758 private extension declaration nodes to avoid reading unavailable
3761 2011-08-01 Thomas Quinot <quinot@adacore.com>
3763 * sem_ch3.adb: Minor reformatting.
3765 2011-08-01 Thomas Quinot <quinot@adacore.com>
3767 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
3768 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
3769 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
3770 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
3771 for VMS, instead parametrize the common implementation with
3772 System.Parameters declarations.
3774 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
3776 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
3778 2011-08-01 Tristan Gingold <gingold@adacore.com>
3780 * seh_init.c: Fix SEH handler installation on win64.
3782 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3784 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
3785 double analysis of an anonymous access to subprogram, because it can
3786 lead to improper sharing of profiles and a back-end crash.
3788 2011-08-01 Robert Dewar <dewar@adacore.com>
3790 * make.adb, sem_ch4.adb: Minor reformatting.
3791 * gcc-interface/Make-lang.in: Update dependencies.
3792 * sem_util.adb, exp_ch5.adb: Minor reformatting.
3794 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3796 * gnat_rm.texi: Fix definition of Long_Integer.
3798 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3800 * exp_aggr.adb: check limit size of static aggregate unconditionally,
3801 to prevent storage exhaustion.
3802 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
3803 finalized is a function body, insert the cleanup code before the final
3804 return statement, to prevent spurious warnings.
3805 * s-pooglo.ads: add overriding indicator.
3807 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3809 * sem_ch4.adb (Operator_Check): improve error message when both a
3810 with_clause and a use_clause are needed to make operator usage legal.
3811 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
3812 determine whether a compilation unit is visible within an other,
3813 either through a with_clause in the current unit, or a with_clause in
3814 its library unit or one one of its parents.
3816 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3818 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
3819 over an arbitrary expression of an array or container type.
3820 * lib-xref.adb: clarify comment.
3822 2011-08-01 Bob Duff <duff@adacore.com>
3824 * einfo.ads: Minor reformatting.
3825 * debug.adb: Minor comment improvement.
3827 2011-08-01 Javier Miranda <miranda@adacore.com>
3829 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
3830 consider hidden subprograms as valid candidates.
3832 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3834 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
3836 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
3838 * gnat_ugn.texi: Fix typo.
3840 2011-08-01 Robert Dewar <dewar@adacore.com>
3842 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
3843 lib-xref.adb: Minor reformatting
3845 2011-08-01 Gary Dismukes <dismukes@adacore.com>
3847 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
3848 when to generate a call to Move_Final_List.
3849 (Has_Controlled_Parts): Remove this function.
3851 2011-08-01 Geert Bosch <bosch@adacore.com>
3853 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
3856 2011-08-01 Thomas Quinot <quinot@adacore.com>
3858 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
3859 explicit raise of a predefined exception as Comes_From_Source if the
3860 original N_Raise_Statement comes from source.
3862 2011-08-01 Robert Dewar <dewar@adacore.com>
3864 * sinfo.ads: Add comment.
3865 * sem_ch6.adb: Minor reformatting.
3867 2011-08-01 Robert Dewar <dewar@adacore.com>
3869 * freeze.adb (Freeze_Entity): Refine check for bad component size
3870 clause to avoid rejecting confirming clause when atomic/aliased present.
3872 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3874 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
3875 better determine whether an entity reference is a write.
3876 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
3878 * lib-xref.adb (Output_References): Do no suppress a read reference at
3879 the same location as an immediately preceeding modify-reference, to
3880 handle properly in-out actuals.
3882 2011-08-01 Tristan Gingold <gingold@adacore.com>
3884 * env.c (__gnat_setenv) [VMS]: Refine previous change.
3886 2011-08-01 Quentin Ochem <ochem@adacore.com>
3888 * i-cstrin.adb (New_String): Changed implementation, now uses only the
3889 heap to compute the result.
3891 2011-08-01 Robert Dewar <dewar@adacore.com>
3893 * atree.ads: Minor reformatting.
3895 2011-08-01 Emmanuel Briot <briot@adacore.com>
3897 * g-expect.adb (Get_Command_Output): Fix memory leak.
3899 2011-08-01 Geert Bosch <bosch@adacore.com>
3901 * cstand.adb (P_Float_Type): New procedure to print the definition of
3902 predefined fpt types.
3903 (P_Mixed_Name): New procedure to print a name using mixed case
3904 (Print_Standard): Use P_Float_Type for printing floating point types
3905 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
3906 precision IEEE float.
3908 2011-08-01 Thomas Quinot <quinot@adacore.com>
3910 * sem_ch3.adb: Minor reformatting.
3912 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3914 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
3915 the completion of a generic function, insert the new body rather than
3916 rewriting the original.
3918 2011-08-01 Yannick Moy <moy@adacore.com>
3920 * sinfo.ads, errout.ads: Typos in comments.
3922 2011-08-01 Robert Dewar <dewar@adacore.com>
3924 * par-endh.adb: Minor reformatting.
3926 2011-08-01 Robert Dewar <dewar@adacore.com>
3928 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
3929 (Pre_Post_Aspects): New subtype.
3930 * par-ch12.adb (P_Generic): New syntax for aspects in packages
3931 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
3932 * par-ch7.adb (P_Package): Remove Decl parameter
3933 (P_Package): Handle new syntax for aspects (before IS)
3934 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
3936 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
3937 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
3938 (P_Package): Remove Decl parameter
3939 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
3941 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
3943 * sem_util.ads, sem_util.adb (Static_Boolean): New function
3944 * sinfo.ads: Document new syntax for aspects in packages etc.
3945 * sprint.adb: Handle new syntax of aspects before IS in package
3947 2011-08-01 Thomas Quinot <quinot@adacore.com>
3949 * atree.ads: Minor reformatting.
3950 * sem_prag.adb: Minor reformatting.
3952 2011-08-01 Robert Dewar <dewar@adacore.com>
3954 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
3955 case expr alternative.
3957 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3959 * sem_ch12.adb: Fix typo.
3961 2011-08-01 Geert Bosch <bosch@adacore.com>
3963 * sem_prag.adb (Check_No_Link_Name): New procedure.
3964 (Process_Import_Or_Interface): Use Check_No_Link_Name.
3965 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
3966 instead of Standard_Long_Long_Float_Size global. Preparation for
3967 eventual removal of per type constants.
3968 * exp_util.ads (Get_Stream_Size): New function returning the stream
3969 size value of subtype E.
3970 * exp_util.adb (Get_Stream_Size): Implement new function.
3971 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
3973 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
3975 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
3977 2011-08-01 Geert Bosch <bosch@adacore.com>
3979 * cstand.adb: Fix comments.
3980 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
3983 2011-08-01 Robert Dewar <dewar@adacore.com>
3985 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
3987 2011-08-01 Geert Bosch <bosch@adacore.com>
3989 * atree.ads: Fix comment.
3991 2011-08-01 Robert Dewar <dewar@adacore.com>
3993 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
3994 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
3995 * par.adb: Add with for Namet.Sp.
3996 * par-tchk.adb: Minor reformatting.
3998 2011-08-01 Vincent Celier <celier@adacore.com>
4000 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
4001 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
4002 of the init procedure of a SAL.
4003 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
4006 2011-08-01 Thomas Quinot <quinot@adacore.com>
4008 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
4011 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4013 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
4015 2011-08-01 Thomas Quinot <quinot@adacore.com>
4017 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
4018 conformant with its spec (return True only for types that have
4019 an overriding Initialize primitive operation that prevents them from
4020 having preelaborable initialization).
4021 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
4022 initialization for controlled types in Ada 2005 or later mode.
4024 2011-08-01 Robert Dewar <dewar@adacore.com>
4026 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
4028 (Same_Aspect): New function.
4029 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
4030 Type_Invariant, Precondition, Postcondition.
4031 * snames.ads-tmpl: Add Name_Type_Invariant.
4033 2011-08-01 Robert Dewar <dewar@adacore.com>
4035 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
4037 (Freeze_All_Ent): Fix error in handling inherited aspects.
4038 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
4039 already analyzed, but don't skip entire processing of a declaration,
4040 that's wrong in some cases of declarations being rewritten.
4041 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
4042 Don't delay for integer, string literals
4043 Treat predicates in usual manner for delay, remove special case code,
4045 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
4046 (Build_Predicate_Function): Update saved expression in aspect
4047 (Build_Invariant_Procedure): Update saved expression in aspect
4048 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
4049 of replacement of discriminant references if the reference is simple.
4051 2011-08-01 Robert Dewar <dewar@adacore.com>
4053 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
4054 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
4055 Static_Predicate and Dynamic_Predicate.
4056 (Build_Predicate_Function): Add processing for Static_Predicate
4057 and Dynamic_Predicate.
4058 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
4059 (From_Static_Predicate): New flag
4060 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
4062 2011-08-01 Robert Dewar <dewar@adacore.com>
4064 * usage.adb: Documentation cleanup for Ada version modes in usage.
4065 * expander.adb: Minor reformatting.
4067 2011-08-01 Robert Dewar <dewar@adacore.com>
4069 * atree.ads: Minor comment fix.
4070 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
4071 a-witeio.ads, sem_prag.adb: Minor reformatting.
4073 2011-08-01 Doug Rupp <rupp@adacore.com>
4075 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
4076 pointers. Use descrip.h header file for convenience. Add some
4079 2011-08-01 Robert Dewar <dewar@adacore.com>
4081 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
4082 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
4083 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
4085 (Check_Aspect_At_End_Of_Declarations): New procedure
4086 (Analye_Aspect_Specification): Minor changes for above procedures
4087 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
4088 specification node as well.
4090 2011-08-01 Pascal Obry <obry@adacore.com>
4092 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
4093 Windows files. Use GetFilesAttributes() in this case to check for file
4094 existence instead of returning with an error code.
4096 2011-08-01 Vincent Celier <celier@adacore.com>
4098 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
4099 High is above Source length.
4101 2011-08-01 Robert Dewar <dewar@adacore.com>
4103 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
4105 2011-08-01 Robert Dewar <dewar@adacore.com>
4107 * aspects.ads (Boolean_Aspects): New subtype.
4108 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
4109 for derived types in cases where the parent type and derived type have
4111 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
4112 with aspects when parent type also has aspects.
4113 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
4114 boolean expression at this point).
4115 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
4116 accordance with final decision on the Ada 2012 feature.
4117 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
4119 2011-08-01 Matthew Heaney <heaney@adacore.com>
4121 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
4123 2011-08-01 Pascal Obry <obry@adacore.com>
4125 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
4126 Fix Replace_Slice when High is above current string size.
4127 (Replace_Slice): Fix DL computation when High is above current
4130 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4132 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
4134 2011-08-01 Matthew Heaney <heaney@adacore.com>
4136 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
4139 2011-08-01 Pascal Obry <obry@adacore.com>
4141 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
4144 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4146 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
4147 access to protected subprograms in generic bodies.
4148 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
4149 protected type, indicate that the convention of the subprogram is
4150 Convention_Protected, because it may be used in subsequent declarations
4151 within the protected declaration.
4153 2011-08-01 Vincent Celier <celier@adacore.com>
4155 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
4156 and "final" procedures when the name of the library is "ada", to avoid
4157 duplicate symbols "adainit" and "adafinal" in executables.
4159 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4161 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
4162 quantified expression that appears within a postcondition and uses the
4163 Ada2012 'Result attribute.
4165 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4167 * init.c (__gnat_error_handler): Cast reason to int.
4168 (__gnat_install_handler): Explain sa_sigaction use.
4170 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4172 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
4173 subprogram has copy-in copy-out parameters, try to promote the mode of
4174 the return type if it is passed in registers.
4176 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4178 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
4179 left operand as addressable.
4181 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4183 * gcc-interface/gigi.h (build_function_stub): Remove.
4184 (build_return_expr): Likewise.
4185 (convert_vms_descriptor): Declare.
4186 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
4187 (build_function_stub): Move to...
4188 * gcc-interface/utils2.c (build_return_expr): Move to...
4189 * gcc-interface/trans.c (build_function_stub): ...here.
4190 (build_return_expr): ...here.
4191 (Subprogram_Body_to_gnu): Add local variable for language_function.
4192 Disconnect the parameter attributes cache, if any, once done with it.
4193 Call end_subprog_body only after setting the end_locus.
4194 Build the stub associated with the function, if any, at the very end.
4195 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
4196 variables and streamline control flow.
4198 2011-07-23 Arnaud Charlet <charlet@adacore.com>
4201 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
4204 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4207 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
4208 Assign to act.sa_sigaction.
4209 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
4210 current->return_address to char * before arithmetic.
4212 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4214 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
4215 Correct argument types.
4216 Extract code from reason.
4217 (__gnat_install_handler): Assign to act.sa_sigaction.
4219 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
4221 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
4222 (GNAT1_OBJS): ...here.
4224 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
4227 * g-socthi-mingw.adb (Fill): Fix formatting.
4229 * gcc-interface/gigi.h: Move around comment.
4231 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4234 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
4236 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
4239 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
4241 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
4243 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
4244 range comparison if Pmode is SImode.
4246 2011-07-12 Laurent GUERBY <laurent@guerby.net>
4247 Eric Botcazou <ebotcazou@adacore.com>
4249 * adadecode.c: Wrap up in extern "C" block.
4250 * adadecode.h: Likewise.
4251 * adaint.c: Likewise. Remove 'const' keyword.
4252 * adaint.h: Likewise.
4254 * atree.h: Likewise.
4256 * cstreams.c: Likewise.
4260 * final.c: Likewise.
4262 * initialize.c: Likewise.
4264 * namet.h: Likewise.
4265 * nlists.h: Likewise.
4266 * raise.c: Likewise.
4267 * raise.h: Likewise.
4268 * repinfo.h: Likewise.
4269 * seh_init.c: Likewise.
4270 * targext.c: Likewise.
4271 * tracebak.c: Likewise.
4272 * uintp.h: Likewise.
4273 * urealp.h: Likewise.
4274 * xeinfo.adb: Wrap up generated C code in extern "C" block.
4275 * xsinfo.adb: Likewise.
4276 * xsnamest.adb: Likewise.
4277 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
4278 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
4279 * gcc-interface/misc.c: Likewise.
4280 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
4281 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
4282 ada/targext.o here...
4283 (GNAT_ADA_OBJS): ...and not here.
4284 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
4285 (GNATBIND_OBJS): Reorder.
4287 2011-07-07 Richard Henderson <rth@redhat.com>
4289 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
4290 dwarf2out_frame_init.
4292 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
4294 * gcc-interface/misc.c (gnat_init): Tweak previous change.
4296 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4299 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
4301 2011-07-06 Richard Guenther <rguenther@suse.de>
4303 * gcc-interface/misc.c (gnat_init): Merge calls to
4304 build_common_tree_nodes and build_common_tree_nodes_2.
4305 Re-initialize boolean_false_node.
4307 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
4308 Olivier Hainque <hainque@adacore.com>
4309 Nicolas Setton <setton@adacore.com>
4311 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
4312 the type according to the ARTIFICIAL_P parameter.
4313 (create_type_decl): Likewise.
4314 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
4316 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
4318 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
4319 (gnatbind): Likewise.
4321 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4323 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
4325 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4327 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
4328 local variable throughout. Remove useless call to Base_Type.
4329 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
4330 Take it also into account for the volatileness of the field. Set the
4331 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
4333 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4335 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
4336 on a dereference built for a by-ref object if it has an address clause.
4338 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4340 * einfo.ads (Address_Taken): Document use for the second argument of
4341 Asm_Input and Asm_Output attributes.
4342 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
4343 argument is an entity name, then set Address_Taken on it.
4344 <Attribute_Asm_Output>: Likewise.
4345 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
4346 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
4347 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
4348 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
4350 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
4353 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
4355 2011-06-14 Joseph Myers <joseph@codesourcery.com>
4357 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
4358 (ada/utils.o): Update dependencies.
4359 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
4360 ../../../libcpp/libcpp.a.
4361 * gcc-interface/utils.c: Include common/common-target.h.
4362 (process_attributes): Use targetm_common.have_named_sections.
4364 2011-06-07 Richard Guenther <rguenther@suse.de>
4366 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
4369 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4371 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
4372 TREE_THIS_NOTRAP flag.
4374 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4376 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
4379 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4381 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
4382 constants whose full view has discriminants specially.
4384 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4386 * gcc-interface/utils.c: Include diagnostic.h.
4387 (gnat_write_global_declarations): Output debug information for all
4388 global type declarations before finalizing the compilation unit.
4389 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
4391 2011-05-25 Jakub Jelinek <jakub@redhat.com>
4393 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
4395 2011-05-25 Kai Tietz <ktietz@redhat.com>
4397 * adaint.c (__gnat_to_canonical_file_list_next): Use array
4398 initialization instead of const/none-const pointer assignment.
4400 2011-05-24 Joseph Myers <joseph@codesourcery.com>
4402 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
4403 $(EXTRA_GNAT1_OBJS).
4404 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
4405 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
4406 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
4407 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
4408 libcommon-target.a instead of prefix.o.
4410 2011-05-21 Joseph Myers <joseph@codesourcery.com>
4413 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
4415 2011-05-20 Joseph Myers <joseph@codesourcery.com>
4417 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
4418 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
4419 instead of version.o.
4421 2011-05-18 Kai Tietz <ktietz@redhat.com>
4423 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
4424 boolean_false_node instead of integer_zero_node.
4425 (convert_with_check): Likewise.
4426 * gcc-interface/decl.c (choices_to_gnu): Likewise.
4428 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
4430 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
4431 type of the parameter is an unconstrained array, convert the actual to
4432 the type of the formal in the In Out and Out cases as well.
4434 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
4436 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
4437 call build_function_type_array or build_varargs_function_type_array
4439 (create_subprog_type): Don't call build_function_type; call
4440 build_function_type_vec instead.
4442 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
4444 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
4445 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
4446 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
4448 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
4450 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
4452 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
4453 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
4455 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4457 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
4459 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4461 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
4462 instead of accessing TYPE_ARG_TYPES directly.
4463 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
4465 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
4468 * gcc-interface/gigi.h (get_variant_part): Declare.
4469 * gcc-interface/decl.c (get_variant_part): Make global.
4470 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
4471 types have the same constant size, are record types and T1 has a
4472 variant part while T2 doesn't.
4474 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
4476 * gcc-interface/utils.c (begin_subprog_body): Do not call
4478 (end_subprog_body): Likewise.
4480 2011-05-04 Richard Guenther <rguenther@suse.de>
4482 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
4484 (pos_to_constructor): Likewise.
4486 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
4487 Eric Botcazou <ebotcazou@adacore.com>
4489 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
4490 of build_function_type. Adjust calls to...
4491 (build_raise_check): ...this. Do not take a void_tree parameter.
4492 Call build_function_type_list instead of build_function_type.
4493 Fix head comment and swap couple of conditional blocks.
4495 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
4497 * gnatvsn.ads (Library_Version): Bump to 4.7.
4498 (Current_Year): Bump to 2011.
4500 2011-04-29 Michael Matz <matz@suse.de>
4502 * gcc-interface/misc.c (gnat_handle_option): Set
4503 warn_maybe_uninitialized.
4505 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
4507 * gnat_ugn.texi (Complexity Metrics Control): Update link to
4508 the Watson/McCabe paper.
4510 2011-04-23 Jim Meyering <meyering@redhat.com>
4512 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
4514 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
4516 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
4519 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
4521 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
4523 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
4524 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
4525 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
4526 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
4527 <all>: Do not set flags on the reused DECL node coming from an alias.
4528 Set DECL_IGNORED_P on the DECL node built for subprograms if they
4529 don't need debug info here...
4530 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
4531 (gigi): Adjust calls to create_subprog_decl.
4532 (build_raise_check): Likewise.
4533 (establish_gnat_vms_condition_handler): Likewise.
4534 (Compilation_Unit_to_gnu): Likewise.
4535 (gnat_to_gnu): Likewise.
4537 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
4539 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
4540 (NO_REORDER_ADAFLAGS): New variable.
4541 (EXTRA_GNATTOOLS): Always define.
4542 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
4543 Clean up and adjust list of files compiled with special options.
4544 * gcc-interface/Make-lang.in: Likewise.
4545 (ada/decl.o): Cosmetical change.
4546 (ada/misc.o): Remove dependency on $(PLUGIN_H).
4548 2011-04-20 Jim Meyering <meyering@redhat.com>
4550 * initialize.c (__gnat_initialize): Remove useless if-before-free.
4552 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
4554 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
4555 $(CFLAGS) on the link line.
4557 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
4559 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
4560 padded type built for the return type if it is unconstrained.
4562 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
4564 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
4566 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
4568 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
4569 before calling TREE_CHAIN.
4570 * gcc-interface/misc.c (gnat_init_ts): New function.
4571 (LANG_HOOKS_INIT_TS): Define.
4573 2011-04-12 Martin Jambor <mjambor@suse.cz>
4575 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
4576 instead of cgraph_node.
4578 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
4580 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
4581 alignment on fields of the RETURN type built for the Copy-In Copy-Out
4584 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
4586 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
4587 of aggregate types that contain a placeholder.
4589 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
4591 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
4593 (handle_type_generic_attribute): Likewise.
4595 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
4598 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
4600 2011-04-04 Kai Tietz <ktietz@redhat.com>
4603 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
4606 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4608 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
4609 type case, do not strip a padding type around the array type.
4611 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4613 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
4616 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4618 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
4619 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
4620 code for -feliminate-unused-debug-types.
4621 (gnat_post_options): Likewise.
4623 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4625 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
4626 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
4629 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4631 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
4632 DECL_ARTIFICIAL flag on enumeration types.
4634 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4636 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
4637 fat pointer types artificial unconditionally.
4638 <E_Array_Subtype>: Attach the base array type as a parallel type if it
4641 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4643 * gcc-interface/gigi.h (get_dummy_type): Declare.
4644 (build_dummy_unc_pointer_types): Likewise.
4645 (finish_fat_pointer_type): Likewise.
4646 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
4647 fat pointer type has been built, complete it in place.
4648 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
4649 and thin pointers. Remove useless variable.
4650 (finish_fat_pointer_type): Make global and move to...
4651 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
4652 (get_dummy_type): New function.
4653 (build_dummy_unc_pointer_types): Likewise.
4654 (gnat_pushdecl): Propage the name to the anonymous variants only.
4655 (update_pointer_to): Only adjust the pointer types in the unconstrained
4658 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4660 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
4661 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
4662 if this is a Taft amendment type and the full declaration is available.
4663 * gcc-interface/trans.c (process_type): Likewise.
4664 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
4665 (process_freeze_entity): Likewise.
4666 * gcc-interface/utils.c (dummy_global): New static variable.
4667 (gnat_write_global_declarations): If there are types declared as used
4668 at the global level, insert them in the global hash table.
4670 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4672 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
4673 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
4674 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
4676 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
4677 flag of the type accordingly.
4678 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
4680 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4682 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
4683 finalizing types when updating the pointers to the designated type.
4684 <all>: Finalize the deferred types even if we didn't defer processing
4685 of incomplete types in this invocation.
4687 2011-04-01 Olivier Hainque <hainque@adacore.com>
4688 Nicolas Setton <setton@adacore.com>
4689 Eric Botcazou <ebotcazou@adacore.com>
4691 * gcc-interface/misc.c (gnat_descriptive_type): New function.
4692 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
4694 2011-03-28 Kai Tietz <ktietz@redhat.com>
4696 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
4698 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
4699 * system-mingw.ads (System): Change ZCX_By_Default default to True.
4701 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
4703 2011-03-28 Tristan Gingold <gingold@adacore.com>
4706 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
4707 Use ada output of gnatbind.
4708 (ada/b_gnatb.adb): Ditto.
4709 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
4710 (ada.mostlyclean, ada.stage1)
4711 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
4712 (ada.stagefeedback): Adjust.
4713 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
4714 Use ada output of gnatbind.
4715 (b_gnatm.adb): Ditto.
4716 (b_gnatl.o, b_gnatm.o): New rules.
4718 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4720 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
4721 for the padded type built to support a specified size or alignment.
4723 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4725 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
4726 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
4727 unconditionally to the end of the unit when the designated type is
4729 <all>: Rename local variable. Attempt to un-defer types only and do it
4730 for limited_with'ed types as well.
4731 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
4732 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
4733 consistently and remove redundant call to finalize_from_with_types.
4735 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4737 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
4738 subprograms without a previous spec declared in the same unit.
4739 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
4740 subprograms at the end of the unit instead of at the beginning.
4741 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
4742 isn't public for the special handling of non-inline functions nested
4743 inside inline external functions.
4745 2011-03-25 Jeff Law <law@redhat.com>
4747 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
4749 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
4751 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
4752 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
4753 to compute Set_Size_Depends_On_Discriminant.
4754 (Layout_Type): Call it on array types in back-end layout mode.
4755 * sem_util.adb (Requires_Transient_Scope): Return true for array
4756 types only if the size depends on the value of discriminants.
4757 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
4758 type if the RHS is a call to a function that returns an unconstrained
4759 type with default discriminant.
4761 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
4763 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
4764 non-conversion to the nominal result type at the end.
4766 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4768 * gcc-interface/trans.c (create_temporary): New function taken from...
4769 (create_init_temporary): ...here. Call it.
4770 (call_to_gnu): Create the temporary for the return value early, if any.
4771 Create it for a function with copy-in/copy-out parameters if there is
4772 no target; in other cases of copy-in/copy-out, use another temporary.
4773 Push the new binding level lazily. Add and rename local variables.
4775 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4777 * gcc-interface/decl.c (validate_size): Improve comments and tweak
4779 (set_rm_size): Likewise.
4781 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4783 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
4784 for the padded type built in order to support a specified alignment.
4785 Fix incorrect formatting.
4787 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4790 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
4792 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4794 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
4795 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
4796 to the end of the list. Adjust recursive call. Rename local variable.
4797 If REORDER is true, reorder components of the record type.
4798 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
4799 components_to_record and adjust the parameter list.
4801 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4803 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
4804 disabled, use the variable for bounds of loop iteration scheme.
4806 2011-03-21 Kai Tietz <ktietz@redhat.com>
4809 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
4811 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
4813 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
4814 out whether the expression is read-only. Short-circuit placeholder
4815 case and rename a couple of local variables.
4817 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
4819 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
4820 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
4821 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
4822 (convert): Deal with conversions from a smaller form type specially.
4824 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
4826 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
4827 its argument, except for the special -I- switch.
4829 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
4831 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
4834 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
4836 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
4838 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
4840 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
4842 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
4843 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
4844 instead of GNAT_FORMAL. Protect the expression against multiple uses.
4845 Do not generate the check directly, instead instantiate the template
4846 check present in the descriptor.
4847 (make_descriptor_field): Move around.
4848 (build_vms_descriptor32): Build a template check in the POINTER field.
4849 (build_vms_descriptor): Remove useless suffixes.
4850 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
4852 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
4855 * targext.c: Include target files if IN_RTS is defined.
4857 2011-01-26 Richard Guenther <rguenther@suse.de>
4860 * targext.c: Include config.h.
4861 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
4864 2011-01-04 Pascal Obry <obry@adacore.com>
4865 Eric Botcazou <ebotcazou@adacore.com>
4867 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
4869 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
4871 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
4872 end-of-case on the end label and its associated gotos, if any.
4874 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
4876 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
4877 expressions of the parameter cache within the statement group of
4880 2011-01-04 Olivier Hainque <hainque@adacore.com>
4881 Eric Botcazou <ebotcazou@adacore.com>
4883 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
4884 (set_end_locus_from_node): New function.
4885 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
4886 make and the function end_locus.
4887 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
4888 for the elaboration subprogram.
4889 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
4890 set the end_locus of the expression as well.
4892 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
4895 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
4896 variables that are referenced in exception handlers volatile.
4900 Copyright (C) 2011 Free Software Foundation, Inc.
4902 Copying and distribution of this file, with or without modification,
4903 are permitted in any medium without royalty provided the copyright
4904 notice and this notice are preserved.
4906 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4907 - fix bugs in the description of Source_Trace;
4908 - get rid of UNIT_NAME;
4910 2011-08-02 Javier Miranda <miranda@adacore.com>
4913 (Build_Dispatching_Requeue): Adding support for VM targets
4914 since we cannot directly reference the Tag entity.
4915 * exp_sel.adb (Build_K): Adding support for VM targets.
4916 (Build_S_Assignment): Adding support for VM targets.
4918 (Default_Prim_Op_Position): In VM targets do not restrict availability
4919 of predefined interface primitives to compiling in Ada 2005 mode.
4920 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4921 restricted to compiling in Ada 2005 mode.
4922 (Make_VM_TSD): Generate code that declares and initializes the OSD
4923 record. Needed to support dispatching calls through synchronized
4926 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4927 primitives associated with synchronized interfaces.
4928 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4929 primitives associated with synchronized interfaces.
4931 2011-08-02 Yannick Moy <moy@adacore.com>
4933 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4934 statements hidden in SPARK if preceded by the HIDE directive
4935 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4936 exception handlers as hidden in SPARK if preceded by the HIDE directive
4937 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4938 if starting with the HIDE directive
4939 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4940 starting with the HIDE directive; mark the declarations in a private
4941 part as hidden in SPARK if the private part starts with the HIDE
4943 * restrict.adb, restrict.ads
4944 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4945 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4946 argument node belongs to a part which is hidden in SPARK
4947 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4948 parts in SPARK; protect the possibly costly call to
4949 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4950 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4951 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4952 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4954 (Scan): recognize special comment starting with '#' and followed by
4955 SPARK keyword "hide" as a HIDE directive.
4957 2011-08-02 Yannick Moy <moy@adacore.com>
4959 * types.ads, erroutc.ads: Minor reformatting.
4961 2011-08-02 Vincent Celier <celier@adacore.com>
4963 * link.c: Add response file support for cross platforms.
4965 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4967 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4968 in an association, set parent field of copy before partial analysis.
4969 * sem_res.adb (Resolve_Slice): create reference to itype only when
4970 expansion is enabled.
4972 2011-08-02 Yannick Moy <moy@adacore.com>
4974 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4975 for new flag denoting which subprogram bodies are in ALFA
4976 * restrict.adb, sem_ch7.adb: Update comment
4977 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4978 sem_ch9.adb, sem_res.adb: Add calls to
4979 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4980 * sem_ch6.adb (Analyze_Function_Return): add calls to
4981 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4982 middle of the body, and extended return.
4983 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4984 False when missing return.
4985 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4986 to True for subprograms whose spec is in ALFA. Remove later on the flag
4987 on the entity used for a subprogram body when there exists a separate
4989 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4990 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4991 False, otherwise do nothing.
4993 2011-08-02 Robert Dewar <dewar@adacore.com>
4995 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4997 2011-08-02 Yannick Moy <moy@adacore.com>
4999 * sem_ch4.ads: minor formatting.
5001 2011-08-02 Yannick Moy <moy@adacore.com>
5003 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5004 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5005 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5006 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5007 opt.ads: cleanup of SPARK mode
5009 2011-08-02 Yannick Moy <moy@adacore.com>
5011 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5013 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5014 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5016 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5017 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5018 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5019 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5021 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5023 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5024 functions whose return type is not in ALFA.
5025 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5027 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5028 parameter's type is not in ALFA.
5029 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5032 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5034 * sem_ch6 (Analyze_Expression_Function): treat the function as
5035 Inline_Always, and introduce a subprogram declaration for it when it is
5037 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5038 expression functions, so that the back-end can determine whether they
5039 can in fact be inlined.
5040 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5041 a function body comes from an expression function.
5043 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5045 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5046 null exclusions to test Can_Never_Be_Null on the anonymous access types
5047 of the formals rather than testing the formals themselves. Exclude this
5048 check in cases where the Old_Formal is marked as a controlling formal,
5049 to avoid issuing spurious errors for bodies completing dispatching
5050 operations (due to the flag not getting set on controlling access
5051 formals in body specs).
5052 (Find_Corresponding_Spec): When checking full and subtype conformance of
5053 subprogram bodies in instances, pass Designated and E in that order, for
5054 consistency with the expected order of the formals (New_Id followed by
5057 2011-08-02 Robert Dewar <dewar@adacore.com>
5059 * sem_ch8.adb: Minor reformatting.
5061 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5063 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5064 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5065 primitive operations of class-wide actuals.
5067 2011-08-02 Javier Miranda <miranda@adacore.com>
5069 * exp_atag.ads, exp_atag.adb
5070 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5071 since its value is implicitly passed in argument Typ.
5072 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5073 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5074 Build_Common_Dispatching_Select_Statements.
5076 2011-08-02 Robert Dewar <dewar@adacore.com>
5078 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5079 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5082 2011-08-02 Robert Dewar <dewar@adacore.com>
5084 * sem_res.adb: Minor reformatting.
5085 * sem_prag.adb: Minor reformatting.
5087 2011-08-02 Javier Miranda <miranda@adacore.com>
5089 * exp_atag.adb, exp_atags.ads
5090 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5091 by the tagged type Entity. Required to use this routine in the VM
5092 targets since we do not have available the Tag entity in the VM
5095 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5096 Ada.Tags has not been previously loaded.
5098 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5099 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5101 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5102 view of enclosing scopes. Required to handle enclosing scopes that
5103 are synchronized types whose full view is a task type.
5105 (Build_VM_TSDs): Minor code improvement to avoid generating and
5106 analyzing lists with empty nodes.
5107 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5108 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5109 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5110 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5111 (Make_Select_Specific_Data_Table): Add support for VM targets.
5112 (Make_VM_TSD): Generate code to initialize the SSD structure of
5115 2011-08-02 Yannick Moy <moy@adacore.com>
5117 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5118 cross-references section in ALI.
5119 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5120 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5122 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5123 subprogram or package entity of a node
5124 (Is_Local_Reference_Type): new function returns True for references
5125 selected in local cross-references.
5126 (Lt): function extracted from Lt in Output_References
5127 (Write_Entity_Name): function extracted from Output_References
5128 (Generate_Definition): generate reference with type 'D' for definition
5129 of objects (object declaration and parameter specification), with
5130 appropriate locations and units, for use in local cross-references.
5131 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5132 references of type 'I' for initialization in object definition.
5133 (Output_References): move part of function Lt and procedure
5134 Write_Entity_Name outside of the body. Ignore references of types 'D'
5135 and 'I' introduced for local cross-references.
5136 (Output_Local_References): new procedure to output the local
5137 cross-references sections.
5138 (Lref_Entity_Status): new array defining whether an entity is a local
5139 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5140 with 'I' type when initialization expression is present.
5141 * get_scos.adb, get_scos.ads: Correct comments and typos
5143 2011-08-02 Javier Miranda <miranda@adacore.com>
5145 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5147 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5149 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5152 2011-08-02 Vincent Celier <celier@adacore.com>
5154 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5155 (No_Space_Img): New function
5156 (Find_Excluded_Sources): When reading from a file, record the file name
5157 and the line number for each excluded source.
5158 (Mark_Excluded_Sources): When reporting an error, if the excluded
5159 sources were read from a file, include file name and line number in
5162 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5164 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5166 2011-08-02 Robert Dewar <dewar@adacore.com>
5168 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5170 2011-08-02 Javier Miranda <miranda@adacore.com>
5172 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5173 generation of TSDs to the DOTNET compiler.
5174 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5175 generation of TSDs to the DOTNET compiler.
5177 2011-08-02 Javier Miranda <miranda@adacore.com>
5179 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5180 record of all the tagged types declared inside library level package
5181 declarations, library level package bodies or library level subprograms.
5182 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5183 associated with a given tagged type.
5184 (Build_VM_TSDs): New subprogram.
5185 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5186 compilation units that are subprograms.
5187 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5188 compilation units that are package bodies.
5189 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5190 units that are a package declaration or a package instantiation.
5191 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5192 reorganization to improve the error generated by the frontend when the
5193 function Ada.Tags.Secondary_Tag is not available.
5194 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5195 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5197 2011-08-02 Javier Miranda <miranda@adacore.com>
5199 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5201 2011-08-02 Robert Dewar <dewar@adacore.com>
5203 * s-imenne.ads: Minor reformatting.
5205 2011-08-02 Robert Dewar <dewar@adacore.com>
5207 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5208 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5209 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5211 2011-08-02 Robert Dewar <dewar@adacore.com>
5213 * einfo.ads (Materialize_Entity): Document this is only for renamings
5214 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5215 required debug information in the case where we transform the object
5216 declaration into a renaming declaration.
5217 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5219 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5222 2011-08-02 Robert Dewar <dewar@adacore.com>
5224 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5225 Suppress_Init_Procs.
5226 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5227 Suppress_Initialization/Initialization_Suppressed.
5228 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5229 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5230 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5231 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5233 2011-08-02 Robert Dewar <dewar@adacore.com>
5235 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5238 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5240 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5241 only have inheritable classwide pre/postconditions.
5243 2011-08-02 Javier Miranda <miranda@adacore.com>
5245 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5246 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5247 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5248 checks if the external tag of a type is the same as the external tag
5249 of some other declaration.
5251 2011-08-02 Thomas Quinot <quinot@adacore.com>
5253 * s-taskin.ads: Minor reformatting.
5255 2011-08-02 Emmanuel Briot <briot@adacore.com>
5257 * g-comlin.adb (Display_Help): swap the order in which it prints the
5258 short help and the general usage.
5260 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5262 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5263 the aspect declarations and attach them to the generic copy for
5264 subsequent analysis.
5265 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5266 declarations of the generic tree to the new subprogram declarations.
5267 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5268 conditions that apply to a subprogram instance.
5270 2011-08-02 Robert Dewar <dewar@adacore.com>
5272 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5274 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5276 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5277 private type with a tagged full view is not derived in the immediate
5278 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5280 2011-08-02 Robert Dewar <dewar@adacore.com>
5282 * exp_ch4.adb: Minor reformatting.
5284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5286 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5287 Ada2012 iterator, the loop will be rewritten during expansion into a
5288 while loop with a cursor and an element declaration. Do not analyze the
5289 body in this case, because if the container is for indefinite types the
5290 actual subtype of the elements will only be determined when the cursor
5291 declaration is analyzed.
5293 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5295 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5296 size/alignment related attributes in CodePeer_Mode.
5298 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5300 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5301 Prepend_Element, since this can result in the operation getting the
5302 wrong slot in the full type's dispatch table if the full type has
5303 inherited operations. The incomplete type's operation will get added
5304 to the proper position in the full type's primitives
5305 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5306 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5307 dispatching operations, since there are cases where nonprimitive
5308 subprograms can get added to the list of incomplete dependents (such
5309 as subprograms in nested packages).
5310 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5311 private part when determining whether to add a primitive with a
5312 parameter of a tagged incomplete type to the Private_Dependents list.
5313 Such primitives can also occur in the visible part, and should not have
5314 been excluded from being private dependents.
5315 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5316 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5317 list of a Taft-amendment incomplete type is a primitive before issuing
5318 an error that the full type must appear in the same unit. There are
5319 cases where nonprimitives can be in the list (such as subprograms in
5321 * sem_disp.adb (Derives_From): Use correct condition for checking that
5322 a formal's type is derived from the type of the corresponding formal in
5323 the parent subprogram (the condition was completely wrong). Add
5324 checking that was missing for controlling result types being derived
5325 from the result type of the parent operation.
5327 2011-08-02 Yannick Moy <moy@adacore.com>
5329 * errout.adb (First_Node): minor renaming
5330 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5333 2011-08-02 Yannick Moy <moy@adacore.com>
5335 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5336 before accessing operands.
5337 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5338 decide whether an initialization expression respects SPARK rules, as
5339 the plain node is the expanded one. This allows for more valid warnings
5341 * gnat_rm.texi: Minor update.
5343 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5345 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5348 2011-08-02 Robert Dewar <dewar@adacore.com>
5350 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5352 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5354 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5355 loop statements and the element renaming declaration with a block when
5356 the element type is controlled.
5358 2011-08-02 Yannick Moy <moy@adacore.com>
5360 * sinfo.ads: Minor formatting.
5362 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5364 * sem_aggr.adb (Add_Association): if the association has a box and no
5365 expression, use the Sloc of the aggregate itself for the new
5367 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5370 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5372 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5373 When a container is provided via a function call, generate a renaming
5374 of the function result. This avoids the creation of a transient scope
5375 and the premature finalization of the container.
5376 * exp_ch7.adb (Is_Container_Cursor): Removed.
5377 (Wrap_Transient_Declaration): Remove the supression of the finalization
5378 of the list controller when the declaration denotes a container cursor,
5381 2011-08-02 Yannick Moy <moy@adacore.com>
5383 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5384 node is from source, instead of the original node being from source.
5386 (Resolve_Array_Aggregate): refine the check for a static expression, to
5387 recognize also static ranges
5388 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5389 Array_Type_Declaration): postpone the test for the type being a subtype
5390 mark after the type has been resolved, so that component-selection and
5391 expanded-name are discriminated.
5392 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5393 to distinguish the case of an iteration scheme, so that an error is
5394 issed on a non-static range in SPARK except in an iteration scheme.
5395 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5396 In_Iter_Schm = True.
5397 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5398 user-defined operators so that they are allowed in renaming
5400 (Find_Selected_Component): refine the check for prefixing of operators
5401 so that they are allowed in renaming. Move the checks for restrictions
5402 on selector name after analysis discriminated between
5403 component-selection and expanded-name.
5404 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5405 concatenation argument of string type if it is static.
5406 * sem_util.adb, sem_util.ads
5407 (Check_Later_Vs_Basic_Declarations): add a new function
5408 Is_Later_Declarative_Item to decice which declarations are allowed as
5409 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5410 mode, add that renamings are considered as later items.
5411 (Enclosing_Package): new function to return the enclosing package
5412 (Enter_Name): correct the rule for homonyms in SPARK
5413 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5414 from source (result of expansion) to avoid issuing wrong warnings.
5416 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5418 * errout.adb: On anything but an expression First_Node returns its
5421 2011-08-02 Pascal Obry <obry@adacore.com>
5423 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5425 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5427 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5428 Set the associated loop as the related expression of internally
5430 * exp_ch7.adb (Is_Container_Cursor): New routine.
5431 (Wrap_Transient_Declaration): Supress the finalization of the list
5432 controller when the declaration denotes a container cursor.
5434 2011-08-02 Yannick Moy <moy@adacore.com>
5436 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5438 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5439 expression is a simple expression. This check cannot be performed in
5440 the semantics, so just drop it.
5441 (P_Index_Or_Discriminant_Constraint): move check that the index or
5442 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5443 semantics. Other cases were previously checked in the semantics.
5444 * par-ch4.adb (P_Name): move checks that a selector name is not
5445 character literal or an operator symbol to Find_Selected_Component in
5447 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5448 declarations are not placed after later declarations in a separate
5449 procedure in Sem_Util (possibly not the best choice?), to be used both
5450 during parsing, for Ada 83 mode, and during semantic analysis, for
5452 * par-endh.adb (Check_End): move check that end label is not missing
5453 to Process_End_Label in the semantics
5454 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5455 the special case for SPARK restriction
5456 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5457 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5458 parameter Force to issue the error message even on internal node (used
5459 for generated end label). Call Check_Restriction to check when an error
5460 must be issued. In SPARK mode, issue an error message even if the
5461 restriction is not set.
5462 (Check_Restriction): new procedure with an additional out parameter to
5463 inform the caller that a message has been issued
5464 * sem_aggr.adb: Minor modification of message
5465 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5466 instead of issuing an error message directly
5467 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5468 declarations are not placed after later declarations, by calling
5469 Check_Later_Vs_Basic_Declarations
5470 (Analyze_Subtype_Declaration): move here the check that an index or
5471 discriminant constraint must be a subtype mark. Change the check that
5472 a subtype of String must start at one so that it works on subtype marks.
5473 * sem_ch4.adb (Analyze_Call): move here the check that a named
5474 association cannot follow a positional one in a call
5475 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5476 instead of issuing an error message directly
5477 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5478 selector name is not a character literal or an operator symbol. Move
5479 here the check that the prefix of an expanded name cannot be a
5480 subprogram or a loop statement.
5481 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5482 procedure called from parsing and semantics to check that basic
5483 declarations are not placed after later declarations
5484 (Process_End_Label): move here the check that end label is not missing
5486 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5488 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5489 representation clause in codepeer mode, since it confuses CodePeer and
5490 does not bring useful info.
5492 2011-08-02 Ed Falis <falis@adacore.com>
5494 * init.c: initialize fp hw on MILS.
5496 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5498 * errout.adb (First_Node): for bodies, return the node itself (small
5499 optimization). For other nodes, do not check source_unit if the node
5500 comes from Standard.
5502 2011-08-02 Robert Dewar <dewar@adacore.com>
5504 * exp_ch3.adb: Minor comment additions.
5505 * sem_ch13.adb: Minor reformatting.
5507 2011-08-02 Pascal Obry <obry@adacore.com>
5509 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5511 2011-08-02 Robert Dewar <dewar@adacore.com>
5513 * sem_attr.adb: Minor reformatting.
5515 2011-08-02 Robert Dewar <dewar@adacore.com>
5517 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5518 (Has_Default_Component_Value): Removed
5519 * einfo.ads Comment updates
5520 (Has_Default_Aspect): Replaces Has_Default_Value
5521 (Has_Default_Component_Value): Removed
5523 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5525 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5526 (Get_Simple_Init_Val): Handle Default_Value aspect
5527 (Needs_Simple_Initialization): Handle Default_Value aspect
5528 * exp_ch3.ads: Needs_Simple_Initialization
5529 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5530 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5532 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5533 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5534 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5536 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5538 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5539 package containing iteration primitives.
5540 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5542 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5544 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5545 "of", pre-analyze expression in case it is a function call with
5546 finalization actions that must be placed ahead of the loop.
5547 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5548 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5550 2011-08-02 Geert Bosch <bosch@adacore.com>
5552 * cstand.adb (Create_Float_Types): Only consider C's long double for
5553 Long_Long_Float, in addition to double.
5555 2011-08-02 Robert Dewar <dewar@adacore.com>
5557 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5558 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5559 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5562 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5564 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5567 2011-08-02 Javier Miranda <miranda@adacore.com>
5569 * einfo.ads, einfo.adb
5570 (Original_Access_Type): Move this attribute to Node26 since there was
5571 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5572 which causes conflicts and breaks the generation of the .NET compiler.
5573 (Interface_Name): Add missing documentation on JGNAT only uses of
5576 2011-08-02 Geert Bosch <bosch@adacore.com>
5578 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5579 (Find_Back_End_Float_Type): Likewise
5580 (Create_Back_End_Float_Types): Likewise
5581 (Create_Float_Types): Likewise
5582 (Register_Float_Type): Likewise
5583 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5584 Nlist and split out type selection in new local Find_Base_Type function.
5585 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5587 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5589 2011-08-02 Robert Dewar <dewar@adacore.com>
5591 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5593 * opt.ads: Minor comment change.
5594 * sem_ch12.adb: Minor code reorganization.
5596 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5598 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5599 subtype's list of rep items to the list on the full subtype in the case
5600 where the lists are the same.
5602 2011-08-02 Geert Bosch <bosch@adacore.com>
5604 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5605 using the one from System.Strings, which also deallocates all strings.
5607 2011-08-02 Geert Bosch <bosch@adacore.com>
5609 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5611 * gcc-interface/Make-lang.in: Update dependencies.
5613 2011-08-02 Olivier Hainque <hainque@adacore.com>
5615 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5618 2011-08-02 Javier Miranda <miranda@adacore.com>
5620 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5621 associated with anonymous access to subprograms.
5623 2011-08-02 Geert Bosch <bosch@adacore.com>
5626 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5627 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5628 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5629 (Add_Symbol_Definition): Move to switch-c.adb
5630 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5631 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5632 (Add_Symbol_Definition): Move to switch-c.adb.
5633 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5635 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5637 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5638 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5640 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5641 (Add_Symbol_Definition): Moved from Prepcomp.
5642 * switch-c.ads: Update copyright notice. Use String_List instead of
5643 Argument_List, removing dependency on System.OS_Lib.
5645 2011-08-02 Yannick Moy <moy@adacore.com>
5647 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5648 mode on initialization expression which does not respect SPARK
5650 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5651 if the tree referenced by its argument represents an initialization
5652 expression in SPARK, suitable for initializing an object in an object
5655 2011-08-02 Javier Miranda <miranda@adacore.com>
5657 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5658 internally generated access to subprogram with its associated protected
5660 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5662 2011-08-02 Geert Bosch <bosch@adacore.com>
5664 * cstand.adb (Register_Float_Type): Print information about type to
5665 register, if the Debug_Flag_Dot_B is set.
5666 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5667 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5668 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5669 with a requested precision of more than Max_Digits digits and no more
5670 than Max_Base_Digits digits, if a range specification is present and the
5671 Predefined_Float_Types list has a suitable type to derive from.
5672 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5673 case of type completion with pragma Import
5675 (Process_Import_Predefined_Type): Processing to complete a type
5676 with pragma Import. Currently supports floating point types only.
5677 (Set_Convention_From_Pragma): Do nothing without underlying type.
5678 (Process_Convention): Guard against absence of underlying type,
5679 which may happen when importing incomplete types.
5680 (Process_Import_Or_Interface): Handle case of importing predefined
5681 types. Tweak error message.
5683 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5685 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5686 functions to previous change. Reorganize code slightly.
5688 2011-08-02 Geert Bosch <bosch@adacore.com>
5690 * back_end.ads (Register_Type_Proc): New call back procedure type for
5691 allowing the back end to provide information about available types.
5692 (Register_Back_End_Types): New procedure to register back end types.
5693 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5695 * cstand.adb (Back_End_Float_Types): New list for floating point types
5696 supported by the back end.
5697 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5698 (Copy_Float_Type): New procedure to make new copies of predefined types.
5699 (Register_Float_Type): New call back procedure to populate the BEFT list
5700 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5701 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5702 (Create_Float_Types): New procedure to create entities for floating
5703 point types predefined in Standard, and put these and any remaining
5704 BEFTs on the Predefined_Float_Types list.
5705 * stand.ads (Predefined_Float_Types): New list for predefined floating
5706 point types that do not have declarations in package Standard.
5708 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5710 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5711 entity node for the unit containing the parameter.
5712 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5713 (Add_Inlined_Subprogram): Likewise.
5714 * gcc-interface/Make-lang.in: Update dependencies.
5716 2011-08-02 Thomas Quinot <quinot@adacore.com>
5718 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5721 2011-08-02 Geert Bosch <bosch@adacore.com>
5723 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5725 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5727 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5728 computed value of Base_Type.
5730 2011-08-02 Yannick Moy <moy@adacore.com>
5732 * restrict.adb (Check_Restriction): issue an error for any use of
5733 class-wide, even if the No_Dispatch restriction is not set.
5734 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5735 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5736 when completing a private extension, the type named in the private part
5737 is not the same as that named in the visible part.
5738 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5739 of an inherited primitive operations of a tagged type or type extension
5740 that returns the tagged type.
5741 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5742 function which returns True for an implicit operation inherited by the
5743 derived type declaration for the argument type.
5744 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5747 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5749 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5750 Process_Bounds, to perform analysis with expansion of a range or an
5751 expression that is the iteration scheme for a loop.
5752 (Analyze_Iterator_Specification): If domain of iteration is given by a
5753 function call with a controlled result, as is the case if call returns
5754 a predefined container, ensure that finalization actions are properly
5756 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5758 2011-08-02 Javier Miranda <miranda@adacore.com>
5760 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5761 * gcc-interface/Make-lang.in: Update dependencies.
5763 2011-08-02 Javier Miranda <miranda@adacore.com>
5765 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5766 determine if the analysis is performed using N or Original_Node (N).
5767 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5768 functionality of routine Is_Variable avoids code duplication.
5769 * checks.adb (Determine_Range): Handle temporaries generated by
5770 Remove_Side_Effects.
5772 2011-08-02 Javier Miranda <miranda@adacore.com>
5774 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5775 expansion of the condition. Required since the previous analysis was
5776 done with expansion disabled (see Resolve_Quantified_Expression) and
5777 hence checks were not inserted and record comparisons have not been
5780 2011-08-02 Ed Falis <falis@adacore.com>
5782 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5785 2011-08-02 Bob Duff <duff@adacore.com>
5787 * opt.ads: Minor comment fix.
5789 2011-08-02 Bob Duff <duff@adacore.com>
5791 * sem_ch12.adb (Analyze_Package_Instantiation,
5792 Analyze_Subprogram_Instantiation): Turn off style checking while
5793 analyzing an instance. Whatever style checks that apply to the generic
5794 unit should apply, so it makes no sense to apply them in an instance.
5795 This was causing trouble when compiling an instance of a runtime
5796 unit that violates the -gnatyO switch.
5797 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5798 one of the two case statements, causing spurious errors.
5800 2011-08-02 Robert Dewar <dewar@adacore.com>
5802 * uname.adb: Minor reformatting.
5803 * gnatcmd.adb: Minor reformatting.
5804 * exp_attr.adb: Minor reformatting.
5806 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5808 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5809 No_Dispatching_Calls, do not look for the Assign primitive, because
5810 predefined primitives are not created in this case.
5812 2011-08-02 Bob Duff <duff@adacore.com>
5814 * stylesw.ads: Minor comment fixes.
5816 2011-08-02 Robert Dewar <dewar@adacore.com>
5818 * freeze.adb (Add_To_Result): New procedure.
5820 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5822 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5823 time, if the specific run-time routines for handling streams of strings
5824 are not available, use the default mechanism.
5826 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5828 * s-regpat.ads: Fix typo.
5830 2011-08-02 Vincent Celier <celier@adacore.com>
5832 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5833 not null, call it to create the in memory config project file without
5834 parsing an existing default config project file.
5836 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5838 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5840 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5842 * sem_elim.adb: an abstract subprogram does not need an eliminate
5843 pragma for its descendant to be eliminable.
5845 2011-08-02 Ed Falis <falis@adacore.com>
5847 * init.c: revert to handling before previous checkin for VxWorks
5848 * s-intman-vxworks.adb: delete unnecessary declarations related to
5849 using Ada interrupt facilities for handling signals.
5850 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5851 * s-intman-vxworks.ads: Import __gnat_install_handler as
5852 Initialize_Interrupts.
5853 * s-taprop-vxworks.adb: Delete Signal_Mask.
5854 (Abort_Handler): change construction of mask to unblock exception
5857 2011-08-02 Jerome Guitton <guitton@adacore.com>
5859 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5860 Debug_Raise_Exception before propagation starts.
5862 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5864 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5865 to Restriction_Check_Required.
5866 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5867 * sem_res.adb (Resolve_Call): Likewise.
5868 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5870 2011-08-02 Bob Duff <duff@adacore.com>
5872 * stylesw.ads: Update comment.
5873 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5874 * errout.ads: Remove obsolete comment.
5876 2011-08-02 Javier Miranda <miranda@adacore.com>
5878 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5879 (Set_Is_Safe_To_Reevaluate): new procedure.
5880 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5881 assignment is allowed on safe-to-reevaluate variables.
5882 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5883 temporary created to remove side effects in expressions that use
5884 the secondary stack as safe-to-reevaluate.
5885 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5886 variables that are not true constants.
5888 2011-08-02 Robert Dewar <dewar@adacore.com>
5890 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5891 sem_res.adb, sem_ch6.adb: Minor reformatting.
5893 2011-08-02 Jerome Guitton <guitton@adacore.com>
5895 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5897 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5899 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5900 not set Overridden_Operation if subprogram is an initialization
5903 2011-08-02 Yannick Moy <moy@adacore.com>
5905 * par-ch6.adb: Correct obsolete name in comments
5906 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5907 which takes two message arguments (existing function takes one), with
5908 second message used for continuation.
5909 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5910 block statements that originate from a source block statement, not
5911 generated block statements
5912 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5913 symmetry with procedure case
5914 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5915 function to issue an error in formal mode if a package specification
5916 contains more than one tagged type or type extension.
5917 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5918 parameters matching formals of tagged types are objects (or ancestor
5919 type conversions of objects), not general expressions. Issue an error
5920 on view conversions that are not involving ancestor conversion of an
5922 (Resolve_Type_Conversion): in formal mode, issue an error on the
5923 operand of an ancestor type conversion which is not an object
5924 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5925 procedure so that it works also for actuals of function calls
5926 (Is_Actual_Tagged_Parameter): new function which determines if its
5927 argument is an actual parameter of a formal of tagged type in a
5929 (Is_SPARK_Object_Reference): new function which determines if the tree
5930 referenced by its argument represents an object in SPARK
5932 2011-08-02 Robert Dewar <dewar@adacore.com>
5934 * sem_ch3.adb: Minor reformatting
5935 Minor comment addition
5936 Minor error msg text change
5938 2011-08-02 Javier Miranda <miranda@adacore.com>
5940 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5941 function. Used to be more precise when we generate a variable plus one
5942 assignment to remove side effects in the evaluation of the Bound
5944 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5945 of the bound expression to force its re-analysis and thus expand the
5946 associated transient scope (if required). Code cleanup replacing the
5947 previous code that declared the constant entity by an invocation to
5948 routine Force_Evaluation which centralizes this work in the frontend.
5950 2011-08-02 Robert Dewar <dewar@adacore.com>
5952 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5953 (Base_Type): Now uses improved Is_Base_Type function
5954 * einfo.ads (Base_Type): Inline this function
5956 2011-08-02 Robert Dewar <dewar@adacore.com>
5958 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5959 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5961 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5963 * gcc-interface/Make-lang.in: Update dependencies.
5964 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5967 2011-08-02 Yannick Moy <moy@adacore.com>
5969 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5970 non-simple expression used in delta constraint
5971 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5972 index constraint which is not a subtype mark
5973 * par.adb: With and use Restrict
5974 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5975 mode on component type which is not a subtype mark and default
5976 expression on component
5977 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5978 of string which does not have a lower index bound equal to 1
5979 (Array_Type_Declaration): issue an error in formal mode on index or
5980 component type which is not a subtype mark, and on aliased keyword on
5982 (Derived_Type_Declaration): issue an error in formal mode on interface,
5983 limited or abstract type
5984 (Record_Type_Declaration): issue an error in formal mode on interface
5985 (Record_Type_Definition): issue an error in formal mode on tagged types
5986 and type extensions not declared in the specification of a library unit
5987 package; on null non-tagged record; on variant part
5989 2011-08-02 Vincent Celier <celier@adacore.com>
5991 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5992 not declared for qualified library project when Library_Name is not
5993 declared, but Library_Dir is.
5995 2011-08-02 Robert Dewar <dewar@adacore.com>
5997 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5998 pragmas (affects aspects [Component_]Default_Value
5999 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6000 component type for the resolution
6002 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6004 * einfo.adb (Base_Type): Tune implementation for speed.
6006 2011-08-02 Robert Dewar <dewar@adacore.com>
6008 * freeze.adb: Minor reformatting.
6010 2011-08-02 Thomas Quinot <quinot@adacore.com>
6012 * scos.ads: Update comments.
6014 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6016 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6017 base type, because the parent may be a subtype of a private type whose
6018 convention is established in a private part.
6020 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6022 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6023 statement in a block when the expansion of the return expression has
6024 created a finalization chain.
6025 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6026 with the parent node.
6027 Add N_Extended_Return_Statement to handle the case where a transient
6028 object declaration appears in the Return_Object_Declarations list of
6029 an extended return statement.
6031 2011-08-02 Matthew Gingell <gingell@adacore.com>
6033 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6034 unused parameter 'name'.
6036 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6038 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6039 inherited operation, check whether its alias, which is the source
6040 operastion that it renames, has been marked eliminated.
6042 2011-08-02 Javier Miranda <miranda@adacore.com>
6044 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6045 in-mode parameter whose type is an access type since it can be used to
6046 modify its designated object. Enforce code that handles as safe an
6047 access type that is not access-to-constant but it is the result of a
6048 previous removal of side-effects.
6049 (Remove_Side_Effects): Minor code reorganization of cases which require
6050 no action. Done to incorporate documentation on new cases uncovered
6051 working in this ticket: no action needed if this routine was invoked
6052 too early and the nodes are not yet decorated.
6053 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6054 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6055 were issued with actuals that are implicitly provided by
6058 2011-08-02 Robert Dewar <dewar@adacore.com>
6060 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6062 2011-08-02 Yannick Moy <moy@adacore.com>
6064 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6065 to issue an error in formal mode on attribute not supported in this mode
6066 (Analyze_Attribute): issue errors on standard attributes not supported
6068 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6069 comment, and issue error in formal mode on modulus which is not a power
6071 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6073 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6075 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6076 operator on modular type (except 'not').
6078 2011-08-02 Robert Dewar <dewar@adacore.com>
6080 * gnat_rm.texi: Minor reformatting.
6082 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6084 * s-osinte-linux.ads: Minor comment update and reformatting.
6085 * i-cexten.ads: Make this unit pure, as for its parent.
6086 Will allow its usage in more contexts if needed.
6088 2011-08-02 Robert Dewar <dewar@adacore.com>
6090 * s-utf_32.ads: Minor comment fix.
6092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6094 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6095 operation of a tagged synchronized type, handle the case where the
6096 controlling argument is overloaded.
6098 2011-08-02 Yannick Moy <moy@adacore.com>
6100 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6101 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6102 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6103 SPARK mode and formal verification mode on processing SPARK restriction
6104 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6105 requiring consistency checking.
6107 2011-08-02 Robert Dewar <dewar@adacore.com>
6109 * sem_res.adb: Minor reformatting.
6111 2011-08-02 Robert Dewar <dewar@adacore.com>
6113 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6114 a-cforse.ads: Remove unneeded with of Ada.Containers
6115 Remove commented out pragma Inline's
6116 Move specifications of new subprograms to the actual specs
6118 2011-08-02 Yannick Moy <moy@adacore.com>
6120 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6121 a-cforse.ads: Update comments.
6123 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6125 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6127 2011-08-02 Robert Dewar <dewar@adacore.com>
6129 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6130 a-cforse.ads, a-cofove.ads: Minor reformatting.
6132 2011-08-02 Claire Dross <dross@adacore.com>
6134 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6135 a-cofove.ads: Add comments.
6137 2011-08-02 Yannick Moy <moy@adacore.com>
6139 * gnat_rm.texi: Document formal containers.
6141 2011-08-02 Emmanuel Briot <briot@adacore.com>
6143 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6146 2011-08-02 Robert Dewar <dewar@adacore.com>
6148 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6151 2011-08-02 Robert Dewar <dewar@adacore.com>
6153 * aspects.adb: New aspects Default_Value and Default_Component_Value
6154 New format of Aspect_Names table checks for omitted entries
6155 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6156 handling of boolean aspects for derived types.
6157 New aspects Default_Value and Default_Component_Value
6158 New format of Aspect_Names table checks for omitted entries
6159 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6160 (Has_Default_Value): New flag
6161 (Has_Default_Component_Value): New flag
6162 (Has_Default_Value): New flag
6163 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6165 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6166 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6167 Default_Value and Default_Component_Value
6168 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6169 New aspects Default_Value and Default_Component_Value
6170 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6171 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6173 2011-08-02 Vincent Celier <celier@adacore.com>
6175 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6176 inherit library kind.
6178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6180 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6183 2011-08-02 Robert Dewar <dewar@adacore.com>
6185 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6187 2011-08-02 Yannick Moy <moy@adacore.com>
6189 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6191 2011-08-02 Robert Dewar <dewar@adacore.com>
6193 * impunit.adb: Add comment.
6195 2011-08-02 Yannick Moy <moy@adacore.com>
6197 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6198 qualification of aggregates in formal mode
6199 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6201 (Resolve_Aggregate): complete the test that an aggregate is adequately
6202 qualified in formal mode
6204 2011-08-02 Pascal Obry <obry@adacore.com>
6206 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6207 * mlib-prj.adb: Supress warning when compiling binder generated file.
6208 (Build_Library): Supress all warnings when compiling the binder
6211 2011-08-02 Yannick Moy <moy@adacore.com>
6213 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6215 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6216 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6217 Add with/use clauses to make Check_Formal_Restriction visible
6219 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6221 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6222 in-parameters when type of the generic formal is private in the generic
6223 spec and non-private in the body.
6225 2011-08-02 Claire Dross <dross@adacore.com>
6227 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6228 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6229 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6230 * impunit.adb, Makefile.rtl: Take new files into account.
6232 2011-08-02 Robert Dewar <dewar@adacore.com>
6234 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6235 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6237 2011-08-02 Yannick Moy <moy@adacore.com>
6239 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6241 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6242 matching static array bounds, taking into account the special case of
6244 * sem_ch3.adb: Typo in comment.
6246 2011-08-02 Yannick Moy <moy@adacore.com>
6248 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6249 which issues an error in formal mode if its argument node is originally
6251 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6252 has a discriminant specification so that it does not include the case
6254 (Derived_Type_Declaration): move here the test that a derived type has a
6255 discriminant specification
6256 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6257 first element of a component association before accessing its choices
6258 (presence of component association is not enough)
6259 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6260 declaration is a library item before accessing the next element in a
6261 list, as library items are not member of lists
6262 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6263 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6264 Check_Formal_Restriction whenever possible.
6266 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6268 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6269 reference when needed.
6271 2011-08-02 Bob Duff <duff@adacore.com>
6273 * gnat_ugn.texi: Fix typo.
6275 2011-08-02 Vincent Celier <celier@adacore.com>
6277 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6278 archive file name. Do not use the full path name of archives for Open
6281 2011-08-02 Robert Dewar <dewar@adacore.com>
6283 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6284 Analyze_Aspect_Specifications
6286 (Analyze_Aspect_Specifications): New handling for boolean aspects
6287 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6288 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6289 sequence for Analyze_Aspect_Specifications
6290 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6291 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6293 2011-08-02 Robert Dewar <dewar@adacore.com>
6295 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6296 aspects, since these no longer exist.
6298 2011-08-02 Robert Dewar <dewar@adacore.com>
6300 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6301 semicolon, do not try to see if there are aspects following it.
6302 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6305 2011-08-02 Robert Dewar <dewar@adacore.com>
6307 * sem_ch8.adb, aspects.ads: Minor reformatting.
6309 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6311 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6312 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6314 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6316 2011-08-02 Yannick Moy <moy@adacore.com>
6318 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6319 mode on subprogram declaration outside of package specification, unless
6320 it is followed by a pragma Import
6321 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6322 Access_Type_Declaration): issue error in formal mode on access type
6323 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6325 (Analyze_Object_Declaration): issue error in formal mode on object
6326 declaration which does not respect SPARK restrictions
6327 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6328 declaration which does not respect SPARK restrictions
6329 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6330 error in formal mode on digits or delta constraint
6331 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6332 decimal fixed point type
6333 (Derived_Type_Declaration): issue error in formal mode on derived type
6334 other than type extensions of tagged record types
6335 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6336 with check on access definition
6337 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6338 mode on protected definition.
6339 (Analyze_Task_Definition): issue error in formal mode on task definition
6341 2011-08-02 Robert Dewar <dewar@adacore.com>
6343 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6345 2011-08-02 Javier Miranda <miranda@adacore.com>
6347 * sem_ch6.adb (Can_Override_Operator): New function.
6348 (Verify_Overriding_Indicator): Add missing code to check overriding
6349 indicator in operators. Fixes regression.
6350 (Check_Overriding_Indicator): Minor reformating after replacing the
6351 code that evaluates if the subprogram can override an operator by
6352 invocations to the above new function.
6354 (Write_Field26_Name): Add missing code to ensure that, following
6355 the documentation in einfo.ads, this field is not shown as attribute
6356 "Static_Initialization" on non-dispatching functions.
6358 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6360 * sem_res.adb (Resolve_Call): A call to
6361 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6362 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6363 i.e., when the second parameter is of type Time_Span.
6365 2011-08-02 Vincent Celier <celier@adacore.com>
6367 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6368 with an archive instead of -L<library dir> -l<library name>.
6370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6372 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6373 mark the base types In_Use in addition to making the operations
6376 2011-08-02 Ed Falis <falis@adacore.com>
6378 * init.c: add and setup __gnat_signal_mask for the exception signals
6379 * s-inmaop-vxworks.adb: new file.
6380 * s-intman-vxworks.adb: remove unnecessary initializations and
6382 * s-intman-vxworks.ads: remove unnecessary variable
6383 * s-taprop-vxworks.adb: simplify signal initialization
6385 2011-08-02 Robert Dewar <dewar@adacore.com>
6387 * sem_ch8.adb: Minor code reorganization, comment updates.
6389 2011-08-02 Robert Dewar <dewar@adacore.com>
6391 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6392 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6394 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6395 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6397 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6399 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6400 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6401 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6402 use_type_clauses, to handle more efficiently use_type and use_all_type
6404 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6405 Ada2012 Use_All_Type clause.
6406 (Use_Class_Wide_Operations): new procedure.
6408 2011-08-02 Robert Dewar <dewar@adacore.com>
6410 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6411 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6412 expression to expression function.
6414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6416 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6417 if types are compatible.
6419 2011-08-02 Yannick Moy <moy@adacore.com>
6421 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6422 returns True if its argument array types have same dimension and same
6423 static bounds at each index.
6424 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6425 OUT or IN OUT paramaters which are not view conversions in SPARK.
6426 (Resolve_Arithmetic_Op): issue an error in formal mode on
6427 multiplication or division with operands of fixed point types which are
6428 not qualified or explicitly converted.
6429 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6430 Boolean or array type (except String) operands.
6431 (Resolve_Equality_Op): issue an error in formal mode on equality
6432 operators for array types other than String with non-matching static
6434 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6435 for array types with non-matching static bounds. Factorize the code in
6436 Matching_Static_Array_Bounds.
6437 (Resolve_Qualified_Expression): issue an error in formal mode on
6438 qualified expressions for array types with non-matching static bounds.
6439 (Resolve_Type_Conversion): issue an error in formal mode on type
6440 conversion for array types with non-matching static bounds
6442 2011-08-02 Robert Dewar <dewar@adacore.com>
6444 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6446 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6448 * par-ch9.adb: save location of entry for proper error message.
6450 2011-08-02 Javier Miranda <miranda@adacore.com>
6452 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6453 (Use_Full_View) which permits this routine to climb through the
6454 ancestors using the full-view of private parents.
6455 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6456 Use_Full_View to true in calls to Is_Ancestor.
6457 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6458 true in call to Is_Ancestor.
6459 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6460 Use_Full_View to true in call to Is_Ancestor.
6461 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6462 call to Is_Ancestor.
6463 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6464 Use_Full_View to true in calls to Is_Ancestor.
6465 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6466 Make_Select_Specific_Data_Table, Register_Primitive,
6467 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6468 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6469 to true in call to Is_Ancestor.
6470 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6471 Use_Full_View to true in calls to Is_Ancestor.
6473 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6474 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6476 2011-08-02 Robert Dewar <dewar@adacore.com>
6478 * gnat_rm.texi: Minor reformatting.
6479 * sem_prag.adb: Minor reformatting.
6481 2011-08-02 Tristan Gingold <gingold@adacore.com>
6483 * vms_data.ads: Add VMS qualifier for -gnateP.
6485 2011-08-02 Robert Dewar <dewar@adacore.com>
6487 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6488 * par-ch7.adb (P_Package): Proper placement of aspects for package
6490 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6491 (End_Statements): Add Is_Sloc parameterr
6492 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6493 (Check_End): Ad Is_Sloc parameter
6494 (End_Statements): Add Is_Sloc parameterr
6496 2011-08-02 Vincent Celier <celier@adacore.com>
6498 * ug_words: Add VMS qualifier equivalent to -gnateP:
6499 /SYMBOL_PREPROCESSING.
6501 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6503 * gnat-style.texi: For hexadecimal numeric literals the typical
6504 grouping of digits is 4 to represent 2 bytes.
6505 A procedure spec which is split into several lines is indented two
6508 2011-08-02 Yannick Moy <moy@adacore.com>
6510 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6511 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6512 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6514 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6515 choice in array aggregate
6516 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6518 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6519 positional and named aggregate for record, or others in record
6520 aggregate, or multiple choice in record aggregate
6521 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6522 array operands to logical operations AND, OR and XOR do not have the
6523 same static lower and higher bounds
6524 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6526 2011-08-01 Robert Dewar <dewar@adacore.com>
6528 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6529 Replaces Last_Source_Node_In_Sequence.
6530 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6531 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6532 parens and blank in string (this was inconsistently implemented).
6534 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6535 blank in string (this was inconsistently implemented).
6537 (Set_Global_Switches): Set formal mode switches appropriately
6538 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6540 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6541 call Set_Error_Msg_Lang to set "spark" as language name.
6542 * par.adb: Remove unnecessary call to set formal language for errout
6543 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6544 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6546 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6547 calls to it, moved after resolution so that types are known
6548 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6549 result of concatenation is not of type String
6550 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6551 concatenation is not properly restricted
6552 * gnat_rm.texi: Add doc on pragma Spark_95.
6553 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6554 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6555 * gcc-interface/Make-lang.in: Update dependencies.
6557 2011-08-01 Javier Miranda <miranda@adacore.com>
6559 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6560 condition that detects if the overridden operation must replace an
6563 2011-08-01 Javier Miranda <miranda@adacore.com>
6565 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6566 code declarations inserted by Insert_Actions in each alternative of the
6567 N_Case_Expression node.
6569 2011-08-01 Robert Dewar <dewar@adacore.com>
6571 * sem_ch6.adb: Minor code reorganization.
6572 * sem_util.adb: Minor reformatting.
6574 2011-08-01 Pascal Obry <obry@adacore.com>
6576 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6577 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6579 2011-08-01 Yannick Moy <moy@adacore.com>
6581 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6582 literal or operator symbol which is prefixed
6583 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6584 mode on access attributes.
6585 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6586 that concatenation operands are properly restricted in formal mode
6587 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6588 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6589 result of the concatenation has a type different from String.
6590 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6591 Analyze_Quantified_Expression, Analyze_Slice,
6592 Analyze_Null): issue an error in formal mode on unsupported constructs
6594 (Analyze_Block_Statement): only issue error on source block statement
6595 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6596 function which returns the last node in a list of nodes for which
6597 Comes_From_Source returns True, if any
6598 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6599 Last_Source_Node_In_Sequence
6600 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6601 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6602 mode on unsupported constructs
6603 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6604 rest of the actions may be needed later on since the error is marked as
6606 * sinfo.ads: Typos in comments.
6608 2011-08-01 Pascal Obry <obry@adacore.com>
6610 * projects.texi: Minor editing.
6612 2011-08-01 Yannick Moy <moy@adacore.com>
6614 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6615 insertion character ~~
6616 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6617 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6618 with insertion character ~~
6619 (Set_Msg_Text): treat insertion character ~~
6620 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6621 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6622 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6623 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6624 errors related to the formal language restriction not serious
6625 (insertion character |).
6626 * par.adb (Par): set formal language for error messages if needed
6627 * sem_ch6.adb (Check_Missing_Return): take into account possible
6628 generated statements at the end of the function
6629 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6630 enumeration value to define a new pragma SPARK_95
6631 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6632 SPARK_Version): new type and variables to store the SPARK version
6634 (SPARK_Mode): return True when SPARK_Version is set
6635 * par-prag.adb: Correct indentation
6636 (Prag): take Pragma_SPARK_95 into account
6637 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6640 2011-08-01 Robert Dewar <dewar@adacore.com>
6642 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6643 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6644 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6646 2011-08-01 Pascal Obry <obry@adacore.com>
6648 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6649 Target_Name to Get_Path call.
6650 (Parse_Single_Project): Likewise.
6651 (Post_Parse_Context_Clause): Likewise.
6652 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6653 Call Initialise_Project_Path with the proper Target_Name.
6654 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6656 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6657 with the proper Target_Name.
6658 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6660 (Parse_Project_And_Apply_Config): Likewise.
6661 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6662 This is fine as this part of the code is supporting only native
6664 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6665 is fine as this part of the code is supporting only native compilation.
6667 2011-08-01 Yannick Moy <moy@adacore.com>
6669 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6670 of homonym, unless the homonym is one of the cases allowed in SPARK
6671 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6672 package declaration occurring after a body.
6674 2011-08-01 Robert Dewar <dewar@adacore.com>
6676 * checks.adb, exp_ch4.adb: Minor reformatting.
6678 2011-08-01 Javier Miranda <miranda@adacore.com>
6680 * einfo.ads (Access_Disp_Table): Fix documentation.
6681 (Dispatch_Table_Wrappers): Fix documentation.
6683 2011-08-01 Pascal Obry <obry@adacore.com>
6685 * prj-env.adb, prj-env.ads: Minor reformatting.
6687 2011-08-01 Yannick Moy <moy@adacore.com>
6689 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6690 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6691 procedures out of these packages.
6692 * errout.ads, errout.adb
6693 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6694 procedures in of this package
6695 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6696 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6697 on misplaced later vs initial declarations, like in Ada 83
6698 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6699 formal mode on attribute of private type whose full type declaration
6701 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6702 package declaration inside a package specification
6703 (Analyze_Full_Type_Declaration): issue error in formal mode on
6704 controlled type or discriminant type
6705 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6706 user-defined operator means that it should come from the source
6707 (New_Overloaded_Entity): issue error in formal mode on overloaded
6709 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6711 2011-08-01 Thomas Quinot <quinot@adacore.com>
6713 * atree.adb: Minor reformatting.
6714 * checks.adb: Minor reformatting.
6716 2011-08-01 Vincent Celier <celier@adacore.com>
6718 * s-parame-vms-ia64.ads: Fix typo in comment
6720 * s-parame-vms-restrict.ads: Removed, unused.
6722 2011-08-01 Javier Miranda <miranda@adacore.com>
6725 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6727 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6728 * sem_ch3.ads, sem_ch3.adb
6729 (Is_Constant_Bound): New extended version of the subprogram that was
6730 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6731 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6732 * sem_aux.ads (Constant_Value): Fix typo in comment.
6733 * checks.adb (Generate_Index_Checks): New implementation which, for
6734 array objects with constant bounds, generates the runtime check
6735 referencing the bounds of the array type. For other cases this routine
6736 provides its previous behavior obtaining such values from the array
6738 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6740 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6741 we cannot have semantic interpretations of the new node.
6743 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6745 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6748 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6750 * sem_ch8.adb: Minor code editing.
6751 * s-vxwext.adb: Remove trailing space.
6752 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6753 consistency with other files.
6755 2011-08-01 Thomas Quinot <quinot@adacore.com>
6757 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6759 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6761 * par-ch10.adb: reject parameterized expressions as compilation unit.
6762 * sem_ch4.adb: handle properly conditional expression with overloaded
6763 then_clause and no else_clause.
6765 2011-08-01 Tristan Gingold <gingold@adacore.com>
6767 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6768 like done by System.Aux_DEC.
6769 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6771 2011-08-01 Yannick Moy <moy@adacore.com>
6773 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6774 missing label at end of declaration (subprogram or package)
6775 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6776 of positional and named parameter association
6777 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6778 Error_Msg_SP which adds a prefix to the error message giving the name
6779 of the formal language analyzed
6780 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6781 access result type in subprogram, unconstrained array as result type,.
6782 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6784 * sem_ch8.adb: Code clean up.
6786 2011-08-01 Javier Miranda <miranda@adacore.com>
6788 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6789 * einfo.ads (Access_Disp_Table): Fix documentation.
6790 (Dispatch_Table_Wrappers): Fix documentation.
6791 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6792 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6793 to enforce the documentation of this attribute.
6794 (Set_Is_Interface): Cleanup the assertion.
6795 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6796 the Underlying_Type entity before reading attribute Access_Disp_Table.
6797 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6798 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6799 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6800 the Underlying_Type entity before reading attribute Access_Disp_Table.
6801 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6802 Locate the Underlying_Type entity before reading attribute
6805 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6807 * s-poosiz.ads: Additional overriding indicators.
6809 2011-08-01 Yannick Moy <moy@adacore.com>
6811 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6813 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6814 parameter specification does not include a subtype mark.
6815 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6816 formal mode on abstract subprogram.
6817 (Analyze_Subprogram_Specification): issue error in formal mode on
6818 user-defined operator.
6819 (Process_Formals): issue error in formal mode on access parameter and
6821 * sem_ch9.adb (Analyze_Abort_Statement,
6822 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6823 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6824 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6825 Analyze_Requeue, Analyze_Selective_Accept,
6826 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6827 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6828 issue error in formal mode on user-defined raise statement.
6830 2011-08-01 Thomas Quinot <quinot@adacore.com>
6832 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6833 declaration being hidden when overriding an implicit inherited
6835 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6836 (-gnats), do not complain about a source file that contains only a
6839 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6841 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6842 variable if already set.
6844 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6846 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6847 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6848 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6849 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6850 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6851 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6852 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6853 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6854 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6855 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6856 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6857 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6858 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6859 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6860 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6861 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6862 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6863 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6864 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6865 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6866 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6867 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6868 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6869 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6870 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6871 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6872 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6873 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6874 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6875 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6876 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6877 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6878 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6879 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6880 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6881 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6882 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6883 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6884 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6885 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6886 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6887 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6888 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6889 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6890 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6891 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6892 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6893 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6894 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6895 Use GNAT instead of GNARL.
6897 2011-08-01 Bob Duff <duff@adacore.com>
6899 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6900 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6901 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6904 2011-08-01 Yannick Moy <moy@adacore.com>
6906 * debug.adb (d.D) reverve flag for the SPARK mode
6907 (d.E) reverve flag for SPARK generation mode
6908 (d.F) reverve flag for Why generation mode
6909 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6910 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6911 functions which return True when the corresponding modes are set
6912 (Formal_Language): return "spark" or "alfa" when in formal verification
6914 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6915 Error_Msg to prefix the error message with a tag giving the formal
6917 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6918 message with a tag giving the formal language
6919 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6921 (Analyze_Case_Statement): issue error in formal mode on case statement
6922 with a single "others" case alternative
6923 (Analyze_Exit_Statement): issue errors in formal mode on exit
6924 statements which do not respect SPARK restrictions
6925 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6926 (Check_Unreachable_Code): always issue an error (not a warning) in
6927 formal mode on unreachable code (concerns both code after an infinite
6928 loop and after an unconditional jump, both not allowed in SPARK)
6929 * sem_ch6.adb (Analyze_Return_Statement): add call to
6930 Set_Return_Present for a procedure containing a return statement
6931 (already done for functions in Analyze_Function_Return)
6932 (Analyze_Function_Return): issue error in formal mode on extended
6933 return or if return is not last statement in function
6934 (Check_Missing_Return): issue error in formal mode if function does
6935 not end with return or if procedure contains a return
6936 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6937 function to detect if there is an inner scope of its parameter S which
6940 2011-08-01 Thomas Quinot <quinot@adacore.com>
6942 * sem_ch6.ads: Minor reformatting.
6944 2011-08-01 Javier Miranda <miranda@adacore.com>
6946 * sem_util.adb (Abstract_Interface_List): Complete condition when
6947 processing private type declarations to avoid reading unavailable
6949 (Is_Synchronized_Tagged_Type): Complete condition when processing
6950 private extension declaration nodes to avoid reading unavailable
6953 2011-08-01 Thomas Quinot <quinot@adacore.com>
6955 * sem_ch3.adb: Minor reformatting.
6957 2011-08-01 Thomas Quinot <quinot@adacore.com>
6959 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6960 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6961 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6962 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6963 for VMS, instead parametrize the common implementation with
6964 System.Parameters declarations.
6966 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6968 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6970 2011-08-01 Tristan Gingold <gingold@adacore.com>
6972 * seh_init.c: Fix SEH handler installation on win64.
6974 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6976 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6977 double analysis of an anonymous access to subprogram, because it can
6978 lead to improper sharing of profiles and a back-end crash.
6980 2011-08-01 Robert Dewar <dewar@adacore.com>
6982 * make.adb, sem_ch4.adb: Minor reformatting.
6983 * gcc-interface/Make-lang.in: Update dependencies.
6984 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6986 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6988 * gnat_rm.texi: Fix definition of Long_Integer.
6990 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6992 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6993 to prevent storage exhaustion.
6994 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6995 finalized is a function body, insert the cleanup code before the final
6996 return statement, to prevent spurious warnings.
6997 * s-pooglo.ads: add overriding indicator.
6999 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7001 * sem_ch4.adb (Operator_Check): improve error message when both a
7002 with_clause and a use_clause are needed to make operator usage legal.
7003 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7004 determine whether a compilation unit is visible within an other,
7005 either through a with_clause in the current unit, or a with_clause in
7006 its library unit or one one of its parents.
7008 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7010 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7011 over an arbitrary expression of an array or container type.
7012 * lib-xref.adb: clarify comment.
7014 2011-08-01 Bob Duff <duff@adacore.com>
7016 * einfo.ads: Minor reformatting.
7017 * debug.adb: Minor comment improvement.
7019 2011-08-01 Javier Miranda <miranda@adacore.com>
7021 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7022 consider hidden subprograms as valid candidates.
7024 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7026 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7028 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7030 * gnat_ugn.texi: Fix typo.
7032 2011-08-01 Robert Dewar <dewar@adacore.com>
7034 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7035 lib-xref.adb: Minor reformatting
7037 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7039 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7040 when to generate a call to Move_Final_List.
7041 (Has_Controlled_Parts): Remove this function.
7043 2011-08-01 Geert Bosch <bosch@adacore.com>
7045 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7048 2011-08-01 Thomas Quinot <quinot@adacore.com>
7050 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7051 explicit raise of a predefined exception as Comes_From_Source if the
7052 original N_Raise_Statement comes from source.
7054 2011-08-01 Robert Dewar <dewar@adacore.com>
7056 * sinfo.ads: Add comment.
7057 * sem_ch6.adb: Minor reformatting.
7059 2011-08-01 Robert Dewar <dewar@adacore.com>
7061 * freeze.adb (Freeze_Entity): Refine check for bad component size
7062 clause to avoid rejecting confirming clause when atomic/aliased present.
7064 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7066 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7067 better determine whether an entity reference is a write.
7068 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7070 * lib-xref.adb (Output_References): Do no suppress a read reference at
7071 the same location as an immediately preceeding modify-reference, to
7072 handle properly in-out actuals.
7074 2011-08-01 Tristan Gingold <gingold@adacore.com>
7076 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7078 2011-08-01 Quentin Ochem <ochem@adacore.com>
7080 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7081 heap to compute the result.
7083 2011-08-01 Robert Dewar <dewar@adacore.com>
7085 * atree.ads: Minor reformatting.
7087 2011-08-01 Emmanuel Briot <briot@adacore.com>
7089 * g-expect.adb (Get_Command_Output): Fix memory leak.
7091 2011-08-01 Geert Bosch <bosch@adacore.com>
7093 * cstand.adb (P_Float_Type): New procedure to print the definition of
7094 predefined fpt types.
7095 (P_Mixed_Name): New procedure to print a name using mixed case
7096 (Print_Standard): Use P_Float_Type for printing floating point types
7097 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7098 precision IEEE float.
7100 2011-08-01 Thomas Quinot <quinot@adacore.com>
7102 * sem_ch3.adb: Minor reformatting.
7104 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7106 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7107 the completion of a generic function, insert the new body rather than
7108 rewriting the original.
7110 2011-08-01 Yannick Moy <moy@adacore.com>
7112 * sinfo.ads, errout.ads: Typos in comments.
7114 2011-08-01 Robert Dewar <dewar@adacore.com>
7116 * par-endh.adb: Minor reformatting.
7118 2011-08-01 Robert Dewar <dewar@adacore.com>
7120 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7121 (Pre_Post_Aspects): New subtype.
7122 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7123 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7124 * par-ch7.adb (P_Package): Remove Decl parameter
7125 (P_Package): Handle new syntax for aspects (before IS)
7126 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7128 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7129 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7130 (P_Package): Remove Decl parameter
7131 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7133 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7135 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7136 * sinfo.ads: Document new syntax for aspects in packages etc.
7137 * sprint.adb: Handle new syntax of aspects before IS in package
7139 2011-08-01 Thomas Quinot <quinot@adacore.com>
7141 * atree.ads: Minor reformatting.
7142 * sem_prag.adb: Minor reformatting.
7144 2011-08-01 Robert Dewar <dewar@adacore.com>
7146 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7147 case expr alternative.
7149 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7151 * sem_ch12.adb: Fix typo.
7153 2011-08-01 Geert Bosch <bosch@adacore.com>
7155 * sem_prag.adb (Check_No_Link_Name): New procedure.
7156 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7157 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7158 instead of Standard_Long_Long_Float_Size global. Preparation for
7159 eventual removal of per type constants.
7160 * exp_util.ads (Get_Stream_Size): New function returning the stream
7161 size value of subtype E.
7162 * exp_util.adb (Get_Stream_Size): Implement new function.
7163 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7165 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7167 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7169 2011-08-01 Geert Bosch <bosch@adacore.com>
7171 * cstand.adb: Fix comments.
7172 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7175 2011-08-01 Robert Dewar <dewar@adacore.com>
7177 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7179 2011-08-01 Geert Bosch <bosch@adacore.com>
7181 * atree.ads: Fix comment.
7183 2011-08-01 Robert Dewar <dewar@adacore.com>
7185 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7186 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7187 * par.adb: Add with for Namet.Sp.
7188 * par-tchk.adb: Minor reformatting.
7190 2011-08-01 Vincent Celier <celier@adacore.com>
7192 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7193 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7194 of the init procedure of a SAL.
7195 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7198 2011-08-01 Thomas Quinot <quinot@adacore.com>
7200 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7203 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7205 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7207 2011-08-01 Thomas Quinot <quinot@adacore.com>
7209 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7210 conformant with its spec (return True only for types that have
7211 an overriding Initialize primitive operation that prevents them from
7212 having preelaborable initialization).
7213 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7214 initialization for controlled types in Ada 2005 or later mode.
7216 2011-08-01 Robert Dewar <dewar@adacore.com>
7218 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7220 (Same_Aspect): New function.
7221 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7222 Type_Invariant, Precondition, Postcondition.
7223 * snames.ads-tmpl: Add Name_Type_Invariant.
7225 2011-08-01 Robert Dewar <dewar@adacore.com>
7227 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7229 (Freeze_All_Ent): Fix error in handling inherited aspects.
7230 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7231 already analyzed, but don't skip entire processing of a declaration,
7232 that's wrong in some cases of declarations being rewritten.
7233 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7234 Don't delay for integer, string literals
7235 Treat predicates in usual manner for delay, remove special case code,
7237 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7238 (Build_Predicate_Function): Update saved expression in aspect
7239 (Build_Invariant_Procedure): Update saved expression in aspect
7240 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7241 of replacement of discriminant references if the reference is simple.
7243 2011-08-01 Robert Dewar <dewar@adacore.com>
7245 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7246 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7247 Static_Predicate and Dynamic_Predicate.
7248 (Build_Predicate_Function): Add processing for Static_Predicate
7249 and Dynamic_Predicate.
7250 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7251 (From_Static_Predicate): New flag
7252 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7254 2011-08-01 Robert Dewar <dewar@adacore.com>
7256 * usage.adb: Documentation cleanup for Ada version modes in usage.
7257 * expander.adb: Minor reformatting.
7259 2011-08-01 Robert Dewar <dewar@adacore.com>
7261 * atree.ads: Minor comment fix.
7262 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7263 a-witeio.ads, sem_prag.adb: Minor reformatting.
7265 2011-08-01 Doug Rupp <rupp@adacore.com>
7267 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7268 pointers. Use descrip.h header file for convenience. Add some
7271 2011-08-01 Robert Dewar <dewar@adacore.com>
7273 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7274 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7275 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7277 (Check_Aspect_At_End_Of_Declarations): New procedure
7278 (Analye_Aspect_Specification): Minor changes for above procedures
7279 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7280 specification node as well.
7282 2011-08-01 Pascal Obry <obry@adacore.com>
7284 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7285 Windows files. Use GetFilesAttributes() in this case to check for file
7286 existence instead of returning with an error code.
7288 2011-08-01 Vincent Celier <celier@adacore.com>
7290 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7291 High is above Source length.
7293 2011-08-01 Robert Dewar <dewar@adacore.com>
7295 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7297 2011-08-01 Robert Dewar <dewar@adacore.com>
7299 * aspects.ads (Boolean_Aspects): New subtype.
7300 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7301 for derived types in cases where the parent type and derived type have
7303 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7304 with aspects when parent type also has aspects.
7305 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7306 boolean expression at this point).
7307 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7308 accordance with final decision on the Ada 2012 feature.
7309 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7311 2011-08-01 Matthew Heaney <heaney@adacore.com>
7313 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7315 2011-08-01 Pascal Obry <obry@adacore.com>
7317 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7318 Fix Replace_Slice when High is above current string size.
7319 (Replace_Slice): Fix DL computation when High is above current
7322 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7324 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7326 2011-08-01 Matthew Heaney <heaney@adacore.com>
7328 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7331 2011-08-01 Pascal Obry <obry@adacore.com>
7333 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7336 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7338 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7339 access to protected subprograms in generic bodies.
7340 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7341 protected type, indicate that the convention of the subprogram is
7342 Convention_Protected, because it may be used in subsequent declarations
7343 within the protected declaration.
7345 2011-08-01 Vincent Celier <celier@adacore.com>
7347 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7348 and "final" procedures when the name of the library is "ada", to avoid
7349 duplicate symbols "adainit" and "adafinal" in executables.
7351 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7353 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7354 quantified expression that appears within a postcondition and uses the
7355 Ada2012 'Result attribute.
7357 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7359 * init.c (__gnat_error_handler): Cast reason to int.
7360 (__gnat_install_handler): Explain sa_sigaction use.
7362 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7364 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7365 subprogram has copy-in copy-out parameters, try to promote the mode of
7366 the return type if it is passed in registers.
7368 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7370 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7371 left operand as addressable.
7373 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7375 * gcc-interface/gigi.h (build_function_stub): Remove.
7376 (build_return_expr): Likewise.
7377 (convert_vms_descriptor): Declare.
7378 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7379 (build_function_stub): Move to...
7380 * gcc-interface/utils2.c (build_return_expr): Move to...
7381 * gcc-interface/trans.c (build_function_stub): ...here.
7382 (build_return_expr): ...here.
7383 (Subprogram_Body_to_gnu): Add local variable for language_function.
7384 Disconnect the parameter attributes cache, if any, once done with it.
7385 Call end_subprog_body only after setting the end_locus.
7386 Build the stub associated with the function, if any, at the very end.
7387 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7388 variables and streamline control flow.
7390 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7393 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7396 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7399 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7400 Assign to act.sa_sigaction.
7401 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7402 current->return_address to char * before arithmetic.
7404 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7406 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7407 Correct argument types.
7408 Extract code from reason.
7409 (__gnat_install_handler): Assign to act.sa_sigaction.
7411 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7413 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7414 (GNAT1_OBJS): ...here.
7416 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7419 * g-socthi-mingw.adb (Fill): Fix formatting.
7421 * gcc-interface/gigi.h: Move around comment.
7423 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7426 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7428 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7431 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7433 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7435 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7436 range comparison if Pmode is SImode.
7438 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7439 Eric Botcazou <ebotcazou@adacore.com>
7441 * adadecode.c: Wrap up in extern "C" block.
7442 * adadecode.h: Likewise.
7443 * adaint.c: Likewise. Remove 'const' keyword.
7444 * adaint.h: Likewise.
7446 * atree.h: Likewise.
7448 * cstreams.c: Likewise.
7452 * final.c: Likewise.
7454 * initialize.c: Likewise.
7456 * namet.h: Likewise.
7457 * nlists.h: Likewise.
7458 * raise.c: Likewise.
7459 * raise.h: Likewise.
7460 * repinfo.h: Likewise.
7461 * seh_init.c: Likewise.
7462 * targext.c: Likewise.
7463 * tracebak.c: Likewise.
7464 * uintp.h: Likewise.
7465 * urealp.h: Likewise.
7466 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7467 * xsinfo.adb: Likewise.
7468 * xsnamest.adb: Likewise.
7469 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7470 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7471 * gcc-interface/misc.c: Likewise.
7472 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7473 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7474 ada/targext.o here...
7475 (GNAT_ADA_OBJS): ...and not here.
7476 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7477 (GNATBIND_OBJS): Reorder.
7479 2011-07-07 Richard Henderson <rth@redhat.com>
7481 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7482 dwarf2out_frame_init.
7484 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7486 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7488 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7491 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7493 2011-07-06 Richard Guenther <rguenther@suse.de>
7495 * gcc-interface/misc.c (gnat_init): Merge calls to
7496 build_common_tree_nodes and build_common_tree_nodes_2.
7497 Re-initialize boolean_false_node.
7499 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7500 Olivier Hainque <hainque@adacore.com>
7501 Nicolas Setton <setton@adacore.com>
7503 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7504 the type according to the ARTIFICIAL_P parameter.
7505 (create_type_decl): Likewise.
7506 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7508 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7510 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7511 (gnatbind): Likewise.
7513 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7515 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7517 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7519 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7520 local variable throughout. Remove useless call to Base_Type.
7521 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7522 Take it also into account for the volatileness of the field. Set the
7523 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7525 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7527 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7528 on a dereference built for a by-ref object if it has an address clause.
7530 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7532 * einfo.ads (Address_Taken): Document use for the second argument of
7533 Asm_Input and Asm_Output attributes.
7534 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7535 argument is an entity name, then set Address_Taken on it.
7536 <Attribute_Asm_Output>: Likewise.
7537 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7538 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7539 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7540 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7542 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7545 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7547 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7549 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7550 (ada/utils.o): Update dependencies.
7551 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7552 ../../../libcpp/libcpp.a.
7553 * gcc-interface/utils.c: Include common/common-target.h.
7554 (process_attributes): Use targetm_common.have_named_sections.
7556 2011-06-07 Richard Guenther <rguenther@suse.de>
7558 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7561 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7563 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7564 TREE_THIS_NOTRAP flag.
7566 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7568 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7571 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7573 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7574 constants whose full view has discriminants specially.
7576 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7578 * gcc-interface/utils.c: Include diagnostic.h.
7579 (gnat_write_global_declarations): Output debug information for all
7580 global type declarations before finalizing the compilation unit.
7581 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7583 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7585 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7587 2011-05-25 Kai Tietz <ktietz@redhat.com>
7589 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7590 initialization instead of const/none-const pointer assignment.
7592 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7594 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7595 $(EXTRA_GNAT1_OBJS).
7596 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7597 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7598 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7599 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7600 libcommon-target.a instead of prefix.o.
7602 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7605 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7607 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7609 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7610 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7611 instead of version.o.
7613 2011-05-18 Kai Tietz <ktietz@redhat.com>
7615 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7616 boolean_false_node instead of integer_zero_node.
7617 (convert_with_check): Likewise.
7618 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7620 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7622 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7623 type of the parameter is an unconstrained array, convert the actual to
7624 the type of the formal in the In Out and Out cases as well.
7626 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7628 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7629 call build_function_type_array or build_varargs_function_type_array
7631 (create_subprog_type): Don't call build_function_type; call
7632 build_function_type_vec instead.
7634 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7636 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7637 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7638 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7640 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7642 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7644 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7645 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7647 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7649 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7651 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7653 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7654 instead of accessing TYPE_ARG_TYPES directly.
7655 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7657 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7660 * gcc-interface/gigi.h (get_variant_part): Declare.
7661 * gcc-interface/decl.c (get_variant_part): Make global.
7662 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7663 types have the same constant size, are record types and T1 has a
7664 variant part while T2 doesn't.
7666 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7668 * gcc-interface/utils.c (begin_subprog_body): Do not call
7670 (end_subprog_body): Likewise.
7672 2011-05-04 Richard Guenther <rguenther@suse.de>
7674 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7676 (pos_to_constructor): Likewise.
7678 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7679 Eric Botcazou <ebotcazou@adacore.com>
7681 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7682 of build_function_type. Adjust calls to...
7683 (build_raise_check): ...this. Do not take a void_tree parameter.
7684 Call build_function_type_list instead of build_function_type.
7685 Fix head comment and swap couple of conditional blocks.
7687 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7689 * gnatvsn.ads (Library_Version): Bump to 4.7.
7690 (Current_Year): Bump to 2011.
7692 2011-04-29 Michael Matz <matz@suse.de>
7694 * gcc-interface/misc.c (gnat_handle_option): Set
7695 warn_maybe_uninitialized.
7697 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7699 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7700 the Watson/McCabe paper.
7702 2011-04-23 Jim Meyering <meyering@redhat.com>
7704 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7706 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7708 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7711 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7713 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7715 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7716 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7717 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7718 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7719 <all>: Do not set flags on the reused DECL node coming from an alias.
7720 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7721 don't need debug info here...
7722 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7723 (gigi): Adjust calls to create_subprog_decl.
7724 (build_raise_check): Likewise.
7725 (establish_gnat_vms_condition_handler): Likewise.
7726 (Compilation_Unit_to_gnu): Likewise.
7727 (gnat_to_gnu): Likewise.
7729 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7731 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7732 (NO_REORDER_ADAFLAGS): New variable.
7733 (EXTRA_GNATTOOLS): Always define.
7734 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7735 Clean up and adjust list of files compiled with special options.
7736 * gcc-interface/Make-lang.in: Likewise.
7737 (ada/decl.o): Cosmetical change.
7738 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7740 2011-04-20 Jim Meyering <meyering@redhat.com>
7742 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7744 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7746 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7747 $(CFLAGS) on the link line.
7749 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7751 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7752 padded type built for the return type if it is unconstrained.
7754 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7756 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7758 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7760 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7761 before calling TREE_CHAIN.
7762 * gcc-interface/misc.c (gnat_init_ts): New function.
7763 (LANG_HOOKS_INIT_TS): Define.
7765 2011-04-12 Martin Jambor <mjambor@suse.cz>
7767 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7768 instead of cgraph_node.
7770 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7772 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7773 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7776 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7778 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7779 of aggregate types that contain a placeholder.
7781 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7783 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7785 (handle_type_generic_attribute): Likewise.
7787 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7790 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7792 2011-04-04 Kai Tietz <ktietz@redhat.com>
7795 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7798 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7800 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7801 type case, do not strip a padding type around the array type.
7803 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7805 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7808 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7810 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7811 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7812 code for -feliminate-unused-debug-types.
7813 (gnat_post_options): Likewise.
7815 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7817 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7818 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7821 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7823 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7824 DECL_ARTIFICIAL flag on enumeration types.
7826 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7828 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7829 fat pointer types artificial unconditionally.
7830 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7833 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7835 * gcc-interface/gigi.h (get_dummy_type): Declare.
7836 (build_dummy_unc_pointer_types): Likewise.
7837 (finish_fat_pointer_type): Likewise.
7838 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7839 fat pointer type has been built, complete it in place.
7840 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7841 and thin pointers. Remove useless variable.
7842 (finish_fat_pointer_type): Make global and move to...
7843 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7844 (get_dummy_type): New function.
7845 (build_dummy_unc_pointer_types): Likewise.
7846 (gnat_pushdecl): Propage the name to the anonymous variants only.
7847 (update_pointer_to): Only adjust the pointer types in the unconstrained
7850 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7852 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7853 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7854 if this is a Taft amendment type and the full declaration is available.
7855 * gcc-interface/trans.c (process_type): Likewise.
7856 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7857 (process_freeze_entity): Likewise.
7858 * gcc-interface/utils.c (dummy_global): New static variable.
7859 (gnat_write_global_declarations): If there are types declared as used
7860 at the global level, insert them in the global hash table.
7862 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7864 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7865 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7866 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7868 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7869 flag of the type accordingly.
7870 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7872 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7874 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7875 finalizing types when updating the pointers to the designated type.
7876 <all>: Finalize the deferred types even if we didn't defer processing
7877 of incomplete types in this invocation.
7879 2011-04-01 Olivier Hainque <hainque@adacore.com>
7880 Nicolas Setton <setton@adacore.com>
7881 Eric Botcazou <ebotcazou@adacore.com>
7883 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7884 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7886 2011-03-28 Kai Tietz <ktietz@redhat.com>
7888 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7890 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7891 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7893 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7895 2011-03-28 Tristan Gingold <gingold@adacore.com>
7898 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7899 Use ada output of gnatbind.
7900 (ada/b_gnatb.adb): Ditto.
7901 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7902 (ada.mostlyclean, ada.stage1)
7903 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7904 (ada.stagefeedback): Adjust.
7905 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7906 Use ada output of gnatbind.
7907 (b_gnatm.adb): Ditto.
7908 (b_gnatl.o, b_gnatm.o): New rules.
7910 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7912 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7913 for the padded type built to support a specified size or alignment.
7915 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7917 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7918 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7919 unconditionally to the end of the unit when the designated type is
7921 <all>: Rename local variable. Attempt to un-defer types only and do it
7922 for limited_with'ed types as well.
7923 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7924 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7925 consistently and remove redundant call to finalize_from_with_types.
7927 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7929 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7930 subprograms without a previous spec declared in the same unit.
7931 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7932 subprograms at the end of the unit instead of at the beginning.
7933 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7934 isn't public for the special handling of non-inline functions nested
7935 inside inline external functions.
7937 2011-03-25 Jeff Law <law@redhat.com>
7939 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7941 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7943 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7944 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7945 to compute Set_Size_Depends_On_Discriminant.
7946 (Layout_Type): Call it on array types in back-end layout mode.
7947 * sem_util.adb (Requires_Transient_Scope): Return true for array
7948 types only if the size depends on the value of discriminants.
7949 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7950 type if the RHS is a call to a function that returns an unconstrained
7951 type with default discriminant.
7953 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7955 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7956 non-conversion to the nominal result type at the end.
7958 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7960 * gcc-interface/trans.c (create_temporary): New function taken from...
7961 (create_init_temporary): ...here. Call it.
7962 (call_to_gnu): Create the temporary for the return value early, if any.
7963 Create it for a function with copy-in/copy-out parameters if there is
7964 no target; in other cases of copy-in/copy-out, use another temporary.
7965 Push the new binding level lazily. Add and rename local variables.
7967 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7969 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7971 (set_rm_size): Likewise.
7973 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7975 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7976 for the padded type built in order to support a specified alignment.
7977 Fix incorrect formatting.
7979 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7982 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7984 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7986 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7987 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7988 to the end of the list. Adjust recursive call. Rename local variable.
7989 If REORDER is true, reorder components of the record type.
7990 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7991 components_to_record and adjust the parameter list.
7993 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7995 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7996 disabled, use the variable for bounds of loop iteration scheme.
7998 2011-03-21 Kai Tietz <ktietz@redhat.com>
8001 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8003 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8005 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8006 out whether the expression is read-only. Short-circuit placeholder
8007 case and rename a couple of local variables.
8009 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8011 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8012 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8013 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8014 (convert): Deal with conversions from a smaller form type specially.
8016 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8018 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8019 its argument, except for the special -I- switch.
8021 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8023 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8026 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8028 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8030 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8032 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8034 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8035 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8036 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8037 Do not generate the check directly, instead instantiate the template
8038 check present in the descriptor.
8039 (make_descriptor_field): Move around.
8040 (build_vms_descriptor32): Build a template check in the POINTER field.
8041 (build_vms_descriptor): Remove useless suffixes.
8042 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8044 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8047 * targext.c: Include target files if IN_RTS is defined.
8049 2011-01-26 Richard Guenther <rguenther@suse.de>
8052 * targext.c: Include config.h.
8053 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8056 2011-01-04 Pascal Obry <obry@adacore.com>
8057 Eric Botcazou <ebotcazou@adacore.com>
8059 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8061 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8063 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8064 end-of-case on the end label and its associated gotos, if any.
8066 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8068 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8069 expressions of the parameter cache within the statement group of
8072 2011-01-04 Olivier Hainque <hainque@adacore.com>
8073 Eric Botcazou <ebotcazou@adacore.com>
8075 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8076 (set_end_locus_from_node): New function.
8077 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8078 make and the function end_locus.
8079 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8080 for the elaboration subprogram.
8081 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8082 set the end_locus of the expression as well.
8084 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8087 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8088 variables that are referenced in exception handlers volatile.
8092 Copyright (C) 2011 Free Software Foundation, Inc.
8094 Copying and distribution of this file, with or without modification,
8095 are permitted in any medium without royalty provided the copyright
8096 notice and this notice are preserved.