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