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