]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/ChangeLog
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / ChangeLog
1 2011-08-04 Emmanuel Briot <briot@adacore.com>
2
3 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
4 Add support for overriding the Project_Path in aggregate projects.
5
6 2011-08-04 Robert Dewar <dewar@adacore.com>
7
8 * a-cofove.ads: Minor reformatting.
9
10 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
11
12 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
13 on the generated code.
14 (Build_Finalize_Statements): Update the comment on the generated code.
15 (Build_Initialize_Statements): Update the comment on the generated code.
16 (Build_Object_Declarations): Add local variable Result. The object
17 declarations are now built in sequence.
18 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
19 RE_Unit_Table.
20
21 2011-08-04 Robert Dewar <dewar@adacore.com>
22
23 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
24
25 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
26
27 * einfo.ads (Elaboration_Entity): Document new definition and use.
28 (Elaboration_Entity_Required): Adjust to above change.
29 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
30 * exp_ch12.adb: And with and use for Snames.
31 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
32 * exp_util.adb (Set_Elaboration_Flag): Likewise.
33 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
34 <Check_Unit_Name>: Deal with N_Expanded_Name.
35 <Attribute_Elaborated>: Extend to all unit names.
36 * sem_elab.adb: And with and use for Uintp.
37 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
38 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
39 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
40 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
41 from Gen_Adainit_Ada.
42 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
43 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
44 case, do not call System.Standard_Library.Adafinal; instead call
45 finalize_library if needed.
46 (Gen_Adafinal_C): Likewise.
47 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
48 non-main program case.
49 (Gen_Adainit_C): Generate a couple of external declarations here.
50 In the main program case, set SSL.Finalize_Library_Objects.
51 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
52 (Gen_Elab_Calls_C): Likewise.
53 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
54 (Gen_Finalize_Library_C): Likewise. Generate a full function.
55 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
56 objects here.
57 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
58 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
59 Gen_Adafinal_Ada.
60 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
61 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
62 of external declarations.  Call Gen_Finalize_Library_C.
63
64 2011-08-04 Emmanuel Briot <briot@adacore.com>
65
66 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
67 Compute_Compilation_Phases): new subprogram.
68 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
69 The number of mains as well as the various compilation phases that
70 need to be run are now project tree specific, since various
71 aggregated trees might have different requirements. In particular,
72 they do not all require bind or link phases.
73
74 2011-08-04 Emmanuel Briot <briot@adacore.com>
75
76 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
77 (Project_Tree_Appdata): New type.
78 It is now possible to associate application-specific data to a project
79 tree. In particular, this is used in the gprbuild builder to avoid a
80 number of global tables and htables, especially now that there can be
81 several project trees loaded at once because of aggregate projects.
82 (Debug_Name): new procedure.
83 * projects.texi: Clarify syntax of "**" for Source_Dirs
84
85 2011-08-03 Emmanuel Briot <briot@adacore.com>
86
87 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
88 the "roots" for a main.
89 (Fill_From_Project): add support for aggregate projects. Main units
90 in aggregated projects are now automatically added in the list of
91 files to build (although this fails later on in gprbuild, because
92 these files are not using the root proejct tree, so this needs
93 further cleanup)
94 * gcc-interface/Make-lang.in: Update dependencies.
95
96 2011-08-03 Yannick Moy <moy@adacore.com>
97
98 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
99 conditional expression in ALFA.
100 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
101 expressions as not in ALFA.
102
103 2011-08-03 Robert Dewar <dewar@adacore.com>
104
105 * a-cofove.adb: Minor reformatting.
106
107 2011-08-03 Emmanuel Briot <briot@adacore.com>
108
109 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
110 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
111 gprbuild sources.
112 These packages are more logically placed in the Queue package, since
113 they manipulate the queue. It is also likely that they can be adapted
114 for gnatmake, thus sharing more code.
115 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
116 that we could move the above.
117
118 2011-08-03 Emmanuel Briot <briot@adacore.com>
119
120 * errutil.adb (Finalize): clean up the list of error messages on exit.
121 Calling this subprogram multiple times will no longer show duplicate
122 error messages on stderr.
123
124 2011-08-03 Emmanuel Briot <briot@adacore.com>
125
126 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
127 Getopt_Switches when we have already define a command line
128 configuration.
129
130 2011-08-03 Yannick Moy <moy@adacore.com>
131
132 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
133 in ALFA. Instead, they are considered as assertions to prove.
134 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
135 nodes as not in ALFA. Instead, include conditional expressions in ALFA
136 if they have no ELSE part, or if they occur in pre- and postconditions,
137 where the Condition cannot have side-effects in ALFA
138 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
139 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
140 Instead, include type conversion between scalar types in ALFA.
141 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
142 if-and-only-if its type is in ALFA.
143
144 2011-08-03 Thomas Quinot <quinot@adacore.com>
145
146 * scos.adb, get_scos.adb, put_scos.adb
147 New code letter for decisions: G (entry guard)
148 * par_sco.adb
149 (Traverse_Subprogram_Body): Rename to...
150 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
151 (Traverse_Protected_Body): New subprogram
152 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
153 protected bodies and entry bodies.
154
155 2011-08-03 Yannick Moy <moy@adacore.com>
156
157 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
158 entities with get/set subprograms, which is set on procedure entities
159 generated by the compiler for a postcondition.
160 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
161 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
162 entity for a declaration
163 (Get_Unique_Entity_For_Decl): new function returning an entity which
164 represents a declaration, so that matching spec and body have the same
165 entity.
166
167 2011-08-03 Robert Dewar <dewar@adacore.com>
168
169 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
170 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
171
172 2011-08-03 Yannick Moy <moy@adacore.com>
173
174 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
175 library-level because retriction No_Implicit_Dynamic_Code in the
176 front-end prevents its definition as a local subprogram
177 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
178 for reuse in other contexts
179 (Traverse_Declarations_Or_Statements,
180 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
181 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
182 procedures take a callback parameter to be called on all declarations
183 * lib-xref.ads
184 (Traverse_All_Compilation_Units): new generic function to traverse a
185 compilation unit and call a callback parameter on all declarations
186
187 2011-08-03 Javier Miranda <miranda@adacore.com>
188
189 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
190 in Java since they are always enclosed in a namespace that
191 differentiates them, and overloaded entities are supported by the VM.
192
193 2011-08-03 Ed Schonberg <schonberg@adacore.com>
194
195 * checks.adb (Determine_Range): If a computed bound of an operation is
196 outside the range of the base type of the expression, and overflow
197 checks are enabled, the result is unknown and cannot be used for any
198 subsequent constant folding.
199 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
200 unknown, so is the result of the comparison.
201
202 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
203
204 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
205 From_Abort. When finalization was triggered by an abort, propagate
206 Standard'Abort_Signal rather than Program_Error.
207 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
208 From_Abort.
209 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
210 From_Abort. When finalization was triggered by an abort, propagate
211 Standard'Abort_Signal rather than Program_Error.
212 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
213 From_Abort.
214 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
215 Abort_Id. Update the calls to Build_Object_Declarations and
216 Build_Raise_Statement to include Abort_Id.
217 (Build_Adjust_Statements): New local variable Abort_Id. Update the
218 calls to Build_Object_Declarations and Build_Raise_Statement to include
219 Abort_Id.
220 (Build_Finalize_Statements): New local variable Abort_Id. Update the
221 calls to Build_Object_Declarations and Build_Raise_Statement to include
222 Abort_Id.
223 (Build_Components): Create an entity for Abort_Id when exceptions are
224 allowed on the target.
225 (Build_Finalizer): New local variable Abort_Id.
226 (Build_Initialize_Statements): New local variable Abort_Id. Update the
227 calls to Build_Object_Declarations and Build_Raise_Statement to include
228 Abort_Id.
229 (Build_Object_Declarations): Add new formal Abort_Id. Create the
230 declaration of flag Abort_Id to preserve the original abort status
231 before finalization code is executed.
232 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
233 runtime routine Raise_From_Controlled_Operation.
234 (Create_Finalizer): Update the call to Build_Raise_Statement to include
235 Abort_Id. Update the call to Build_Object_Declarations to include
236 Abort_Id. Update the layout of the finalizer body.
237 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
238 (Process_Transient_Objects): New local variable Abort_Id. Remove the
239 clunky code to create all flags and objects related to
240 exception propagation and replace it with a call to
241 Build_Object_Declarations. Update the call to Build_Raise_Statement to
242 include Abort_Id.
243 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
244 Add new formal Abort_Id and associated comment on its use.
245 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
246 on its use.
247 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
248 Remove the clunky code to create all flags and objects related to
249 exception propagation and replace it with a call to
250 Build_Object_Declarations. Update the call to Build_Raise_Statement.
251
252 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
253
254 * s-tassta.adb: Fix minor typos.
255
256 2011-08-03 Robert Dewar <dewar@adacore.com>
257
258 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
259 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
260
261 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
262
263 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
264 to packages. This ensures that the finalizer body will not end up
265 inside the freeze node.
266 (Process_Declarations): Add code to detect whether a freeze node has a
267 nested finalization collection.
268
269 2011-08-03 Pascal Obry <obry@adacore.com>
270
271 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
272 (Current_Session): Return a not null access to Session_Type.
273 (Default_Session): Likewise.
274
275 2011-08-03 Robert Dewar <dewar@adacore.com>
276
277 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
278 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
279
280 2011-08-03 Pascal Obry <obry@adacore.com>
281
282 * g-awk.ads: Minor comment fix.
283
284 2011-08-03 Sergey Rybin <rybin@adacore.com>
285
286 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
287 the tree structure related to discriminant constraints.
288 Original_Discriminant cannot be used any more for computing the
289 defining name for the reference to a discriminant.
290
291 2011-08-03 Ed Schonberg <schonberg@adacore.com>
292
293 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
294 function is not visibly tagged, this is not a dispatching call and
295 therfore is not Tag_Indeterminate, even if the function is marked as
296 dispatching on result.
297
298 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
299
300 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
301 (Expand_N_Free_Statement): Add a guard to protect against run-times
302 which do not support controlled types.
303 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
304 against run-times which do not support controlled types.
305 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
306 against run-times which do not support controlled types.
307 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
308 against run-times which do not support controlled types.
309 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
310 protect against run-times which do not support controlled types.
311
312 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
313
314 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
315 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
316
317 2011-08-03 Ed Schonberg <schonberg@adacore.com>
318
319 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
320 modified in the source, to prevent spurious warnings when compiling
321 with -gnatg.
322
323 2011-08-03 Thomas Quinot <quinot@adacore.com>
324
325 * a-except-2005.adb: Minor reformatting.
326
327 2011-08-03 Ed Schonberg <schonberg@adacore.com>
328
329 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
330 is a renaming declaration in the private part of a package, do not emit
331 a warning that the with_clause could be moved because the renaming may
332 be used in the body or in a child unit.
333
334 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
335
336 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
337 Propagate the Comes_From_Source attribute from the original return
338 object to the renaming.
339
340 2011-08-03 Jose Ruiz <ruiz@adacore.com>
341
342 * exp_ch7.adb (Build_Raise_Statement): Do not call
343 Raise_From_Controlled_Operation when this routine is not present in
344 the run-time library.
345 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
346 libraries (Ravenscar), tasks are non-terminating, and protected objects
347 and tasks can only appear at library level, so we do not want
348 finalization of protected objects nor tasks.
349 * exp_intr.adb: Minor clarification in comment.
350 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
351 Gen_Output_File_C): Remove references to finalization of library-level
352 objects when using restricted run-time libraries.
353
354 2011-08-03 Ed Schonberg <schonberg@adacore.com>
355
356 * sem_ch3.adb (Build_Discriminant_Constraints): Set
357 Original_Discriminant only if the parent type is a generic formal.
358
359 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
360
361 * exp_ch13.adb: Add with and use clause for Targparm;
362 (Expand_N_Free_Statement): Prevent the generation of a custom
363 Deallocate on .NET/JVM targets since this requires pools and address
364 arithmetic.
365 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
366 .NET/JVM targets, attach the newly allocated object to the access
367 type's finalization collection. Do not generate a call to
368 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
369 exist in the runtime.
370 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
371 create a custom Allocate for object that do not require initialization.
372 Attach a newly allocated object to the access type's finalization
373 collection on .NET/JVM.
374 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
375 assignment of controlled types on .NET/JVM. The two hidden pointers
376 Prev and Next and stored and later restored after the assignment takes
377 place.
378 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
379 kludge for .NET/JVM to recognize a particular piece of code coming from
380 Heap_Management and change the call to Finalize into Deep_Finalize.
381 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
382 finalization collections on .NET/JVM only for types derived from
383 Controlled. Separate the association of storage pools with a collection
384 and only allow it on non-.NET/JVM targets.
385 (Make_Attach_Call): New routine.
386 (Make_Detach_Call): New routine.
387 (Process_Object_Declarations): Suppress the generation of
388 build-in-place return object clean up code on .NET/JVM since it uses
389 pools.
390 * exp_ch7.ads (Make_Attach_Call): New routine.
391 (Make_Detach_Call): New routine.
392 * exp_intr.adb Add with and use clause for Targparm.
393 (Expand_Unc_Deallocation): Detach a controlled object from a collection
394 on .NET/JVM targets.
395 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
396 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
397 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
398 names used in finalization.
399
400 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
401
402 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
403 (Attach, Detach): Lock the current task when chaining an object onto a
404 collection.
405
406 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
407
408 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
409 Rewritten to create the message strings when the exception is not
410 raised by an abort during finalization.
411 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
412 Raise_From_Controlled_Operation and update its associated comment.
413 * a-fihema.ads, a-fihema.adb: New GNAT unit.
414 Ada.Finalization.Heap_Management provides key functionality
415 associated with controlled objects on the heap, their creation,
416 finalization and reclamation. Type Finalization_Collection is
417 effectively a wrapper which sits ontop of a storage pool and performs
418 all necessary bookkeeping for all the objects it contains. Each
419 access-to-controlled or access-to-class-wide type receives a collection
420 as part of its expansion. The compiler generates buffer code and
421 invokes Allocate / Deallocate to create and destroy allocated
422 controlled objects.
423 * a-finali.adb ("="): Removed.
424 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
425 fields Prev and Next.
426 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
427 A library unit with at least one controlled object on the library level
428 has a special finalizer which is invoked by the binder. To signal this,
429 ali files carry field PF.
430 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
431 associated comment on field usage.
432 * a-tags.adb (Get_RC_Offset): Removed.
433 (Needs_Finalization): New routine.
434 * a-tags.ads: Update the structure of the GNAT dispatch tables.
435 Dispatch tables now carry field Needs_Finalization which provides
436 runtime indication whether a type is controlled or has controlled
437 components or both. Remove field RC_Offset.
438 (Get_RC_Offset): Removed along with its associated pragma Export.
439 Since tagged types with controlled components no longer carry hidden
440 field _controller, the special mechanism to retrieve its location is no
441 longer needed.
442 (Needs_Finalization): New routine.
443 * atree.ads, atree.adb (Elist24): New routine.
444 (Set_Elist24): New routine.
445 * atree.h: Add a define clause for Elist24.
446 * bindgen.adb New library-level variable Lib_Final_Built.
447 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
448 presence of a VM target, the routine generates calls to the proper
449 library finalization routine.
450 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
451 targets. Set the correct library finalization routine depending on
452 whether the library has controlled objects or this is a VM compilation.
453 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
454 to library-level finalizers of compiled units in reverse order of
455 elaboration. It also produces exception management code and reraises a
456 potential exception after all units have been finalized.
457 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
458 library-level finalizers of compiled units in reverse order of
459 elaboration.
460 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
461 definitions of all library-level finalizers available to the compilation
462 (Gen_Main_Ada): Directly call Adafinal which now contails all target
463 dependent code.
464 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
465 System.Standard_Library.Adafinal directly. If the library needs
466 finalization actions, create the sequence of finalization calls.
467 (Gen_Output_File_Ada): Alphabetize local variables and constants.
468 Generate a with clause for System.Soft_Links when compiling for a VM.
469 Remove the code which imports System.Standard_Library.Adafinal as
470 Do_Finalize. Generate the library finalization routine.
471 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
472 If the library needs finalization actions, create all the definitions
473 of library- level finalizers.
474 (Has_Finalizer): New routine. Determines whether at least one compiled
475 unit has a library-level finalizer.
476 Add type Qualification_Mode.
477 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
478 * einfo.adb: New usage of field 15 as Return_Flag.
479 Remove Finalization_Chain_Entity from the usages of field 19.
480 Remove Associated_Final_Chain from the usages of field 23.
481 New usage of field 23 as Associated_Collection.
482 New usage of field 24 as Finalizer.
483 New usage of flag 252 as Is_Processed_Transient.
484 (Associated_Final_Chain): Removed.
485 (Associated_Collection): New routine.
486 (Finalization_Chain_Entity): Removed.
487 (Finalizer): New routine.
488 (Is_Finalizer): New routine.
489 (Is_Processed_Transient): New routine.
490 (Return_Flag): New routine.
491 (Set_Associated_Final_Chain): Removed.
492 (Set_Associated_Collection): New routine.
493 (Set_Finalization_Chain_Entity): Removed.
494 (Set_Finalizer): New routine.
495 (Set_Is_Processed_Transient): New routine.
496 (Set_Return_Flag): New routine.
497 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
498 displayed flags.
499 (Write_Field8_Name): Alphabetize the output.
500 (Write_Field11_Name): Alphabetize the output.
501 (Write_Field12_Name): Alphabetize the output.
502 (Write_Field13_Name): Alphabetize the output.
503 (Write_Field14_Name): Alphabetize the output.
504 (Write_Field15_Name): Alphabetize the output.
505 (Write_Field16_Name): Alphabetize the output.
506 (Write_Field17_Name): Alphabetize the output.
507 (Write_Field18_Name): Alphabetize the output.
508 (Write_Field19_Name): Alphabetize the output. Remove the output of
509 Finalization_Chain_Entity.
510 (Write_Field20_Name): Alphabetize the output.
511 (Write_Field21_Name): Alphabetize the output.
512 (Write_Field22_Name): Alphabetize the output.
513 (Write_Field23_Name): Alphabetize the output. Remove the output of
514 Associated_Final_Chain. Add output for Associated_Collection.
515 (Write_Field24_Name): Alphabetize the output.
516 (Write_Field25_Name): Add output for Finalizer.
517 (Write_Field26_Name): Alphabetize the output.
518 (Write_Field27_Name): Alphabetize the output.
519 (Write_Field28_Name): Alphabetize the output.
520 * einfo.ads: Add new field description for Associated_Collection and
521 its uses in nodes.
522 Remove Associated_Final_Chain and its uses in nodes.
523 Remove Finalization_Chain_Entity and its uses in nodes.
524 Add new field description for Finalizer and its uses in nodes.
525 Add new synthesized attribute Is_Finalizer.
526 Add new flag description for Is_Processed_Transient and its uses in
527 nodes.
528 Add new field description for Return_Flag and its uses in nodes.
529 (Associated_Final_Chain): Removed along with its pragma Inline.
530 (Associated_Collection): New routine and pragma Inline.
531 (Finalization_Chain_Entity): Removed along with its pragma Inline.
532 (Finalizer): New routine and pragma Inline.
533 (Is_Finalizer): New routine and pragma Inline.
534 (Is_Processed_Transient): New routine and pragma Inline.
535 (Return_Flag): New routine and pragma Inline.
536 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
537 (Set_Associated_Collection): New routine and pragma Inline.
538 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
539 (Set_Finalizer): New routine and pragma Inline.
540 (Set_Is_Processed_Transient): New routine and pragma Inline.
541 (Set_Return_Flag): New routine and pragma Inline.
542 * exp_aggr.adb: Alphabetize subprograms.
543 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
544 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
545 associated comments. Remove local variables External_Final_List and
546 Attach.
547 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
548 Ancestor. Remove the retrieval of finalization lists. Update the call to
549 Make_Adjust_Call.
550 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
551 lists. Update the call to Late_Expansion.
552 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
553 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
554 (Gen_Assign): Remove the retrieval of the finalization list used to
555 build the assignment. Update the calls to Make_Init_Call and
556 Make_Adjust_Call.
557 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
558 Remove the mechanism to determine attachment levels and finalization
559 list retrieval. Remove the processing for coextensions.
560 (Init_Controller): Removed. Controllers no longer exist.
561 (Late_Expansion): Remove formals Flist and Obj along with their
562 associated comments. Update the calls to Build_Record_Aggr_Code and
563 Build_Array_Aggr_Code.
564 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
565 (Expand_N_Freeze_Entity): Add special processing for finalizers which
566 appear in entry bodies, protected subprograms and task bodies.
567 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
568 * exp_ch3.adb (Add_Final_Chain): Removed.
569 (Build_Array_Init_Proc): Alphabetize local variables.
570 (Build_Assignment): Alphabetize local variables. Update the call to
571 Maked_Adjust_Call.
572 (Build_Class_Wide_Master): Rename local variables to better reflect
573 their role.
574 (Build_Discriminant_Assignments): Code reformatting.
575 (Build_Init_Call_Thru): Code reformatting.
576 (Build_Init_Procedure): Code reformatting. Generate a special version
577 of Deep_Finalize which is capable of finalizing all initialized
578 components and ignore the rest.
579 (Build_Init_Statements): Rename local variables to better reflect their
580 role.
581 Reimplement the mechanism to include the creation and update of an index
582 variable called a "counter". It is used as a bookmark for tracing
583 initialized and non-initialized components.
584 (Build_Initialization_Call): Remove local variable Controller_Typ.
585 Alphabetize all local variables. Remove the initialization of the
586 record controller and update the call to Make_Init_Call.
587 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
588 New local variable Counter.
589 (Constrain_Array): Alphabetize.
590 (Expand_Freeze_Array_Type): Create a collection instead of a
591 finalization list.
592 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
593 Finalize_Address which is used in conjunction with allocated controlled
594 objects.
595 (Expand_N_Object_Declaration): Remove the creation of a finalization
596 list for anonymous access types. Update the calls to Make_Init_Call and
597 Make_Adjust_Call.
598 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
599 retrieval of finalization lists. Remove the expansion of the record
600 controller. Create TSS primitive Finalize_Address used in conjunction
601 with controlled objects on the heap. Create finalization collections
602 for access-to-controlled record components.
603 (Expand_Record_Controller): Removed.
604 (Freeze_Type): Remove the freezing of record controllers. Freezing of
605 class-wide types now requires additional processing. Create
606 finalization collections for access-to-controlled types.
607 (Increment_Counter): New routine.
608 (Make_Counter): New routine.
609 (Make_Eq_If): Remove the mention of Name_uController.
610 (Make_Predefined_Primitive_Specs): There is no longer need to skip
611 types coming from System.Finalization_Root.
612 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
613 (Predefined_Primitive_Bodies): There is no longer need to skip types
614 coming from System.Finalization_Root.
615 (Stream_Operation_OK): Do not generate stream routines for
616 type Ada.Finalization.Heap_Management.Finalization_Collection.
617 * exp_ch3.ads: Alphabetize subprograms.
618 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
619 Add with and use clause for Lib.
620 (Complete_Coextension_Finalization): Removed.
621 (Complete_Controlled_Allocation): New routine. Create a finalization
622 collection for anonymous access-to-controlled types. Create a custom
623 Allocate which interfaces with the back end and the machinery in
624 Heap_Management.
625 (Expand_Allocator_Expression): Add necessary calls to
626 Complete_Controlled_Allocation. Remove the retrieval of finalization
627 lists. Update the calls to Make_Adjust_Call. Generate a call to
628 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
629 the associated collection.
630 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
631 Code clean up. Remove the retrieval of finalization lists and
632 attachment levels.
633 Update the call to Make_Init_Call. Generate a call to
634 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
635 the associated collection.
636 (Get_Allocator_Final_List): Removed. Finalization lists are not
637 available.
638 (Suitable_Element): Remove the mention of Name_uController.
639 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
640 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
641 the left hand side, carry out the assignment and adjust the left hand
642 side.
643 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
644 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
645 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
646 BIP_Collection and BIPcollection.
647 (Build_Heap_Allocator): New routine used to allocate the return object
648 of a build-in-place function onto a collection.
649 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
650 (Expand_Call): Do not replace direct calls to Deep routines with their
651 aliases.
652 (Expand_N_Extended_Return_Statement): Give all variables shorter names
653 and update their occurrences. Add a special return flag to monitor the
654 [ab]normal execution of the function. The flag is set right before the
655 return statement.
656 Rewrite the mechanism used to allocate a build-in-place return object
657 on the heap or on a storage pool.
658 (Is_Direct_Deep_Call): New routine.
659 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
660 build-in-place function call instead of a final list. Build a call to
661 Set_Finalize_Address_Ptr to decorate the associated collection.
662 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
663 order to name the build-in-place function call's result for later
664 finalization. Add a collection to a build-in-place function call
665 instead of a final list.
666 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
667 build-in-place function call instead of a final list. Remove the code
668 which moves one final list and transforms it into the actual in a
669 nested build-in-place call.
670 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
671 build-in-place function call instead of a final list.
672 (Move_Final_List): Removed.
673 (Needs_BIP_Collection): New routine.
674 (Needs_BIP_Final_List): Removed.
675 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
676 enumeration type BIP_Formal_Kind.
677 Update the related comment.
678 (Needs_BIP_Collection): New routine.
679 (Needs_BIP_Final_List): Removed.
680 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
681 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
682 majority of subprograms in this unit. Add Name_Finalize_Address to
683 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
684 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
685 statements for an array type.
686 (Build_Adjust_Statements): Create the adjust statements for a record
687 type.
688 (Build_Cleanup_Statements): New routine. A procedure which given any
689 construct containing asynchronous calls, references to _master, or is a
690 task body, a task allocation or a protected body produces the necessary
691 runtime calls to clean up these constructs.
692 (Build_Exception_Handler): New routine.
693 (Build_Final_List): Removed.
694 (Build_Finalization_Collection): New routine. A core procedure which
695 creates a collection to service heap allocated controlled objects
696 associated with an access-to-controlled type.
697 (Build_Finalize_Statements): Create the finalization statements for a
698 record types.
699 (Build_Finalizer): New routine. A core procedure which given any
700 construct with declarations and/or statements detects all objects which
701 need any type of clean up (controlled objects, protected objects) and
702 generates all necessary code to clean up the said objects in the proper
703 order.
704 (Build_Finalizer_Call): New routine.
705 (Build_Initialize_Statements): Create the initialization statements for
706 an array type. The generated routine contains code to finalize partially
707 initialized arrays.
708 (Build_Object_Declarations): New routine.
709 (Build_Raise_Statement): New routine.
710 (Clean_Simple_Protected_Objects): Removed.
711 (Controller_Component): Removed.
712 (Enclosing_Function): New routine.
713 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
714 either declarations or statements or both.
715 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
716 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
717 package.
718 (Find_Final_List): Removed.
719 (Global_Flist_Ref): Removed.
720 (In_Finalization_Root): Removed.
721 (Insert_Actions_In_Scope_Around): Determine the range of the transient
722 scope in terms of tree nodes. Process all transient variables within
723 that range.
724 (Make_Adjust_Call): Rewritten. There is no longer an attach call
725 generated after the adjust.
726 (Make_Attach_Call): Removed.
727 (Make_Call): New routine.
728 (Make_Clean): Removed.
729 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
730 build routines.
731 (Make_Deep_Proc): Rewritten to generate the new profile signature used
732 in Deep routines.
733 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
734 build routines.
735 (Make_Final_Call): Modified to simply create a call to either
736 Deep_Finalize or Finalize.
737 (Make_Finalize_Address_Body): New routine.
738 (Make_Finalize_Address_Stmts): New routine. A function which produces
739 TSS primitive Finalize_Address used in conjunction with heap allocated
740 controlled objects.
741 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
742 (Make_Init_Call): Rewritten. There is no longer an attach call
743 generated after initialization.
744 (Make_Local_Deep_Finalize): New routine.
745 (Make_Set_Finalize_Address_Ptr_Call): New routine.
746 (Make_Transient_Block): Remove the finalization list retrieval and
747 manipulation.
748 (Needs_Finalization): Moved to Exp_Util.
749 (Parent_Field_Type): New routine.
750 (Preprocess_Components): New routine.
751 (Process_Transient_Objects): New routine.
752 (Wrap_HSS_In_Block): New routine.
753 (Wrap_Transient_Declaration): Remove finalization list management and
754 controller insertion.
755 (Wrap_Transient_Expression): Code reformatting.
756 (Wrap_Transient_Statement): Code reformatting.
757 * exp_ch7.ads (Build_Final_List): Removed.
758 (Build_Finalization_Collection): New routine.
759 (Build_Raise_Statement): New routine.
760 (Controller_Component): Removed.
761 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
762 (Find_Final_List): Removed.
763 (In_Finalization_Root): Removed.
764 (Is_Simple_Protected_Type): Update related comment.
765 (Make_Adjust_Call): New parameter profile and associated comments.
766 (Make_Attach_Call): Removed.
767 (Make_Final_Call): New parameter profile and associated comments.
768 (Make_Finalize_Address_Body): New routine.
769 (Make_Init_Call): New parameter profile and associated comments.
770 (Make_Local_Deep_Finalize): New routine.
771 (Make_Set_Finalize_Address_Ptr_Call): New routine.
772 (Needs_Finalization): Moved to Exp_Util.
773 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
774 (Expand_N_Protected_Body): Remove the handling of finalization lists.
775 (Find_Protection_Type): Moved to Exp_Util.
776 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
777 (Make_DT): Update sequence of dispatch table initialization. Remove the
778 initialization of field RC_Offset. Add initialization of field Needs_
779 Finalization.
780 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
781 Reimplement how an object is first finalized, then deallocated.
782 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
783 Code reformatting.
784 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
785 Register TSS_Finalize_Address with type TSS_Names.
786 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
787 procedure provides the interface between an allocation / deallocation
788 and the support machinery in Ada.Finalization.Heap_Management.
789 (Find_Init_Call): Code reformatting.
790 (Find_Init_Call_In_List): Code reformatting.
791 (Find_Protection_Type): Moved from Exp_Ch9.
792 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
793 (Has_Controlled_Coextensions): Removed.
794 (Has_Controlled_Objects): New routine.
795 (In_Library_Level_Package_Body): New routine.
796 (Insert_Action_After): New routine.
797 (Is_Finalizable_Transient): New routine. This predicate determines
798 whether an object declaration is one of the many variants of controlled
799 transients.
800 (Is_Null_Access_BIP_Func_Call): New routine.
801 (Is_Non_BIP_Func_Call): New routine.
802 (Is_Related_To_Func_Return): New routine.
803 (Needs_Finalization): Moved from Exp_Ch7.
804 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
805 (Find_Protection_Type): Moved from Exp_Ch9.
806 (Has_Controlled_Coextensions): Removed.
807 (Has_Controlled_Objects): New routine.
808 (In_Library_Level_Package_Body): New routine.
809 (Insert_Action_After): New routine.
810 (Is_Finalizable_Transient): New routine.
811 (Is_Null_Access_BIP_Func_Call): New routine.
812 (Is_Non_BIP_Func_Call): New routine.
813 (Is_Related_To_Func_Return): New routine.
814 (Needs_Finalization): Moved from Exp_ch7.
815 * expander.adb (Expand): Add a case for N_Free_Statement.
816 * freeze.adb (Freeze_All): Replace the generation of a finalization
817 list with a collection for access-to-controlled types.
818 (Freeze_Entity): Code reformatting.
819 (Freeze_Record_Type): Remove the freezing of a record controller
820 component.
821 (Freeze_Subprogram): Code reformatting.
822 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
823 finalization list.
824 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
825 has a library-level finalizer.
826 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
827 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
828 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
829 files. Add a-fihema to the list of object files.
830 * par-ch4.adb:
831 Alphabetize the associations in type Is_Parameterless_Attribute.
832 * rtsfind.ads: Ada.Finalization_List.Controller and
833 System.Finalization_Implementation are no longer a GNAT unit.
834 Update the range of type Ada_Finalization_Child. Remove the following
835 recoverable entities:
836
837 RE_Attach_To_Final_List
838 RE_Deep_Tag_Attach
839 RE_Finalize_List
840 RE_Finalize_One
841 RE_Finalizable_Ptr_Ptr
842 RE_Global_Final_List
843 RE_Limited_Record_Controller
844 RE_List_Controller
845 RE_Move_Final_List
846 RE_Record_Controller
847 RE_Simple_List_Controller
848
849 Add the following recoverable entities:
850
851 RE_Add_Offset_To_Address
852 RE_Allocate
853 RE_Base_Pool
854 RE_Deallocate
855 RE_Exception_Identity
856 RE_Finalization_Collection
857 RE_Finalization_Collection_Ptr
858 RE_Needs_Finalization
859 RE_Save_Library_Occurrence
860 RE_Set_Finalize_Address_Ptr
861 RE_Set_Storage_Pool_Ptr
862 RE_Storage_Count
863 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
864 Name_uController.
865 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
866 (First_Stored_Discriminant): Remove the mention of Name_uController.
867 * sem_aux.ads: Comment reformatting.
868 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
869 to redecorate an already existing class-wide type.
870 (Decorate_Tagged_Type): New parameter profile and associated comment.
871 Create a "shadow class-wide type" for a shadow entity.
872 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
873 of the final chain along with the associated comment.
874 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
875 Full_Desig and set it to the full view of the designated type.
876 Initialize the finalization collection to empty.
877 (Build_Derived_Record_Type): Alphabetize local variables. Code
878 reformatting.
879 (Collect_Fixed_Components): Remove the mention of Name_uController.
880 (Create_Constrained_Components): Remove the mention of Name_uController.
881 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
882 class-wide type of a shadow entity.
883 (Process_Full_View): Update the machinery which marks type
884 Limited_Controlled's entity as limited.
885 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
886 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
887 list, instead make a collection build-in-place formal.
888 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
889 a designated type in order to establish a match between the renaming
890 and the renamed entity.
891 (Find_Selected_Component): Add guard to prevent spurious exceptions
892 from being raised on .NET/JVM.
893 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
894 to the list of primitive that need special processing. Update arrays
895 C_Names and D_Names.
896 (Replace_Types): Handle class-wide types.
897 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
898 different parameter profile, look at the first formal.
899 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
900 use clauses for Exp_Util.
901 * sem_res.adb: Remove with and use clauses for Elists.
902 (Propagate_Coextensions): Removed.
903 (Resolve_Allocator): Do not propagate the list of coextensions from one
904 allocator to another.
905 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
906 Deaccessed_T to Desig_Typ.
907 (Enter_Name): Remove the mention of Name_uController.
908 (Gather_Components): Remove the mention of Name_uController.
909 (Incomplete_Or_Private_View): New routine.
910 (Is_Coextension_Root): Removed.
911 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
912 * sem_util.ads (Incomplete_Or_Private_View): New routine.
913 (Is_Coextension_Root): Removed.
914 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
915 Controlled types are now derived from a null tagged record. Remove
916 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
917 * sinfo.adb (Coextensions): Removed.
918 (Set_Coextensions): Removed.
919 * sinfo.ads: Remove Coextensions from the explanation of node fields
920 and its uses in nodes.
921 Update the field usage of N_Allocator.
922 (Coextensions): Removed along with its pragma Inline.
923 (Set_Coextensions): Removed along with its pragma Inline.
924 * snames.ads-tmpl: Remove names
925
926 Name_uClean
927 Name_uController
928 Name_uFinal_List
929 Name_uLocal_Final_List
930 Name_Finalization_Root
931 Name_Next
932 Name_Prev
933
934 Add names
935
936 Name_uFinalizer
937 Name_Finalize_Address
938 * s-pooglo.adb (Allocate): Add overriding indicator.
939 (Deallocate): Add overriding indicator.
940 (Storage_Size): Add overriding indicator.
941 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
942 than Finalize_Global_List.
943 (Null_Finalize_Global_List): Removed.
944 (Save_Library_Occurrence): New routine.
945 * s-soflin.ads: Remove variable Finalize_Global_List along with its
946 initialization. Add variable Finalize_Library_Objects along with its
947 pragma Export. Add variables Library_Exception and
948 Library_Exception_Set along with their pragma Export.
949 (Null_Finalize_Global_List): Removed.
950 (Save_Library_Occurrence): New routine.
951 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
952 rather than Finalize_Global_List.
953 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
954 of the constructed node.
955
956 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
957
958 * link.c: Include "auto-host.h" before system headers.
959
960 2011-08-03 Vincent Celier <celier@adacore.com>
961
962 * make.adb (Gnatmake): Add to table Library_Projs only library projects
963 that are not extended. Do not check if a library project that is
964 extended should be regenerated. Do not add to table Library_Paths the
965 libraries that are in extended projects. Link only with libraries that
966 are in libray projects that are not extended.
967 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
968 for a library project that is extended.
969
970 2011-08-03 Gary Dismukes <dismukes@adacore.com>
971
972 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
973 conforming subprogram renamings that appear to be completions if they
974 are not fully conformant.
975 Such renamings are homographs but not completions.
976 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
977 names in a subprogram renaming that appears in an instance.
978
979 2011-08-03 Ed Schonberg <schonberg@adacore.com>
980
981 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
982 not immutably limited, build actual subtype from expression to provide
983 proper bounds to caller.
984
985 2011-08-03 Gary Dismukes <dismukes@adacore.com>
986
987 * sem_ch8.adb: Minor comment correction.
988
989 2011-08-03 Thomas Quinot <quinot@adacore.com>
990
991 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
992 returning a limited array, use an extended return statement.
993
994 2011-08-03 Vincent Celier <celier@adacore.com>
995
996 * make.adb (Initialize): If --subdirs= is used, but no project file is
997 specified, attempt to create the specify subdir if it does not already
998 exist and use it as the object directory as if -D had been specified.
999
1000 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1001
1002 * s-tpopsp-vms.adb: New file.
1003 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
1004 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
1005
1006 2011-08-03 Emmanuel Briot <briot@adacore.com>
1007
1008 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
1009 package.
1010
1011 2011-08-03 Yannick Moy <moy@adacore.com>
1012
1013 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
1014 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
1015 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
1016 detect that an array has static bounds.
1017
1018 2011-08-03 Thomas Quinot <quinot@adacore.com>
1019
1020 * exp_dist.adb: Minor reformatting.
1021
1022 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1023
1024 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
1025 (ATCB_Key): Removed, not always used.
1026
1027 2011-08-03 Emmanuel Briot <briot@adacore.com>
1028
1029 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
1030 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
1031 most remaining global variables.
1032
1033 2011-08-03 Robert Dewar <dewar@adacore.com>
1034
1035 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
1036 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
1037 reformatting.
1038
1039 2011-08-03 Javier Miranda <miranda@adacore.com>
1040
1041 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
1042 that must be passed by copy in VM targets.
1043
1044 2011-08-03 Emmanuel Briot <briot@adacore.com>
1045
1046 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
1047 duplicates a similar htable now in the project tree.
1048
1049 2011-08-03 Claire Dross <dross@adacore.com>
1050
1051 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
1052 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
1053 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
1054 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
1055 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
1056 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
1057 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
1058 update.
1059
1060 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1061
1062 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
1063 (ATCB_Key): Removed, not always used.
1064 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
1065 s-taprop-posix.adb.
1066 * s-tpopsp-tls.adb: New file.
1067 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
1068 x86/x64/ia64/powerpc/sparc Linux.
1069
1070 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1071
1072 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
1073 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
1074
1075 2011-08-03 Thomas Quinot <quinot@adacore.com>
1076
1077 * rtsfind.ads, exp_dist.adb, exp_dist.ads
1078 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1079 Fix type selection for mapping integer types to PolyORB types.
1080
1081 2011-08-03 Bob Duff <duff@adacore.com>
1082
1083 * sem_ch7.adb: Minor comment clarification.
1084
1085 2011-08-03 Bob Duff <duff@adacore.com>
1086
1087 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
1088 an error analyzing a choice, skip further processing. Further
1089 processing could cause a crash or cascade errors.
1090
1091 2011-08-03 Emmanuel Briot <briot@adacore.com>
1092
1093 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
1094 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
1095 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
1096 prj-env.ads (Shared_Project_Tree_Data): new type
1097 An aggregate project and its aggregated trees need to share the common
1098 data structures used for lists of strings, packages,... This makes the
1099 code simpler since otherwise we have to pass the root tree (also used
1100 for the configuration file data) in addition to the current project
1101 tree. This also avoids ambiguities as to which tree should be used.
1102 And finally this saves a bit of memory.
1103 (For_Every_Project_Imported): new parameter Tree.
1104 Since aggregated projects are using a different tree, we need to let
1105 the caller know which tree to use to manipulate the returned project.
1106
1107 2011-08-03 Robert Dewar <dewar@adacore.com>
1108
1109 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
1110 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
1111 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
1112 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
1113
1114 2011-08-03 Javier Miranda <miranda@adacore.com>
1115
1116 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
1117 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
1118
1119 2011-08-03 Bob Duff <duff@adacore.com>
1120
1121 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
1122 the Base_Type.
1123
1124 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
1125
1126 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
1127 g-sehash.ads: Fix typo. Update header.
1128
1129 2011-08-03 Thomas Quinot <quinot@adacore.com>
1130
1131 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
1132 expansion.
1133
1134 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1135
1136 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
1137 prefixes of private types along with records, since the selector may be
1138 a discriminant.
1139 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
1140 private types along with records, since the selector may be a
1141 discriminant.
1142
1143 2011-08-03 Emmanuel Briot <briot@adacore.com>
1144
1145 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
1146
1147 2011-08-03 Javier Miranda <miranda@adacore.com>
1148
1149 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
1150 Tagged_Type_Expansion.
1151
1152 2011-08-03 Yannick Moy <moy@adacore.com>
1153
1154 * sem_res.adb
1155 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
1156 concatenation is the name of a constant
1157
1158 2011-08-03 Emmanuel Briot <briot@adacore.com>
1159
1160 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
1161 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
1162 (Process_Declarative_Items): new parameter Child_Env.
1163
1164 2011-08-03 Yannick Moy <moy@adacore.com>
1165
1166 * alfa.ads Update format of ALFA section in ALI file in order to add a
1167 mapping from bodies to specs when both are present
1168 (ALFA_Scope_Record): add components for spec file/scope
1169 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
1170 * lib-xref-alfa.adb
1171 (Collect_ALFA): after all scopes have been collected, fill in the spec
1172 information when relevant
1173 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
1174 present.
1175
1176 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1177
1178 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
1179 code unit to decide whether to add internally generated subprograms.
1180
1181 2011-08-03 Javier Miranda <miranda@adacore.com>
1182
1183 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
1184 * exp_ch9.adb
1185 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
1186 in VM targets.
1187
1188 2011-08-03 Emmanuel Briot <briot@adacore.com>
1189
1190 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
1191 code with Makeutl.Get_Switches.
1192 * prj-tree.adb: Update comment.
1193
1194 2011-08-03 Thomas Quinot <quinot@adacore.com>
1195
1196 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
1197 subprogram with a limited formal that does not support external
1198 streaming.
1199
1200 2011-08-03 Yannick Moy <moy@adacore.com>
1201
1202 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
1203 continuation line
1204 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
1205 not from current unit in two phases, because it is not possible to
1206 change the table while iterating over its content.
1207 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
1208
1209 2011-08-03 Sergey Rybin <rybin@adacore.com>
1210
1211 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
1212 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
1213
1214 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1215
1216 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
1217 and the component type is composite, this is ambiguous for predefined
1218 concatenation, but if the node is not overloaded and the entity is a use
1219 -defined function its profile can be used to resolve that aggregate.
1220
1221 2011-08-03 Robert Dewar <dewar@adacore.com>
1222
1223 * exp_ch4.adb: Minor code cleanup.
1224
1225 2011-08-03 Thomas Quinot <quinot@adacore.com>
1226
1227 * exp_dist.adb: Do not generate distribution stubs if serious errors
1228 have been diagnosed.
1229
1230 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1231
1232 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
1233 the first formal of a primitive operation, go to the base type to
1234 handle properly an access to a derived type with constrained
1235 discriminants.
1236 * sem_type.adb (Disambiguate): an immediately visible operator hides a
1237 user-defined function that is only use-visible.
1238
1239 2011-08-03 Robert Dewar <dewar@adacore.com>
1240
1241 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
1242 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
1243 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
1244 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
1245 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
1246 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
1247 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
1248 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
1249
1250 2011-08-03 Robert Dewar <dewar@adacore.com>
1251
1252 * repinfo.adb (List_Mechanism): Add handling of
1253 Convention_Ada_Pass_By_XXX.
1254 * sem_mech.adb (Set_Mechanism): Ditto.
1255 * sem_prag.adb (Process_Convention): Add entries for
1256 Convention_Ada_Pass_By_XXX.
1257 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
1258
1259 2011-08-03 Pascal Obry <obry@adacore.com>
1260
1261 * makeutl.adb: Minor reformatting.
1262
1263 2011-08-03 Vincent Celier <celier@adacore.com>
1264
1265 * fname-uf.adb
1266 (Get_File_Name) If the file cannot be found when there are no config
1267 pragmas file and May_Fail is True, return No_File instead of the file
1268 name, to be consistent.
1269
1270 2011-08-03 Pascal Obry <obry@adacore.com>
1271
1272 * adaint.c (__gnat_is_executable_file_attr): Avoid access
1273 to null pointer.
1274
1275 2011-08-03 Javier Miranda <miranda@adacore.com>
1276
1277 * sem_ch13.adb
1278 (Same_Representation): In VM targets the representation of arrays with
1279 aliased components differs from arrays with non-aliased components.
1280
1281 2011-08-03 Emmanuel Briot <briot@adacore.com>
1282
1283 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
1284 not systematically lower case attribute indexes that contain no "."
1285 Fix definition of several Naming attributes, which take
1286 a unit name as index and therefore should be case insensitive.
1287 Minor refactoring (reduce length of variable names).
1288
1289 2011-08-03 Emmanuel Briot <briot@adacore.com>
1290
1291 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
1292
1293 2011-08-03 Emmanuel Briot <briot@adacore.com>
1294
1295 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
1296 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
1297 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
1298 prj-tree.ads (Prj.Tree.Environment): new type.
1299
1300 2011-08-03 Emmanuel Briot <briot@adacore.com>
1301
1302 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
1303 prj-tree.adb, prj-tree.ads (Environment): new type.
1304
1305 2011-08-03 Emmanuel Briot <briot@adacore.com>
1306
1307 * prj-tree.ads: Remove unused variable.
1308
1309 2011-08-03 Yannick Moy <moy@adacore.com>
1310
1311 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
1312 issuing messages related to SPARK restriction violation.
1313
1314 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1315
1316 * sem_ch6.adb: guard against error nodes in return statements.
1317
1318 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1319
1320 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
1321 a warning can only appear on a configuration file, so emit warning
1322 without further checks.
1323
1324 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1325
1326 * s-interr.ads: add overriding keyword.
1327
1328 2011-08-03 Geert Bosch <bosch@adacore.com>
1329
1330 * exp_attr.adb: Fix minor typo.
1331
1332 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1333
1334 * par-ch4.adb: improve error recovery.
1335
1336 2011-08-03 Emmanuel Briot <briot@adacore.com>
1337
1338 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
1339 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
1340 to Errout_Handling.
1341
1342 2011-08-03 Emmanuel Briot <briot@adacore.com>
1343
1344 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
1345 "external" as an attribute name in aggregate projects.
1346
1347 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1348
1349 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
1350 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
1351 from 0, so we need to adjust.
1352
1353 2011-08-03 Emmanuel Briot <briot@adacore.com>
1354
1355 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
1356 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
1357
1358 2011-08-03 Yannick Moy <moy@adacore.com>
1359
1360 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
1361 restriction on overloaded entity if the entity is not an operator.
1362
1363 2011-08-03 Yannick Moy <moy@adacore.com>
1364
1365 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
1366 restrict.ads: Rename remaining Check_Formal_Restriction* into
1367 Check_SPARK_Restriction*.
1368
1369 2011-08-03 Emmanuel Briot <briot@adacore.com>
1370
1371 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
1372 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
1373 qualifier.
1374 (Project_Empty): removed
1375 (Empty_Project): new parameter Qualifier
1376 This is used to have fields specific to aggregate projects, cleaner
1377 New field to store the list of aggregated projects.
1378 (Check_Aggregate_Project): removed
1379 (Process_Aggregated_Projects, Free): new subprograms.
1380
1381 2011-08-03 Olivier Hainque <hainque@adacore.com>
1382
1383 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
1384
1385 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1386
1387 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
1388 explicit dereference of an unconstrained type, create a constrained
1389 subtype for it, as is done for function calls that return an
1390 unconstrained type.
1391
1392 2011-08-03 Thomas Quinot <quinot@adacore.com>
1393
1394 * g-pehage.adb (Finalize): Avoid possible double-free.
1395
1396 2011-08-03 Steve Baird <baird@adacore.com>
1397
1398 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
1399 Elab_Spec/Body attrs in CodePeer_Mode.
1400
1401 2011-08-03 Javier Miranda <miranda@adacore.com>
1402
1403 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
1404 low bound is not known at compile time but they have no others choice.
1405 Done because in this case the bounds can be obtained directly from the
1406 aggregate.
1407
1408 2011-08-03 Ed Falis <falis@adacore.com>
1409
1410 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
1411 on VxWorks SMP. Remove unusable constant ANY_CPU.
1412
1413 2011-08-03 Emmanuel Briot <briot@adacore.com>
1414
1415 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
1416 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
1417 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
1418 Prj.Env.Initialize_Empty): new subprograms
1419 (Get_Env, Find_Project): remove parameter Target_Name.
1420
1421 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1422
1423 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
1424 as a condition for the delayed call to Derived_Subprograms done for the
1425 case of the rewriting of a derived type that constrains the
1426 discriminants of its parent type.
1427 Avoids redundant subprogram derivations for private subtype derivations.
1428
1429 2011-08-03 Javier Miranda <miranda@adacore.com>
1430
1431 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
1432 Build_Record_Aggr_Code.
1433 (Build_Record_Aggr_Code): Add missing support to initialize hidden
1434 discriminants in extension aggregates.
1435
1436 2011-08-03 Emmanuel Briot <briot@adacore.com>
1437
1438 * prj-pp.adb (Print): also output project qualifiers, since in
1439 particular "aggregate" is mandatory in an aggregate project.
1440
1441 2011-08-03 Emmanuel Briot <briot@adacore.com>
1442
1443 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
1444 (Debug_Output): new function.
1445
1446 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1447
1448 * gnat_ugn.texi: Document -Wstack-usage.
1449 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
1450
1451 2011-08-03 Thomas Quinot <quinot@adacore.com>
1452
1453 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
1454 have keyword LIMITED.
1455
1456 2011-08-03 Yannick Moy <moy@adacore.com>
1457
1458 * alfa.adb, alfa.ads, alfa_test.adb: New files.
1459 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
1460 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
1461 section (does not happen in compiler, only if code directly calls
1462 Scan_ALI).
1463 * get_alfa.adb, get_alfa.ads: New files.
1464 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
1465 needed.
1466 * lib-xref-alfa.adb: New file.
1467 * lib-xref.adb, lib-xref.ads
1468 (Xref_Entry): redefine information needed in cross-references for ALFA.
1469 Push ALFA treatments in separated local package.
1470 (Enclosing_Subpragram_Or_Package): treat specially subprogram
1471 identifiers. Return entity of package body instead of spec. Return
1472 Empty for a scope with no location.
1473 (Generate_Reference): adapt to new components for ALFA information.
1474 Remove the need for D references on definitions.
1475 (Is_Local_Reference): moved to ALFA local package
1476 (Output_References): extract subfunction as Extract_Source_Name
1477 (Output_Local_References): remove procedure, replaced by filtering of
1478 cross-references in package ALFA and printing in Put_ALFA.
1479 (Write_Entity_Name): remove procedure
1480 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
1481 print exact name of entity as it appears in source file
1482 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
1483 * put_alfa.adb, put_alfa.ads: New files.
1484 * xref_lib.adb (Search_Xref): protect read of cross-references against
1485 reading other sections of the ALI file, in gnatxref
1486 (Search): protect read of cross-references against reading other
1487 sections of the ALI file, in gnatfind.
1488 * gcc-interface/Make-lang.in: Update dependencies.
1489
1490 2011-08-03 Thomas Quinot <quinot@adacore.com>
1491
1492 * sem_ch3.adb: Minor reformatting.
1493
1494 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1495
1496 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
1497 raising an exception.
1498
1499 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1500
1501 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
1502 type, always use 1 as the lower bound or string, even if lower bound of
1503 context is not static, to handle properly null strings in a non-static
1504 context.
1505
1506 2011-08-03 Bob Duff <duff@adacore.com>
1507
1508 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
1509 always legal on the right-hand side of an assignment statement; there
1510 is always an applicable index constraint in this case. Therefore, the
1511 check for Pkind = N_Assignment_Statement is now unconditional -- it
1512 doesn't depend on whether Is_Constrained (Typ).
1513
1514 2011-08-03 Robert Dewar <dewar@adacore.com>
1515
1516 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
1517
1518 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1519
1520 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
1521 for an itype created within a generic unit.
1522
1523 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1524
1525 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
1526 suppresses all inlining.
1527
1528 2011-08-03 Robert Dewar <dewar@adacore.com>
1529
1530 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
1531 exp_aggr.adb: Minor reformatting.
1532
1533 2011-08-03 Thomas Quinot <quinot@adacore.com>
1534
1535 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
1536 tagged assignment when discriminant checks are suppressed. This is
1537 useless and extremely costly in terms of static stack usage.
1538
1539 2011-08-03 Bob Duff <duff@adacore.com>
1540
1541 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
1542 of generics, because this leads to the wrong entity in the wrong scope,
1543 causing (e.g.) pragma Export_Procedure to get an error if the entity is
1544 an instance.
1545 (Process_Interface_Name): Follow Alias for instances of generics, to
1546 correct for the above change.
1547
1548 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1549
1550 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
1551 is an integer literal it is always safe to replace the reference. In
1552 addition, if the reference appears in the generated code for an object
1553 declaration it is necessary to copy because otherwise the reference
1554 might be to the uninitilized value of the discriminant of the object
1555 itself.
1556
1557 2011-08-03 Pascal Obry <obry@adacore.com>
1558
1559 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
1560 ACL used, in this case we want to check for ending .exe, not .exe
1561 anywhere in the path.
1562
1563 2011-08-03 Sergey Rybin <rybin@adacore.com>
1564
1565 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
1566 the tree structure (semantic decoration of references to record
1567 discriminants).
1568
1569 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1570
1571 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
1572 choices of a named array aggregate, bail out when any choices are
1573 marked as Errors_Posted.
1574
1575 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1576
1577 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
1578 in which entity is frozen, to handle properly loop variables in
1579 iterators.
1580
1581 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1582
1583 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
1584 subtype is not static, compute the upper bound using attributes, to
1585 handle properly index types that are not integer types.
1586
1587 2011-08-03 Bob Duff <duff@adacore.com>
1588
1589 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
1590 Update copyright notice.
1591
1592 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1593
1594 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
1595 Original_Discriminant if within an instance.
1596 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
1597
1598 2011-08-03 Thomas Quinot <quinot@adacore.com>
1599
1600 * einfo.ads: Minor reformatting.
1601
1602 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1603
1604 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
1605 composite type with an unfrozen subcomponent, in the profile of a
1606 primitive operation.
1607
1608 2011-08-03 Robert Dewar <dewar@adacore.com>
1609
1610 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
1611
1612 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1613
1614 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
1615 unconstrained type with discriminants is initialized with an aggregate,
1616 use the constrained subtype of the aggregate as the type of the object,
1617 because it is immutable, and this allows the back-end to generate no
1618 code for the object declaration.
1619
1620 2011-08-03 Robert Dewar <dewar@adacore.com>
1621
1622 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
1623 comparison operand is variable, and turns out to be zero or negative.
1624
1625 2011-08-03 Javier Miranda <miranda@adacore.com>
1626
1627 * exp_intr.adb
1628 (Expand_Dispatching_Constructor_Call): Disable expansion of
1629 code required for native targets. Done to avoid generating
1630 references to unavailable runtime entities in VM targets.
1631 * exp_ch3.adb
1632 (Expand_N_Object_Declaration): Add missing support to handle
1633 the explicit initialization of class-wide interface objects.
1634 Fix documentation.
1635
1636 2011-08-03 Matthew Heaney <heaney@adacore.com>
1637
1638 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
1639
1640 2011-08-03 Matthew Heaney <heaney@adacore.com>
1641
1642 * a-cbdlli.adb (Splice): move source items from first to last
1643
1644 2011-08-03 Yannick Moy <moy@adacore.com>
1645
1646 * sem_util.ads: comment added.
1647
1648 2011-08-03 Javier Miranda <miranda@adacore.com>
1649
1650 * exp_aggr.adb
1651 (Expand_Record_Aggregate): In VM targets disable the expansion into
1652 assignments of aggregates whose type is not known at compile time.
1653
1654 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1655
1656 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
1657 protected entries and task entries, to build the proper renaming
1658 declaration for entry formals, used in debugging.
1659 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
1660 parameters in the same way.
1661
1662 2011-08-02 Robert Dewar <dewar@adacore.com>
1663
1664 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
1665 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
1666 code reorganization.
1667
1668 2011-08-02 Robert Dewar <dewar@adacore.com>
1669
1670 * debug.adb: Debug flag d.P to suppress length comparison optimization
1671 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
1672 comparison of Length by comparing First/Last instead.
1673
1674 2011-08-02 Matthew Heaney <heaney@adacore.com>
1675
1676 * a-cobove.ads: Code clean up.
1677
1678 2011-08-02 Vincent Celier <celier@adacore.com>
1679
1680 * adaint.c (file_names_case_sensitive_cache): New static int.
1681 (__gnat_get_file_names_case_sensitive): Cache the return value in
1682 file_names_case_sensitive_cache at the first invocation, to avoid
1683 multiple calls to getenv.
1684
1685 2011-08-02 Bob Duff <duff@adacore.com>
1686
1687 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
1688
1689 2011-08-02 Yannick Moy <moy@adacore.com>
1690
1691 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
1692 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
1693 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
1694 indicate that we are in a precondition or postcondition. This is used in
1695 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
1696 decide whether to flag the spec or body of the current subprogram as
1697 not in ALFA.
1698
1699 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
1700
1701 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
1702 list.
1703 * a-extiin.ads: New file.
1704
1705 2011-08-02 Bob Duff <duff@adacore.com>
1706
1707 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
1708 now raises Name_Error instead of Use_Error in certain cases. The other
1709 parts of this AI were already implemented properly.
1710
1711 2011-08-02 Vincent Celier <celier@adacore.com>
1712
1713 * link.c: Only import "auto-host.h" when building the gnattools.
1714
1715 2011-08-02 Yannick Moy <moy@adacore.com>
1716
1717 * sem_util.adb: Inter-unit inlining does not work for a subprogram
1718 which calls a local subprogram, so extract subprogram
1719 from Mark_Non_ALFA_Subprogram_Body.
1720
1721 2011-08-02 Javier Miranda <miranda@adacore.com>
1722
1723 * exp_ch9.adb
1724 (Extract_Dispatching_Call): If the type of the dispatching object is an
1725 access type then return an explicit dereference in the Object out-mode
1726 parameter.
1727
1728 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1729
1730 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
1731 compatibility checks for all indexes of an array subtype, not just the
1732 first. Reset Has_Dynamic_Range_Check on the subtype before each
1733 potential check to ensure that Insert_Range_Checks will not elide any
1734 of the dynamic checks.
1735
1736 2011-08-02 Yannick Moy <moy@adacore.com>
1737
1738 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
1739 SPARK restriction at parsing time.
1740 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
1741 directive only if the SPARK restriction is set for this unit.
1742
1743 2011-08-02 Yannick Moy <moy@adacore.com>
1744
1745 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
1746 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
1747 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
1748 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
1749 Mark_Non_ALFA_Subprogram_Body.
1750 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
1751 inlined.
1752
1753 2011-08-02 Yannick Moy <moy@adacore.com>
1754
1755 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
1756 might be costly.
1757
1758 2011-08-02 Robert Dewar <dewar@adacore.com>
1759
1760 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
1761 exp_ch3.adb: Minor reformatting.
1762
1763 2011-08-02 Emmanuel Briot <briot@adacore.com>
1764
1765 * adaint.c (__gnat_locate_exec_on_path): only returns executable
1766 files, not any regular file.
1767 (__gnat_locate_file_with_predicate): new subprogram.
1768
1769 2011-08-02 Yannick Moy <moy@adacore.com>
1770
1771 * sinfo.adb, sinfo.ads: Restrict the use of flags
1772 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
1773 nodes, plus N_Subtype_Declaration for the 2nd one.
1774
1775 2011-08-02 Sergey Rybin <rybin@adacore.com>
1776
1777 * gnat_rm.texi: Ramification of pragma Eliminate documentation
1778 - fix bugs in the description of Source_Trace;
1779 - get rid of UNIT_NAME;
1780
1781 2011-08-02 Javier Miranda <miranda@adacore.com>
1782
1783 * exp_ch9.adb
1784 (Build_Dispatching_Requeue): Adding support for VM targets
1785 since we cannot directly reference the Tag entity.
1786 * exp_sel.adb (Build_K): Adding support for VM targets.
1787 (Build_S_Assignment): Adding support for VM targets.
1788 * exp_disp.adb
1789 (Default_Prim_Op_Position): In VM targets do not restrict availability
1790 of predefined interface primitives to compiling in Ada 2005 mode.
1791 (Is_Predefined_Interface_Primitive): In VM targets this service is not
1792 restricted to compiling in Ada 2005 mode.
1793 (Make_VM_TSD): Generate code that declares and initializes the OSD
1794 record. Needed to support dispatching calls through synchronized
1795 interfaces.
1796 * exp_ch3.adb
1797 (Make_Predefined_Primitive_Specs): Enable generation of predefined
1798 primitives associated with synchronized interfaces.
1799 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
1800 primitives associated with synchronized interfaces.
1801
1802 2011-08-02 Yannick Moy <moy@adacore.com>
1803
1804 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
1805 statements hidden in SPARK if preceded by the HIDE directive
1806 (Parse_Exception_Handlers): mark each exception handler in a sequence of
1807 exception handlers as hidden in SPARK if preceded by the HIDE directive
1808 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
1809 if starting with the HIDE directive
1810 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
1811 starting with the HIDE directive; mark the declarations in a private
1812 part as hidden in SPARK if the private part starts with the HIDE
1813 directive
1814 * restrict.adb, restrict.ads
1815 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
1816 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
1817 argument node belongs to a part which is hidden in SPARK
1818 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
1819 parts in SPARK; protect the possibly costly call to
1820 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
1821 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
1822 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
1823 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
1824 Tok_SPARK_Hide.
1825 (Scan): recognize special comment starting with '#' and followed by
1826 SPARK keyword "hide" as a HIDE directive.
1827
1828 2011-08-02 Yannick Moy <moy@adacore.com>
1829
1830 * types.ads, erroutc.ads: Minor reformatting.
1831
1832 2011-08-02 Vincent Celier <celier@adacore.com>
1833
1834 * link.c: Add response file support for cross platforms.
1835
1836 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1837
1838 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
1839 in an association, set parent field of copy before partial analysis.
1840 * sem_res.adb (Resolve_Slice): create reference to itype only when
1841 expansion is enabled.
1842
1843 2011-08-02 Yannick Moy <moy@adacore.com>
1844
1845 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
1846 for new flag denoting which subprogram bodies are in ALFA
1847 * restrict.adb, sem_ch7.adb: Update comment
1848 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1849 sem_ch9.adb, sem_res.adb: Add calls to
1850 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
1851 * sem_ch6.adb (Analyze_Function_Return): add calls to
1852 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
1853 middle of the body, and extended return.
1854 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
1855 False when missing return.
1856 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
1857 to True for subprograms whose spec is in ALFA. Remove later on the flag
1858 on the entity used for a subprogram body when there exists a separate
1859 declaration.
1860 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
1861 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
1862 False, otherwise do nothing.
1863
1864 2011-08-02 Robert Dewar <dewar@adacore.com>
1865
1866 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
1867
1868 2011-08-02 Yannick Moy <moy@adacore.com>
1869
1870 * sem_ch4.ads: minor formatting.
1871
1872 2011-08-02 Yannick Moy <moy@adacore.com>
1873
1874 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
1875 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
1876 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
1877 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
1878 opt.ads: cleanup of SPARK mode
1879
1880 2011-08-02 Yannick Moy <moy@adacore.com>
1881
1882 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
1883 types.
1884 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
1885 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
1886 * sem_ch3.adb
1887 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
1888 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
1889 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
1890 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
1891 types.
1892 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
1893 non-static range.
1894 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
1895 functions whose return type is not in ALFA.
1896 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
1897 specifications.
1898 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
1899 parameter's type is not in ALFA.
1900 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
1901 types are in ALFA.
1902
1903 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1904
1905 * sem_ch6 (Analyze_Expression_Function): treat the function as
1906 Inline_Always, and introduce a subprogram declaration for it when it is
1907 not a completion.
1908 * inline.adb (Add_Inlined_Body): recognize bodies that come from
1909 expression functions, so that the back-end can determine whether they
1910 can in fact be inlined.
1911 * sem_util.adb (Is_Expression_Function): predicate to determine whether
1912 a function body comes from an expression function.
1913
1914 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1915
1916 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
1917 null exclusions to test Can_Never_Be_Null on the anonymous access types
1918 of the formals rather than testing the formals themselves. Exclude this
1919 check in cases where the Old_Formal is marked as a controlling formal,
1920 to avoid issuing spurious errors for bodies completing dispatching
1921 operations (due to the flag not getting set on controlling access
1922 formals in body specs).
1923 (Find_Corresponding_Spec): When checking full and subtype conformance of
1924 subprogram bodies in instances, pass Designated and E in that order, for
1925 consistency with the expected order of the formals (New_Id followed by
1926 Old_Id).
1927
1928 2011-08-02 Robert Dewar <dewar@adacore.com>
1929
1930 * sem_ch8.adb: Minor reformatting.
1931
1932 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1933
1934 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
1935 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
1936 primitive operations of class-wide actuals.
1937
1938 2011-08-02 Javier Miranda <miranda@adacore.com>
1939
1940 * exp_atag.ads, exp_atag.adb
1941 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
1942 since its value is implicitly passed in argument Typ.
1943 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
1944 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
1945 Build_Common_Dispatching_Select_Statements.
1946
1947 2011-08-02 Robert Dewar <dewar@adacore.com>
1948
1949 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
1950 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
1951 Minor reformatting.
1952
1953 2011-08-02 Robert Dewar <dewar@adacore.com>
1954
1955 * sem_res.adb: Minor reformatting.
1956 * sem_prag.adb: Minor reformatting.
1957
1958 2011-08-02 Javier Miranda <miranda@adacore.com>
1959
1960 * exp_atag.adb, exp_atags.ads
1961 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
1962 by the tagged type Entity. Required to use this routine in the VM
1963 targets since we do not have available the Tag entity in the VM
1964 platforms.
1965 * exp_ch6.adb
1966 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
1967 Ada.Tags has not been previously loaded.
1968 * exp_ch7.adb
1969 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
1970 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
1971 * sem_aux.adb
1972 (Enclosing_Dynamic_Scope): Add missing support to handle the full
1973 view of enclosing scopes. Required to handle enclosing scopes that
1974 are synchronized types whose full view is a task type.
1975 * exp_disp.adb
1976 (Build_VM_TSDs): Minor code improvement to avoid generating and
1977 analyzing lists with empty nodes.
1978 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
1979 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
1980 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
1981 (Make_Disp_Timed_Select_Body): Add support for VM targets.
1982 (Make_Select_Specific_Data_Table): Add support for VM targets.
1983 (Make_VM_TSD): Generate code to initialize the SSD structure of
1984 the TSD.
1985
1986 2011-08-02 Yannick Moy <moy@adacore.com>
1987
1988 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
1989 cross-references section in ALI.
1990 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
1991 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
1992 Sub).
1993 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
1994 subprogram or package entity of a node
1995 (Is_Local_Reference_Type): new function returns True for references
1996 selected in local cross-references.
1997 (Lt): function extracted from Lt in Output_References
1998 (Write_Entity_Name): function extracted from Output_References
1999 (Generate_Definition): generate reference with type 'D' for definition
2000 of objects (object declaration and parameter specification), with
2001 appropriate locations and units, for use in local cross-references.
2002 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
2003 references of type 'I' for initialization in object definition.
2004 (Output_References): move part of function Lt and procedure
2005 Write_Entity_Name outside of the body. Ignore references of types 'D'
2006 and 'I' introduced for local cross-references.
2007 (Output_Local_References): new procedure to output the local
2008 cross-references sections.
2009 (Lref_Entity_Status): new array defining whether an entity is a local
2010 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
2011 with 'I' type when initialization expression is present.
2012 * get_scos.adb, get_scos.ads: Correct comments and typos
2013
2014 2011-08-02 Javier Miranda <miranda@adacore.com>
2015
2016 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
2017 the JVM target.
2018 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
2019 the JVM target.
2020 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
2021 TSD support.
2022
2023 2011-08-02 Vincent Celier <celier@adacore.com>
2024
2025 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
2026 (No_Space_Img): New function
2027 (Find_Excluded_Sources): When reading from a file, record the file name
2028 and the line number for each excluded source.
2029 (Mark_Excluded_Sources): When reporting an error, if the excluded
2030 sources were read from a file, include file name and line number in
2031 the error message.
2032
2033 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2034
2035 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
2036
2037 2011-08-02 Robert Dewar <dewar@adacore.com>
2038
2039 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
2040
2041 2011-08-02 Javier Miranda <miranda@adacore.com>
2042
2043 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
2044 generation of TSDs to the DOTNET compiler.
2045 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
2046 generation of TSDs to the DOTNET compiler.
2047
2048 2011-08-02 Javier Miranda <miranda@adacore.com>
2049
2050 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
2051 record of all the tagged types declared inside library level package
2052 declarations, library level package bodies or library level subprograms.
2053 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
2054 associated with a given tagged type.
2055 (Build_VM_TSDs): New subprogram.
2056 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
2057 compilation units that are subprograms.
2058 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
2059 compilation units that are package bodies.
2060 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
2061 units that are a package declaration or a package instantiation.
2062 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
2063 reorganization to improve the error generated by the frontend when the
2064 function Ada.Tags.Secondary_Tag is not available.
2065 * rtsfind.ads (RE_Register_TSD): New runtime entity.
2066 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
2067
2068 2011-08-02 Javier Miranda <miranda@adacore.com>
2069
2070 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
2071
2072 2011-08-02 Robert Dewar <dewar@adacore.com>
2073
2074 * s-imenne.ads: Minor reformatting.
2075
2076 2011-08-02 Robert Dewar <dewar@adacore.com>
2077
2078 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
2079 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
2080 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
2081
2082 2011-08-02 Robert Dewar <dewar@adacore.com>
2083
2084 * einfo.ads (Materialize_Entity): Document this is only for renamings
2085 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
2086 required debug information in the case where we transform the object
2087 declaration into a renaming declaration.
2088 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
2089 object
2090 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
2091 Materialize_Entity.
2092
2093 2011-08-02 Robert Dewar <dewar@adacore.com>
2094
2095 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
2096 Suppress_Init_Procs.
2097 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
2098 Suppress_Initialization/Initialization_Suppressed.
2099 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
2100 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
2101 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
2102 * sem_prag.adb: New processing for pragma Suppress_Initialization.
2103
2104 2011-08-02 Robert Dewar <dewar@adacore.com>
2105
2106 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
2107 Minor reformatting.
2108
2109 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2110
2111 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
2112 only have inheritable classwide pre/postconditions.
2113
2114 2011-08-02 Javier Miranda <miranda@adacore.com>
2115
2116 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
2117 * rtsfind.ads (RE_Check_TSD): New runtime entity.
2118 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
2119 checks if the external tag of a type is the same as the external tag
2120 of some other declaration.
2121
2122 2011-08-02 Thomas Quinot <quinot@adacore.com>
2123
2124 * s-taskin.ads: Minor reformatting.
2125
2126 2011-08-02 Emmanuel Briot <briot@adacore.com>
2127
2128 * g-comlin.adb (Display_Help): swap the order in which it prints the
2129 short help and the general usage.
2130
2131 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2132
2133 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
2134 the aspect declarations and attach them to the generic copy for
2135 subsequent analysis.
2136 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
2137 declarations of the generic tree to the new subprogram declarations.
2138 * sem_attr.adb (Check_Precondition_Postcondition): recognize
2139 conditions that apply to a subprogram instance.
2140
2141 2011-08-02 Robert Dewar <dewar@adacore.com>
2142
2143 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
2144
2145 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2146
2147 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
2148 private type with a tagged full view is not derived in the immediate
2149 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
2150
2151 2011-08-02 Robert Dewar <dewar@adacore.com>
2152
2153 * exp_ch4.adb: Minor reformatting.
2154
2155 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2156
2157 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
2158 Ada2012 iterator, the loop will be rewritten during expansion into a
2159 while loop with a cursor and an element declaration. Do not analyze the
2160 body in this case, because if the container is for indefinite types the
2161 actual subtype of the elements will only be determined when the cursor
2162 declaration is analyzed.
2163
2164 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2165
2166 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
2167 size/alignment related attributes in CodePeer_Mode.
2168
2169 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2170
2171 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
2172 Prepend_Element, since this can result in the operation getting the
2173 wrong slot in the full type's dispatch table if the full type has
2174 inherited operations. The incomplete type's operation will get added
2175 to the proper position in the full type's primitives
2176 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
2177 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
2178 dispatching operations, since there are cases where nonprimitive
2179 subprograms can get added to the list of incomplete dependents (such
2180 as subprograms in nested packages).
2181 * sem_ch6.adb (Process_Formals): First, remove test for being in a
2182 private part when determining whether to add a primitive with a
2183 parameter of a tagged incomplete type to the Private_Dependents list.
2184 Such primitives can also occur in the visible part, and should not have
2185 been excluded from being private dependents.
2186 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
2187 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
2188 list of a Taft-amendment incomplete type is a primitive before issuing
2189 an error that the full type must appear in the same unit. There are
2190 cases where nonprimitives can be in the list (such as subprograms in
2191 nested packages).
2192 * sem_disp.adb (Derives_From): Use correct condition for checking that
2193 a formal's type is derived from the type of the corresponding formal in
2194 the parent subprogram (the condition was completely wrong). Add
2195 checking that was missing for controlling result types being derived
2196 from the result type of the parent operation.
2197
2198 2011-08-02 Yannick Moy <moy@adacore.com>
2199
2200 * errout.adb (First_Node): minor renaming
2201 * restrict.adb (Check_Formal_Restriction): put restriction warning on
2202 first node.
2203
2204 2011-08-02 Yannick Moy <moy@adacore.com>
2205
2206 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
2207 before accessing operands.
2208 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
2209 decide whether an initialization expression respects SPARK rules, as
2210 the plain node is the expanded one. This allows for more valid warnings
2211 to be issued.
2212 * gnat_rm.texi: Minor update.
2213
2214 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2215
2216 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
2217 previous change.
2218
2219 2011-08-02 Robert Dewar <dewar@adacore.com>
2220
2221 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
2222
2223 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2224
2225 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
2226 loop statements and the element renaming declaration with a block when
2227 the element type is controlled.
2228
2229 2011-08-02 Yannick Moy <moy@adacore.com>
2230
2231 * sinfo.ads: Minor formatting.
2232
2233 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2234
2235 * sem_aggr.adb (Add_Association): if the association has a box and no
2236 expression, use the Sloc of the aggregate itself for the new
2237 association.
2238 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
2239 the Original_Node.
2240
2241 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2242
2243 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
2244 When a container is provided via a function call, generate a renaming
2245 of the function result. This avoids the creation of a transient scope
2246 and the premature finalization of the container.
2247 * exp_ch7.adb (Is_Container_Cursor): Removed.
2248 (Wrap_Transient_Declaration): Remove the supression of the finalization
2249 of the list controller when the declaration denotes a container cursor,
2250 it is not needed.
2251
2252 2011-08-02 Yannick Moy <moy@adacore.com>
2253
2254 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
2255 node is from source, instead of the original node being from source.
2256 * sem_aggr.adb
2257 (Resolve_Array_Aggregate): refine the check for a static expression, to
2258 recognize also static ranges
2259 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
2260 Array_Type_Declaration): postpone the test for the type being a subtype
2261 mark after the type has been resolved, so that component-selection and
2262 expanded-name are discriminated.
2263 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
2264 to distinguish the case of an iteration scheme, so that an error is
2265 issed on a non-static range in SPARK except in an iteration scheme.
2266 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
2267 In_Iter_Schm = True.
2268 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
2269 user-defined operators so that they are allowed in renaming
2270 * sem_ch8.adb
2271 (Find_Selected_Component): refine the check for prefixing of operators
2272 so that they are allowed in renaming. Move the checks for restrictions
2273 on selector name after analysis discriminated between
2274 component-selection and expanded-name.
2275 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
2276 concatenation argument of string type if it is static.
2277 * sem_util.adb, sem_util.ads
2278 (Check_Later_Vs_Basic_Declarations): add a new function
2279 Is_Later_Declarative_Item to decice which declarations are allowed as
2280 later items, in the two different modes Ada 83 and SPARK. In the SPARK
2281 mode, add that renamings are considered as later items.
2282 (Enclosing_Package): new function to return the enclosing package
2283 (Enter_Name): correct the rule for homonyms in SPARK
2284 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
2285 from source (result of expansion) to avoid issuing wrong warnings.
2286
2287 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2288
2289 * errout.adb: On anything but an expression First_Node returns its
2290 argument.
2291
2292 2011-08-02 Pascal Obry <obry@adacore.com>
2293
2294 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
2295
2296 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2297
2298 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
2299 Set the associated loop as the related expression of internally
2300 generated cursors.
2301 * exp_ch7.adb (Is_Container_Cursor): New routine.
2302 (Wrap_Transient_Declaration): Supress the finalization of the list
2303 controller when the declaration denotes a container cursor.
2304
2305 2011-08-02 Yannick Moy <moy@adacore.com>
2306
2307 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
2308 command line now.
2309 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
2310 expression is a simple expression. This check cannot be performed in
2311 the semantics, so just drop it.
2312 (P_Index_Or_Discriminant_Constraint): move check that the index or
2313 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
2314 semantics. Other cases were previously checked in the semantics.
2315 * par-ch4.adb (P_Name): move checks that a selector name is not
2316 character literal or an operator symbol to Find_Selected_Component in
2317 the semantics
2318 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
2319 declarations are not placed after later declarations in a separate
2320 procedure in Sem_Util (possibly not the best choice?), to be used both
2321 during parsing, for Ada 83 mode, and during semantic analysis, for
2322 SPARK mode.
2323 * par-endh.adb (Check_End): move check that end label is not missing
2324 to Process_End_Label in the semantics
2325 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
2326 the special case for SPARK restriction
2327 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
2328 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
2329 parameter Force to issue the error message even on internal node (used
2330 for generated end label). Call Check_Restriction to check when an error
2331 must be issued. In SPARK mode, issue an error message even if the
2332 restriction is not set.
2333 (Check_Restriction): new procedure with an additional out parameter to
2334 inform the caller that a message has been issued
2335 * sem_aggr.adb: Minor modification of message
2336 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
2337 instead of issuing an error message directly
2338 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
2339 declarations are not placed after later declarations, by calling
2340 Check_Later_Vs_Basic_Declarations
2341 (Analyze_Subtype_Declaration): move here the check that an index or
2342 discriminant constraint must be a subtype mark. Change the check that
2343 a subtype of String must start at one so that it works on subtype marks.
2344 * sem_ch4.adb (Analyze_Call): move here the check that a named
2345 association cannot follow a positional one in a call
2346 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
2347 instead of issuing an error message directly
2348 * sem_ch8.adb (Find_Selected_Component): move here the check that a
2349 selector name is not a character literal or an operator symbol. Move
2350 here the check that the prefix of an expanded name cannot be a
2351 subprogram or a loop statement.
2352 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
2353 procedure called from parsing and semantics to check that basic
2354 declarations are not placed after later declarations
2355 (Process_End_Label): move here the check that end label is not missing
2356
2357 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2358
2359 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
2360 representation clause in codepeer mode, since it confuses CodePeer and
2361 does not bring useful info.
2362
2363 2011-08-02 Ed Falis <falis@adacore.com>
2364
2365 * init.c: initialize fp hw on MILS.
2366
2367 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2368
2369 * errout.adb (First_Node): for bodies, return the node itself (small
2370 optimization). For other nodes, do not check source_unit if the node
2371 comes from Standard.
2372
2373 2011-08-02 Robert Dewar <dewar@adacore.com>
2374
2375 * exp_ch3.adb: Minor comment additions.
2376 * sem_ch13.adb: Minor reformatting.
2377
2378 2011-08-02 Pascal Obry <obry@adacore.com>
2379
2380 * make.adb, makeutl.adb: Removes some superfluous directory separator.
2381
2382 2011-08-02 Robert Dewar <dewar@adacore.com>
2383
2384 * sem_attr.adb: Minor reformatting.
2385
2386 2011-08-02 Robert Dewar <dewar@adacore.com>
2387
2388 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
2389 (Has_Default_Component_Value): Removed
2390 * einfo.ads Comment updates
2391 (Has_Default_Aspect): Replaces Has_Default_Value
2392 (Has_Default_Component_Value): Removed
2393 * exp_ch13.adb
2394 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
2395 * exp_ch3.adb
2396 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
2397 (Get_Simple_Init_Val): Handle Default_Value aspect
2398 (Needs_Simple_Initialization): Handle Default_Value aspect
2399 * exp_ch3.ads: Needs_Simple_Initialization
2400 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
2401 * par-prag.adb (Pragma_Default[_Component]Value) Removed
2402 * sem_ch13.adb
2403 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
2404 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
2405 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
2406
2407 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2408
2409 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
2410 package containing iteration primitives.
2411 exp_ch5.adb (Expand_Iterator_Loop): ditto.
2412
2413 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2414
2415 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
2416 "of", pre-analyze expression in case it is a function call with
2417 finalization actions that must be placed ahead of the loop.
2418 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
2419 on an Ada2012 iterator, insert them ahead of the rewritten loop.
2420
2421 2011-08-02 Geert Bosch <bosch@adacore.com>
2422
2423 * cstand.adb (Create_Float_Types): Only consider C's long double for
2424 Long_Long_Float, in addition to double.
2425
2426 2011-08-02 Robert Dewar <dewar@adacore.com>
2427
2428 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
2429 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
2430 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
2431 Minor reformatting.
2432
2433 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2434
2435 * sem_attr.adb: handle properly 'Result when it is a prefix of an
2436 indexed component.
2437
2438 2011-08-02 Javier Miranda <miranda@adacore.com>
2439
2440 * einfo.ads, einfo.adb
2441 (Original_Access_Type): Move this attribute to Node26 since there was
2442 an undocumented use of Node21 in E_Access_Subprogram_Type entities
2443 which causes conflicts and breaks the generation of the .NET compiler.
2444 (Interface_Name): Add missing documentation on JGNAT only uses of
2445 this attribute.
2446
2447 2011-08-02 Geert Bosch <bosch@adacore.com>
2448
2449 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
2450 (Find_Back_End_Float_Type): Likewise
2451 (Create_Back_End_Float_Types): Likewise
2452 (Create_Float_Types): Likewise
2453 (Register_Float_Type): Likewise
2454 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
2455 Nlist and split out type selection in new local Find_Base_Type function.
2456 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
2457 Nlist
2458 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
2459
2460 2011-08-02 Robert Dewar <dewar@adacore.com>
2461
2462 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
2463 alpha order).
2464 * opt.ads: Minor comment change.
2465 * sem_ch12.adb: Minor code reorganization.
2466
2467 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2468
2469 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
2470 subtype's list of rep items to the list on the full subtype in the case
2471 where the lists are the same.
2472
2473 2011-08-02 Geert Bosch <bosch@adacore.com>
2474
2475 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
2476 using the one from System.Strings, which also deallocates all strings.
2477
2478 2011-08-02 Geert Bosch <bosch@adacore.com>
2479
2480 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
2481 function.
2482 * gcc-interface/Make-lang.in: Update dependencies.
2483
2484 2011-08-02 Olivier Hainque <hainque@adacore.com>
2485
2486 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
2487 end_locus.
2488
2489 2011-08-02 Javier Miranda <miranda@adacore.com>
2490
2491 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
2492 associated with anonymous access to subprograms.
2493
2494 2011-08-02 Geert Bosch <bosch@adacore.com>
2495
2496 * opt.ads
2497 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
2498 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
2499 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
2500 (Add_Symbol_Definition): Move to switch-c.adb
2501 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
2502 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
2503 (Add_Symbol_Definition): Move to switch-c.adb.
2504 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
2505 * sem_warn.adb
2506 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
2507 Move to warnsw.adb.
2508 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
2509 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
2510 Move to warnsw.adb.
2511 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
2512 (Add_Symbol_Definition): Moved from Prepcomp.
2513 * switch-c.ads: Update copyright notice. Use String_List instead of
2514 Argument_List, removing dependency on System.OS_Lib.
2515
2516 2011-08-02 Yannick Moy <moy@adacore.com>
2517
2518 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
2519 mode on initialization expression which does not respect SPARK
2520 restrictions.
2521 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
2522 if the tree referenced by its argument represents an initialization
2523 expression in SPARK, suitable for initializing an object in an object
2524 declaration.
2525
2526 2011-08-02 Javier Miranda <miranda@adacore.com>
2527
2528 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
2529 internally generated access to subprogram with its associated protected
2530 subprogram type.
2531 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
2532
2533 2011-08-02 Geert Bosch <bosch@adacore.com>
2534
2535 * cstand.adb (Register_Float_Type): Print information about type to
2536 register, if the Debug_Flag_Dot_B is set.
2537 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
2538 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
2539 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
2540 with a requested precision of more than Max_Digits digits and no more
2541 than Max_Base_Digits digits, if a range specification is present and the
2542 Predefined_Float_Types list has a suitable type to derive from.
2543 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
2544 case of type completion with pragma Import
2545 * sem_prag.adb
2546 (Process_Import_Predefined_Type): Processing to complete a type
2547 with pragma Import. Currently supports floating point types only.
2548 (Set_Convention_From_Pragma): Do nothing without underlying type.
2549 (Process_Convention): Guard against absence of underlying type,
2550 which may happen when importing incomplete types.
2551 (Process_Import_Or_Interface): Handle case of importing predefined
2552 types. Tweak error message.
2553
2554 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2555
2556 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
2557 functions to previous change. Reorganize code slightly.
2558
2559 2011-08-02 Geert Bosch <bosch@adacore.com>
2560
2561 * back_end.ads (Register_Type_Proc): New call back procedure type for
2562 allowing the back end to provide information about available types.
2563 (Register_Back_End_Types): New procedure to register back end types.
2564 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
2565 available types.
2566 * cstand.adb (Back_End_Float_Types): New list for floating point types
2567 supported by the back end.
2568 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
2569 (Copy_Float_Type): New procedure to make new copies of predefined types.
2570 (Register_Float_Type): New call back procedure to populate the BEFT list
2571 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
2572 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
2573 (Create_Float_Types): New procedure to create entities for floating
2574 point types predefined in Standard, and put these and any remaining
2575 BEFTs on the Predefined_Float_Types list.
2576 * stand.ads (Predefined_Float_Types): New list for predefined floating
2577 point types that do not have declarations in package Standard.
2578
2579 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2580
2581 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
2582 entity node for the unit containing the parameter.
2583 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
2584 (Add_Inlined_Subprogram): Likewise.
2585 * gcc-interface/Make-lang.in: Update dependencies.
2586
2587 2011-08-02 Thomas Quinot <quinot@adacore.com>
2588
2589 * s-stusta.adb (Print): Make sure Pos is always initialized to a
2590 suitable value.
2591
2592 2011-08-02 Geert Bosch <bosch@adacore.com>
2593
2594 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
2595
2596 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2597
2598 * sem_type.adb (Covers): Move trivial case to the top and reuse the
2599 computed value of Base_Type.
2600
2601 2011-08-02 Yannick Moy <moy@adacore.com>
2602
2603 * restrict.adb (Check_Restriction): issue an error for any use of
2604 class-wide, even if the No_Dispatch restriction is not set.
2605 * sem_aggr.adb: Correct typos in comments and messages in formal mode
2606 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
2607 when completing a private extension, the type named in the private part
2608 is not the same as that named in the visible part.
2609 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
2610 of an inherited primitive operations of a tagged type or type extension
2611 that returns the tagged type.
2612 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
2613 function which returns True for an implicit operation inherited by the
2614 derived type declaration for the argument type.
2615 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
2616 order.
2617
2618 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2619
2620 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
2621 Process_Bounds, to perform analysis with expansion of a range or an
2622 expression that is the iteration scheme for a loop.
2623 (Analyze_Iterator_Specification): If domain of iteration is given by a
2624 function call with a controlled result, as is the case if call returns
2625 a predefined container, ensure that finalization actions are properly
2626 generated.
2627 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
2628
2629 2011-08-02 Javier Miranda <miranda@adacore.com>
2630
2631 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
2632 * gcc-interface/Make-lang.in: Update dependencies.
2633
2634 2011-08-02 Javier Miranda <miranda@adacore.com>
2635
2636 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
2637 determine if the analysis is performed using N or Original_Node (N).
2638 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
2639 functionality of routine Is_Variable avoids code duplication.
2640 * checks.adb (Determine_Range): Handle temporaries generated by
2641 Remove_Side_Effects.
2642
2643 2011-08-02 Javier Miranda <miranda@adacore.com>
2644
2645 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
2646 expansion of the condition. Required since the previous analysis was
2647 done with expansion disabled (see Resolve_Quantified_Expression) and
2648 hence checks were not inserted and record comparisons have not been
2649 expanded.
2650
2651 2011-08-02 Ed Falis <falis@adacore.com>
2652
2653 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
2654 Update header.
2655
2656 2011-08-02 Bob Duff <duff@adacore.com>
2657
2658 * opt.ads: Minor comment fix.
2659
2660 2011-08-02 Bob Duff <duff@adacore.com>
2661
2662 * sem_ch12.adb (Analyze_Package_Instantiation,
2663 Analyze_Subprogram_Instantiation): Turn off style checking while
2664 analyzing an instance. Whatever style checks that apply to the generic
2665 unit should apply, so it makes no sense to apply them in an instance.
2666 This was causing trouble when compiling an instance of a runtime
2667 unit that violates the -gnatyO switch.
2668 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
2669 one of the two case statements, causing spurious errors.
2670
2671 2011-08-02 Robert Dewar <dewar@adacore.com>
2672
2673 * uname.adb: Minor reformatting.
2674 * gnatcmd.adb: Minor reformatting.
2675 * exp_attr.adb: Minor reformatting.
2676
2677 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2678
2679 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
2680 No_Dispatching_Calls, do not look for the Assign primitive, because
2681 predefined primitives are not created in this case.
2682
2683 2011-08-02 Bob Duff <duff@adacore.com>
2684
2685 * stylesw.ads: Minor comment fixes.
2686
2687 2011-08-02 Robert Dewar <dewar@adacore.com>
2688
2689 * freeze.adb (Add_To_Result): New procedure.
2690
2691 2011-08-02 Jose Ruiz <ruiz@adacore.com>
2692
2693 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
2694 time, if the specific run-time routines for handling streams of strings
2695 are not available, use the default mechanism.
2696
2697 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2698
2699 * s-regpat.ads: Fix typo.
2700
2701 2011-08-02 Vincent Celier <celier@adacore.com>
2702
2703 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
2704 not null, call it to create the in memory config project file without
2705 parsing an existing default config project file.
2706
2707 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2708
2709 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
2710
2711 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2712
2713 * sem_elim.adb: an abstract subprogram does not need an eliminate
2714 pragma for its descendant to be eliminable.
2715
2716 2011-08-02 Ed Falis <falis@adacore.com>
2717
2718 * init.c: revert to handling before previous checkin for VxWorks
2719 * s-intman-vxworks.adb: delete unnecessary declarations related to
2720 using Ada interrupt facilities for handling signals.
2721 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
2722 * s-intman-vxworks.ads: Import __gnat_install_handler as
2723 Initialize_Interrupts.
2724 * s-taprop-vxworks.adb: Delete Signal_Mask.
2725 (Abort_Handler): change construction of mask to unblock exception
2726 signals.
2727
2728 2011-08-02 Jerome Guitton <guitton@adacore.com>
2729
2730 * a-except-2005.adb (Raise_From_Signal_Handler): Call
2731 Debug_Raise_Exception before propagation starts.
2732
2733 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2734
2735 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
2736 to Restriction_Check_Required.
2737 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
2738 * sem_res.adb (Resolve_Call): Likewise.
2739 * sem_attr.adb (Check_Stream_Attribute): Likewise.
2740
2741 2011-08-02 Bob Duff <duff@adacore.com>
2742
2743 * stylesw.ads: Update comment.
2744 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
2745 * errout.ads: Remove obsolete comment.
2746
2747 2011-08-02 Javier Miranda <miranda@adacore.com>
2748
2749 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
2750 (Set_Is_Safe_To_Reevaluate): new procedure.
2751 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
2752 assignment is allowed on safe-to-reevaluate variables.
2753 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
2754 temporary created to remove side effects in expressions that use
2755 the secondary stack as safe-to-reevaluate.
2756 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
2757 variables that are not true constants.
2758
2759 2011-08-02 Robert Dewar <dewar@adacore.com>
2760
2761 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
2762 sem_res.adb, sem_ch6.adb: Minor reformatting.
2763
2764 2011-08-02 Jerome Guitton <guitton@adacore.com>
2765
2766 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
2767
2768 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2769
2770 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
2771 not set Overridden_Operation if subprogram is an initialization
2772 procedure.
2773
2774 2011-08-02 Yannick Moy <moy@adacore.com>
2775
2776 * par-ch6.adb: Correct obsolete name in comments
2777 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
2778 which takes two message arguments (existing function takes one), with
2779 second message used for continuation.
2780 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
2781 block statements that originate from a source block statement, not
2782 generated block statements
2783 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
2784 symmetry with procedure case
2785 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
2786 function to issue an error in formal mode if a package specification
2787 contains more than one tagged type or type extension.
2788 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
2789 parameters matching formals of tagged types are objects (or ancestor
2790 type conversions of objects), not general expressions. Issue an error
2791 on view conversions that are not involving ancestor conversion of an
2792 extended type.
2793 (Resolve_Type_Conversion): in formal mode, issue an error on the
2794 operand of an ancestor type conversion which is not an object
2795 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
2796 procedure so that it works also for actuals of function calls
2797 (Is_Actual_Tagged_Parameter): new function which determines if its
2798 argument is an actual parameter of a formal of tagged type in a
2799 subprogram call
2800 (Is_SPARK_Object_Reference): new function which determines if the tree
2801 referenced by its argument represents an object in SPARK
2802
2803 2011-08-02 Robert Dewar <dewar@adacore.com>
2804
2805 * sem_ch3.adb: Minor reformatting
2806 Minor comment addition
2807 Minor error msg text change
2808
2809 2011-08-02 Javier Miranda <miranda@adacore.com>
2810
2811 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
2812 function. Used to be more precise when we generate a variable plus one
2813 assignment to remove side effects in the evaluation of the Bound
2814 expressions.
2815 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
2816 of the bound expression to force its re-analysis and thus expand the
2817 associated transient scope (if required). Code cleanup replacing the
2818 previous code that declared the constant entity by an invocation to
2819 routine Force_Evaluation which centralizes this work in the frontend.
2820
2821 2011-08-02 Robert Dewar <dewar@adacore.com>
2822
2823 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
2824 (Base_Type): Now uses improved Is_Base_Type function
2825 * einfo.ads (Base_Type): Inline this function
2826
2827 2011-08-02 Robert Dewar <dewar@adacore.com>
2828
2829 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
2830 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
2831
2832 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2833
2834 * gcc-interface/Make-lang.in: Update dependencies.
2835 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
2836 targets.
2837
2838 2011-08-02 Yannick Moy <moy@adacore.com>
2839
2840 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
2841 non-simple expression used in delta constraint
2842 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
2843 index constraint which is not a subtype mark
2844 * par.adb: With and use Restrict
2845 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
2846 mode on component type which is not a subtype mark and default
2847 expression on component
2848 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
2849 of string which does not have a lower index bound equal to 1
2850 (Array_Type_Declaration): issue an error in formal mode on index or
2851 component type which is not a subtype mark, and on aliased keyword on
2852 component
2853 (Derived_Type_Declaration): issue an error in formal mode on interface,
2854 limited or abstract type
2855 (Record_Type_Declaration): issue an error in formal mode on interface
2856 (Record_Type_Definition): issue an error in formal mode on tagged types
2857 and type extensions not declared in the specification of a library unit
2858 package; on null non-tagged record; on variant part
2859
2860 2011-08-02 Vincent Celier <celier@adacore.com>
2861
2862 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
2863 not declared for qualified library project when Library_Name is not
2864 declared, but Library_Dir is.
2865
2866 2011-08-02 Robert Dewar <dewar@adacore.com>
2867
2868 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
2869 pragmas (affects aspects [Component_]Default_Value
2870 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
2871 component type for the resolution
2872
2873 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2874
2875 * einfo.adb (Base_Type): Tune implementation for speed.
2876
2877 2011-08-02 Robert Dewar <dewar@adacore.com>
2878
2879 * freeze.adb: Minor reformatting.
2880
2881 2011-08-02 Thomas Quinot <quinot@adacore.com>
2882
2883 * scos.ads: Update comments.
2884
2885 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2886
2887 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
2888 base type, because the parent may be a subtype of a private type whose
2889 convention is established in a private part.
2890
2891 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2892
2893 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
2894 statement in a block when the expansion of the return expression has
2895 created a finalization chain.
2896 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
2897 with the parent node.
2898 Add N_Extended_Return_Statement to handle the case where a transient
2899 object declaration appears in the Return_Object_Declarations list of
2900 an extended return statement.
2901
2902 2011-08-02 Matthew Gingell <gingell@adacore.com>
2903
2904 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
2905 unused parameter 'name'.
2906
2907 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2908
2909 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
2910 inherited operation, check whether its alias, which is the source
2911 operastion that it renames, has been marked eliminated.
2912
2913 2011-08-02 Javier Miranda <miranda@adacore.com>
2914
2915 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
2916 in-mode parameter whose type is an access type since it can be used to
2917 modify its designated object. Enforce code that handles as safe an
2918 access type that is not access-to-constant but it is the result of a
2919 previous removal of side-effects.
2920 (Remove_Side_Effects): Minor code reorganization of cases which require
2921 no action. Done to incorporate documentation on new cases uncovered
2922 working in this ticket: no action needed if this routine was invoked
2923 too early and the nodes are not yet decorated.
2924 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
2925 to routine Remove_Side_Effects by calls to Force_Evaluation since they
2926 were issued with actuals that are implicitly provided by
2927 Force_Evaluation.
2928
2929 2011-08-02 Robert Dewar <dewar@adacore.com>
2930
2931 * sem_ch3.adb, sem_res.adb: Minor reformatting.
2932
2933 2011-08-02 Yannick Moy <moy@adacore.com>
2934
2935 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
2936 to issue an error in formal mode on attribute not supported in this mode
2937 (Analyze_Attribute): issue errors on standard attributes not supported
2938 in formal mode.
2939 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
2940 comment, and issue error in formal mode on modulus which is not a power
2941 of 2.
2942 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
2943 range.
2944 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
2945 subtype mark.
2946 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
2947 operator on modular type (except 'not').
2948
2949 2011-08-02 Robert Dewar <dewar@adacore.com>
2950
2951 * gnat_rm.texi: Minor reformatting.
2952
2953 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2954
2955 * s-osinte-linux.ads: Minor comment update and reformatting.
2956 * i-cexten.ads: Make this unit pure, as for its parent.
2957 Will allow its usage in more contexts if needed.
2958
2959 2011-08-02 Robert Dewar <dewar@adacore.com>
2960
2961 * s-utf_32.ads: Minor comment fix.
2962
2963 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2964
2965 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
2966 operation of a tagged synchronized type, handle the case where the
2967 controlling argument is overloaded.
2968
2969 2011-08-02 Yannick Moy <moy@adacore.com>
2970
2971 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
2972 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
2973 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
2974 SPARK mode and formal verification mode on processing SPARK restriction
2975 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
2976 requiring consistency checking.
2977
2978 2011-08-02 Robert Dewar <dewar@adacore.com>
2979
2980 * sem_res.adb: Minor reformatting.
2981
2982 2011-08-02 Robert Dewar <dewar@adacore.com>
2983
2984 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2985 a-cforse.ads: Remove unneeded with of Ada.Containers
2986 Remove commented out pragma Inline's
2987 Move specifications of new subprograms to the actual specs
2988
2989 2011-08-02 Yannick Moy <moy@adacore.com>
2990
2991 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2992 a-cforse.ads: Update comments.
2993
2994 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2995
2996 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
2997
2998 2011-08-02 Robert Dewar <dewar@adacore.com>
2999
3000 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3001 a-cforse.ads, a-cofove.ads: Minor reformatting.
3002
3003 2011-08-02 Claire Dross <dross@adacore.com>
3004
3005 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3006 a-cofove.ads: Add comments.
3007
3008 2011-08-02 Yannick Moy <moy@adacore.com>
3009
3010 * gnat_rm.texi: Document formal containers.
3011
3012 2011-08-02 Emmanuel Briot <briot@adacore.com>
3013
3014 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
3015 are empty sections.
3016
3017 2011-08-02 Robert Dewar <dewar@adacore.com>
3018
3019 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
3020 reformatting.
3021
3022 2011-08-02 Robert Dewar <dewar@adacore.com>
3023
3024 * aspects.adb: New aspects Default_Value and Default_Component_Value
3025 New format of Aspect_Names table checks for omitted entries
3026 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
3027 handling of boolean aspects for derived types.
3028 New aspects Default_Value and Default_Component_Value
3029 New format of Aspect_Names table checks for omitted entries
3030 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
3031 (Has_Default_Value): New flag
3032 (Has_Default_Component_Value): New flag
3033 (Has_Default_Value): New flag
3034 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
3035 table.
3036 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
3037 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
3038 Default_Value and Default_Component_Value
3039 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
3040 New aspects Default_Value and Default_Component_Value
3041 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
3042 * sprint.adb: Print N_Aspect_Specification node when called from gdb
3043
3044 2011-08-02 Vincent Celier <celier@adacore.com>
3045
3046 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
3047 inherit library kind.
3048
3049 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3050
3051 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
3052 Minor reformatting.
3053
3054 2011-08-02 Robert Dewar <dewar@adacore.com>
3055
3056 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
3057
3058 2011-08-02 Yannick Moy <moy@adacore.com>
3059
3060 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
3061
3062 2011-08-02 Robert Dewar <dewar@adacore.com>
3063
3064 * impunit.adb: Add comment.
3065
3066 2011-08-02 Yannick Moy <moy@adacore.com>
3067
3068 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
3069 qualification of aggregates in formal mode
3070 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
3071 another aggregate
3072 (Resolve_Aggregate): complete the test that an aggregate is adequately
3073 qualified in formal mode
3074
3075 2011-08-02 Pascal Obry <obry@adacore.com>
3076
3077 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
3078 * mlib-prj.adb: Supress warning when compiling binder generated file.
3079 (Build_Library): Supress all warnings when compiling the binder
3080 generated file.
3081
3082 2011-08-02 Yannick Moy <moy@adacore.com>
3083
3084 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
3085 from here...
3086 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
3087 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
3088 Add with/use clauses to make Check_Formal_Restriction visible
3089
3090 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3091
3092 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
3093 in-parameters when type of the generic formal is private in the generic
3094 spec and non-private in the body.
3095
3096 2011-08-02 Claire Dross <dross@adacore.com>
3097
3098 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
3099 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
3100 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
3101 * impunit.adb, Makefile.rtl: Take new files into account.
3102
3103 2011-08-02 Robert Dewar <dewar@adacore.com>
3104
3105 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
3106 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3107
3108 2011-08-02 Yannick Moy <moy@adacore.com>
3109
3110 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
3111 formal mode
3112 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
3113 matching static array bounds, taking into account the special case of
3114 string literals
3115 * sem_ch3.adb: Typo in comment.
3116
3117 2011-08-02 Yannick Moy <moy@adacore.com>
3118
3119 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
3120 which issues an error in formal mode if its argument node is originally
3121 from source
3122 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
3123 has a discriminant specification so that it does not include the case
3124 of derived types
3125 (Derived_Type_Declaration): move here the test that a derived type has a
3126 discriminant specification
3127 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
3128 first element of a component association before accessing its choices
3129 (presence of component association is not enough)
3130 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
3131 declaration is a library item before accessing the next element in a
3132 list, as library items are not member of lists
3133 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3134 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
3135 Check_Formal_Restriction whenever possible.
3136
3137 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3138
3139 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
3140 reference when needed.
3141
3142 2011-08-02 Bob Duff <duff@adacore.com>
3143
3144 * gnat_ugn.texi: Fix typo.
3145
3146 2011-08-02 Vincent Celier <celier@adacore.com>
3147
3148 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
3149 archive file name. Do not use the full path name of archives for Open
3150 VMS.
3151
3152 2011-08-02 Robert Dewar <dewar@adacore.com>
3153
3154 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
3155 Analyze_Aspect_Specifications
3156 * sem_ch13.adb
3157 (Analyze_Aspect_Specifications): New handling for boolean aspects
3158 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
3159 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
3160 sequence for Analyze_Aspect_Specifications
3161 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
3162 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
3163
3164 2011-08-02 Robert Dewar <dewar@adacore.com>
3165
3166 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
3167 aspects, since these no longer exist.
3168
3169 2011-08-02 Robert Dewar <dewar@adacore.com>
3170
3171 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
3172 semicolon, do not try to see if there are aspects following it.
3173 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
3174 aspect spec.
3175
3176 2011-08-02 Robert Dewar <dewar@adacore.com>
3177
3178 * sem_ch8.adb, aspects.ads: Minor reformatting.
3179
3180 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3181
3182 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
3183 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
3184 extracted from...
3185 (Analyze_Aspect_Specifications): ...here. Call above procedure.
3186
3187 2011-08-02 Yannick Moy <moy@adacore.com>
3188
3189 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
3190 mode on subprogram declaration outside of package specification, unless
3191 it is followed by a pragma Import
3192 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
3193 Access_Type_Declaration): issue error in formal mode on access type
3194 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
3195 incomplete type
3196 (Analyze_Object_Declaration): issue error in formal mode on object
3197 declaration which does not respect SPARK restrictions
3198 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
3199 declaration which does not respect SPARK restrictions
3200 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
3201 error in formal mode on digits or delta constraint
3202 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
3203 decimal fixed point type
3204 (Derived_Type_Declaration): issue error in formal mode on derived type
3205 other than type extensions of tagged record types
3206 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
3207 with check on access definition
3208 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
3209 mode on protected definition.
3210 (Analyze_Task_Definition): issue error in formal mode on task definition
3211
3212 2011-08-02 Robert Dewar <dewar@adacore.com>
3213
3214 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
3215
3216 2011-08-02 Javier Miranda <miranda@adacore.com>
3217
3218 * sem_ch6.adb (Can_Override_Operator): New function.
3219 (Verify_Overriding_Indicator): Add missing code to check overriding
3220 indicator in operators. Fixes regression.
3221 (Check_Overriding_Indicator): Minor reformating after replacing the
3222 code that evaluates if the subprogram can override an operator by
3223 invocations to the above new function.
3224 * einfo.adb
3225 (Write_Field26_Name): Add missing code to ensure that, following
3226 the documentation in einfo.ads, this field is not shown as attribute
3227 "Static_Initialization" on non-dispatching functions.
3228
3229 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3230
3231 * sem_res.adb (Resolve_Call): A call to
3232 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
3233 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
3234 i.e., when the second parameter is of type Time_Span.
3235
3236 2011-08-02 Vincent Celier <celier@adacore.com>
3237
3238 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
3239 with an archive instead of -L<library dir> -l<library name>.
3240
3241 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3242
3243 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
3244 mark the base types In_Use in addition to making the operations
3245 use_visible.
3246
3247 2011-08-02 Ed Falis <falis@adacore.com>
3248
3249 * init.c: add and setup __gnat_signal_mask for the exception signals
3250 * s-inmaop-vxworks.adb: new file.
3251 * s-intman-vxworks.adb: remove unnecessary initializations and
3252 simplify remaining
3253 * s-intman-vxworks.ads: remove unnecessary variable
3254 * s-taprop-vxworks.adb: simplify signal initialization
3255
3256 2011-08-02 Robert Dewar <dewar@adacore.com>
3257
3258 * sem_ch8.adb: Minor code reorganization, comment updates.
3259
3260 2011-08-02 Robert Dewar <dewar@adacore.com>
3261
3262 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
3263 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
3264 here from Sem_Res.
3265 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
3266 (Matching_Static_Array_Bounds): Moved here from Sem_Res
3267
3268 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3269
3270 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
3271 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
3272 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
3273 use_type_clauses, to handle more efficiently use_type and use_all_type
3274 constructs.
3275 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
3276 Ada2012 Use_All_Type clause.
3277 (Use_Class_Wide_Operations): new procedure.
3278
3279 2011-08-02 Robert Dewar <dewar@adacore.com>
3280
3281 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
3282 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
3283 expression to expression function.
3284
3285 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3286
3287 * sem_ch4.adb: transform simple Ada2012 membership into equality only
3288 if types are compatible.
3289
3290 2011-08-02 Yannick Moy <moy@adacore.com>
3291
3292 * sem_res.adb (Matching_Static_Array_Bounds): new function which
3293 returns True if its argument array types have same dimension and same
3294 static bounds at each index.
3295 (Resolve_Actuals): issue an error in formal mode on actuals passed as
3296 OUT or IN OUT paramaters which are not view conversions in SPARK.
3297 (Resolve_Arithmetic_Op): issue an error in formal mode on
3298 multiplication or division with operands of fixed point types which are
3299 not qualified or explicitly converted.
3300 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
3301 Boolean or array type (except String) operands.
3302 (Resolve_Equality_Op): issue an error in formal mode on equality
3303 operators for array types other than String with non-matching static
3304 bounds.
3305 (Resolve_Logical_Op): issue an error in formal mode on logical operators
3306 for array types with non-matching static bounds. Factorize the code in
3307 Matching_Static_Array_Bounds.
3308 (Resolve_Qualified_Expression): issue an error in formal mode on
3309 qualified expressions for array types with non-matching static bounds.
3310 (Resolve_Type_Conversion): issue an error in formal mode on type
3311 conversion for array types with non-matching static bounds
3312
3313 2011-08-02 Robert Dewar <dewar@adacore.com>
3314
3315 * par-ch10.adb: Minor code reorganization (use Nkind_In).
3316
3317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3318
3319 * par-ch9.adb: save location of entry for proper error message.
3320
3321 2011-08-02 Javier Miranda <miranda@adacore.com>
3322
3323 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
3324 (Use_Full_View) which permits this routine to climb through the
3325 ancestors using the full-view of private parents.
3326 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
3327 Use_Full_View to true in calls to Is_Ancestor.
3328 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
3329 true in call to Is_Ancestor.
3330 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
3331 Use_Full_View to true in call to Is_Ancestor.
3332 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
3333 call to Is_Ancestor.
3334 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
3335 Use_Full_View to true in calls to Is_Ancestor.
3336 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
3337 Make_Select_Specific_Data_Table, Register_Primitive,
3338 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
3339 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
3340 to true in call to Is_Ancestor.
3341 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
3342 Use_Full_View to true in calls to Is_Ancestor.
3343 * exp_cg.adb
3344 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
3345 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
3346
3347 2011-08-02 Robert Dewar <dewar@adacore.com>
3348
3349 * gnat_rm.texi: Minor reformatting.
3350 * sem_prag.adb: Minor reformatting.
3351
3352 2011-08-02 Tristan Gingold <gingold@adacore.com>
3353
3354 * vms_data.ads: Add VMS qualifier for -gnateP.
3355
3356 2011-08-02 Robert Dewar <dewar@adacore.com>
3357
3358 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
3359 * par-ch7.adb (P_Package): Proper placement of aspects for package
3360 decl/instantiation.
3361 * par-endh.adb (Check_End): Ad Is_Sloc parameter
3362 (End_Statements): Add Is_Sloc parameterr
3363 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
3364 (Check_End): Ad Is_Sloc parameter
3365 (End_Statements): Add Is_Sloc parameterr
3366
3367 2011-08-02 Vincent Celier <celier@adacore.com>
3368
3369 * ug_words: Add VMS qualifier equivalent to -gnateP:
3370 /SYMBOL_PREPROCESSING.
3371
3372 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3373
3374 * gnat-style.texi: For hexadecimal numeric literals the typical
3375 grouping of digits is 4 to represent 2 bytes.
3376 A procedure spec which is split into several lines is indented two
3377 characters.
3378
3379 2011-08-02 Yannick Moy <moy@adacore.com>
3380
3381 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
3382 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
3383 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
3384 properly qualified
3385 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
3386 choice in array aggregate
3387 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
3388 mark as ancestor
3389 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
3390 positional and named aggregate for record, or others in record
3391 aggregate, or multiple choice in record aggregate
3392 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
3393 array operands to logical operations AND, OR and XOR do not have the
3394 same static lower and higher bounds
3395 * sem_ch5.adb, sinfo.ads: Correct typos in comments
3396
3397 2011-08-01 Robert Dewar <dewar@adacore.com>
3398
3399 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
3400 Replaces Last_Source_Node_In_Sequence.
3401 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
3402 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
3403 parens and blank in string (this was inconsistently implemented).
3404 * errout.ads
3405 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
3406 blank in string (this was inconsistently implemented).
3407 * gnat1drv.adb
3408 (Set_Global_Switches): Set formal mode switches appropriately
3409 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
3410 * par-prag.adb
3411 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
3412 call Set_Error_Msg_Lang to set "spark" as language name.
3413 * par.adb: Remove unnecessary call to set formal language for errout
3414 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
3415 appropriately and call Set_Error_Msg_Lang to set "spark" as language
3416 name.
3417 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
3418 calls to it, moved after resolution so that types are known
3419 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
3420 result of concatenation is not of type String
3421 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
3422 concatenation is not properly restricted
3423 * gnat_rm.texi: Add doc on pragma Spark_95.
3424 * gcc-interface/Makefile.in: Remove obsolete target pairs for
3425 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
3426 * gcc-interface/Make-lang.in: Update dependencies.
3427
3428 2011-08-01 Javier Miranda <miranda@adacore.com>
3429
3430 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
3431 condition that detects if the overridden operation must replace an
3432 existing entity.
3433
3434 2011-08-01 Javier Miranda <miranda@adacore.com>
3435
3436 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
3437 code declarations inserted by Insert_Actions in each alternative of the
3438 N_Case_Expression node.
3439
3440 2011-08-01 Robert Dewar <dewar@adacore.com>
3441
3442 * sem_ch6.adb: Minor code reorganization.
3443 * sem_util.adb: Minor reformatting.
3444
3445 2011-08-01 Pascal Obry <obry@adacore.com>
3446
3447 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
3448 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
3449
3450 2011-08-01 Yannick Moy <moy@adacore.com>
3451
3452 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
3453 literal or operator symbol which is prefixed
3454 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
3455 mode on access attributes.
3456 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
3457 that concatenation operands are properly restricted in formal mode
3458 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
3459 Analyze_Concatenation_Operand. Issue an error in formal mode if the
3460 result of the concatenation has a type different from String.
3461 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
3462 Analyze_Quantified_Expression, Analyze_Slice,
3463 Analyze_Null): issue an error in formal mode on unsupported constructs
3464 * sem_ch5.adb
3465 (Analyze_Block_Statement): only issue error on source block statement
3466 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
3467 function which returns the last node in a list of nodes for which
3468 Comes_From_Source returns True, if any
3469 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
3470 Last_Source_Node_In_Sequence
3471 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
3472 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
3473 mode on unsupported constructs
3474 * sem_ch9.adb Do not return after issuing error in formal mode, as the
3475 rest of the actions may be needed later on since the error is marked as
3476 not serious.
3477 * sinfo.ads: Typos in comments.
3478
3479 2011-08-01 Pascal Obry <obry@adacore.com>
3480
3481 * projects.texi: Minor editing.
3482
3483 2011-08-01 Yannick Moy <moy@adacore.com>
3484
3485 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
3486 insertion character ~~
3487 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
3488 (Set_Error_Msg_Lang): new procedure which fixes the language for use
3489 with insertion character ~~
3490 (Set_Msg_Text): treat insertion character ~~
3491 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
3492 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
3493 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
3494 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
3495 errors related to the formal language restriction not serious
3496 (insertion character |).
3497 * par.adb (Par): set formal language for error messages if needed
3498 * sem_ch6.adb (Check_Missing_Return): take into account possible
3499 generated statements at the end of the function
3500 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
3501 enumeration value to define a new pragma SPARK_95
3502 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
3503 SPARK_Version): new type and variables to store the SPARK version
3504 (none by default).
3505 (SPARK_Mode): return True when SPARK_Version is set
3506 * par-prag.adb: Correct indentation
3507 (Prag): take Pragma_SPARK_95 into account
3508 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
3509 into account.
3510
3511 2011-08-01 Robert Dewar <dewar@adacore.com>
3512
3513 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
3514 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
3515 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
3516
3517 2011-08-01 Pascal Obry <obry@adacore.com>
3518
3519 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
3520 Target_Name to Get_Path call.
3521 (Parse_Single_Project): Likewise.
3522 (Post_Parse_Context_Clause): Likewise.
3523 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
3524 Call Initialise_Project_Path with the proper Target_Name.
3525 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
3526 search path.
3527 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
3528 with the proper Target_Name.
3529 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
3530 Part.Parse routine.
3531 (Parse_Project_And_Apply_Config): Likewise.
3532 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
3533 This is fine as this part of the code is supporting only native
3534 compilation.
3535 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
3536 is fine as this part of the code is supporting only native compilation.
3537
3538 2011-08-01 Yannick Moy <moy@adacore.com>
3539
3540 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
3541 of homonym, unless the homonym is one of the cases allowed in SPARK
3542 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
3543 package declaration occurring after a body.
3544
3545 2011-08-01 Robert Dewar <dewar@adacore.com>
3546
3547 * checks.adb, exp_ch4.adb: Minor reformatting.
3548
3549 2011-08-01 Javier Miranda <miranda@adacore.com>
3550
3551 * einfo.ads (Access_Disp_Table): Fix documentation.
3552 (Dispatch_Table_Wrappers): Fix documentation.
3553
3554 2011-08-01 Pascal Obry <obry@adacore.com>
3555
3556 * prj-env.adb, prj-env.ads: Minor reformatting.
3557
3558 2011-08-01 Yannick Moy <moy@adacore.com>
3559
3560 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
3561 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
3562 procedures out of these packages.
3563 * errout.ads, errout.adb
3564 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
3565 procedures in of this package
3566 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
3567 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
3568 on misplaced later vs initial declarations, like in Ada 83
3569 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
3570 formal mode on attribute of private type whose full type declaration
3571 is not visible
3572 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
3573 package declaration inside a package specification
3574 (Analyze_Full_Type_Declaration): issue error in formal mode on
3575 controlled type or discriminant type
3576 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
3577 user-defined operator means that it should come from the source
3578 (New_Overloaded_Entity): issue error in formal mode on overloaded
3579 entity.
3580 * sem_ch6.ads, sem_ch13.ads: typos in comments.
3581
3582 2011-08-01 Thomas Quinot <quinot@adacore.com>
3583
3584 * atree.adb: Minor reformatting.
3585 * checks.adb: Minor reformatting.
3586
3587 2011-08-01 Vincent Celier <celier@adacore.com>
3588
3589 * s-parame-vms-ia64.ads: Fix typo in comment
3590 Minor reformatting
3591 * s-parame-vms-restrict.ads: Removed, unused.
3592
3593 2011-08-01 Javier Miranda <miranda@adacore.com>
3594
3595 * exp_ch3.adb
3596 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
3597 * sem_ch3.adb
3598 (Constrain_Index): Remove side effects in the evaluation of the bounds.
3599 * sem_ch3.ads, sem_ch3.adb
3600 (Is_Constant_Bound): New extended version of the subprogram that was
3601 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
3602 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
3603 * sem_aux.ads (Constant_Value): Fix typo in comment.
3604 * checks.adb (Generate_Index_Checks): New implementation which, for
3605 array objects with constant bounds, generates the runtime check
3606 referencing the bounds of the array type. For other cases this routine
3607 provides its previous behavior obtaining such values from the array
3608 object.
3609 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
3610 parent type.
3611 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
3612 we cannot have semantic interpretations of the new node.
3613
3614 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3615
3616 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
3617 expressions.
3618
3619 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3620
3621 * sem_ch8.adb: Minor code editing.
3622 * s-vxwext.adb: Remove trailing space.
3623 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
3624 consistency with other files.
3625
3626 2011-08-01 Thomas Quinot <quinot@adacore.com>
3627
3628 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
3629
3630 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3631
3632 * par-ch10.adb: reject parameterized expressions as compilation unit.
3633 * sem_ch4.adb: handle properly conditional expression with overloaded
3634 then_clause and no else_clause.
3635
3636 2011-08-01 Tristan Gingold <gingold@adacore.com>
3637
3638 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
3639 like done by System.Aux_DEC.
3640 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
3641
3642 2011-08-01 Yannick Moy <moy@adacore.com>
3643
3644 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
3645 missing label at end of declaration (subprogram or package)
3646 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
3647 of positional and named parameter association
3648 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
3649 Error_Msg_SP which adds a prefix to the error message giving the name
3650 of the formal language analyzed
3651 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
3652 access result type in subprogram, unconstrained array as result type,.
3653 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
3654 procedure
3655 * sem_ch8.adb: Code clean up.
3656
3657 2011-08-01 Javier Miranda <miranda@adacore.com>
3658
3659 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
3660 * einfo.ads (Access_Disp_Table): Fix documentation.
3661 (Dispatch_Table_Wrappers): Fix documentation.
3662 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
3663 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
3664 to enforce the documentation of this attribute.
3665 (Set_Is_Interface): Cleanup the assertion.
3666 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
3667 the Underlying_Type entity before reading attribute Access_Disp_Table.
3668 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
3669 Locate the Underlying_Type before reading attribute Access_Disp_Table.
3670 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
3671 the Underlying_Type entity before reading attribute Access_Disp_Table.
3672 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
3673 Locate the Underlying_Type entity before reading attribute
3674 Access_Disp_Table.
3675
3676 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3677
3678 * s-poosiz.ads: Additional overriding indicators.
3679
3680 2011-08-01 Yannick Moy <moy@adacore.com>
3681
3682 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
3683 formal mode.
3684 (Analyze_Iteration_Scheme): issue error in formal mode when loop
3685 parameter specification does not include a subtype mark.
3686 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
3687 formal mode on abstract subprogram.
3688 (Analyze_Subprogram_Specification): issue error in formal mode on
3689 user-defined operator.
3690 (Process_Formals): issue error in formal mode on access parameter and
3691 default expression.
3692 * sem_ch9.adb (Analyze_Abort_Statement,
3693 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
3694 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
3695 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
3696 Analyze_Requeue, Analyze_Selective_Accept,
3697 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
3698 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
3699 issue error in formal mode on user-defined raise statement.
3700
3701 2011-08-01 Thomas Quinot <quinot@adacore.com>
3702
3703 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
3704 declaration being hidden when overriding an implicit inherited
3705 subprogram.
3706 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
3707 (-gnats), do not complain about a source file that contains only a
3708 pragma No_Body.
3709
3710 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3711
3712 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
3713 variable if already set.
3714
3715 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3716
3717 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
3718 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
3719 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
3720 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
3721 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
3722 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
3723 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
3724 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
3725 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
3726 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
3727 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
3728 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
3729 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
3730 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
3731 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
3732 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
3733 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
3734 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
3735 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
3736 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
3737 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
3738 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
3739 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
3740 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
3741 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
3742 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
3743 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
3744 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
3745 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
3746 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
3747 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
3748 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
3749 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
3750 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
3751 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
3752 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
3753 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
3754 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
3755 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
3756 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
3757 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
3758 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
3759 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
3760 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
3761 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
3762 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
3763 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
3764 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
3765 s-osinte-mingw.ads: Update to GPLv3 run-time license.
3766 Use GNAT instead of GNARL.
3767
3768 2011-08-01 Bob Duff <duff@adacore.com>
3769
3770 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
3771 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
3772 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
3773 reformatting.
3774
3775 2011-08-01 Yannick Moy <moy@adacore.com>
3776
3777 * debug.adb (d.D) reverve flag for the SPARK mode
3778 (d.E) reverve flag for SPARK generation mode
3779 (d.F) reverve flag for Why generation mode
3780 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
3781 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
3782 functions which return True when the corresponding modes are set
3783 (Formal_Language): return "spark" or "alfa" when in formal verification
3784 mode.
3785 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
3786 Error_Msg to prefix the error message with a tag giving the formal
3787 language
3788 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
3789 message with a tag giving the formal language
3790 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
3791 block statement
3792 (Analyze_Case_Statement): issue error in formal mode on case statement
3793 with a single "others" case alternative
3794 (Analyze_Exit_Statement): issue errors in formal mode on exit
3795 statements which do not respect SPARK restrictions
3796 (Analyze_Goto_Statement): issue error in formal mode on goto statement
3797 (Check_Unreachable_Code): always issue an error (not a warning) in
3798 formal mode on unreachable code (concerns both code after an infinite
3799 loop and after an unconditional jump, both not allowed in SPARK)
3800 * sem_ch6.adb (Analyze_Return_Statement): add call to
3801 Set_Return_Present for a procedure containing a return statement
3802 (already done for functions in Analyze_Function_Return)
3803 (Analyze_Function_Return): issue error in formal mode on extended
3804 return or if return is not last statement in function
3805 (Check_Missing_Return): issue error in formal mode if function does
3806 not end with return or if procedure contains a return
3807 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
3808 function to detect if there is an inner scope of its parameter S which
3809 is a loop.
3810
3811 2011-08-01 Thomas Quinot <quinot@adacore.com>
3812
3813 * sem_ch6.ads: Minor reformatting.
3814
3815 2011-08-01 Javier Miranda <miranda@adacore.com>
3816
3817 * sem_util.adb (Abstract_Interface_List): Complete condition when
3818 processing private type declarations to avoid reading unavailable
3819 attribute.
3820 (Is_Synchronized_Tagged_Type): Complete condition when processing
3821 private extension declaration nodes to avoid reading unavailable
3822 attribute.
3823
3824 2011-08-01 Thomas Quinot <quinot@adacore.com>
3825
3826 * sem_ch3.adb: Minor reformatting.
3827
3828 2011-08-01 Thomas Quinot <quinot@adacore.com>
3829
3830 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
3831 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
3832 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
3833 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
3834 for VMS, instead parametrize the common implementation with
3835 System.Parameters declarations.
3836
3837 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
3838
3839 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
3840
3841 2011-08-01 Tristan Gingold <gingold@adacore.com>
3842
3843 * seh_init.c: Fix SEH handler installation on win64.
3844
3845 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3846
3847 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
3848 double analysis of an anonymous access to subprogram, because it can
3849 lead to improper sharing of profiles and a back-end crash.
3850
3851 2011-08-01 Robert Dewar <dewar@adacore.com>
3852
3853 * make.adb, sem_ch4.adb: Minor reformatting.
3854 * gcc-interface/Make-lang.in: Update dependencies.
3855 * sem_util.adb, exp_ch5.adb: Minor reformatting.
3856
3857 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3858
3859 * gnat_rm.texi: Fix definition of Long_Integer.
3860
3861 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3862
3863 * exp_aggr.adb: check limit size of static aggregate unconditionally,
3864 to prevent storage exhaustion.
3865 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
3866 finalized is a function body, insert the cleanup code before the final
3867 return statement, to prevent spurious warnings.
3868 * s-pooglo.ads: add overriding indicator.
3869
3870 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3871
3872 * sem_ch4.adb (Operator_Check): improve error message when both a
3873 with_clause and a use_clause are needed to make operator usage legal.
3874 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
3875 determine whether a compilation unit is visible within an other,
3876 either through a with_clause in the current unit, or a with_clause in
3877 its library unit or one one of its parents.
3878
3879 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3880
3881 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
3882 over an arbitrary expression of an array or container type.
3883 * lib-xref.adb: clarify comment.
3884
3885 2011-08-01 Bob Duff <duff@adacore.com>
3886
3887 * einfo.ads: Minor reformatting.
3888 * debug.adb: Minor comment improvement.
3889
3890 2011-08-01 Javier Miranda <miranda@adacore.com>
3891
3892 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
3893 consider hidden subprograms as valid candidates.
3894
3895 2011-08-01 Arnaud Charlet <charlet@adacore.com>
3896
3897 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
3898
3899 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
3900
3901 * gnat_ugn.texi: Fix typo.
3902
3903 2011-08-01 Robert Dewar <dewar@adacore.com>
3904
3905 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
3906 lib-xref.adb: Minor reformatting
3907
3908 2011-08-01 Gary Dismukes <dismukes@adacore.com>
3909
3910 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
3911 when to generate a call to Move_Final_List.
3912 (Has_Controlled_Parts): Remove this function.
3913
3914 2011-08-01 Geert Bosch <bosch@adacore.com>
3915
3916 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
3917 "," in choice list.
3918
3919 2011-08-01 Thomas Quinot <quinot@adacore.com>
3920
3921 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
3922 explicit raise of a predefined exception as Comes_From_Source if the
3923 original N_Raise_Statement comes from source.
3924
3925 2011-08-01 Robert Dewar <dewar@adacore.com>
3926
3927 * sinfo.ads: Add comment.
3928 * sem_ch6.adb: Minor reformatting.
3929
3930 2011-08-01 Robert Dewar <dewar@adacore.com>
3931
3932 * freeze.adb (Freeze_Entity): Refine check for bad component size
3933 clause to avoid rejecting confirming clause when atomic/aliased present.
3934
3935 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3936
3937 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
3938 better determine whether an entity reference is a write.
3939 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
3940 subcomponent.
3941 * lib-xref.adb (Output_References): Do no suppress a read reference at
3942 the same location as an immediately preceeding modify-reference, to
3943 handle properly in-out actuals.
3944
3945 2011-08-01 Tristan Gingold <gingold@adacore.com>
3946
3947 * env.c (__gnat_setenv) [VMS]: Refine previous change.
3948
3949 2011-08-01 Quentin Ochem <ochem@adacore.com>
3950
3951 * i-cstrin.adb (New_String): Changed implementation, now uses only the
3952 heap to compute the result.
3953
3954 2011-08-01 Robert Dewar <dewar@adacore.com>
3955
3956 * atree.ads: Minor reformatting.
3957
3958 2011-08-01 Emmanuel Briot <briot@adacore.com>
3959
3960 * g-expect.adb (Get_Command_Output): Fix memory leak.
3961
3962 2011-08-01 Geert Bosch <bosch@adacore.com>
3963
3964 * cstand.adb (P_Float_Type): New procedure to print the definition of
3965 predefined fpt types.
3966 (P_Mixed_Name): New procedure to print a name using mixed case
3967 (Print_Standard): Use P_Float_Type for printing floating point types
3968 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
3969 precision IEEE float.
3970
3971 2011-08-01 Thomas Quinot <quinot@adacore.com>
3972
3973 * sem_ch3.adb: Minor reformatting.
3974
3975 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3976
3977 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
3978 the completion of a generic function, insert the new body rather than
3979 rewriting the original.
3980
3981 2011-08-01 Yannick Moy <moy@adacore.com>
3982
3983 * sinfo.ads, errout.ads: Typos in comments.
3984
3985 2011-08-01 Robert Dewar <dewar@adacore.com>
3986
3987 * par-endh.adb: Minor reformatting.
3988
3989 2011-08-01 Robert Dewar <dewar@adacore.com>
3990
3991 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
3992 (Pre_Post_Aspects): New subtype.
3993 * par-ch12.adb (P_Generic): New syntax for aspects in packages
3994 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
3995 * par-ch7.adb (P_Package): Remove Decl parameter
3996 (P_Package): Handle new syntax for aspects (before IS)
3997 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
3998 new aspect syntax
3999 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
4000 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
4001 (P_Package): Remove Decl parameter
4002 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
4003 aspects
4004 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
4005 specs
4006 * sem_util.ads, sem_util.adb (Static_Boolean): New function
4007 * sinfo.ads: Document new syntax for aspects in packages etc.
4008 * sprint.adb: Handle new syntax of aspects before IS in package
4009
4010 2011-08-01 Thomas Quinot <quinot@adacore.com>
4011
4012 * atree.ads: Minor reformatting.
4013 * sem_prag.adb: Minor reformatting.
4014
4015 2011-08-01 Robert Dewar <dewar@adacore.com>
4016
4017 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
4018 case expr alternative.
4019
4020 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4021
4022 * sem_ch12.adb: Fix typo.
4023
4024 2011-08-01 Geert Bosch <bosch@adacore.com>
4025
4026 * sem_prag.adb (Check_No_Link_Name): New procedure.
4027 (Process_Import_Or_Interface): Use Check_No_Link_Name.
4028 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
4029 instead of Standard_Long_Long_Float_Size global. Preparation for
4030 eventual removal of per type constants.
4031 * exp_util.ads (Get_Stream_Size): New function returning the stream
4032 size value of subtype E.
4033 * exp_util.adb (Get_Stream_Size): Implement new function.
4034 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
4035 function.
4036 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
4037 * einfo.adb:
4038 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
4039
4040 2011-08-01 Geert Bosch <bosch@adacore.com>
4041
4042 * cstand.adb: Fix comments.
4043 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
4044 count of arguments.
4045
4046 2011-08-01 Robert Dewar <dewar@adacore.com>
4047
4048 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
4049
4050 2011-08-01 Geert Bosch <bosch@adacore.com>
4051
4052 * atree.ads: Fix comment.
4053
4054 2011-08-01 Robert Dewar <dewar@adacore.com>
4055
4056 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
4057 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
4058 * par.adb: Add with for Namet.Sp.
4059 * par-tchk.adb: Minor reformatting.
4060
4061 2011-08-01 Vincent Celier <celier@adacore.com>
4062
4063 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
4064 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
4065 of the init procedure of a SAL.
4066 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
4067 New procedure.
4068
4069 2011-08-01 Thomas Quinot <quinot@adacore.com>
4070
4071 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
4072 reformatting.
4073
4074 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4075
4076 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
4077
4078 2011-08-01 Thomas Quinot <quinot@adacore.com>
4079
4080 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
4081 conformant with its spec (return True only for types that have
4082 an overriding Initialize primitive operation that prevents them from
4083 having preelaborable initialization).
4084 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
4085 initialization for controlled types in Ada 2005 or later mode.
4086
4087 2011-08-01 Robert Dewar <dewar@adacore.com>
4088
4089 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
4090 Postcondition.
4091 (Same_Aspect): New function.
4092 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
4093 Type_Invariant, Precondition, Postcondition.
4094 * snames.ads-tmpl: Add Name_Type_Invariant.
4095
4096 2011-08-01 Robert Dewar <dewar@adacore.com>
4097
4098 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
4099 here.
4100 (Freeze_All_Ent): Fix error in handling inherited aspects.
4101 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
4102 already analyzed, but don't skip entire processing of a declaration,
4103 that's wrong in some cases of declarations being rewritten.
4104 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
4105 Don't delay for integer, string literals
4106 Treat predicates in usual manner for delay, remove special case code,
4107 not needed.
4108 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
4109 (Build_Predicate_Function): Update saved expression in aspect
4110 (Build_Invariant_Procedure): Update saved expression in aspect
4111 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
4112 of replacement of discriminant references if the reference is simple.
4113
4114 2011-08-01 Robert Dewar <dewar@adacore.com>
4115
4116 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
4117 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
4118 Static_Predicate and Dynamic_Predicate.
4119 (Build_Predicate_Function): Add processing for Static_Predicate
4120 and Dynamic_Predicate.
4121 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
4122 (From_Static_Predicate): New flag
4123 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
4124
4125 2011-08-01 Robert Dewar <dewar@adacore.com>
4126
4127 * usage.adb: Documentation cleanup for Ada version modes in usage.
4128 * expander.adb: Minor reformatting.
4129
4130 2011-08-01 Robert Dewar <dewar@adacore.com>
4131
4132 * atree.ads: Minor comment fix.
4133 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
4134 a-witeio.ads, sem_prag.adb: Minor reformatting.
4135
4136 2011-08-01 Doug Rupp <rupp@adacore.com>
4137
4138 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
4139 pointers. Use descrip.h header file for convenience. Add some
4140 comments.
4141
4142 2011-08-01 Robert Dewar <dewar@adacore.com>
4143
4144 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
4145 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
4146 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
4147 New procedure.
4148 (Check_Aspect_At_End_Of_Declarations): New procedure
4149 (Analye_Aspect_Specification): Minor changes for above procedures
4150 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
4151 specification node as well.
4152
4153 2011-08-01 Pascal Obry <obry@adacore.com>
4154
4155 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
4156 Windows files. Use GetFilesAttributes() in this case to check for file
4157 existence instead of returning with an error code.
4158
4159 2011-08-01 Vincent Celier <celier@adacore.com>
4160
4161 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
4162 High is above Source length.
4163
4164 2011-08-01 Robert Dewar <dewar@adacore.com>
4165
4166 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
4167
4168 2011-08-01 Robert Dewar <dewar@adacore.com>
4169
4170 * aspects.ads (Boolean_Aspects): New subtype.
4171 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
4172 for derived types in cases where the parent type and derived type have
4173 aspects.
4174 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
4175 with aspects when parent type also has aspects.
4176 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
4177 boolean expression at this point).
4178 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
4179 accordance with final decision on the Ada 2012 feature.
4180 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
4181
4182 2011-08-01 Matthew Heaney <heaney@adacore.com>
4183
4184 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
4185
4186 2011-08-01 Pascal Obry <obry@adacore.com>
4187
4188 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
4189 Fix Replace_Slice when High is above current string size.
4190 (Replace_Slice): Fix DL computation when High is above current
4191 string length.
4192
4193 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4194
4195 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
4196
4197 2011-08-01 Matthew Heaney <heaney@adacore.com>
4198
4199 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
4200 of node.
4201
4202 2011-08-01 Pascal Obry <obry@adacore.com>
4203
4204 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
4205 reformatting.
4206
4207 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4208
4209 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
4210 access to protected subprograms in generic bodies.
4211 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
4212 protected type, indicate that the convention of the subprogram is
4213 Convention_Protected, because it may be used in subsequent declarations
4214 within the protected declaration.
4215
4216 2011-08-01 Vincent Celier <celier@adacore.com>
4217
4218 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
4219 and "final" procedures when the name of the library is "ada", to avoid
4220 duplicate symbols "adainit" and "adafinal" in executables.
4221
4222 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4223
4224 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
4225 quantified expression that appears within a postcondition and uses the
4226 Ada2012 'Result attribute.
4227
4228 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4229
4230 * init.c (__gnat_error_handler): Cast reason to int.
4231 (__gnat_install_handler): Explain sa_sigaction use.
4232
4233 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4234
4235 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
4236 subprogram has copy-in copy-out parameters, try to promote the mode of
4237 the return type if it is passed in registers.
4238
4239 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4240
4241 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
4242 left operand as addressable.
4243
4244 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4245
4246 * gcc-interface/gigi.h (build_function_stub): Remove.
4247 (build_return_expr): Likewise.
4248 (convert_vms_descriptor): Declare.
4249 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
4250 (build_function_stub): Move to...
4251 * gcc-interface/utils2.c (build_return_expr): Move to...
4252 * gcc-interface/trans.c (build_function_stub): ...here.
4253 (build_return_expr): ...here.
4254 (Subprogram_Body_to_gnu): Add local variable for language_function.
4255 Disconnect the parameter attributes cache, if any, once done with it.
4256 Call end_subprog_body only after setting the end_locus.
4257 Build the stub associated with the function, if any, at the very end.
4258 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
4259 variables and streamline control flow.
4260
4261 2011-07-23 Arnaud Charlet <charlet@adacore.com>
4262
4263 PR ada/49819
4264 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
4265 g-trasym-dwarf.adb.
4266
4267 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4268
4269 PR bootstrap/49794
4270 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
4271 Assign to act.sa_sigaction.
4272 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
4273 current->return_address to char * before arithmetic.
4274
4275 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4276
4277 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
4278 Correct argument types.
4279 Extract code from reason.
4280 (__gnat_install_handler): Assign to act.sa_sigaction.
4281
4282 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
4283
4284 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
4285 (GNAT1_OBJS): ...here.
4286
4287 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
4288
4289 PR ada/48711
4290 * g-socthi-mingw.adb (Fill): Fix formatting.
4291
4292 * gcc-interface/gigi.h: Move around comment.
4293
4294 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4295
4296 PR ada/46350
4297 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
4298
4299 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
4300
4301 PR ada/48711
4302 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
4303
4304 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
4305
4306 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
4307 range comparison if Pmode is SImode.
4308
4309 2011-07-12 Laurent GUERBY <laurent@guerby.net>
4310 Eric Botcazou <ebotcazou@adacore.com>
4311
4312 * adadecode.c: Wrap up in extern "C" block.
4313 * adadecode.h: Likewise.
4314 * adaint.c: Likewise. Remove 'const' keyword.
4315 * adaint.h: Likewise.
4316 * argv.c: Likewise.
4317 * atree.h: Likewise.
4318 * cio.c: Likewise.
4319 * cstreams.c: Likewise.
4320 * env.c: Likewise.
4321 * exit.c: Likewise.
4322 * fe.h: Likewise.
4323 * final.c: Likewise.
4324 * init.c: Likewise.
4325 * initialize.c: Likewise.
4326 * link.c: Likewise.
4327 * namet.h: Likewise.
4328 * nlists.h: Likewise.
4329 * raise.c: Likewise.
4330 * raise.h: Likewise.
4331 * repinfo.h: Likewise.
4332 * seh_init.c: Likewise.
4333 * targext.c: Likewise.
4334 * tracebak.c: Likewise.
4335 * uintp.h: Likewise.
4336 * urealp.h: Likewise.
4337 * xeinfo.adb: Wrap up generated C code in extern "C" block.
4338 * xsinfo.adb: Likewise.
4339 * xsnamest.adb: Likewise.
4340 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
4341 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
4342 * gcc-interface/misc.c: Likewise.
4343 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
4344 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
4345 ada/targext.o here...
4346 (GNAT_ADA_OBJS): ...and not here.
4347 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
4348 (GNATBIND_OBJS): Reorder.
4349
4350 2011-07-07 Richard Henderson <rth@redhat.com>
4351
4352 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
4353 dwarf2out_frame_init.
4354
4355 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
4356
4357 * gcc-interface/misc.c (gnat_init): Tweak previous change.
4358
4359 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4360
4361 PR target/39150
4362 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
4363
4364 2011-07-06 Richard Guenther <rguenther@suse.de>
4365
4366 * gcc-interface/misc.c (gnat_init): Merge calls to
4367 build_common_tree_nodes and build_common_tree_nodes_2.
4368 Re-initialize boolean_false_node.
4369
4370 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
4371 Olivier Hainque <hainque@adacore.com>
4372 Nicolas Setton <setton@adacore.com>
4373
4374 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
4375 the type according to the ARTIFICIAL_P parameter.
4376 (create_type_decl): Likewise.
4377 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
4378
4379 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
4380
4381 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
4382 (gnatbind): Likewise.
4383
4384 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4385
4386 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
4387
4388 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4389
4390 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
4391 local variable throughout. Remove useless call to Base_Type.
4392 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
4393 Take it also into account for the volatileness of the field. Set the
4394 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
4395
4396 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4397
4398 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
4399 on a dereference built for a by-ref object if it has an address clause.
4400
4401 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4402
4403 * einfo.ads (Address_Taken): Document use for the second argument of
4404 Asm_Input and Asm_Output attributes.
4405 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
4406 argument is an entity name, then set Address_Taken on it.
4407 <Attribute_Asm_Output>: Likewise.
4408 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
4409 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
4410 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
4411 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
4412
4413 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
4414
4415 PR middle-end/46500
4416 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
4417
4418 2011-06-14 Joseph Myers <joseph@codesourcery.com>
4419
4420 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
4421 (ada/utils.o): Update dependencies.
4422 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
4423 ../../../libcpp/libcpp.a.
4424 * gcc-interface/utils.c: Include common/common-target.h.
4425 (process_attributes): Use targetm_common.have_named_sections.
4426
4427 2011-06-07 Richard Guenther <rguenther@suse.de>
4428
4429 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
4430 set_sizetype.
4431
4432 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4433
4434 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
4435 TREE_THIS_NOTRAP flag.
4436
4437 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4438
4439 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
4440 Fix thinko.
4441
4442 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4443
4444 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
4445 constants whose full view has discriminants specially.
4446
4447 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4448
4449 * gcc-interface/utils.c: Include diagnostic.h.
4450 (gnat_write_global_declarations): Output debug information for all
4451 global type declarations before finalizing the compilation unit.
4452 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
4453
4454 2011-05-25 Jakub Jelinek <jakub@redhat.com>
4455
4456 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
4457
4458 2011-05-25 Kai Tietz <ktietz@redhat.com>
4459
4460 * adaint.c (__gnat_to_canonical_file_list_next): Use array
4461 initialization instead of const/none-const pointer assignment.
4462
4463 2011-05-24 Joseph Myers <joseph@codesourcery.com>
4464
4465 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
4466 $(EXTRA_GNAT1_OBJS).
4467 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
4468 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
4469 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
4470 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
4471 libcommon-target.a instead of prefix.o.
4472
4473 2011-05-21 Joseph Myers <joseph@codesourcery.com>
4474
4475 PR ada/49097
4476 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
4477
4478 2011-05-20 Joseph Myers <joseph@codesourcery.com>
4479
4480 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
4481 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
4482 instead of version.o.
4483
4484 2011-05-18 Kai Tietz <ktietz@redhat.com>
4485
4486 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
4487 boolean_false_node instead of integer_zero_node.
4488 (convert_with_check): Likewise.
4489 * gcc-interface/decl.c (choices_to_gnu): Likewise.
4490
4491 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
4492
4493 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
4494 type of the parameter is an unconstrained array, convert the actual to
4495 the type of the formal in the In Out and Out cases as well.
4496
4497 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
4498
4499 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
4500 call build_function_type_array or build_varargs_function_type_array
4501 instead.
4502 (create_subprog_type): Don't call build_function_type; call
4503 build_function_type_vec instead.
4504
4505 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
4506
4507 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
4508 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
4509 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
4510
4511 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
4512
4513 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
4514
4515 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
4516 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
4517
4518 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4519
4520 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
4521
4522 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4523
4524 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
4525 instead of accessing TYPE_ARG_TYPES directly.
4526 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
4527
4528 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
4529
4530 PR ada/48844
4531 * gcc-interface/gigi.h (get_variant_part): Declare.
4532 * gcc-interface/decl.c (get_variant_part): Make global.
4533 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
4534 types have the same constant size, are record types and T1 has a
4535 variant part while T2 doesn't.
4536
4537 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
4538
4539 * gcc-interface/utils.c (begin_subprog_body): Do not call
4540 get_pending_sizes.
4541 (end_subprog_body): Likewise.
4542
4543 2011-05-04 Richard Guenther <rguenther@suse.de>
4544
4545 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
4546 int_const_binop.
4547 (pos_to_constructor): Likewise.
4548
4549 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
4550 Eric Botcazou <ebotcazou@adacore.com>
4551
4552 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
4553 of build_function_type. Adjust calls to...
4554 (build_raise_check): ...this. Do not take a void_tree parameter.
4555 Call build_function_type_list instead of build_function_type.
4556 Fix head comment and swap couple of conditional blocks.
4557
4558 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
4559
4560 * gnatvsn.ads (Library_Version): Bump to 4.7.
4561 (Current_Year): Bump to 2011.
4562
4563 2011-04-29 Michael Matz <matz@suse.de>
4564
4565 * gcc-interface/misc.c (gnat_handle_option): Set
4566 warn_maybe_uninitialized.
4567
4568 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
4569
4570 * gnat_ugn.texi (Complexity Metrics Control): Update link to
4571 the Watson/McCabe paper.
4572
4573 2011-04-23 Jim Meyering <meyering@redhat.com>
4574
4575 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
4576
4577 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
4578
4579 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
4580 onto the new type.
4581
4582 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
4583
4584 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
4585 parameter.
4586 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
4587 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
4588 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
4589 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
4590 <all>: Do not set flags on the reused DECL node coming from an alias.
4591 Set DECL_IGNORED_P on the DECL node built for subprograms if they
4592 don't need debug info here...
4593 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
4594 (gigi): Adjust calls to create_subprog_decl.
4595 (build_raise_check): Likewise.
4596 (establish_gnat_vms_condition_handler): Likewise.
4597 (Compilation_Unit_to_gnu): Likewise.
4598 (gnat_to_gnu): Likewise.
4599
4600 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
4601
4602 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
4603 (NO_REORDER_ADAFLAGS): New variable.
4604 (EXTRA_GNATTOOLS): Always define.
4605 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
4606 Clean up and adjust list of files compiled with special options.
4607 * gcc-interface/Make-lang.in: Likewise.
4608 (ada/decl.o): Cosmetical change.
4609 (ada/misc.o): Remove dependency on $(PLUGIN_H).
4610
4611 2011-04-20 Jim Meyering <meyering@redhat.com>
4612
4613 * initialize.c (__gnat_initialize): Remove useless if-before-free.
4614
4615 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
4616
4617 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
4618 $(CFLAGS) on the link line.
4619
4620 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
4621
4622 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
4623 padded type built for the return type if it is unconstrained.
4624
4625 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
4626
4627 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
4628
4629 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
4630
4631 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
4632 before calling TREE_CHAIN.
4633 * gcc-interface/misc.c (gnat_init_ts): New function.
4634 (LANG_HOOKS_INIT_TS): Define.
4635
4636 2011-04-12 Martin Jambor <mjambor@suse.cz>
4637
4638 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
4639 instead of cgraph_node.
4640
4641 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
4642
4643 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
4644 alignment on fields of the RETURN type built for the Copy-In Copy-Out
4645 mechanism.
4646
4647 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
4648
4649 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
4650 of aggregate types that contain a placeholder.
4651
4652 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
4653
4654 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
4655 TYPE_ARG_TYPES.
4656 (handle_type_generic_attribute): Likewise.
4657
4658 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
4659
4660 PR ada/47163
4661 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
4662
4663 2011-04-04 Kai Tietz <ktietz@redhat.com>
4664
4665 PR ada/47163
4666 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
4667 to flag value.
4668
4669 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4670
4671 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
4672 type case, do not strip a padding type around the array type.
4673
4674 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4675
4676 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
4677 types.
4678
4679 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4680
4681 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
4682 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
4683 code for -feliminate-unused-debug-types.
4684 (gnat_post_options): Likewise.
4685
4686 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4687
4688 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
4689 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
4690 distinct copy.
4691
4692 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4693
4694 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
4695 DECL_ARTIFICIAL flag on enumeration types.
4696
4697 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4698
4699 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
4700 fat pointer types artificial unconditionally.
4701 <E_Array_Subtype>: Attach the base array type as a parallel type if it
4702 isn't artificial.
4703
4704 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4705
4706 * gcc-interface/gigi.h (get_dummy_type): Declare.
4707 (build_dummy_unc_pointer_types): Likewise.
4708 (finish_fat_pointer_type): Likewise.
4709 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
4710 fat pointer type has been built, complete it in place.
4711 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
4712 and thin pointers. Remove useless variable.
4713 (finish_fat_pointer_type): Make global and move to...
4714 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
4715 (get_dummy_type): New function.
4716 (build_dummy_unc_pointer_types): Likewise.
4717 (gnat_pushdecl): Propage the name to the anonymous variants only.
4718 (update_pointer_to): Only adjust the pointer types in the unconstrained
4719 array case.
4720
4721 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4722
4723 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
4724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
4725 if this is a Taft amendment type and the full declaration is available.
4726 * gcc-interface/trans.c (process_type): Likewise.
4727 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
4728 (process_freeze_entity): Likewise.
4729 * gcc-interface/utils.c (dummy_global): New static variable.
4730 (gnat_write_global_declarations): If there are types declared as used
4731 at the global level, insert them in the global hash table.
4732
4733 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4734
4735 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
4736 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
4737 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
4738 copy.
4739 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
4740 flag of the type accordingly.
4741 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
4742
4743 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
4744
4745 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
4746 finalizing types when updating the pointers to the designated type.
4747 <all>: Finalize the deferred types even if we didn't defer processing
4748 of incomplete types in this invocation.
4749
4750 2011-04-01 Olivier Hainque <hainque@adacore.com>
4751 Nicolas Setton <setton@adacore.com>
4752 Eric Botcazou <ebotcazou@adacore.com>
4753
4754 * gcc-interface/misc.c (gnat_descriptive_type): New function.
4755 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
4756
4757 2011-03-28 Kai Tietz <ktietz@redhat.com>
4758
4759 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
4760 Windows targets.
4761 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
4762 * system-mingw.ads (System): Change ZCX_By_Default default to True.
4763
4764 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
4765
4766 2011-03-28 Tristan Gingold <gingold@adacore.com>
4767
4768 PR ada/44431
4769 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
4770 Use ada output of gnatbind.
4771 (ada/b_gnatb.adb): Ditto.
4772 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
4773 (ada.mostlyclean, ada.stage1)
4774 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
4775 (ada.stagefeedback): Adjust.
4776 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
4777 Use ada output of gnatbind.
4778 (b_gnatm.adb): Ditto.
4779 (b_gnatl.o, b_gnatm.o): New rules.
4780
4781 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4782
4783 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
4784 for the padded type built to support a specified size or alignment.
4785
4786 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4787
4788 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
4789 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
4790 unconditionally to the end of the unit when the designated type is
4791 limited_with'ed.
4792 <all>: Rename local variable. Attempt to un-defer types only and do it
4793 for limited_with'ed types as well.
4794 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
4795 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
4796 consistently and remove redundant call to finalize_from_with_types.
4797
4798 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
4799
4800 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
4801 subprograms without a previous spec declared in the same unit.
4802 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
4803 subprograms at the end of the unit instead of at the beginning.
4804 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
4805 isn't public for the special handling of non-inline functions nested
4806 inside inline external functions.
4807
4808 2011-03-25 Jeff Law <law@redhat.com>
4809
4810 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
4811
4812 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
4813
4814 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
4815 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
4816 to compute Set_Size_Depends_On_Discriminant.
4817 (Layout_Type): Call it on array types in back-end layout mode.
4818 * sem_util.adb (Requires_Transient_Scope): Return true for array
4819 types only if the size depends on the value of discriminants.
4820 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
4821 type if the RHS is a call to a function that returns an unconstrained
4822 type with default discriminant.
4823
4824 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
4825
4826 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
4827 non-conversion to the nominal result type at the end.
4828
4829 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4830
4831 * gcc-interface/trans.c (create_temporary): New function taken from...
4832 (create_init_temporary): ...here. Call it.
4833 (call_to_gnu): Create the temporary for the return value early, if any.
4834 Create it for a function with copy-in/copy-out parameters if there is
4835 no target; in other cases of copy-in/copy-out, use another temporary.
4836 Push the new binding level lazily. Add and rename local variables.
4837
4838 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4839
4840 * gcc-interface/decl.c (validate_size): Improve comments and tweak
4841 error message.
4842 (set_rm_size): Likewise.
4843
4844 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
4845
4846 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
4847 for the padded type built in order to support a specified alignment.
4848 Fix incorrect formatting.
4849
4850 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4851
4852 PR bootstrap/48216
4853 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
4854
4855 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4856
4857 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
4858 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
4859 to the end of the list. Adjust recursive call. Rename local variable.
4860 If REORDER is true, reorder components of the record type.
4861 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
4862 components_to_record and adjust the parameter list.
4863
4864 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
4865
4866 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
4867 disabled, use the variable for bounds of loop iteration scheme.
4868
4869 2011-03-21 Kai Tietz <ktietz@redhat.com>
4870
4871 PR target/12171
4872 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
4873
4874 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
4875
4876 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
4877 out whether the expression is read-only. Short-circuit placeholder
4878 case and rename a couple of local variables.
4879
4880 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
4881
4882 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
4883 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
4884 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
4885 (convert): Deal with conversions from a smaller form type specially.
4886
4887 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
4888
4889 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
4890 its argument, except for the special -I- switch.
4891
4892 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
4893
4894 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
4895 "Ada Issues".
4896
4897 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
4898
4899 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
4900
4901 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
4902
4903 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
4904 GNAT_FORMAL.
4905 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
4906 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
4907 instead of GNAT_FORMAL. Protect the expression against multiple uses.
4908 Do not generate the check directly, instead instantiate the template
4909 check present in the descriptor.
4910 (make_descriptor_field): Move around.
4911 (build_vms_descriptor32): Build a template check in the POINTER field.
4912 (build_vms_descriptor): Remove useless suffixes.
4913 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
4914
4915 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
4916
4917 PR bootstrap/47467
4918 * targext.c: Include target files if IN_RTS is defined.
4919
4920 2011-01-26 Richard Guenther <rguenther@suse.de>
4921
4922 PR bootstrap/47467
4923 * targext.c: Include config.h.
4924 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
4925 dependency.
4926
4927 2011-01-04 Pascal Obry <obry@adacore.com>
4928 Eric Botcazou <ebotcazou@adacore.com>
4929
4930 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
4931
4932 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
4933
4934 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
4935 end-of-case on the end label and its associated gotos, if any.
4936
4937 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
4938
4939 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
4940 expressions of the parameter cache within the statement group of
4941 the CICO mechanism.
4942
4943 2011-01-04 Olivier Hainque <hainque@adacore.com>
4944 Eric Botcazou <ebotcazou@adacore.com>
4945
4946 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
4947 (set_end_locus_from_node): New function.
4948 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
4949 make and the function end_locus.
4950 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
4951 for the elaboration subprogram.
4952 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
4953 set the end_locus of the expression as well.
4954
4955 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
4956
4957 PR ada/47131
4958 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
4959 variables that are referenced in exception handlers volatile.
4960
4961
4962 \f
4963 Copyright (C) 2011 Free Software Foundation, Inc.
4964
4965 Copying and distribution of this file, with or without modification,
4966 are permitted in any medium without royalty provided the copyright
4967 notice and this notice are preserved.
4968
4969 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4970 - fix bugs in the description of Source_Trace;
4971 - get rid of UNIT_NAME;
4972
4973 2011-08-02 Javier Miranda <miranda@adacore.com>
4974
4975 * exp_ch9.adb
4976 (Build_Dispatching_Requeue): Adding support for VM targets
4977 since we cannot directly reference the Tag entity.
4978 * exp_sel.adb (Build_K): Adding support for VM targets.
4979 (Build_S_Assignment): Adding support for VM targets.
4980 * exp_disp.adb
4981 (Default_Prim_Op_Position): In VM targets do not restrict availability
4982 of predefined interface primitives to compiling in Ada 2005 mode.
4983 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4984 restricted to compiling in Ada 2005 mode.
4985 (Make_VM_TSD): Generate code that declares and initializes the OSD
4986 record. Needed to support dispatching calls through synchronized
4987 interfaces.
4988 * exp_ch3.adb
4989 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4990 primitives associated with synchronized interfaces.
4991 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4992 primitives associated with synchronized interfaces.
4993
4994 2011-08-02 Yannick Moy <moy@adacore.com>
4995
4996 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4997 statements hidden in SPARK if preceded by the HIDE directive
4998 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4999 exception handlers as hidden in SPARK if preceded by the HIDE directive
5000 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5001 if starting with the HIDE directive
5002 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5003 starting with the HIDE directive; mark the declarations in a private
5004 part as hidden in SPARK if the private part starts with the HIDE
5005 directive
5006 * restrict.adb, restrict.ads
5007 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5008 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5009 argument node belongs to a part which is hidden in SPARK
5010 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5011 parts in SPARK; protect the possibly costly call to
5012 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5013 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5014 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5015 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5016 Tok_SPARK_Hide.
5017 (Scan): recognize special comment starting with '#' and followed by
5018 SPARK keyword "hide" as a HIDE directive.
5019
5020 2011-08-02 Yannick Moy <moy@adacore.com>
5021
5022 * types.ads, erroutc.ads: Minor reformatting.
5023
5024 2011-08-02 Vincent Celier <celier@adacore.com>
5025
5026 * link.c: Add response file support for cross platforms.
5027
5028 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5029
5030 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5031 in an association, set parent field of copy before partial analysis.
5032 * sem_res.adb (Resolve_Slice): create reference to itype only when
5033 expansion is enabled.
5034
5035 2011-08-02 Yannick Moy <moy@adacore.com>
5036
5037 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5038 for new flag denoting which subprogram bodies are in ALFA
5039 * restrict.adb, sem_ch7.adb: Update comment
5040 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5041 sem_ch9.adb, sem_res.adb: Add calls to
5042 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5043 * sem_ch6.adb (Analyze_Function_Return): add calls to
5044 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5045 middle of the body, and extended return.
5046 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5047 False when missing return.
5048 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5049 to True for subprograms whose spec is in ALFA. Remove later on the flag
5050 on the entity used for a subprogram body when there exists a separate
5051 declaration.
5052 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5053 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5054 False, otherwise do nothing.
5055
5056 2011-08-02 Robert Dewar <dewar@adacore.com>
5057
5058 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5059
5060 2011-08-02 Yannick Moy <moy@adacore.com>
5061
5062 * sem_ch4.ads: minor formatting.
5063
5064 2011-08-02 Yannick Moy <moy@adacore.com>
5065
5066 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5067 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5068 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5069 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5070 opt.ads: cleanup of SPARK mode
5071
5072 2011-08-02 Yannick Moy <moy@adacore.com>
5073
5074 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5075 types.
5076 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5077 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5078 * sem_ch3.adb
5079 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5080 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5081 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5082 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5083 types.
5084 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5085 non-static range.
5086 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5087 functions whose return type is not in ALFA.
5088 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5089 specifications.
5090 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5091 parameter's type is not in ALFA.
5092 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5093 types are in ALFA.
5094
5095 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5096
5097 * sem_ch6 (Analyze_Expression_Function): treat the function as
5098 Inline_Always, and introduce a subprogram declaration for it when it is
5099 not a completion.
5100 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5101 expression functions, so that the back-end can determine whether they
5102 can in fact be inlined.
5103 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5104 a function body comes from an expression function.
5105
5106 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5107
5108 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5109 null exclusions to test Can_Never_Be_Null on the anonymous access types
5110 of the formals rather than testing the formals themselves. Exclude this
5111 check in cases where the Old_Formal is marked as a controlling formal,
5112 to avoid issuing spurious errors for bodies completing dispatching
5113 operations (due to the flag not getting set on controlling access
5114 formals in body specs).
5115 (Find_Corresponding_Spec): When checking full and subtype conformance of
5116 subprogram bodies in instances, pass Designated and E in that order, for
5117 consistency with the expected order of the formals (New_Id followed by
5118 Old_Id).
5119
5120 2011-08-02 Robert Dewar <dewar@adacore.com>
5121
5122 * sem_ch8.adb: Minor reformatting.
5123
5124 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5125
5126 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5127 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5128 primitive operations of class-wide actuals.
5129
5130 2011-08-02 Javier Miranda <miranda@adacore.com>
5131
5132 * exp_atag.ads, exp_atag.adb
5133 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5134 since its value is implicitly passed in argument Typ.
5135 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5136 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5137 Build_Common_Dispatching_Select_Statements.
5138
5139 2011-08-02 Robert Dewar <dewar@adacore.com>
5140
5141 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5142 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5143 Minor reformatting.
5144
5145 2011-08-02 Robert Dewar <dewar@adacore.com>
5146
5147 * sem_res.adb: Minor reformatting.
5148 * sem_prag.adb: Minor reformatting.
5149
5150 2011-08-02 Javier Miranda <miranda@adacore.com>
5151
5152 * exp_atag.adb, exp_atags.ads
5153 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5154 by the tagged type Entity. Required to use this routine in the VM
5155 targets since we do not have available the Tag entity in the VM
5156 platforms.
5157 * exp_ch6.adb
5158 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5159 Ada.Tags has not been previously loaded.
5160 * exp_ch7.adb
5161 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5162 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5163 * sem_aux.adb
5164 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5165 view of enclosing scopes. Required to handle enclosing scopes that
5166 are synchronized types whose full view is a task type.
5167 * exp_disp.adb
5168 (Build_VM_TSDs): Minor code improvement to avoid generating and
5169 analyzing lists with empty nodes.
5170 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5171 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5172 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5173 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5174 (Make_Select_Specific_Data_Table): Add support for VM targets.
5175 (Make_VM_TSD): Generate code to initialize the SSD structure of
5176 the TSD.
5177
5178 2011-08-02 Yannick Moy <moy@adacore.com>
5179
5180 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5181 cross-references section in ALI.
5182 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5183 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5184 Sub).
5185 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5186 subprogram or package entity of a node
5187 (Is_Local_Reference_Type): new function returns True for references
5188 selected in local cross-references.
5189 (Lt): function extracted from Lt in Output_References
5190 (Write_Entity_Name): function extracted from Output_References
5191 (Generate_Definition): generate reference with type 'D' for definition
5192 of objects (object declaration and parameter specification), with
5193 appropriate locations and units, for use in local cross-references.
5194 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5195 references of type 'I' for initialization in object definition.
5196 (Output_References): move part of function Lt and procedure
5197 Write_Entity_Name outside of the body. Ignore references of types 'D'
5198 and 'I' introduced for local cross-references.
5199 (Output_Local_References): new procedure to output the local
5200 cross-references sections.
5201 (Lref_Entity_Status): new array defining whether an entity is a local
5202 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5203 with 'I' type when initialization expression is present.
5204 * get_scos.adb, get_scos.ads: Correct comments and typos
5205
5206 2011-08-02 Javier Miranda <miranda@adacore.com>
5207
5208 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5209 the JVM target.
5210 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5211 the JVM target.
5212 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5213 TSD support.
5214
5215 2011-08-02 Vincent Celier <celier@adacore.com>
5216
5217 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5218 (No_Space_Img): New function
5219 (Find_Excluded_Sources): When reading from a file, record the file name
5220 and the line number for each excluded source.
5221 (Mark_Excluded_Sources): When reporting an error, if the excluded
5222 sources were read from a file, include file name and line number in
5223 the error message.
5224
5225 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5226
5227 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5228
5229 2011-08-02 Robert Dewar <dewar@adacore.com>
5230
5231 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5232
5233 2011-08-02 Javier Miranda <miranda@adacore.com>
5234
5235 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5236 generation of TSDs to the DOTNET compiler.
5237 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5238 generation of TSDs to the DOTNET compiler.
5239
5240 2011-08-02 Javier Miranda <miranda@adacore.com>
5241
5242 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5243 record of all the tagged types declared inside library level package
5244 declarations, library level package bodies or library level subprograms.
5245 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5246 associated with a given tagged type.
5247 (Build_VM_TSDs): New subprogram.
5248 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5249 compilation units that are subprograms.
5250 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5251 compilation units that are package bodies.
5252 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5253 units that are a package declaration or a package instantiation.
5254 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5255 reorganization to improve the error generated by the frontend when the
5256 function Ada.Tags.Secondary_Tag is not available.
5257 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5258 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5259
5260 2011-08-02 Javier Miranda <miranda@adacore.com>
5261
5262 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5263
5264 2011-08-02 Robert Dewar <dewar@adacore.com>
5265
5266 * s-imenne.ads: Minor reformatting.
5267
5268 2011-08-02 Robert Dewar <dewar@adacore.com>
5269
5270 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5271 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5272 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5273
5274 2011-08-02 Robert Dewar <dewar@adacore.com>
5275
5276 * einfo.ads (Materialize_Entity): Document this is only for renamings
5277 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5278 required debug information in the case where we transform the object
5279 declaration into a renaming declaration.
5280 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5281 object
5282 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5283 Materialize_Entity.
5284
5285 2011-08-02 Robert Dewar <dewar@adacore.com>
5286
5287 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5288 Suppress_Init_Procs.
5289 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5290 Suppress_Initialization/Initialization_Suppressed.
5291 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5292 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5293 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5294 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5295
5296 2011-08-02 Robert Dewar <dewar@adacore.com>
5297
5298 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5299 Minor reformatting.
5300
5301 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5302
5303 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5304 only have inheritable classwide pre/postconditions.
5305
5306 2011-08-02 Javier Miranda <miranda@adacore.com>
5307
5308 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5309 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5310 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5311 checks if the external tag of a type is the same as the external tag
5312 of some other declaration.
5313
5314 2011-08-02 Thomas Quinot <quinot@adacore.com>
5315
5316 * s-taskin.ads: Minor reformatting.
5317
5318 2011-08-02 Emmanuel Briot <briot@adacore.com>
5319
5320 * g-comlin.adb (Display_Help): swap the order in which it prints the
5321 short help and the general usage.
5322
5323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5324
5325 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5326 the aspect declarations and attach them to the generic copy for
5327 subsequent analysis.
5328 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5329 declarations of the generic tree to the new subprogram declarations.
5330 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5331 conditions that apply to a subprogram instance.
5332
5333 2011-08-02 Robert Dewar <dewar@adacore.com>
5334
5335 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5336
5337 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5338
5339 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5340 private type with a tagged full view is not derived in the immediate
5341 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5342
5343 2011-08-02 Robert Dewar <dewar@adacore.com>
5344
5345 * exp_ch4.adb: Minor reformatting.
5346
5347 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5348
5349 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5350 Ada2012 iterator, the loop will be rewritten during expansion into a
5351 while loop with a cursor and an element declaration. Do not analyze the
5352 body in this case, because if the container is for indefinite types the
5353 actual subtype of the elements will only be determined when the cursor
5354 declaration is analyzed.
5355
5356 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5357
5358 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5359 size/alignment related attributes in CodePeer_Mode.
5360
5361 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5362
5363 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5364 Prepend_Element, since this can result in the operation getting the
5365 wrong slot in the full type's dispatch table if the full type has
5366 inherited operations. The incomplete type's operation will get added
5367 to the proper position in the full type's primitives
5368 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5369 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5370 dispatching operations, since there are cases where nonprimitive
5371 subprograms can get added to the list of incomplete dependents (such
5372 as subprograms in nested packages).
5373 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5374 private part when determining whether to add a primitive with a
5375 parameter of a tagged incomplete type to the Private_Dependents list.
5376 Such primitives can also occur in the visible part, and should not have
5377 been excluded from being private dependents.
5378 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5379 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5380 list of a Taft-amendment incomplete type is a primitive before issuing
5381 an error that the full type must appear in the same unit. There are
5382 cases where nonprimitives can be in the list (such as subprograms in
5383 nested packages).
5384 * sem_disp.adb (Derives_From): Use correct condition for checking that
5385 a formal's type is derived from the type of the corresponding formal in
5386 the parent subprogram (the condition was completely wrong). Add
5387 checking that was missing for controlling result types being derived
5388 from the result type of the parent operation.
5389
5390 2011-08-02 Yannick Moy <moy@adacore.com>
5391
5392 * errout.adb (First_Node): minor renaming
5393 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5394 first node.
5395
5396 2011-08-02 Yannick Moy <moy@adacore.com>
5397
5398 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5399 before accessing operands.
5400 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5401 decide whether an initialization expression respects SPARK rules, as
5402 the plain node is the expanded one. This allows for more valid warnings
5403 to be issued.
5404 * gnat_rm.texi: Minor update.
5405
5406 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5407
5408 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5409 previous change.
5410
5411 2011-08-02 Robert Dewar <dewar@adacore.com>
5412
5413 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5414
5415 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5416
5417 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5418 loop statements and the element renaming declaration with a block when
5419 the element type is controlled.
5420
5421 2011-08-02 Yannick Moy <moy@adacore.com>
5422
5423 * sinfo.ads: Minor formatting.
5424
5425 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5426
5427 * sem_aggr.adb (Add_Association): if the association has a box and no
5428 expression, use the Sloc of the aggregate itself for the new
5429 association.
5430 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5431 the Original_Node.
5432
5433 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5434
5435 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5436 When a container is provided via a function call, generate a renaming
5437 of the function result. This avoids the creation of a transient scope
5438 and the premature finalization of the container.
5439 * exp_ch7.adb (Is_Container_Cursor): Removed.
5440 (Wrap_Transient_Declaration): Remove the supression of the finalization
5441 of the list controller when the declaration denotes a container cursor,
5442 it is not needed.
5443
5444 2011-08-02 Yannick Moy <moy@adacore.com>
5445
5446 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5447 node is from source, instead of the original node being from source.
5448 * sem_aggr.adb
5449 (Resolve_Array_Aggregate): refine the check for a static expression, to
5450 recognize also static ranges
5451 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5452 Array_Type_Declaration): postpone the test for the type being a subtype
5453 mark after the type has been resolved, so that component-selection and
5454 expanded-name are discriminated.
5455 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5456 to distinguish the case of an iteration scheme, so that an error is
5457 issed on a non-static range in SPARK except in an iteration scheme.
5458 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5459 In_Iter_Schm = True.
5460 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5461 user-defined operators so that they are allowed in renaming
5462 * sem_ch8.adb
5463 (Find_Selected_Component): refine the check for prefixing of operators
5464 so that they are allowed in renaming. Move the checks for restrictions
5465 on selector name after analysis discriminated between
5466 component-selection and expanded-name.
5467 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5468 concatenation argument of string type if it is static.
5469 * sem_util.adb, sem_util.ads
5470 (Check_Later_Vs_Basic_Declarations): add a new function
5471 Is_Later_Declarative_Item to decice which declarations are allowed as
5472 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5473 mode, add that renamings are considered as later items.
5474 (Enclosing_Package): new function to return the enclosing package
5475 (Enter_Name): correct the rule for homonyms in SPARK
5476 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5477 from source (result of expansion) to avoid issuing wrong warnings.
5478
5479 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5480
5481 * errout.adb: On anything but an expression First_Node returns its
5482 argument.
5483
5484 2011-08-02 Pascal Obry <obry@adacore.com>
5485
5486 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5487
5488 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5489
5490 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5491 Set the associated loop as the related expression of internally
5492 generated cursors.
5493 * exp_ch7.adb (Is_Container_Cursor): New routine.
5494 (Wrap_Transient_Declaration): Supress the finalization of the list
5495 controller when the declaration denotes a container cursor.
5496
5497 2011-08-02 Yannick Moy <moy@adacore.com>
5498
5499 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5500 command line now.
5501 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5502 expression is a simple expression. This check cannot be performed in
5503 the semantics, so just drop it.
5504 (P_Index_Or_Discriminant_Constraint): move check that the index or
5505 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5506 semantics. Other cases were previously checked in the semantics.
5507 * par-ch4.adb (P_Name): move checks that a selector name is not
5508 character literal or an operator symbol to Find_Selected_Component in
5509 the semantics
5510 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5511 declarations are not placed after later declarations in a separate
5512 procedure in Sem_Util (possibly not the best choice?), to be used both
5513 during parsing, for Ada 83 mode, and during semantic analysis, for
5514 SPARK mode.
5515 * par-endh.adb (Check_End): move check that end label is not missing
5516 to Process_End_Label in the semantics
5517 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5518 the special case for SPARK restriction
5519 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5520 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5521 parameter Force to issue the error message even on internal node (used
5522 for generated end label). Call Check_Restriction to check when an error
5523 must be issued. In SPARK mode, issue an error message even if the
5524 restriction is not set.
5525 (Check_Restriction): new procedure with an additional out parameter to
5526 inform the caller that a message has been issued
5527 * sem_aggr.adb: Minor modification of message
5528 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5529 instead of issuing an error message directly
5530 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5531 declarations are not placed after later declarations, by calling
5532 Check_Later_Vs_Basic_Declarations
5533 (Analyze_Subtype_Declaration): move here the check that an index or
5534 discriminant constraint must be a subtype mark. Change the check that
5535 a subtype of String must start at one so that it works on subtype marks.
5536 * sem_ch4.adb (Analyze_Call): move here the check that a named
5537 association cannot follow a positional one in a call
5538 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5539 instead of issuing an error message directly
5540 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5541 selector name is not a character literal or an operator symbol. Move
5542 here the check that the prefix of an expanded name cannot be a
5543 subprogram or a loop statement.
5544 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5545 procedure called from parsing and semantics to check that basic
5546 declarations are not placed after later declarations
5547 (Process_End_Label): move here the check that end label is not missing
5548
5549 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5550
5551 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5552 representation clause in codepeer mode, since it confuses CodePeer and
5553 does not bring useful info.
5554
5555 2011-08-02 Ed Falis <falis@adacore.com>
5556
5557 * init.c: initialize fp hw on MILS.
5558
5559 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5560
5561 * errout.adb (First_Node): for bodies, return the node itself (small
5562 optimization). For other nodes, do not check source_unit if the node
5563 comes from Standard.
5564
5565 2011-08-02 Robert Dewar <dewar@adacore.com>
5566
5567 * exp_ch3.adb: Minor comment additions.
5568 * sem_ch13.adb: Minor reformatting.
5569
5570 2011-08-02 Pascal Obry <obry@adacore.com>
5571
5572 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5573
5574 2011-08-02 Robert Dewar <dewar@adacore.com>
5575
5576 * sem_attr.adb: Minor reformatting.
5577
5578 2011-08-02 Robert Dewar <dewar@adacore.com>
5579
5580 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5581 (Has_Default_Component_Value): Removed
5582 * einfo.ads Comment updates
5583 (Has_Default_Aspect): Replaces Has_Default_Value
5584 (Has_Default_Component_Value): Removed
5585 * exp_ch13.adb
5586 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5587 * exp_ch3.adb
5588 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5589 (Get_Simple_Init_Val): Handle Default_Value aspect
5590 (Needs_Simple_Initialization): Handle Default_Value aspect
5591 * exp_ch3.ads: Needs_Simple_Initialization
5592 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5593 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5594 * sem_ch13.adb
5595 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5596 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5597 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5598
5599 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5600
5601 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5602 package containing iteration primitives.
5603 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5604
5605 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5606
5607 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5608 "of", pre-analyze expression in case it is a function call with
5609 finalization actions that must be placed ahead of the loop.
5610 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5611 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5612
5613 2011-08-02 Geert Bosch <bosch@adacore.com>
5614
5615 * cstand.adb (Create_Float_Types): Only consider C's long double for
5616 Long_Long_Float, in addition to double.
5617
5618 2011-08-02 Robert Dewar <dewar@adacore.com>
5619
5620 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5621 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5622 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5623 Minor reformatting.
5624
5625 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5626
5627 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5628 indexed component.
5629
5630 2011-08-02 Javier Miranda <miranda@adacore.com>
5631
5632 * einfo.ads, einfo.adb
5633 (Original_Access_Type): Move this attribute to Node26 since there was
5634 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5635 which causes conflicts and breaks the generation of the .NET compiler.
5636 (Interface_Name): Add missing documentation on JGNAT only uses of
5637 this attribute.
5638
5639 2011-08-02 Geert Bosch <bosch@adacore.com>
5640
5641 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5642 (Find_Back_End_Float_Type): Likewise
5643 (Create_Back_End_Float_Types): Likewise
5644 (Create_Float_Types): Likewise
5645 (Register_Float_Type): Likewise
5646 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5647 Nlist and split out type selection in new local Find_Base_Type function.
5648 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5649 Nlist
5650 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5651
5652 2011-08-02 Robert Dewar <dewar@adacore.com>
5653
5654 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5655 alpha order).
5656 * opt.ads: Minor comment change.
5657 * sem_ch12.adb: Minor code reorganization.
5658
5659 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5660
5661 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5662 subtype's list of rep items to the list on the full subtype in the case
5663 where the lists are the same.
5664
5665 2011-08-02 Geert Bosch <bosch@adacore.com>
5666
5667 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5668 using the one from System.Strings, which also deallocates all strings.
5669
5670 2011-08-02 Geert Bosch <bosch@adacore.com>
5671
5672 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5673 function.
5674 * gcc-interface/Make-lang.in: Update dependencies.
5675
5676 2011-08-02 Olivier Hainque <hainque@adacore.com>
5677
5678 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5679 end_locus.
5680
5681 2011-08-02 Javier Miranda <miranda@adacore.com>
5682
5683 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5684 associated with anonymous access to subprograms.
5685
5686 2011-08-02 Geert Bosch <bosch@adacore.com>
5687
5688 * opt.ads
5689 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5690 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5691 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5692 (Add_Symbol_Definition): Move to switch-c.adb
5693 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5694 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5695 (Add_Symbol_Definition): Move to switch-c.adb.
5696 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5697 * sem_warn.adb
5698 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5699 Move to warnsw.adb.
5700 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5701 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5702 Move to warnsw.adb.
5703 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5704 (Add_Symbol_Definition): Moved from Prepcomp.
5705 * switch-c.ads: Update copyright notice. Use String_List instead of
5706 Argument_List, removing dependency on System.OS_Lib.
5707
5708 2011-08-02 Yannick Moy <moy@adacore.com>
5709
5710 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5711 mode on initialization expression which does not respect SPARK
5712 restrictions.
5713 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5714 if the tree referenced by its argument represents an initialization
5715 expression in SPARK, suitable for initializing an object in an object
5716 declaration.
5717
5718 2011-08-02 Javier Miranda <miranda@adacore.com>
5719
5720 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5721 internally generated access to subprogram with its associated protected
5722 subprogram type.
5723 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5724
5725 2011-08-02 Geert Bosch <bosch@adacore.com>
5726
5727 * cstand.adb (Register_Float_Type): Print information about type to
5728 register, if the Debug_Flag_Dot_B is set.
5729 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5730 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5731 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5732 with a requested precision of more than Max_Digits digits and no more
5733 than Max_Base_Digits digits, if a range specification is present and the
5734 Predefined_Float_Types list has a suitable type to derive from.
5735 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5736 case of type completion with pragma Import
5737 * sem_prag.adb
5738 (Process_Import_Predefined_Type): Processing to complete a type
5739 with pragma Import. Currently supports floating point types only.
5740 (Set_Convention_From_Pragma): Do nothing without underlying type.
5741 (Process_Convention): Guard against absence of underlying type,
5742 which may happen when importing incomplete types.
5743 (Process_Import_Or_Interface): Handle case of importing predefined
5744 types. Tweak error message.
5745
5746 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5747
5748 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5749 functions to previous change. Reorganize code slightly.
5750
5751 2011-08-02 Geert Bosch <bosch@adacore.com>
5752
5753 * back_end.ads (Register_Type_Proc): New call back procedure type for
5754 allowing the back end to provide information about available types.
5755 (Register_Back_End_Types): New procedure to register back end types.
5756 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5757 available types.
5758 * cstand.adb (Back_End_Float_Types): New list for floating point types
5759 supported by the back end.
5760 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5761 (Copy_Float_Type): New procedure to make new copies of predefined types.
5762 (Register_Float_Type): New call back procedure to populate the BEFT list
5763 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5764 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5765 (Create_Float_Types): New procedure to create entities for floating
5766 point types predefined in Standard, and put these and any remaining
5767 BEFTs on the Predefined_Float_Types list.
5768 * stand.ads (Predefined_Float_Types): New list for predefined floating
5769 point types that do not have declarations in package Standard.
5770
5771 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5772
5773 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5774 entity node for the unit containing the parameter.
5775 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5776 (Add_Inlined_Subprogram): Likewise.
5777 * gcc-interface/Make-lang.in: Update dependencies.
5778
5779 2011-08-02 Thomas Quinot <quinot@adacore.com>
5780
5781 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5782 suitable value.
5783
5784 2011-08-02 Geert Bosch <bosch@adacore.com>
5785
5786 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5787
5788 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5789
5790 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5791 computed value of Base_Type.
5792
5793 2011-08-02 Yannick Moy <moy@adacore.com>
5794
5795 * restrict.adb (Check_Restriction): issue an error for any use of
5796 class-wide, even if the No_Dispatch restriction is not set.
5797 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5798 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5799 when completing a private extension, the type named in the private part
5800 is not the same as that named in the visible part.
5801 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5802 of an inherited primitive operations of a tagged type or type extension
5803 that returns the tagged type.
5804 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5805 function which returns True for an implicit operation inherited by the
5806 derived type declaration for the argument type.
5807 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5808 order.
5809
5810 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5811
5812 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5813 Process_Bounds, to perform analysis with expansion of a range or an
5814 expression that is the iteration scheme for a loop.
5815 (Analyze_Iterator_Specification): If domain of iteration is given by a
5816 function call with a controlled result, as is the case if call returns
5817 a predefined container, ensure that finalization actions are properly
5818 generated.
5819 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5820
5821 2011-08-02 Javier Miranda <miranda@adacore.com>
5822
5823 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5824 * gcc-interface/Make-lang.in: Update dependencies.
5825
5826 2011-08-02 Javier Miranda <miranda@adacore.com>
5827
5828 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5829 determine if the analysis is performed using N or Original_Node (N).
5830 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5831 functionality of routine Is_Variable avoids code duplication.
5832 * checks.adb (Determine_Range): Handle temporaries generated by
5833 Remove_Side_Effects.
5834
5835 2011-08-02 Javier Miranda <miranda@adacore.com>
5836
5837 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5838 expansion of the condition. Required since the previous analysis was
5839 done with expansion disabled (see Resolve_Quantified_Expression) and
5840 hence checks were not inserted and record comparisons have not been
5841 expanded.
5842
5843 2011-08-02 Ed Falis <falis@adacore.com>
5844
5845 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5846 Update header.
5847
5848 2011-08-02 Bob Duff <duff@adacore.com>
5849
5850 * opt.ads: Minor comment fix.
5851
5852 2011-08-02 Bob Duff <duff@adacore.com>
5853
5854 * sem_ch12.adb (Analyze_Package_Instantiation,
5855 Analyze_Subprogram_Instantiation): Turn off style checking while
5856 analyzing an instance. Whatever style checks that apply to the generic
5857 unit should apply, so it makes no sense to apply them in an instance.
5858 This was causing trouble when compiling an instance of a runtime
5859 unit that violates the -gnatyO switch.
5860 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5861 one of the two case statements, causing spurious errors.
5862
5863 2011-08-02 Robert Dewar <dewar@adacore.com>
5864
5865 * uname.adb: Minor reformatting.
5866 * gnatcmd.adb: Minor reformatting.
5867 * exp_attr.adb: Minor reformatting.
5868
5869 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5870
5871 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5872 No_Dispatching_Calls, do not look for the Assign primitive, because
5873 predefined primitives are not created in this case.
5874
5875 2011-08-02 Bob Duff <duff@adacore.com>
5876
5877 * stylesw.ads: Minor comment fixes.
5878
5879 2011-08-02 Robert Dewar <dewar@adacore.com>
5880
5881 * freeze.adb (Add_To_Result): New procedure.
5882
5883 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5884
5885 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5886 time, if the specific run-time routines for handling streams of strings
5887 are not available, use the default mechanism.
5888
5889 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5890
5891 * s-regpat.ads: Fix typo.
5892
5893 2011-08-02 Vincent Celier <celier@adacore.com>
5894
5895 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5896 not null, call it to create the in memory config project file without
5897 parsing an existing default config project file.
5898
5899 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5900
5901 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5902
5903 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5904
5905 * sem_elim.adb: an abstract subprogram does not need an eliminate
5906 pragma for its descendant to be eliminable.
5907
5908 2011-08-02 Ed Falis <falis@adacore.com>
5909
5910 * init.c: revert to handling before previous checkin for VxWorks
5911 * s-intman-vxworks.adb: delete unnecessary declarations related to
5912 using Ada interrupt facilities for handling signals.
5913 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5914 * s-intman-vxworks.ads: Import __gnat_install_handler as
5915 Initialize_Interrupts.
5916 * s-taprop-vxworks.adb: Delete Signal_Mask.
5917 (Abort_Handler): change construction of mask to unblock exception
5918 signals.
5919
5920 2011-08-02 Jerome Guitton <guitton@adacore.com>
5921
5922 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5923 Debug_Raise_Exception before propagation starts.
5924
5925 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5926
5927 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5928 to Restriction_Check_Required.
5929 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5930 * sem_res.adb (Resolve_Call): Likewise.
5931 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5932
5933 2011-08-02 Bob Duff <duff@adacore.com>
5934
5935 * stylesw.ads: Update comment.
5936 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5937 * errout.ads: Remove obsolete comment.
5938
5939 2011-08-02 Javier Miranda <miranda@adacore.com>
5940
5941 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5942 (Set_Is_Safe_To_Reevaluate): new procedure.
5943 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5944 assignment is allowed on safe-to-reevaluate variables.
5945 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5946 temporary created to remove side effects in expressions that use
5947 the secondary stack as safe-to-reevaluate.
5948 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5949 variables that are not true constants.
5950
5951 2011-08-02 Robert Dewar <dewar@adacore.com>
5952
5953 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5954 sem_res.adb, sem_ch6.adb: Minor reformatting.
5955
5956 2011-08-02 Jerome Guitton <guitton@adacore.com>
5957
5958 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5959
5960 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5961
5962 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5963 not set Overridden_Operation if subprogram is an initialization
5964 procedure.
5965
5966 2011-08-02 Yannick Moy <moy@adacore.com>
5967
5968 * par-ch6.adb: Correct obsolete name in comments
5969 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5970 which takes two message arguments (existing function takes one), with
5971 second message used for continuation.
5972 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5973 block statements that originate from a source block statement, not
5974 generated block statements
5975 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5976 symmetry with procedure case
5977 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5978 function to issue an error in formal mode if a package specification
5979 contains more than one tagged type or type extension.
5980 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5981 parameters matching formals of tagged types are objects (or ancestor
5982 type conversions of objects), not general expressions. Issue an error
5983 on view conversions that are not involving ancestor conversion of an
5984 extended type.
5985 (Resolve_Type_Conversion): in formal mode, issue an error on the
5986 operand of an ancestor type conversion which is not an object
5987 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5988 procedure so that it works also for actuals of function calls
5989 (Is_Actual_Tagged_Parameter): new function which determines if its
5990 argument is an actual parameter of a formal of tagged type in a
5991 subprogram call
5992 (Is_SPARK_Object_Reference): new function which determines if the tree
5993 referenced by its argument represents an object in SPARK
5994
5995 2011-08-02 Robert Dewar <dewar@adacore.com>
5996
5997 * sem_ch3.adb: Minor reformatting
5998 Minor comment addition
5999 Minor error msg text change
6000
6001 2011-08-02 Javier Miranda <miranda@adacore.com>
6002
6003 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6004 function. Used to be more precise when we generate a variable plus one
6005 assignment to remove side effects in the evaluation of the Bound
6006 expressions.
6007 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6008 of the bound expression to force its re-analysis and thus expand the
6009 associated transient scope (if required). Code cleanup replacing the
6010 previous code that declared the constant entity by an invocation to
6011 routine Force_Evaluation which centralizes this work in the frontend.
6012
6013 2011-08-02 Robert Dewar <dewar@adacore.com>
6014
6015 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6016 (Base_Type): Now uses improved Is_Base_Type function
6017 * einfo.ads (Base_Type): Inline this function
6018
6019 2011-08-02 Robert Dewar <dewar@adacore.com>
6020
6021 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6022 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6023
6024 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6025
6026 * gcc-interface/Make-lang.in: Update dependencies.
6027 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6028 targets.
6029
6030 2011-08-02 Yannick Moy <moy@adacore.com>
6031
6032 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6033 non-simple expression used in delta constraint
6034 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6035 index constraint which is not a subtype mark
6036 * par.adb: With and use Restrict
6037 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6038 mode on component type which is not a subtype mark and default
6039 expression on component
6040 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6041 of string which does not have a lower index bound equal to 1
6042 (Array_Type_Declaration): issue an error in formal mode on index or
6043 component type which is not a subtype mark, and on aliased keyword on
6044 component
6045 (Derived_Type_Declaration): issue an error in formal mode on interface,
6046 limited or abstract type
6047 (Record_Type_Declaration): issue an error in formal mode on interface
6048 (Record_Type_Definition): issue an error in formal mode on tagged types
6049 and type extensions not declared in the specification of a library unit
6050 package; on null non-tagged record; on variant part
6051
6052 2011-08-02 Vincent Celier <celier@adacore.com>
6053
6054 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6055 not declared for qualified library project when Library_Name is not
6056 declared, but Library_Dir is.
6057
6058 2011-08-02 Robert Dewar <dewar@adacore.com>
6059
6060 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6061 pragmas (affects aspects [Component_]Default_Value
6062 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6063 component type for the resolution
6064
6065 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6066
6067 * einfo.adb (Base_Type): Tune implementation for speed.
6068
6069 2011-08-02 Robert Dewar <dewar@adacore.com>
6070
6071 * freeze.adb: Minor reformatting.
6072
6073 2011-08-02 Thomas Quinot <quinot@adacore.com>
6074
6075 * scos.ads: Update comments.
6076
6077 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6078
6079 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6080 base type, because the parent may be a subtype of a private type whose
6081 convention is established in a private part.
6082
6083 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6084
6085 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6086 statement in a block when the expansion of the return expression has
6087 created a finalization chain.
6088 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6089 with the parent node.
6090 Add N_Extended_Return_Statement to handle the case where a transient
6091 object declaration appears in the Return_Object_Declarations list of
6092 an extended return statement.
6093
6094 2011-08-02 Matthew Gingell <gingell@adacore.com>
6095
6096 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6097 unused parameter 'name'.
6098
6099 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6100
6101 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6102 inherited operation, check whether its alias, which is the source
6103 operastion that it renames, has been marked eliminated.
6104
6105 2011-08-02 Javier Miranda <miranda@adacore.com>
6106
6107 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6108 in-mode parameter whose type is an access type since it can be used to
6109 modify its designated object. Enforce code that handles as safe an
6110 access type that is not access-to-constant but it is the result of a
6111 previous removal of side-effects.
6112 (Remove_Side_Effects): Minor code reorganization of cases which require
6113 no action. Done to incorporate documentation on new cases uncovered
6114 working in this ticket: no action needed if this routine was invoked
6115 too early and the nodes are not yet decorated.
6116 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6117 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6118 were issued with actuals that are implicitly provided by
6119 Force_Evaluation.
6120
6121 2011-08-02 Robert Dewar <dewar@adacore.com>
6122
6123 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6124
6125 2011-08-02 Yannick Moy <moy@adacore.com>
6126
6127 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6128 to issue an error in formal mode on attribute not supported in this mode
6129 (Analyze_Attribute): issue errors on standard attributes not supported
6130 in formal mode.
6131 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6132 comment, and issue error in formal mode on modulus which is not a power
6133 of 2.
6134 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6135 range.
6136 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6137 subtype mark.
6138 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6139 operator on modular type (except 'not').
6140
6141 2011-08-02 Robert Dewar <dewar@adacore.com>
6142
6143 * gnat_rm.texi: Minor reformatting.
6144
6145 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6146
6147 * s-osinte-linux.ads: Minor comment update and reformatting.
6148 * i-cexten.ads: Make this unit pure, as for its parent.
6149 Will allow its usage in more contexts if needed.
6150
6151 2011-08-02 Robert Dewar <dewar@adacore.com>
6152
6153 * s-utf_32.ads: Minor comment fix.
6154
6155 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6156
6157 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6158 operation of a tagged synchronized type, handle the case where the
6159 controlling argument is overloaded.
6160
6161 2011-08-02 Yannick Moy <moy@adacore.com>
6162
6163 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6164 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6165 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6166 SPARK mode and formal verification mode on processing SPARK restriction
6167 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6168 requiring consistency checking.
6169
6170 2011-08-02 Robert Dewar <dewar@adacore.com>
6171
6172 * sem_res.adb: Minor reformatting.
6173
6174 2011-08-02 Robert Dewar <dewar@adacore.com>
6175
6176 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6177 a-cforse.ads: Remove unneeded with of Ada.Containers
6178 Remove commented out pragma Inline's
6179 Move specifications of new subprograms to the actual specs
6180
6181 2011-08-02 Yannick Moy <moy@adacore.com>
6182
6183 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6184 a-cforse.ads: Update comments.
6185
6186 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6187
6188 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6189
6190 2011-08-02 Robert Dewar <dewar@adacore.com>
6191
6192 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6193 a-cforse.ads, a-cofove.ads: Minor reformatting.
6194
6195 2011-08-02 Claire Dross <dross@adacore.com>
6196
6197 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6198 a-cofove.ads: Add comments.
6199
6200 2011-08-02 Yannick Moy <moy@adacore.com>
6201
6202 * gnat_rm.texi: Document formal containers.
6203
6204 2011-08-02 Emmanuel Briot <briot@adacore.com>
6205
6206 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6207 are empty sections.
6208
6209 2011-08-02 Robert Dewar <dewar@adacore.com>
6210
6211 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6212 reformatting.
6213
6214 2011-08-02 Robert Dewar <dewar@adacore.com>
6215
6216 * aspects.adb: New aspects Default_Value and Default_Component_Value
6217 New format of Aspect_Names table checks for omitted entries
6218 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6219 handling of boolean aspects for derived types.
6220 New aspects Default_Value and Default_Component_Value
6221 New format of Aspect_Names table checks for omitted entries
6222 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6223 (Has_Default_Value): New flag
6224 (Has_Default_Component_Value): New flag
6225 (Has_Default_Value): New flag
6226 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6227 table.
6228 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6229 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6230 Default_Value and Default_Component_Value
6231 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6232 New aspects Default_Value and Default_Component_Value
6233 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6234 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6235
6236 2011-08-02 Vincent Celier <celier@adacore.com>
6237
6238 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6239 inherit library kind.
6240
6241 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6242
6243 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6244 Minor reformatting.
6245
6246 2011-08-02 Robert Dewar <dewar@adacore.com>
6247
6248 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6249
6250 2011-08-02 Yannick Moy <moy@adacore.com>
6251
6252 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6253
6254 2011-08-02 Robert Dewar <dewar@adacore.com>
6255
6256 * impunit.adb: Add comment.
6257
6258 2011-08-02 Yannick Moy <moy@adacore.com>
6259
6260 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6261 qualification of aggregates in formal mode
6262 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6263 another aggregate
6264 (Resolve_Aggregate): complete the test that an aggregate is adequately
6265 qualified in formal mode
6266
6267 2011-08-02 Pascal Obry <obry@adacore.com>
6268
6269 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6270 * mlib-prj.adb: Supress warning when compiling binder generated file.
6271 (Build_Library): Supress all warnings when compiling the binder
6272 generated file.
6273
6274 2011-08-02 Yannick Moy <moy@adacore.com>
6275
6276 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6277 from here...
6278 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6279 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6280 Add with/use clauses to make Check_Formal_Restriction visible
6281
6282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6283
6284 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6285 in-parameters when type of the generic formal is private in the generic
6286 spec and non-private in the body.
6287
6288 2011-08-02 Claire Dross <dross@adacore.com>
6289
6290 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6291 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6292 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6293 * impunit.adb, Makefile.rtl: Take new files into account.
6294
6295 2011-08-02 Robert Dewar <dewar@adacore.com>
6296
6297 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6298 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6299
6300 2011-08-02 Yannick Moy <moy@adacore.com>
6301
6302 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6303 formal mode
6304 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6305 matching static array bounds, taking into account the special case of
6306 string literals
6307 * sem_ch3.adb: Typo in comment.
6308
6309 2011-08-02 Yannick Moy <moy@adacore.com>
6310
6311 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6312 which issues an error in formal mode if its argument node is originally
6313 from source
6314 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6315 has a discriminant specification so that it does not include the case
6316 of derived types
6317 (Derived_Type_Declaration): move here the test that a derived type has a
6318 discriminant specification
6319 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6320 first element of a component association before accessing its choices
6321 (presence of component association is not enough)
6322 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6323 declaration is a library item before accessing the next element in a
6324 list, as library items are not member of lists
6325 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6326 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6327 Check_Formal_Restriction whenever possible.
6328
6329 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6330
6331 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6332 reference when needed.
6333
6334 2011-08-02 Bob Duff <duff@adacore.com>
6335
6336 * gnat_ugn.texi: Fix typo.
6337
6338 2011-08-02 Vincent Celier <celier@adacore.com>
6339
6340 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6341 archive file name. Do not use the full path name of archives for Open
6342 VMS.
6343
6344 2011-08-02 Robert Dewar <dewar@adacore.com>
6345
6346 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6347 Analyze_Aspect_Specifications
6348 * sem_ch13.adb
6349 (Analyze_Aspect_Specifications): New handling for boolean aspects
6350 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6351 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6352 sequence for Analyze_Aspect_Specifications
6353 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6354 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6355
6356 2011-08-02 Robert Dewar <dewar@adacore.com>
6357
6358 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6359 aspects, since these no longer exist.
6360
6361 2011-08-02 Robert Dewar <dewar@adacore.com>
6362
6363 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6364 semicolon, do not try to see if there are aspects following it.
6365 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6366 aspect spec.
6367
6368 2011-08-02 Robert Dewar <dewar@adacore.com>
6369
6370 * sem_ch8.adb, aspects.ads: Minor reformatting.
6371
6372 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6373
6374 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6375 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6376 extracted from...
6377 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6378
6379 2011-08-02 Yannick Moy <moy@adacore.com>
6380
6381 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6382 mode on subprogram declaration outside of package specification, unless
6383 it is followed by a pragma Import
6384 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6385 Access_Type_Declaration): issue error in formal mode on access type
6386 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6387 incomplete type
6388 (Analyze_Object_Declaration): issue error in formal mode on object
6389 declaration which does not respect SPARK restrictions
6390 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6391 declaration which does not respect SPARK restrictions
6392 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6393 error in formal mode on digits or delta constraint
6394 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6395 decimal fixed point type
6396 (Derived_Type_Declaration): issue error in formal mode on derived type
6397 other than type extensions of tagged record types
6398 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6399 with check on access definition
6400 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6401 mode on protected definition.
6402 (Analyze_Task_Definition): issue error in formal mode on task definition
6403
6404 2011-08-02 Robert Dewar <dewar@adacore.com>
6405
6406 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6407
6408 2011-08-02 Javier Miranda <miranda@adacore.com>
6409
6410 * sem_ch6.adb (Can_Override_Operator): New function.
6411 (Verify_Overriding_Indicator): Add missing code to check overriding
6412 indicator in operators. Fixes regression.
6413 (Check_Overriding_Indicator): Minor reformating after replacing the
6414 code that evaluates if the subprogram can override an operator by
6415 invocations to the above new function.
6416 * einfo.adb
6417 (Write_Field26_Name): Add missing code to ensure that, following
6418 the documentation in einfo.ads, this field is not shown as attribute
6419 "Static_Initialization" on non-dispatching functions.
6420
6421 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6422
6423 * sem_res.adb (Resolve_Call): A call to
6424 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6425 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6426 i.e., when the second parameter is of type Time_Span.
6427
6428 2011-08-02 Vincent Celier <celier@adacore.com>
6429
6430 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6431 with an archive instead of -L<library dir> -l<library name>.
6432
6433 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6434
6435 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6436 mark the base types In_Use in addition to making the operations
6437 use_visible.
6438
6439 2011-08-02 Ed Falis <falis@adacore.com>
6440
6441 * init.c: add and setup __gnat_signal_mask for the exception signals
6442 * s-inmaop-vxworks.adb: new file.
6443 * s-intman-vxworks.adb: remove unnecessary initializations and
6444 simplify remaining
6445 * s-intman-vxworks.ads: remove unnecessary variable
6446 * s-taprop-vxworks.adb: simplify signal initialization
6447
6448 2011-08-02 Robert Dewar <dewar@adacore.com>
6449
6450 * sem_ch8.adb: Minor code reorganization, comment updates.
6451
6452 2011-08-02 Robert Dewar <dewar@adacore.com>
6453
6454 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6455 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6456 here from Sem_Res.
6457 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6458 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6459
6460 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6461
6462 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6463 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6464 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6465 use_type_clauses, to handle more efficiently use_type and use_all_type
6466 constructs.
6467 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6468 Ada2012 Use_All_Type clause.
6469 (Use_Class_Wide_Operations): new procedure.
6470
6471 2011-08-02 Robert Dewar <dewar@adacore.com>
6472
6473 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6474 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6475 expression to expression function.
6476
6477 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6478
6479 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6480 if types are compatible.
6481
6482 2011-08-02 Yannick Moy <moy@adacore.com>
6483
6484 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6485 returns True if its argument array types have same dimension and same
6486 static bounds at each index.
6487 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6488 OUT or IN OUT paramaters which are not view conversions in SPARK.
6489 (Resolve_Arithmetic_Op): issue an error in formal mode on
6490 multiplication or division with operands of fixed point types which are
6491 not qualified or explicitly converted.
6492 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6493 Boolean or array type (except String) operands.
6494 (Resolve_Equality_Op): issue an error in formal mode on equality
6495 operators for array types other than String with non-matching static
6496 bounds.
6497 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6498 for array types with non-matching static bounds. Factorize the code in
6499 Matching_Static_Array_Bounds.
6500 (Resolve_Qualified_Expression): issue an error in formal mode on
6501 qualified expressions for array types with non-matching static bounds.
6502 (Resolve_Type_Conversion): issue an error in formal mode on type
6503 conversion for array types with non-matching static bounds
6504
6505 2011-08-02 Robert Dewar <dewar@adacore.com>
6506
6507 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6508
6509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6510
6511 * par-ch9.adb: save location of entry for proper error message.
6512
6513 2011-08-02 Javier Miranda <miranda@adacore.com>
6514
6515 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6516 (Use_Full_View) which permits this routine to climb through the
6517 ancestors using the full-view of private parents.
6518 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6519 Use_Full_View to true in calls to Is_Ancestor.
6520 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6521 true in call to Is_Ancestor.
6522 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6523 Use_Full_View to true in call to Is_Ancestor.
6524 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6525 call to Is_Ancestor.
6526 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6527 Use_Full_View to true in calls to Is_Ancestor.
6528 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6529 Make_Select_Specific_Data_Table, Register_Primitive,
6530 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6531 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6532 to true in call to Is_Ancestor.
6533 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6534 Use_Full_View to true in calls to Is_Ancestor.
6535 * exp_cg.adb
6536 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6537 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6538
6539 2011-08-02 Robert Dewar <dewar@adacore.com>
6540
6541 * gnat_rm.texi: Minor reformatting.
6542 * sem_prag.adb: Minor reformatting.
6543
6544 2011-08-02 Tristan Gingold <gingold@adacore.com>
6545
6546 * vms_data.ads: Add VMS qualifier for -gnateP.
6547
6548 2011-08-02 Robert Dewar <dewar@adacore.com>
6549
6550 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6551 * par-ch7.adb (P_Package): Proper placement of aspects for package
6552 decl/instantiation.
6553 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6554 (End_Statements): Add Is_Sloc parameterr
6555 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6556 (Check_End): Ad Is_Sloc parameter
6557 (End_Statements): Add Is_Sloc parameterr
6558
6559 2011-08-02 Vincent Celier <celier@adacore.com>
6560
6561 * ug_words: Add VMS qualifier equivalent to -gnateP:
6562 /SYMBOL_PREPROCESSING.
6563
6564 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6565
6566 * gnat-style.texi: For hexadecimal numeric literals the typical
6567 grouping of digits is 4 to represent 2 bytes.
6568 A procedure spec which is split into several lines is indented two
6569 characters.
6570
6571 2011-08-02 Yannick Moy <moy@adacore.com>
6572
6573 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6574 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6575 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6576 properly qualified
6577 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6578 choice in array aggregate
6579 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6580 mark as ancestor
6581 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6582 positional and named aggregate for record, or others in record
6583 aggregate, or multiple choice in record aggregate
6584 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6585 array operands to logical operations AND, OR and XOR do not have the
6586 same static lower and higher bounds
6587 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6588
6589 2011-08-01 Robert Dewar <dewar@adacore.com>
6590
6591 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6592 Replaces Last_Source_Node_In_Sequence.
6593 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6594 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6595 parens and blank in string (this was inconsistently implemented).
6596 * errout.ads
6597 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6598 blank in string (this was inconsistently implemented).
6599 * gnat1drv.adb
6600 (Set_Global_Switches): Set formal mode switches appropriately
6601 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6602 * par-prag.adb
6603 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6604 call Set_Error_Msg_Lang to set "spark" as language name.
6605 * par.adb: Remove unnecessary call to set formal language for errout
6606 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6607 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6608 name.
6609 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6610 calls to it, moved after resolution so that types are known
6611 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6612 result of concatenation is not of type String
6613 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6614 concatenation is not properly restricted
6615 * gnat_rm.texi: Add doc on pragma Spark_95.
6616 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6617 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6618 * gcc-interface/Make-lang.in: Update dependencies.
6619
6620 2011-08-01 Javier Miranda <miranda@adacore.com>
6621
6622 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6623 condition that detects if the overridden operation must replace an
6624 existing entity.
6625
6626 2011-08-01 Javier Miranda <miranda@adacore.com>
6627
6628 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6629 code declarations inserted by Insert_Actions in each alternative of the
6630 N_Case_Expression node.
6631
6632 2011-08-01 Robert Dewar <dewar@adacore.com>
6633
6634 * sem_ch6.adb: Minor code reorganization.
6635 * sem_util.adb: Minor reformatting.
6636
6637 2011-08-01 Pascal Obry <obry@adacore.com>
6638
6639 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6640 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6641
6642 2011-08-01 Yannick Moy <moy@adacore.com>
6643
6644 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6645 literal or operator symbol which is prefixed
6646 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6647 mode on access attributes.
6648 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6649 that concatenation operands are properly restricted in formal mode
6650 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6651 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6652 result of the concatenation has a type different from String.
6653 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6654 Analyze_Quantified_Expression, Analyze_Slice,
6655 Analyze_Null): issue an error in formal mode on unsupported constructs
6656 * sem_ch5.adb
6657 (Analyze_Block_Statement): only issue error on source block statement
6658 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6659 function which returns the last node in a list of nodes for which
6660 Comes_From_Source returns True, if any
6661 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6662 Last_Source_Node_In_Sequence
6663 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6664 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6665 mode on unsupported constructs
6666 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6667 rest of the actions may be needed later on since the error is marked as
6668 not serious.
6669 * sinfo.ads: Typos in comments.
6670
6671 2011-08-01 Pascal Obry <obry@adacore.com>
6672
6673 * projects.texi: Minor editing.
6674
6675 2011-08-01 Yannick Moy <moy@adacore.com>
6676
6677 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6678 insertion character ~~
6679 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6680 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6681 with insertion character ~~
6682 (Set_Msg_Text): treat insertion character ~~
6683 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6684 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6685 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6686 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6687 errors related to the formal language restriction not serious
6688 (insertion character |).
6689 * par.adb (Par): set formal language for error messages if needed
6690 * sem_ch6.adb (Check_Missing_Return): take into account possible
6691 generated statements at the end of the function
6692 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6693 enumeration value to define a new pragma SPARK_95
6694 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6695 SPARK_Version): new type and variables to store the SPARK version
6696 (none by default).
6697 (SPARK_Mode): return True when SPARK_Version is set
6698 * par-prag.adb: Correct indentation
6699 (Prag): take Pragma_SPARK_95 into account
6700 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6701 into account.
6702
6703 2011-08-01 Robert Dewar <dewar@adacore.com>
6704
6705 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6706 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6707 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6708
6709 2011-08-01 Pascal Obry <obry@adacore.com>
6710
6711 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6712 Target_Name to Get_Path call.
6713 (Parse_Single_Project): Likewise.
6714 (Post_Parse_Context_Clause): Likewise.
6715 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6716 Call Initialise_Project_Path with the proper Target_Name.
6717 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6718 search path.
6719 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6720 with the proper Target_Name.
6721 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6722 Part.Parse routine.
6723 (Parse_Project_And_Apply_Config): Likewise.
6724 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6725 This is fine as this part of the code is supporting only native
6726 compilation.
6727 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6728 is fine as this part of the code is supporting only native compilation.
6729
6730 2011-08-01 Yannick Moy <moy@adacore.com>
6731
6732 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6733 of homonym, unless the homonym is one of the cases allowed in SPARK
6734 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6735 package declaration occurring after a body.
6736
6737 2011-08-01 Robert Dewar <dewar@adacore.com>
6738
6739 * checks.adb, exp_ch4.adb: Minor reformatting.
6740
6741 2011-08-01 Javier Miranda <miranda@adacore.com>
6742
6743 * einfo.ads (Access_Disp_Table): Fix documentation.
6744 (Dispatch_Table_Wrappers): Fix documentation.
6745
6746 2011-08-01 Pascal Obry <obry@adacore.com>
6747
6748 * prj-env.adb, prj-env.ads: Minor reformatting.
6749
6750 2011-08-01 Yannick Moy <moy@adacore.com>
6751
6752 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6753 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6754 procedures out of these packages.
6755 * errout.ads, errout.adb
6756 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6757 procedures in of this package
6758 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6759 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6760 on misplaced later vs initial declarations, like in Ada 83
6761 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6762 formal mode on attribute of private type whose full type declaration
6763 is not visible
6764 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6765 package declaration inside a package specification
6766 (Analyze_Full_Type_Declaration): issue error in formal mode on
6767 controlled type or discriminant type
6768 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6769 user-defined operator means that it should come from the source
6770 (New_Overloaded_Entity): issue error in formal mode on overloaded
6771 entity.
6772 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6773
6774 2011-08-01 Thomas Quinot <quinot@adacore.com>
6775
6776 * atree.adb: Minor reformatting.
6777 * checks.adb: Minor reformatting.
6778
6779 2011-08-01 Vincent Celier <celier@adacore.com>
6780
6781 * s-parame-vms-ia64.ads: Fix typo in comment
6782 Minor reformatting
6783 * s-parame-vms-restrict.ads: Removed, unused.
6784
6785 2011-08-01 Javier Miranda <miranda@adacore.com>
6786
6787 * exp_ch3.adb
6788 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6789 * sem_ch3.adb
6790 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6791 * sem_ch3.ads, sem_ch3.adb
6792 (Is_Constant_Bound): New extended version of the subprogram that was
6793 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6794 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6795 * sem_aux.ads (Constant_Value): Fix typo in comment.
6796 * checks.adb (Generate_Index_Checks): New implementation which, for
6797 array objects with constant bounds, generates the runtime check
6798 referencing the bounds of the array type. For other cases this routine
6799 provides its previous behavior obtaining such values from the array
6800 object.
6801 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6802 parent type.
6803 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6804 we cannot have semantic interpretations of the new node.
6805
6806 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6807
6808 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6809 expressions.
6810
6811 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6812
6813 * sem_ch8.adb: Minor code editing.
6814 * s-vxwext.adb: Remove trailing space.
6815 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6816 consistency with other files.
6817
6818 2011-08-01 Thomas Quinot <quinot@adacore.com>
6819
6820 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6821
6822 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6823
6824 * par-ch10.adb: reject parameterized expressions as compilation unit.
6825 * sem_ch4.adb: handle properly conditional expression with overloaded
6826 then_clause and no else_clause.
6827
6828 2011-08-01 Tristan Gingold <gingold@adacore.com>
6829
6830 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6831 like done by System.Aux_DEC.
6832 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6833
6834 2011-08-01 Yannick Moy <moy@adacore.com>
6835
6836 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6837 missing label at end of declaration (subprogram or package)
6838 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6839 of positional and named parameter association
6840 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6841 Error_Msg_SP which adds a prefix to the error message giving the name
6842 of the formal language analyzed
6843 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6844 access result type in subprogram, unconstrained array as result type,.
6845 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6846 procedure
6847 * sem_ch8.adb: Code clean up.
6848
6849 2011-08-01 Javier Miranda <miranda@adacore.com>
6850
6851 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6852 * einfo.ads (Access_Disp_Table): Fix documentation.
6853 (Dispatch_Table_Wrappers): Fix documentation.
6854 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6855 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6856 to enforce the documentation of this attribute.
6857 (Set_Is_Interface): Cleanup the assertion.
6858 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6859 the Underlying_Type entity before reading attribute Access_Disp_Table.
6860 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6861 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6862 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6863 the Underlying_Type entity before reading attribute Access_Disp_Table.
6864 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6865 Locate the Underlying_Type entity before reading attribute
6866 Access_Disp_Table.
6867
6868 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6869
6870 * s-poosiz.ads: Additional overriding indicators.
6871
6872 2011-08-01 Yannick Moy <moy@adacore.com>
6873
6874 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6875 formal mode.
6876 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6877 parameter specification does not include a subtype mark.
6878 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6879 formal mode on abstract subprogram.
6880 (Analyze_Subprogram_Specification): issue error in formal mode on
6881 user-defined operator.
6882 (Process_Formals): issue error in formal mode on access parameter and
6883 default expression.
6884 * sem_ch9.adb (Analyze_Abort_Statement,
6885 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6886 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6887 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6888 Analyze_Requeue, Analyze_Selective_Accept,
6889 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6890 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6891 issue error in formal mode on user-defined raise statement.
6892
6893 2011-08-01 Thomas Quinot <quinot@adacore.com>
6894
6895 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6896 declaration being hidden when overriding an implicit inherited
6897 subprogram.
6898 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6899 (-gnats), do not complain about a source file that contains only a
6900 pragma No_Body.
6901
6902 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6903
6904 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6905 variable if already set.
6906
6907 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6908
6909 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6910 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6911 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6912 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6913 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6914 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6915 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6916 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6917 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6918 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6919 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6920 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6921 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6922 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6923 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6924 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6925 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6926 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6927 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6928 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6929 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6930 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6931 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6932 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6933 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6934 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6935 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6936 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6937 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6938 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6939 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6940 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6941 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6942 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6943 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6944 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6945 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6946 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6947 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6948 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6949 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6950 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6951 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6952 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6953 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6954 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6955 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6956 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6957 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6958 Use GNAT instead of GNARL.
6959
6960 2011-08-01 Bob Duff <duff@adacore.com>
6961
6962 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6963 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6964 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6965 reformatting.
6966
6967 2011-08-01 Yannick Moy <moy@adacore.com>
6968
6969 * debug.adb (d.D) reverve flag for the SPARK mode
6970 (d.E) reverve flag for SPARK generation mode
6971 (d.F) reverve flag for Why generation mode
6972 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6973 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6974 functions which return True when the corresponding modes are set
6975 (Formal_Language): return "spark" or "alfa" when in formal verification
6976 mode.
6977 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6978 Error_Msg to prefix the error message with a tag giving the formal
6979 language
6980 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6981 message with a tag giving the formal language
6982 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6983 block statement
6984 (Analyze_Case_Statement): issue error in formal mode on case statement
6985 with a single "others" case alternative
6986 (Analyze_Exit_Statement): issue errors in formal mode on exit
6987 statements which do not respect SPARK restrictions
6988 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6989 (Check_Unreachable_Code): always issue an error (not a warning) in
6990 formal mode on unreachable code (concerns both code after an infinite
6991 loop and after an unconditional jump, both not allowed in SPARK)
6992 * sem_ch6.adb (Analyze_Return_Statement): add call to
6993 Set_Return_Present for a procedure containing a return statement
6994 (already done for functions in Analyze_Function_Return)
6995 (Analyze_Function_Return): issue error in formal mode on extended
6996 return or if return is not last statement in function
6997 (Check_Missing_Return): issue error in formal mode if function does
6998 not end with return or if procedure contains a return
6999 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7000 function to detect if there is an inner scope of its parameter S which
7001 is a loop.
7002
7003 2011-08-01 Thomas Quinot <quinot@adacore.com>
7004
7005 * sem_ch6.ads: Minor reformatting.
7006
7007 2011-08-01 Javier Miranda <miranda@adacore.com>
7008
7009 * sem_util.adb (Abstract_Interface_List): Complete condition when
7010 processing private type declarations to avoid reading unavailable
7011 attribute.
7012 (Is_Synchronized_Tagged_Type): Complete condition when processing
7013 private extension declaration nodes to avoid reading unavailable
7014 attribute.
7015
7016 2011-08-01 Thomas Quinot <quinot@adacore.com>
7017
7018 * sem_ch3.adb: Minor reformatting.
7019
7020 2011-08-01 Thomas Quinot <quinot@adacore.com>
7021
7022 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7023 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7024 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7025 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7026 for VMS, instead parametrize the common implementation with
7027 System.Parameters declarations.
7028
7029 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7030
7031 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7032
7033 2011-08-01 Tristan Gingold <gingold@adacore.com>
7034
7035 * seh_init.c: Fix SEH handler installation on win64.
7036
7037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7038
7039 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7040 double analysis of an anonymous access to subprogram, because it can
7041 lead to improper sharing of profiles and a back-end crash.
7042
7043 2011-08-01 Robert Dewar <dewar@adacore.com>
7044
7045 * make.adb, sem_ch4.adb: Minor reformatting.
7046 * gcc-interface/Make-lang.in: Update dependencies.
7047 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7048
7049 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7050
7051 * gnat_rm.texi: Fix definition of Long_Integer.
7052
7053 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7054
7055 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7056 to prevent storage exhaustion.
7057 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7058 finalized is a function body, insert the cleanup code before the final
7059 return statement, to prevent spurious warnings.
7060 * s-pooglo.ads: add overriding indicator.
7061
7062 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7063
7064 * sem_ch4.adb (Operator_Check): improve error message when both a
7065 with_clause and a use_clause are needed to make operator usage legal.
7066 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7067 determine whether a compilation unit is visible within an other,
7068 either through a with_clause in the current unit, or a with_clause in
7069 its library unit or one one of its parents.
7070
7071 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7072
7073 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7074 over an arbitrary expression of an array or container type.
7075 * lib-xref.adb: clarify comment.
7076
7077 2011-08-01 Bob Duff <duff@adacore.com>
7078
7079 * einfo.ads: Minor reformatting.
7080 * debug.adb: Minor comment improvement.
7081
7082 2011-08-01 Javier Miranda <miranda@adacore.com>
7083
7084 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7085 consider hidden subprograms as valid candidates.
7086
7087 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7088
7089 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7090
7091 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7092
7093 * gnat_ugn.texi: Fix typo.
7094
7095 2011-08-01 Robert Dewar <dewar@adacore.com>
7096
7097 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7098 lib-xref.adb: Minor reformatting
7099
7100 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7101
7102 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7103 when to generate a call to Move_Final_List.
7104 (Has_Controlled_Parts): Remove this function.
7105
7106 2011-08-01 Geert Bosch <bosch@adacore.com>
7107
7108 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7109 "," in choice list.
7110
7111 2011-08-01 Thomas Quinot <quinot@adacore.com>
7112
7113 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7114 explicit raise of a predefined exception as Comes_From_Source if the
7115 original N_Raise_Statement comes from source.
7116
7117 2011-08-01 Robert Dewar <dewar@adacore.com>
7118
7119 * sinfo.ads: Add comment.
7120 * sem_ch6.adb: Minor reformatting.
7121
7122 2011-08-01 Robert Dewar <dewar@adacore.com>
7123
7124 * freeze.adb (Freeze_Entity): Refine check for bad component size
7125 clause to avoid rejecting confirming clause when atomic/aliased present.
7126
7127 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7128
7129 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7130 better determine whether an entity reference is a write.
7131 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7132 subcomponent.
7133 * lib-xref.adb (Output_References): Do no suppress a read reference at
7134 the same location as an immediately preceeding modify-reference, to
7135 handle properly in-out actuals.
7136
7137 2011-08-01 Tristan Gingold <gingold@adacore.com>
7138
7139 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7140
7141 2011-08-01 Quentin Ochem <ochem@adacore.com>
7142
7143 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7144 heap to compute the result.
7145
7146 2011-08-01 Robert Dewar <dewar@adacore.com>
7147
7148 * atree.ads: Minor reformatting.
7149
7150 2011-08-01 Emmanuel Briot <briot@adacore.com>
7151
7152 * g-expect.adb (Get_Command_Output): Fix memory leak.
7153
7154 2011-08-01 Geert Bosch <bosch@adacore.com>
7155
7156 * cstand.adb (P_Float_Type): New procedure to print the definition of
7157 predefined fpt types.
7158 (P_Mixed_Name): New procedure to print a name using mixed case
7159 (Print_Standard): Use P_Float_Type for printing floating point types
7160 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7161 precision IEEE float.
7162
7163 2011-08-01 Thomas Quinot <quinot@adacore.com>
7164
7165 * sem_ch3.adb: Minor reformatting.
7166
7167 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7168
7169 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7170 the completion of a generic function, insert the new body rather than
7171 rewriting the original.
7172
7173 2011-08-01 Yannick Moy <moy@adacore.com>
7174
7175 * sinfo.ads, errout.ads: Typos in comments.
7176
7177 2011-08-01 Robert Dewar <dewar@adacore.com>
7178
7179 * par-endh.adb: Minor reformatting.
7180
7181 2011-08-01 Robert Dewar <dewar@adacore.com>
7182
7183 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7184 (Pre_Post_Aspects): New subtype.
7185 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7186 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7187 * par-ch7.adb (P_Package): Remove Decl parameter
7188 (P_Package): Handle new syntax for aspects (before IS)
7189 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7190 new aspect syntax
7191 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7192 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7193 (P_Package): Remove Decl parameter
7194 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7195 aspects
7196 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7197 specs
7198 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7199 * sinfo.ads: Document new syntax for aspects in packages etc.
7200 * sprint.adb: Handle new syntax of aspects before IS in package
7201
7202 2011-08-01 Thomas Quinot <quinot@adacore.com>
7203
7204 * atree.ads: Minor reformatting.
7205 * sem_prag.adb: Minor reformatting.
7206
7207 2011-08-01 Robert Dewar <dewar@adacore.com>
7208
7209 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7210 case expr alternative.
7211
7212 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7213
7214 * sem_ch12.adb: Fix typo.
7215
7216 2011-08-01 Geert Bosch <bosch@adacore.com>
7217
7218 * sem_prag.adb (Check_No_Link_Name): New procedure.
7219 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7220 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7221 instead of Standard_Long_Long_Float_Size global. Preparation for
7222 eventual removal of per type constants.
7223 * exp_util.ads (Get_Stream_Size): New function returning the stream
7224 size value of subtype E.
7225 * exp_util.adb (Get_Stream_Size): Implement new function.
7226 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7227 function.
7228 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7229 * einfo.adb:
7230 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7231
7232 2011-08-01 Geert Bosch <bosch@adacore.com>
7233
7234 * cstand.adb: Fix comments.
7235 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7236 count of arguments.
7237
7238 2011-08-01 Robert Dewar <dewar@adacore.com>
7239
7240 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7241
7242 2011-08-01 Geert Bosch <bosch@adacore.com>
7243
7244 * atree.ads: Fix comment.
7245
7246 2011-08-01 Robert Dewar <dewar@adacore.com>
7247
7248 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7249 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7250 * par.adb: Add with for Namet.Sp.
7251 * par-tchk.adb: Minor reformatting.
7252
7253 2011-08-01 Vincent Celier <celier@adacore.com>
7254
7255 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7256 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7257 of the init procedure of a SAL.
7258 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7259 New procedure.
7260
7261 2011-08-01 Thomas Quinot <quinot@adacore.com>
7262
7263 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7264 reformatting.
7265
7266 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7267
7268 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7269
7270 2011-08-01 Thomas Quinot <quinot@adacore.com>
7271
7272 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7273 conformant with its spec (return True only for types that have
7274 an overriding Initialize primitive operation that prevents them from
7275 having preelaborable initialization).
7276 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7277 initialization for controlled types in Ada 2005 or later mode.
7278
7279 2011-08-01 Robert Dewar <dewar@adacore.com>
7280
7281 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7282 Postcondition.
7283 (Same_Aspect): New function.
7284 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7285 Type_Invariant, Precondition, Postcondition.
7286 * snames.ads-tmpl: Add Name_Type_Invariant.
7287
7288 2011-08-01 Robert Dewar <dewar@adacore.com>
7289
7290 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7291 here.
7292 (Freeze_All_Ent): Fix error in handling inherited aspects.
7293 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7294 already analyzed, but don't skip entire processing of a declaration,
7295 that's wrong in some cases of declarations being rewritten.
7296 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7297 Don't delay for integer, string literals
7298 Treat predicates in usual manner for delay, remove special case code,
7299 not needed.
7300 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7301 (Build_Predicate_Function): Update saved expression in aspect
7302 (Build_Invariant_Procedure): Update saved expression in aspect
7303 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7304 of replacement of discriminant references if the reference is simple.
7305
7306 2011-08-01 Robert Dewar <dewar@adacore.com>
7307
7308 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7309 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7310 Static_Predicate and Dynamic_Predicate.
7311 (Build_Predicate_Function): Add processing for Static_Predicate
7312 and Dynamic_Predicate.
7313 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7314 (From_Static_Predicate): New flag
7315 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7316
7317 2011-08-01 Robert Dewar <dewar@adacore.com>
7318
7319 * usage.adb: Documentation cleanup for Ada version modes in usage.
7320 * expander.adb: Minor reformatting.
7321
7322 2011-08-01 Robert Dewar <dewar@adacore.com>
7323
7324 * atree.ads: Minor comment fix.
7325 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7326 a-witeio.ads, sem_prag.adb: Minor reformatting.
7327
7328 2011-08-01 Doug Rupp <rupp@adacore.com>
7329
7330 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7331 pointers. Use descrip.h header file for convenience. Add some
7332 comments.
7333
7334 2011-08-01 Robert Dewar <dewar@adacore.com>
7335
7336 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7337 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7338 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7339 New procedure.
7340 (Check_Aspect_At_End_Of_Declarations): New procedure
7341 (Analye_Aspect_Specification): Minor changes for above procedures
7342 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7343 specification node as well.
7344
7345 2011-08-01 Pascal Obry <obry@adacore.com>
7346
7347 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7348 Windows files. Use GetFilesAttributes() in this case to check for file
7349 existence instead of returning with an error code.
7350
7351 2011-08-01 Vincent Celier <celier@adacore.com>
7352
7353 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7354 High is above Source length.
7355
7356 2011-08-01 Robert Dewar <dewar@adacore.com>
7357
7358 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7359
7360 2011-08-01 Robert Dewar <dewar@adacore.com>
7361
7362 * aspects.ads (Boolean_Aspects): New subtype.
7363 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7364 for derived types in cases where the parent type and derived type have
7365 aspects.
7366 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7367 with aspects when parent type also has aspects.
7368 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7369 boolean expression at this point).
7370 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7371 accordance with final decision on the Ada 2012 feature.
7372 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7373
7374 2011-08-01 Matthew Heaney <heaney@adacore.com>
7375
7376 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7377
7378 2011-08-01 Pascal Obry <obry@adacore.com>
7379
7380 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7381 Fix Replace_Slice when High is above current string size.
7382 (Replace_Slice): Fix DL computation when High is above current
7383 string length.
7384
7385 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7386
7387 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7388
7389 2011-08-01 Matthew Heaney <heaney@adacore.com>
7390
7391 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7392 of node.
7393
7394 2011-08-01 Pascal Obry <obry@adacore.com>
7395
7396 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7397 reformatting.
7398
7399 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7400
7401 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7402 access to protected subprograms in generic bodies.
7403 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7404 protected type, indicate that the convention of the subprogram is
7405 Convention_Protected, because it may be used in subsequent declarations
7406 within the protected declaration.
7407
7408 2011-08-01 Vincent Celier <celier@adacore.com>
7409
7410 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7411 and "final" procedures when the name of the library is "ada", to avoid
7412 duplicate symbols "adainit" and "adafinal" in executables.
7413
7414 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7415
7416 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7417 quantified expression that appears within a postcondition and uses the
7418 Ada2012 'Result attribute.
7419
7420 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7421
7422 * init.c (__gnat_error_handler): Cast reason to int.
7423 (__gnat_install_handler): Explain sa_sigaction use.
7424
7425 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7426
7427 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7428 subprogram has copy-in copy-out parameters, try to promote the mode of
7429 the return type if it is passed in registers.
7430
7431 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7432
7433 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7434 left operand as addressable.
7435
7436 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7437
7438 * gcc-interface/gigi.h (build_function_stub): Remove.
7439 (build_return_expr): Likewise.
7440 (convert_vms_descriptor): Declare.
7441 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7442 (build_function_stub): Move to...
7443 * gcc-interface/utils2.c (build_return_expr): Move to...
7444 * gcc-interface/trans.c (build_function_stub): ...here.
7445 (build_return_expr): ...here.
7446 (Subprogram_Body_to_gnu): Add local variable for language_function.
7447 Disconnect the parameter attributes cache, if any, once done with it.
7448 Call end_subprog_body only after setting the end_locus.
7449 Build the stub associated with the function, if any, at the very end.
7450 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7451 variables and streamline control flow.
7452
7453 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7454
7455 PR ada/49819
7456 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7457 g-trasym-dwarf.adb.
7458
7459 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7460
7461 PR bootstrap/49794
7462 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7463 Assign to act.sa_sigaction.
7464 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7465 current->return_address to char * before arithmetic.
7466
7467 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7468
7469 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7470 Correct argument types.
7471 Extract code from reason.
7472 (__gnat_install_handler): Assign to act.sa_sigaction.
7473
7474 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7475
7476 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7477 (GNAT1_OBJS): ...here.
7478
7479 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7480
7481 PR ada/48711
7482 * g-socthi-mingw.adb (Fill): Fix formatting.
7483
7484 * gcc-interface/gigi.h: Move around comment.
7485
7486 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7487
7488 PR ada/46350
7489 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7490
7491 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7492
7493 PR ada/48711
7494 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7495
7496 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7497
7498 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7499 range comparison if Pmode is SImode.
7500
7501 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7502 Eric Botcazou <ebotcazou@adacore.com>
7503
7504 * adadecode.c: Wrap up in extern "C" block.
7505 * adadecode.h: Likewise.
7506 * adaint.c: Likewise. Remove 'const' keyword.
7507 * adaint.h: Likewise.
7508 * argv.c: Likewise.
7509 * atree.h: Likewise.
7510 * cio.c: Likewise.
7511 * cstreams.c: Likewise.
7512 * env.c: Likewise.
7513 * exit.c: Likewise.
7514 * fe.h: Likewise.
7515 * final.c: Likewise.
7516 * init.c: Likewise.
7517 * initialize.c: Likewise.
7518 * link.c: Likewise.
7519 * namet.h: Likewise.
7520 * nlists.h: Likewise.
7521 * raise.c: Likewise.
7522 * raise.h: Likewise.
7523 * repinfo.h: Likewise.
7524 * seh_init.c: Likewise.
7525 * targext.c: Likewise.
7526 * tracebak.c: Likewise.
7527 * uintp.h: Likewise.
7528 * urealp.h: Likewise.
7529 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7530 * xsinfo.adb: Likewise.
7531 * xsnamest.adb: Likewise.
7532 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7533 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7534 * gcc-interface/misc.c: Likewise.
7535 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7536 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7537 ada/targext.o here...
7538 (GNAT_ADA_OBJS): ...and not here.
7539 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7540 (GNATBIND_OBJS): Reorder.
7541
7542 2011-07-07 Richard Henderson <rth@redhat.com>
7543
7544 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7545 dwarf2out_frame_init.
7546
7547 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7548
7549 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7550
7551 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7552
7553 PR target/39150
7554 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7555
7556 2011-07-06 Richard Guenther <rguenther@suse.de>
7557
7558 * gcc-interface/misc.c (gnat_init): Merge calls to
7559 build_common_tree_nodes and build_common_tree_nodes_2.
7560 Re-initialize boolean_false_node.
7561
7562 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7563 Olivier Hainque <hainque@adacore.com>
7564 Nicolas Setton <setton@adacore.com>
7565
7566 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7567 the type according to the ARTIFICIAL_P parameter.
7568 (create_type_decl): Likewise.
7569 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7570
7571 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7572
7573 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7574 (gnatbind): Likewise.
7575
7576 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7577
7578 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7579
7580 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7581
7582 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7583 local variable throughout. Remove useless call to Base_Type.
7584 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7585 Take it also into account for the volatileness of the field. Set the
7586 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7587
7588 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7589
7590 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7591 on a dereference built for a by-ref object if it has an address clause.
7592
7593 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7594
7595 * einfo.ads (Address_Taken): Document use for the second argument of
7596 Asm_Input and Asm_Output attributes.
7597 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7598 argument is an entity name, then set Address_Taken on it.
7599 <Attribute_Asm_Output>: Likewise.
7600 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7601 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7602 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7603 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7604
7605 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7606
7607 PR middle-end/46500
7608 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7609
7610 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7611
7612 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7613 (ada/utils.o): Update dependencies.
7614 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7615 ../../../libcpp/libcpp.a.
7616 * gcc-interface/utils.c: Include common/common-target.h.
7617 (process_attributes): Use targetm_common.have_named_sections.
7618
7619 2011-06-07 Richard Guenther <rguenther@suse.de>
7620
7621 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7622 set_sizetype.
7623
7624 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7625
7626 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7627 TREE_THIS_NOTRAP flag.
7628
7629 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7630
7631 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7632 Fix thinko.
7633
7634 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7635
7636 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7637 constants whose full view has discriminants specially.
7638
7639 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7640
7641 * gcc-interface/utils.c: Include diagnostic.h.
7642 (gnat_write_global_declarations): Output debug information for all
7643 global type declarations before finalizing the compilation unit.
7644 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7645
7646 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7647
7648 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7649
7650 2011-05-25 Kai Tietz <ktietz@redhat.com>
7651
7652 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7653 initialization instead of const/none-const pointer assignment.
7654
7655 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7656
7657 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7658 $(EXTRA_GNAT1_OBJS).
7659 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7660 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7661 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7662 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7663 libcommon-target.a instead of prefix.o.
7664
7665 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7666
7667 PR ada/49097
7668 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7669
7670 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7671
7672 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7673 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7674 instead of version.o.
7675
7676 2011-05-18 Kai Tietz <ktietz@redhat.com>
7677
7678 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7679 boolean_false_node instead of integer_zero_node.
7680 (convert_with_check): Likewise.
7681 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7682
7683 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7684
7685 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7686 type of the parameter is an unconstrained array, convert the actual to
7687 the type of the formal in the In Out and Out cases as well.
7688
7689 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7690
7691 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7692 call build_function_type_array or build_varargs_function_type_array
7693 instead.
7694 (create_subprog_type): Don't call build_function_type; call
7695 build_function_type_vec instead.
7696
7697 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7698
7699 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7700 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7701 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7702
7703 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7704
7705 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7706
7707 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7708 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7709
7710 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7711
7712 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7713
7714 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7715
7716 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7717 instead of accessing TYPE_ARG_TYPES directly.
7718 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7719
7720 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7721
7722 PR ada/48844
7723 * gcc-interface/gigi.h (get_variant_part): Declare.
7724 * gcc-interface/decl.c (get_variant_part): Make global.
7725 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7726 types have the same constant size, are record types and T1 has a
7727 variant part while T2 doesn't.
7728
7729 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7730
7731 * gcc-interface/utils.c (begin_subprog_body): Do not call
7732 get_pending_sizes.
7733 (end_subprog_body): Likewise.
7734
7735 2011-05-04 Richard Guenther <rguenther@suse.de>
7736
7737 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7738 int_const_binop.
7739 (pos_to_constructor): Likewise.
7740
7741 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7742 Eric Botcazou <ebotcazou@adacore.com>
7743
7744 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7745 of build_function_type. Adjust calls to...
7746 (build_raise_check): ...this. Do not take a void_tree parameter.
7747 Call build_function_type_list instead of build_function_type.
7748 Fix head comment and swap couple of conditional blocks.
7749
7750 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7751
7752 * gnatvsn.ads (Library_Version): Bump to 4.7.
7753 (Current_Year): Bump to 2011.
7754
7755 2011-04-29 Michael Matz <matz@suse.de>
7756
7757 * gcc-interface/misc.c (gnat_handle_option): Set
7758 warn_maybe_uninitialized.
7759
7760 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7761
7762 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7763 the Watson/McCabe paper.
7764
7765 2011-04-23 Jim Meyering <meyering@redhat.com>
7766
7767 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7768
7769 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7770
7771 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7772 onto the new type.
7773
7774 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7775
7776 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7777 parameter.
7778 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7779 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7780 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7781 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7782 <all>: Do not set flags on the reused DECL node coming from an alias.
7783 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7784 don't need debug info here...
7785 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7786 (gigi): Adjust calls to create_subprog_decl.
7787 (build_raise_check): Likewise.
7788 (establish_gnat_vms_condition_handler): Likewise.
7789 (Compilation_Unit_to_gnu): Likewise.
7790 (gnat_to_gnu): Likewise.
7791
7792 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7793
7794 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7795 (NO_REORDER_ADAFLAGS): New variable.
7796 (EXTRA_GNATTOOLS): Always define.
7797 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7798 Clean up and adjust list of files compiled with special options.
7799 * gcc-interface/Make-lang.in: Likewise.
7800 (ada/decl.o): Cosmetical change.
7801 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7802
7803 2011-04-20 Jim Meyering <meyering@redhat.com>
7804
7805 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7806
7807 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7808
7809 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7810 $(CFLAGS) on the link line.
7811
7812 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7813
7814 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7815 padded type built for the return type if it is unconstrained.
7816
7817 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7818
7819 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7820
7821 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7822
7823 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7824 before calling TREE_CHAIN.
7825 * gcc-interface/misc.c (gnat_init_ts): New function.
7826 (LANG_HOOKS_INIT_TS): Define.
7827
7828 2011-04-12 Martin Jambor <mjambor@suse.cz>
7829
7830 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7831 instead of cgraph_node.
7832
7833 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7834
7835 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7836 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7837 mechanism.
7838
7839 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7840
7841 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7842 of aggregate types that contain a placeholder.
7843
7844 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7845
7846 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7847 TYPE_ARG_TYPES.
7848 (handle_type_generic_attribute): Likewise.
7849
7850 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7851
7852 PR ada/47163
7853 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7854
7855 2011-04-04 Kai Tietz <ktietz@redhat.com>
7856
7857 PR ada/47163
7858 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7859 to flag value.
7860
7861 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7862
7863 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7864 type case, do not strip a padding type around the array type.
7865
7866 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7867
7868 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7869 types.
7870
7871 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7872
7873 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7874 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7875 code for -feliminate-unused-debug-types.
7876 (gnat_post_options): Likewise.
7877
7878 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7879
7880 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7881 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7882 distinct copy.
7883
7884 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7885
7886 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7887 DECL_ARTIFICIAL flag on enumeration types.
7888
7889 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7890
7891 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7892 fat pointer types artificial unconditionally.
7893 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7894 isn't artificial.
7895
7896 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7897
7898 * gcc-interface/gigi.h (get_dummy_type): Declare.
7899 (build_dummy_unc_pointer_types): Likewise.
7900 (finish_fat_pointer_type): Likewise.
7901 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7902 fat pointer type has been built, complete it in place.
7903 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7904 and thin pointers. Remove useless variable.
7905 (finish_fat_pointer_type): Make global and move to...
7906 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7907 (get_dummy_type): New function.
7908 (build_dummy_unc_pointer_types): Likewise.
7909 (gnat_pushdecl): Propage the name to the anonymous variants only.
7910 (update_pointer_to): Only adjust the pointer types in the unconstrained
7911 array case.
7912
7913 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7914
7915 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7916 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7917 if this is a Taft amendment type and the full declaration is available.
7918 * gcc-interface/trans.c (process_type): Likewise.
7919 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7920 (process_freeze_entity): Likewise.
7921 * gcc-interface/utils.c (dummy_global): New static variable.
7922 (gnat_write_global_declarations): If there are types declared as used
7923 at the global level, insert them in the global hash table.
7924
7925 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7926
7927 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7928 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7929 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7930 copy.
7931 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7932 flag of the type accordingly.
7933 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7934
7935 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7936
7937 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7938 finalizing types when updating the pointers to the designated type.
7939 <all>: Finalize the deferred types even if we didn't defer processing
7940 of incomplete types in this invocation.
7941
7942 2011-04-01 Olivier Hainque <hainque@adacore.com>
7943 Nicolas Setton <setton@adacore.com>
7944 Eric Botcazou <ebotcazou@adacore.com>
7945
7946 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7947 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7948
7949 2011-03-28 Kai Tietz <ktietz@redhat.com>
7950
7951 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7952 Windows targets.
7953 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7954 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7955
7956 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7957
7958 2011-03-28 Tristan Gingold <gingold@adacore.com>
7959
7960 PR ada/44431
7961 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7962 Use ada output of gnatbind.
7963 (ada/b_gnatb.adb): Ditto.
7964 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7965 (ada.mostlyclean, ada.stage1)
7966 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7967 (ada.stagefeedback): Adjust.
7968 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7969 Use ada output of gnatbind.
7970 (b_gnatm.adb): Ditto.
7971 (b_gnatl.o, b_gnatm.o): New rules.
7972
7973 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7974
7975 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7976 for the padded type built to support a specified size or alignment.
7977
7978 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7979
7980 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7981 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7982 unconditionally to the end of the unit when the designated type is
7983 limited_with'ed.
7984 <all>: Rename local variable. Attempt to un-defer types only and do it
7985 for limited_with'ed types as well.
7986 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7987 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7988 consistently and remove redundant call to finalize_from_with_types.
7989
7990 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7991
7992 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7993 subprograms without a previous spec declared in the same unit.
7994 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7995 subprograms at the end of the unit instead of at the beginning.
7996 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7997 isn't public for the special handling of non-inline functions nested
7998 inside inline external functions.
7999
8000 2011-03-25 Jeff Law <law@redhat.com>
8001
8002 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8003
8004 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8005
8006 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8007 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8008 to compute Set_Size_Depends_On_Discriminant.
8009 (Layout_Type): Call it on array types in back-end layout mode.
8010 * sem_util.adb (Requires_Transient_Scope): Return true for array
8011 types only if the size depends on the value of discriminants.
8012 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8013 type if the RHS is a call to a function that returns an unconstrained
8014 type with default discriminant.
8015
8016 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8017
8018 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8019 non-conversion to the nominal result type at the end.
8020
8021 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8022
8023 * gcc-interface/trans.c (create_temporary): New function taken from...
8024 (create_init_temporary): ...here. Call it.
8025 (call_to_gnu): Create the temporary for the return value early, if any.
8026 Create it for a function with copy-in/copy-out parameters if there is
8027 no target; in other cases of copy-in/copy-out, use another temporary.
8028 Push the new binding level lazily. Add and rename local variables.
8029
8030 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8031
8032 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8033 error message.
8034 (set_rm_size): Likewise.
8035
8036 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8037
8038 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8039 for the padded type built in order to support a specified alignment.
8040 Fix incorrect formatting.
8041
8042 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8043
8044 PR bootstrap/48216
8045 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8046
8047 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8048
8049 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8050 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8051 to the end of the list. Adjust recursive call. Rename local variable.
8052 If REORDER is true, reorder components of the record type.
8053 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8054 components_to_record and adjust the parameter list.
8055
8056 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8057
8058 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8059 disabled, use the variable for bounds of loop iteration scheme.
8060
8061 2011-03-21 Kai Tietz <ktietz@redhat.com>
8062
8063 PR target/12171
8064 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8065
8066 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8067
8068 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8069 out whether the expression is read-only. Short-circuit placeholder
8070 case and rename a couple of local variables.
8071
8072 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8073
8074 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8075 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8076 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8077 (convert): Deal with conversions from a smaller form type specially.
8078
8079 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8080
8081 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8082 its argument, except for the special -I- switch.
8083
8084 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8085
8086 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8087 "Ada Issues".
8088
8089 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8090
8091 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8092
8093 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8094
8095 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8096 GNAT_FORMAL.
8097 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8098 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8099 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8100 Do not generate the check directly, instead instantiate the template
8101 check present in the descriptor.
8102 (make_descriptor_field): Move around.
8103 (build_vms_descriptor32): Build a template check in the POINTER field.
8104 (build_vms_descriptor): Remove useless suffixes.
8105 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8106
8107 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8108
8109 PR bootstrap/47467
8110 * targext.c: Include target files if IN_RTS is defined.
8111
8112 2011-01-26 Richard Guenther <rguenther@suse.de>
8113
8114 PR bootstrap/47467
8115 * targext.c: Include config.h.
8116 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8117 dependency.
8118
8119 2011-01-04 Pascal Obry <obry@adacore.com>
8120 Eric Botcazou <ebotcazou@adacore.com>
8121
8122 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8123
8124 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8125
8126 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8127 end-of-case on the end label and its associated gotos, if any.
8128
8129 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8130
8131 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8132 expressions of the parameter cache within the statement group of
8133 the CICO mechanism.
8134
8135 2011-01-04 Olivier Hainque <hainque@adacore.com>
8136 Eric Botcazou <ebotcazou@adacore.com>
8137
8138 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8139 (set_end_locus_from_node): New function.
8140 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8141 make and the function end_locus.
8142 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8143 for the elaboration subprogram.
8144 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8145 set the end_locus of the expression as well.
8146
8147 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8148
8149 PR ada/47131
8150 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8151 variables that are referenced in exception handlers volatile.
8152
8153
8154 \f
8155 Copyright (C) 2011 Free Software Foundation, Inc.
8156
8157 Copying and distribution of this file, with or without modification,
8158 are permitted in any medium without royalty provided the copyright
8159 notice and this notice are preserved.