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