1 2011-08-04 Thomas Quinot <quinot@adacore.com>
3 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4 This flag of N_Pragma nodes is not used, remove it as well as all of
5 the associated circuitry.
7 2011-08-04 Javier Miranda <miranda@adacore.com>
9 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
10 runtime check on duplicated externa tags
11 * debug.adb Document switch -gnatdQ.
13 2011-08-04 Gary Dismukes <dismukes@adacore.com>
15 * a-fihema.ads: Minor typo fix.
17 2011-08-04 Yannick Moy <moy@adacore.com>
19 * sem_ch10.adb: Minor comment update.
21 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
23 * einfo.adb: Update the node field usage to reflect the renaming of
24 Return_Flag to Return_ Flag_Or_Transient_Decl.
25 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
26 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
27 (Write_Field15_Name): Change Return_Flag to
28 Return_Flag_Or_Transient_Decl.
29 * einfo.ads: Rename node field Return_Flag to
30 Return_Flag_Or_Transient_Decl. Update the associated comment and all
31 occurrences in entities.
32 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
33 associated Inline pragma.
34 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
35 associated Inline pragma.
36 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
38 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
39 Return_Flag and Set_Return_Flag.
40 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
41 objects generated for controlled transients declared inside an
42 Exception_With_Actions. Update the calls to Return_Flag.
43 (Process_Object_Declaration): Add code to add a null guard for hook
44 objects generated for controlled transients declared inside an
45 Exception_With_Actions. Update related comment.
46 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
47 objects generated for controlled transients declared inside an
48 Exception_With_Actions. Update the calls to Return_Flag.
49 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
51 2011-08-04 Ed Schonberg <schonberg@adacore.com>
53 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
56 2011-08-04 Vincent Celier <celier@adacore.com>
58 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
59 SLOC only for pragmas.
61 2011-08-04 Emmanuel Briot <briot@adacore.com>
63 * projects.texi: Minor typo fix.
65 2011-08-04 Emmanuel Briot <briot@adacore.com>
67 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
68 on case-sensitive file systems.
70 2011-08-04 Thomas Quinot <quinot@adacore.com>
72 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
73 nested in a disabled pragma.
74 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
75 enclosing pragma, if any, for X decisions.
77 2011-08-04 Thomas Quinot <quinot@adacore.com>
79 * sem_prag.adb: Minor reformatting.
81 2011-08-04 Vincent Celier <celier@adacore.com>
83 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
84 allowed in no run time mode.
86 2011-08-04 Vincent Celier <celier@adacore.com>
88 * make.adb (Check): When -gnatc is used, check for the source file
89 inside the ALI file with a canonical case file name.
91 2011-08-04 Emmanuel Briot <briot@adacore.com>
93 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
94 overriding the separator.
96 2011-08-04 Robert Dewar <dewar@adacore.com>
98 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
99 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
101 2011-08-04 Robert Dewar <dewar@adacore.com>
103 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
105 2011-08-04 Yannick Moy <moy@adacore.com>
107 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
108 'Result only appears in postcondition of function.
110 2011-08-04 Thomas Quinot <quinot@adacore.com>
112 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
113 external tag, include the value of the external tag in the exception
116 2011-08-04 Yannick Moy <moy@adacore.com>
118 * sem_attr.adb (Result): modify error message for misplaced 'Result
120 2011-08-04 Sergey Rybin <rybin@adacore.com>
122 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
123 clear that the second argument must be an identifier.
125 2011-08-04 Thomas Quinot <quinot@adacore.com>
127 * exp_ch9.adb (Build_Barrier_Function): When compiling with
128 -fpreserve-control-flow, insert an IF statement on the barrier
129 condition to ensure that a conditional branch instruction is generated.
131 2011-08-04 Emmanuel Briot <briot@adacore.com>
133 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
134 (Processing_Flags.Ignore_Missing_With): new flag.
136 2011-08-04 Emmanuel Briot <briot@adacore.com>
138 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
139 Source_List_File on case-insensitive systems where the file is actually
140 on a case-sensitive file system (NFS,...).
142 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
144 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
145 function return contains a controlled [extension] aggregate and the
146 return statement is not part of a handled sequence of statements, wrap
147 the return in a block. This ensures that all controlled temporaries
148 generated during aggregate resolution will be picked up by the
149 finalization machinery.
151 2011-08-04 Ed Schonberg <schonberg@adacore.com>
153 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
154 components, freeze type before resolution, to ensure that default
155 initializations are present for all components.
156 * sem_res.adb (Resolve_Actuals): the designated object of an
157 accces-to-constant type is a legal actual in a call to an
158 initialization procedure.
160 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
162 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
163 N_Unchecked_Type_Conversion to the possible containers of a renamed
166 2011-08-04 Yannick Moy <moy@adacore.com>
168 * par-ch13.adb (Aspect_Specifications_Present): recognize
169 "with Identifier'Class =>" as an aspect, so that a meaningful warning
170 is issued in Strict mode.
171 * par.adb: Fix typos in comments.
173 2011-08-04 Yannick Moy <moy@adacore.com>
175 * sem_attr.adb (Result): modify error message to take into account Post
176 aspect when compiling Ada 2012 (or newer) code.
178 2011-08-04 Nicolas Roche <roche@adacore.com>
180 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
181 remove need for GCC exceptions.
183 2011-08-04 Vincent Celier <celier@adacore.com>
185 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
186 project, not the source file name.
187 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
188 excluded, continue looking. This excluded source will only be returned
189 if there is no other source with the same base name that is not locally
192 2011-08-04 Ed Schonberg <schonberg@adacore.com>
194 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
195 private and one of the operands is a real literal, use a qualified
196 expression rather than a conversion which is not meaningful to the
199 2011-08-04 Yannick Moy <moy@adacore.com>
201 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
202 corresponding aspect X'Class are allowed, proceed with analysis of the
203 aspect instead of skipping it.
205 2011-08-04 Tristan Gingold <gingold@adacore.com>
207 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
208 This will allow to have an Ada implementation for the subprogram.
210 2011-08-04 Ed Schonberg <schonberg@adacore.com>
212 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
213 completion and aspects are present, apply them to the entity for the
214 type which is currently the partial view, but which is the one that
216 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
217 applies to a partial view, indicate that the full view has predicates
219 (Replace_Type_Reference): Handle properly predicates that apply to the
220 full view of a private completion.
222 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
224 * layout.adb (Layout_Type): For composite types, do not set Esize.
225 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
227 (Size_Known): Look at the RM size of components instead of the Esize.
228 (Freeze_Record_Type): Look at the RM size instead of the Esize to
229 issue warning and activate Implicit_Packing.
230 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
231 if the Esize is not known.
232 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
233 for elementary types only.
234 (Analyze_Record_Representation_Clause): Look at the RM size instead
235 of the Esize to issue errors.
236 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
238 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
240 Look at the RM size instead of the Esize for types if the latter is
242 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
244 2011-08-04 Ed Schonberg <schonberg@adacore.com>
246 * sem_type.adb: proper handling of equality not involving anonymous
249 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
251 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
252 Vis_Decls. When creating a library-level finalizer for a package spec,
253 both the declaration and body of the finalizer are inserted either in
254 the visible or private declarations of the package spec.
256 2011-08-04 Javier Miranda <miranda@adacore.com>
258 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
259 use of the full-view of a type when invoking Is_Ancestor.
260 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
261 the full-view of private parents is requested, then use also the
262 full-view of the parent of the first derivation.
264 2011-08-04 Tristan Gingold <gingold@adacore.com>
266 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
267 instead of the locally imported procedure.
268 * s-taprop-mingw.adb (Enter_Task): Ditto.
269 * s-valrea.adb (Scan_Real): Ditto.
270 * s-imgrea.adb (Set_Image_Real): Ditto.
271 * s-flocon.ads: Make the package pure.
273 2011-08-04 Thomas Quinot <quinot@adacore.com>
275 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
276 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
277 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
278 New subprogram, moved here from...
279 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
280 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
281 rewriting of the last argument into a procedure call statement here...
282 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
285 2011-08-04 Thomas Quinot <quinot@adacore.com>
287 * par_sco.adb: Minor reformatting.
289 2011-08-04 Robert Dewar <dewar@adacore.com>
291 * erroutc.adb: Minor reformatting.
293 2011-08-04 Thomas Quinot <quinot@adacore.com>
295 * par_sco.adb: Comment update.
297 2011-08-04 Tristan Gingold <gingold@adacore.com>
299 * s-flocon.ads: New file.
300 * g-flocon.ads: Now a renaming of s-flocon.
301 * Makefile.rtl: Add s-flocon.o
303 2011-08-04 Javier Miranda <miranda@adacore.com>
305 * exp_strm.adb (Build_Array_Input_Function): if the array type is
306 constrained, do not attempt to build a subtype of it.
308 2011-08-04 Yannick Moy <moy@adacore.com>
310 * errout.ads Change comments: remove 'R'M as an example where quotes
311 are needed; add ALFA as another case where quotes are not needed
312 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
313 case where quotes are not needed.
314 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
315 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
316 Remove all occurrences of 'A'L'F'A
318 2011-08-04 Ed Schonberg <schonberg@adacore.com>
320 * sem_ch13.adb: check legality of invariant pragma.
322 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
324 * bindgen.adb: Add comments.
326 2011-08-04 Yannick Moy <moy@adacore.com>
328 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
330 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
331 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
333 2011-08-04 Robert Dewar <dewar@adacore.com>
335 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
336 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
337 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
339 2011-08-04 Thomas Quinot <quinot@adacore.com>
341 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
343 2011-08-04 Thomas Quinot <quinot@adacore.com>
346 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
349 2011-08-04 Robert Dewar <dewar@adacore.com>
351 * einfo.ads, exp_ch4.adb: Minor reformatting.
353 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
355 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
357 2011-08-04 Ed Schonberg <schonberg@adacore.com>
359 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
360 type in all cases to compute list of primitive operations, because full
361 view may be an itype that is not attached to the list of declarations.
363 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
365 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
366 library has already been finalized.
367 (Gen_Adafinal_C): Likewise.
368 (Gen_Adainit_Ada): Generate an early return if the library has
369 already been elaborated.
370 (Gen_Adainit_C): Likewise.
371 (Gen_Output_File_Ada): Generate an elaboration flag.
372 (Gen_Output_File_C): Likewise.
374 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
376 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
377 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
378 built in the first place.
379 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
380 for CodePeer because Finalize_Address was not built to begin with.
381 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
383 2011-08-04 Pascal Obry <obry@adacore.com>
385 * adaint.c (__gnat_tmp_name): Use current process id to create temp
386 filenames, this ensures unicity of filenames across processes.
388 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
390 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
391 Raise_Controlled to Raise_From_Controlled_Operation. Update the
392 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
393 Add False as the actual to From_Abort in the generated call to
394 Raise_From_Controlled_Operation.
396 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
398 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
399 so that the ali file name can be retrieved from outside of this package.
400 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
401 doing nothing in the general case, but used to update the object file
402 timestamp if directly generated by the backend.
403 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
404 to a later time than the ali file one.
406 2011-08-04 Yannick Moy <moy@adacore.com>
408 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
409 entities whose body contains an Annotate pragma which forces formal
411 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
412 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
413 Mark_Non_ALFA_Subprogram to pass in a message and node.
414 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
415 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
416 surrounding subprogram.
417 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
418 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
419 as not in ALFA is annotated with Formal_Proof being On, then an error
420 is issued based on the additional parameters for message and node.
421 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
422 * gcc-interface/Make-lang.in: Update dependencies.
424 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
426 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
427 Finalize_Address when CodePeer is enabled.
429 2011-08-04 Pascal Obry <obry@adacore.com>
431 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
432 the latter returns a pointer to a static buffer which is deallocated
433 at the end of the routine.
435 2011-08-04 Yannick Moy <moy@adacore.com>
437 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
438 after index creation; mark unconstrained base array type generated as
439 being in/not in ALFA as well
440 (Make_Index): mark subtype created as in/not in ALFA
441 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
442 over a loop as in/not in ALFA, depending on its type and form of loop
445 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
447 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
448 directly to False on .NET and JVM.
450 2011-08-04 Yannick Moy <moy@adacore.com>
452 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
453 constraint that subtype must come from source code to be in ALFA, so
454 that anonymous subtypes can be in ALFA too.
456 2011-08-04 Yannick Moy <moy@adacore.com>
458 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
459 reference for ALFA mode.
460 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
461 procedure public so as to use it from formal verification back-end.
463 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
465 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
466 invalid checks of the Parameter, making Remove_Switch not working
469 2011-08-04 Arnaud Charlet <charlet@adacore.com>
471 * targparm.ads: Update header: no run-time exception is needed on this
474 2011-08-04 Vincent Celier <celier@adacore.com>
476 * a-fihema.adb: Use System.IO instead of GNAT.IO
478 2011-08-04 Thomas Quinot <quinot@adacore.com>
480 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
481 are forbidden in Compiler_Unit mode.
483 2011-08-04 Robert Dewar <dewar@adacore.com>
485 * sem_util.adb: Minor reformatting.
487 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
489 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
490 library-level finalizers.
491 (Gen_Finalize_Library_C): Update the import string for library-level
493 (Gen_Finalize_Library_Defs_C): Update the definition name of a
494 library-level finalizer.
495 * exp_ch7.adb: Remove with and use clauses for Stringt.
496 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
497 Spec_Decl. Add local variable Body_Id. The names of library-level
498 finalizers are now manually fully qualified and are no longer external.
499 A single name is now capable of servicing .NET, JVM and non-VM targets.
500 Pragma Export is no longer required to provide visibility for the name.
501 (Create_Finalizer_String): Removed.
502 (New_Finalizer_Name): New routine which mimics New_..._Name.
504 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
506 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
507 elaboration counter to Standard_Short_Integer.
508 * sem_util.adb (Build_Elaboration_Entity): Likewise.
509 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
510 (Gen_Elab_Externals_C): Likewise.
512 2011-08-04 Ed Falis <falis@adacore.com>
514 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
515 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
516 system-vxworks-mips.ads, system-vxworks-x86.ads
517 (Always_Compatible_Rep): set to False for all VxWorks targets.
519 2011-08-04 Robert Dewar <dewar@adacore.com>
521 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
522 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
523 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
524 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
525 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
526 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
527 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
528 Minor reformatting and code reorganization.
530 2011-08-04 Emmanuel Briot <briot@adacore.com>
532 * projects.texi: Added doc for aggregate projects.
534 2011-08-04 Emmanuel Briot <briot@adacore.com>
536 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
537 Add support for overriding the Project_Path in aggregate projects.
539 2011-08-04 Robert Dewar <dewar@adacore.com>
541 * a-cofove.ads: Minor reformatting.
543 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
545 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
546 on the generated code.
547 (Build_Finalize_Statements): Update the comment on the generated code.
548 (Build_Initialize_Statements): Update the comment on the generated code.
549 (Build_Object_Declarations): Add local variable Result. The object
550 declarations are now built in sequence.
551 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
554 2011-08-04 Robert Dewar <dewar@adacore.com>
556 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
558 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
560 * einfo.ads (Elaboration_Entity): Document new definition and use.
561 (Elaboration_Entity_Required): Adjust to above change.
562 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
563 * exp_ch12.adb: And with and use for Snames.
564 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
565 * exp_util.adb (Set_Elaboration_Flag): Likewise.
566 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
567 <Check_Unit_Name>: Deal with N_Expanded_Name.
568 <Attribute_Elaborated>: Extend to all unit names.
569 * sem_elab.adb: And with and use for Uintp.
570 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
571 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
572 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
573 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
574 from Gen_Adainit_Ada.
575 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
576 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
577 case, do not call System.Standard_Library.Adafinal; instead call
578 finalize_library if needed.
579 (Gen_Adafinal_C): Likewise.
580 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
581 non-main program case.
582 (Gen_Adainit_C): Generate a couple of external declarations here.
583 In the main program case, set SSL.Finalize_Library_Objects.
584 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
585 (Gen_Elab_Calls_C): Likewise.
586 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
587 (Gen_Finalize_Library_C): Likewise. Generate a full function.
588 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
590 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
591 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
593 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
594 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
595 of external declarations. Â Call Gen_Finalize_Library_C.
597 2011-08-04 Emmanuel Briot <briot@adacore.com>
599 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
600 Compute_Compilation_Phases): new subprogram.
601 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
602 The number of mains as well as the various compilation phases that
603 need to be run are now project tree specific, since various
604 aggregated trees might have different requirements. In particular,
605 they do not all require bind or link phases.
607 2011-08-04 Emmanuel Briot <briot@adacore.com>
609 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
610 (Project_Tree_Appdata): New type.
611 It is now possible to associate application-specific data to a project
612 tree. In particular, this is used in the gprbuild builder to avoid a
613 number of global tables and htables, especially now that there can be
614 several project trees loaded at once because of aggregate projects.
615 (Debug_Name): new procedure.
616 * projects.texi: Clarify syntax of "**" for Source_Dirs
618 2011-08-03 Emmanuel Briot <briot@adacore.com>
620 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
621 the "roots" for a main.
622 (Fill_From_Project): add support for aggregate projects. Main units
623 in aggregated projects are now automatically added in the list of
624 files to build (although this fails later on in gprbuild, because
625 these files are not using the root proejct tree, so this needs
627 * gcc-interface/Make-lang.in: Update dependencies.
629 2011-08-03 Yannick Moy <moy@adacore.com>
631 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
632 conditional expression in ALFA.
633 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
634 expressions as not in ALFA.
636 2011-08-03 Robert Dewar <dewar@adacore.com>
638 * a-cofove.adb: Minor reformatting.
640 2011-08-03 Emmanuel Briot <briot@adacore.com>
642 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
643 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
645 These packages are more logically placed in the Queue package, since
646 they manipulate the queue. It is also likely that they can be adapted
647 for gnatmake, thus sharing more code.
648 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
649 that we could move the above.
651 2011-08-03 Emmanuel Briot <briot@adacore.com>
653 * errutil.adb (Finalize): clean up the list of error messages on exit.
654 Calling this subprogram multiple times will no longer show duplicate
655 error messages on stderr.
657 2011-08-03 Emmanuel Briot <briot@adacore.com>
659 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
660 Getopt_Switches when we have already define a command line
663 2011-08-03 Yannick Moy <moy@adacore.com>
665 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
666 in ALFA. Instead, they are considered as assertions to prove.
667 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
668 nodes as not in ALFA. Instead, include conditional expressions in ALFA
669 if they have no ELSE part, or if they occur in pre- and postconditions,
670 where the Condition cannot have side-effects in ALFA
671 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
672 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
673 Instead, include type conversion between scalar types in ALFA.
674 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
675 if-and-only-if its type is in ALFA.
677 2011-08-03 Thomas Quinot <quinot@adacore.com>
679 * scos.adb, get_scos.adb, put_scos.adb
680 New code letter for decisions: G (entry guard)
682 (Traverse_Subprogram_Body): Rename to...
683 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
684 (Traverse_Protected_Body): New subprogram
685 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
686 protected bodies and entry bodies.
688 2011-08-03 Yannick Moy <moy@adacore.com>
690 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
691 entities with get/set subprograms, which is set on procedure entities
692 generated by the compiler for a postcondition.
693 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
694 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
695 entity for a declaration
696 (Get_Unique_Entity_For_Decl): new function returning an entity which
697 represents a declaration, so that matching spec and body have the same
700 2011-08-03 Robert Dewar <dewar@adacore.com>
702 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
703 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
705 2011-08-03 Yannick Moy <moy@adacore.com>
707 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
708 library-level because retriction No_Implicit_Dynamic_Code in the
709 front-end prevents its definition as a local subprogram
710 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
711 for reuse in other contexts
712 (Traverse_Declarations_Or_Statements,
713 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
714 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
715 procedures take a callback parameter to be called on all declarations
717 (Traverse_All_Compilation_Units): new generic function to traverse a
718 compilation unit and call a callback parameter on all declarations
720 2011-08-03 Javier Miranda <miranda@adacore.com>
722 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
723 in Java since they are always enclosed in a namespace that
724 differentiates them, and overloaded entities are supported by the VM.
726 2011-08-03 Ed Schonberg <schonberg@adacore.com>
728 * checks.adb (Determine_Range): If a computed bound of an operation is
729 outside the range of the base type of the expression, and overflow
730 checks are enabled, the result is unknown and cannot be used for any
731 subsequent constant folding.
732 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
733 unknown, so is the result of the comparison.
735 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
737 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
738 From_Abort. When finalization was triggered by an abort, propagate
739 Standard'Abort_Signal rather than Program_Error.
740 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
742 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
743 From_Abort. When finalization was triggered by an abort, propagate
744 Standard'Abort_Signal rather than Program_Error.
745 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
747 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
748 Abort_Id. Update the calls to Build_Object_Declarations and
749 Build_Raise_Statement to include Abort_Id.
750 (Build_Adjust_Statements): New local variable Abort_Id. Update the
751 calls to Build_Object_Declarations and Build_Raise_Statement to include
753 (Build_Finalize_Statements): New local variable Abort_Id. Update the
754 calls to Build_Object_Declarations and Build_Raise_Statement to include
756 (Build_Components): Create an entity for Abort_Id when exceptions are
757 allowed on the target.
758 (Build_Finalizer): New local variable Abort_Id.
759 (Build_Initialize_Statements): New local variable Abort_Id. Update the
760 calls to Build_Object_Declarations and Build_Raise_Statement to include
762 (Build_Object_Declarations): Add new formal Abort_Id. Create the
763 declaration of flag Abort_Id to preserve the original abort status
764 before finalization code is executed.
765 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
766 runtime routine Raise_From_Controlled_Operation.
767 (Create_Finalizer): Update the call to Build_Raise_Statement to include
768 Abort_Id. Update the call to Build_Object_Declarations to include
769 Abort_Id. Update the layout of the finalizer body.
770 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
771 (Process_Transient_Objects): New local variable Abort_Id. Remove the
772 clunky code to create all flags and objects related to
773 exception propagation and replace it with a call to
774 Build_Object_Declarations. Update the call to Build_Raise_Statement to
776 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
777 Add new formal Abort_Id and associated comment on its use.
778 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
780 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
781 Remove the clunky code to create all flags and objects related to
782 exception propagation and replace it with a call to
783 Build_Object_Declarations. Update the call to Build_Raise_Statement.
785 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
787 * s-tassta.adb: Fix minor typos.
789 2011-08-03 Robert Dewar <dewar@adacore.com>
791 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
792 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
794 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
796 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
797 to packages. This ensures that the finalizer body will not end up
798 inside the freeze node.
799 (Process_Declarations): Add code to detect whether a freeze node has a
800 nested finalization collection.
802 2011-08-03 Pascal Obry <obry@adacore.com>
804 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
805 (Current_Session): Return a not null access to Session_Type.
806 (Default_Session): Likewise.
808 2011-08-03 Robert Dewar <dewar@adacore.com>
810 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
811 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
813 2011-08-03 Pascal Obry <obry@adacore.com>
815 * g-awk.ads: Minor comment fix.
817 2011-08-03 Sergey Rybin <rybin@adacore.com>
819 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
820 the tree structure related to discriminant constraints.
821 Original_Discriminant cannot be used any more for computing the
822 defining name for the reference to a discriminant.
824 2011-08-03 Ed Schonberg <schonberg@adacore.com>
826 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
827 function is not visibly tagged, this is not a dispatching call and
828 therfore is not Tag_Indeterminate, even if the function is marked as
829 dispatching on result.
831 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
833 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
834 (Expand_N_Free_Statement): Add a guard to protect against run-times
835 which do not support controlled types.
836 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
837 against run-times which do not support controlled types.
838 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
839 against run-times which do not support controlled types.
840 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
841 against run-times which do not support controlled types.
842 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
843 protect against run-times which do not support controlled types.
845 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
847 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
848 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
850 2011-08-03 Ed Schonberg <schonberg@adacore.com>
852 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
853 modified in the source, to prevent spurious warnings when compiling
856 2011-08-03 Thomas Quinot <quinot@adacore.com>
858 * a-except-2005.adb: Minor reformatting.
860 2011-08-03 Ed Schonberg <schonberg@adacore.com>
862 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
863 is a renaming declaration in the private part of a package, do not emit
864 a warning that the with_clause could be moved because the renaming may
865 be used in the body or in a child unit.
867 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
869 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
870 Propagate the Comes_From_Source attribute from the original return
871 object to the renaming.
873 2011-08-03 Jose Ruiz <ruiz@adacore.com>
875 * exp_ch7.adb (Build_Raise_Statement): Do not call
876 Raise_From_Controlled_Operation when this routine is not present in
877 the run-time library.
878 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
879 libraries (Ravenscar), tasks are non-terminating, and protected objects
880 and tasks can only appear at library level, so we do not want
881 finalization of protected objects nor tasks.
882 * exp_intr.adb: Minor clarification in comment.
883 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
884 Gen_Output_File_C): Remove references to finalization of library-level
885 objects when using restricted run-time libraries.
887 2011-08-03 Ed Schonberg <schonberg@adacore.com>
889 * sem_ch3.adb (Build_Discriminant_Constraints): Set
890 Original_Discriminant only if the parent type is a generic formal.
892 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
894 * exp_ch13.adb: Add with and use clause for Targparm;
895 (Expand_N_Free_Statement): Prevent the generation of a custom
896 Deallocate on .NET/JVM targets since this requires pools and address
898 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
899 .NET/JVM targets, attach the newly allocated object to the access
900 type's finalization collection. Do not generate a call to
901 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
902 exist in the runtime.
903 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
904 create a custom Allocate for object that do not require initialization.
905 Attach a newly allocated object to the access type's finalization
906 collection on .NET/JVM.
907 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
908 assignment of controlled types on .NET/JVM. The two hidden pointers
909 Prev and Next and stored and later restored after the assignment takes
911 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
912 kludge for .NET/JVM to recognize a particular piece of code coming from
913 Heap_Management and change the call to Finalize into Deep_Finalize.
914 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
915 finalization collections on .NET/JVM only for types derived from
916 Controlled. Separate the association of storage pools with a collection
917 and only allow it on non-.NET/JVM targets.
918 (Make_Attach_Call): New routine.
919 (Make_Detach_Call): New routine.
920 (Process_Object_Declarations): Suppress the generation of
921 build-in-place return object clean up code on .NET/JVM since it uses
923 * exp_ch7.ads (Make_Attach_Call): New routine.
924 (Make_Detach_Call): New routine.
925 * exp_intr.adb Add with and use clause for Targparm.
926 (Expand_Unc_Deallocation): Detach a controlled object from a collection
928 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
929 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
930 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
931 names used in finalization.
933 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
935 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
936 (Attach, Detach): Lock the current task when chaining an object onto a
939 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
941 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
942 Rewritten to create the message strings when the exception is not
943 raised by an abort during finalization.
944 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
945 Raise_From_Controlled_Operation and update its associated comment.
946 * a-fihema.ads, a-fihema.adb: New GNAT unit.
947 Ada.Finalization.Heap_Management provides key functionality
948 associated with controlled objects on the heap, their creation,
949 finalization and reclamation. Type Finalization_Collection is
950 effectively a wrapper which sits ontop of a storage pool and performs
951 all necessary bookkeeping for all the objects it contains. Each
952 access-to-controlled or access-to-class-wide type receives a collection
953 as part of its expansion. The compiler generates buffer code and
954 invokes Allocate / Deallocate to create and destroy allocated
956 * a-finali.adb ("="): Removed.
957 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
958 fields Prev and Next.
959 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
960 A library unit with at least one controlled object on the library level
961 has a special finalizer which is invoked by the binder. To signal this,
962 ali files carry field PF.
963 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
964 associated comment on field usage.
965 * a-tags.adb (Get_RC_Offset): Removed.
966 (Needs_Finalization): New routine.
967 * a-tags.ads: Update the structure of the GNAT dispatch tables.
968 Dispatch tables now carry field Needs_Finalization which provides
969 runtime indication whether a type is controlled or has controlled
970 components or both. Remove field RC_Offset.
971 (Get_RC_Offset): Removed along with its associated pragma Export.
972 Since tagged types with controlled components no longer carry hidden
973 field _controller, the special mechanism to retrieve its location is no
975 (Needs_Finalization): New routine.
976 * atree.ads, atree.adb (Elist24): New routine.
977 (Set_Elist24): New routine.
978 * atree.h: Add a define clause for Elist24.
979 * bindgen.adb New library-level variable Lib_Final_Built.
980 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
981 presence of a VM target, the routine generates calls to the proper
982 library finalization routine.
983 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
984 targets. Set the correct library finalization routine depending on
985 whether the library has controlled objects or this is a VM compilation.
986 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
987 to library-level finalizers of compiled units in reverse order of
988 elaboration. It also produces exception management code and reraises a
989 potential exception after all units have been finalized.
990 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
991 library-level finalizers of compiled units in reverse order of
993 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
994 definitions of all library-level finalizers available to the compilation
995 (Gen_Main_Ada): Directly call Adafinal which now contails all target
997 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
998 System.Standard_Library.Adafinal directly. If the library needs
999 finalization actions, create the sequence of finalization calls.
1000 (Gen_Output_File_Ada): Alphabetize local variables and constants.
1001 Generate a with clause for System.Soft_Links when compiling for a VM.
1002 Remove the code which imports System.Standard_Library.Adafinal as
1003 Do_Finalize. Generate the library finalization routine.
1004 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
1005 If the library needs finalization actions, create all the definitions
1006 of library- level finalizers.
1007 (Has_Finalizer): New routine. Determines whether at least one compiled
1008 unit has a library-level finalizer.
1009 Add type Qualification_Mode.
1010 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
1011 * einfo.adb: New usage of field 15 as Return_Flag.
1012 Remove Finalization_Chain_Entity from the usages of field 19.
1013 Remove Associated_Final_Chain from the usages of field 23.
1014 New usage of field 23 as Associated_Collection.
1015 New usage of field 24 as Finalizer.
1016 New usage of flag 252 as Is_Processed_Transient.
1017 (Associated_Final_Chain): Removed.
1018 (Associated_Collection): New routine.
1019 (Finalization_Chain_Entity): Removed.
1020 (Finalizer): New routine.
1021 (Is_Finalizer): New routine.
1022 (Is_Processed_Transient): New routine.
1023 (Return_Flag): New routine.
1024 (Set_Associated_Final_Chain): Removed.
1025 (Set_Associated_Collection): New routine.
1026 (Set_Finalization_Chain_Entity): Removed.
1027 (Set_Finalizer): New routine.
1028 (Set_Is_Processed_Transient): New routine.
1029 (Set_Return_Flag): New routine.
1030 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
1032 (Write_Field8_Name): Alphabetize the output.
1033 (Write_Field11_Name): Alphabetize the output.
1034 (Write_Field12_Name): Alphabetize the output.
1035 (Write_Field13_Name): Alphabetize the output.
1036 (Write_Field14_Name): Alphabetize the output.
1037 (Write_Field15_Name): Alphabetize the output.
1038 (Write_Field16_Name): Alphabetize the output.
1039 (Write_Field17_Name): Alphabetize the output.
1040 (Write_Field18_Name): Alphabetize the output.
1041 (Write_Field19_Name): Alphabetize the output. Remove the output of
1042 Finalization_Chain_Entity.
1043 (Write_Field20_Name): Alphabetize the output.
1044 (Write_Field21_Name): Alphabetize the output.
1045 (Write_Field22_Name): Alphabetize the output.
1046 (Write_Field23_Name): Alphabetize the output. Remove the output of
1047 Associated_Final_Chain. Add output for Associated_Collection.
1048 (Write_Field24_Name): Alphabetize the output.
1049 (Write_Field25_Name): Add output for Finalizer.
1050 (Write_Field26_Name): Alphabetize the output.
1051 (Write_Field27_Name): Alphabetize the output.
1052 (Write_Field28_Name): Alphabetize the output.
1053 * einfo.ads: Add new field description for Associated_Collection and
1055 Remove Associated_Final_Chain and its uses in nodes.
1056 Remove Finalization_Chain_Entity and its uses in nodes.
1057 Add new field description for Finalizer and its uses in nodes.
1058 Add new synthesized attribute Is_Finalizer.
1059 Add new flag description for Is_Processed_Transient and its uses in
1061 Add new field description for Return_Flag and its uses in nodes.
1062 (Associated_Final_Chain): Removed along with its pragma Inline.
1063 (Associated_Collection): New routine and pragma Inline.
1064 (Finalization_Chain_Entity): Removed along with its pragma Inline.
1065 (Finalizer): New routine and pragma Inline.
1066 (Is_Finalizer): New routine and pragma Inline.
1067 (Is_Processed_Transient): New routine and pragma Inline.
1068 (Return_Flag): New routine and pragma Inline.
1069 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
1070 (Set_Associated_Collection): New routine and pragma Inline.
1071 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
1072 (Set_Finalizer): New routine and pragma Inline.
1073 (Set_Is_Processed_Transient): New routine and pragma Inline.
1074 (Set_Return_Flag): New routine and pragma Inline.
1075 * exp_aggr.adb: Alphabetize subprograms.
1076 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
1077 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
1078 associated comments. Remove local variables External_Final_List and
1080 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
1081 Ancestor. Remove the retrieval of finalization lists. Update the call to
1083 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
1084 lists. Update the call to Late_Expansion.
1085 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
1086 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
1087 (Gen_Assign): Remove the retrieval of the finalization list used to
1088 build the assignment. Update the calls to Make_Init_Call and
1090 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
1091 Remove the mechanism to determine attachment levels and finalization
1092 list retrieval. Remove the processing for coextensions.
1093 (Init_Controller): Removed. Controllers no longer exist.
1094 (Late_Expansion): Remove formals Flist and Obj along with their
1095 associated comments. Update the calls to Build_Record_Aggr_Code and
1096 Build_Array_Aggr_Code.
1097 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
1098 (Expand_N_Freeze_Entity): Add special processing for finalizers which
1099 appear in entry bodies, protected subprograms and task bodies.
1100 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
1101 * exp_ch3.adb (Add_Final_Chain): Removed.
1102 (Build_Array_Init_Proc): Alphabetize local variables.
1103 (Build_Assignment): Alphabetize local variables. Update the call to
1105 (Build_Class_Wide_Master): Rename local variables to better reflect
1107 (Build_Discriminant_Assignments): Code reformatting.
1108 (Build_Init_Call_Thru): Code reformatting.
1109 (Build_Init_Procedure): Code reformatting. Generate a special version
1110 of Deep_Finalize which is capable of finalizing all initialized
1111 components and ignore the rest.
1112 (Build_Init_Statements): Rename local variables to better reflect their
1114 Reimplement the mechanism to include the creation and update of an index
1115 variable called a "counter". It is used as a bookmark for tracing
1116 initialized and non-initialized components.
1117 (Build_Initialization_Call): Remove local variable Controller_Typ.
1118 Alphabetize all local variables. Remove the initialization of the
1119 record controller and update the call to Make_Init_Call.
1120 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
1121 New local variable Counter.
1122 (Constrain_Array): Alphabetize.
1123 (Expand_Freeze_Array_Type): Create a collection instead of a
1125 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
1126 Finalize_Address which is used in conjunction with allocated controlled
1128 (Expand_N_Object_Declaration): Remove the creation of a finalization
1129 list for anonymous access types. Update the calls to Make_Init_Call and
1131 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
1132 retrieval of finalization lists. Remove the expansion of the record
1133 controller. Create TSS primitive Finalize_Address used in conjunction
1134 with controlled objects on the heap. Create finalization collections
1135 for access-to-controlled record components.
1136 (Expand_Record_Controller): Removed.
1137 (Freeze_Type): Remove the freezing of record controllers. Freezing of
1138 class-wide types now requires additional processing. Create
1139 finalization collections for access-to-controlled types.
1140 (Increment_Counter): New routine.
1141 (Make_Counter): New routine.
1142 (Make_Eq_If): Remove the mention of Name_uController.
1143 (Make_Predefined_Primitive_Specs): There is no longer need to skip
1144 types coming from System.Finalization_Root.
1145 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
1146 (Predefined_Primitive_Bodies): There is no longer need to skip types
1147 coming from System.Finalization_Root.
1148 (Stream_Operation_OK): Do not generate stream routines for
1149 type Ada.Finalization.Heap_Management.Finalization_Collection.
1150 * exp_ch3.ads: Alphabetize subprograms.
1151 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
1152 Add with and use clause for Lib.
1153 (Complete_Coextension_Finalization): Removed.
1154 (Complete_Controlled_Allocation): New routine. Create a finalization
1155 collection for anonymous access-to-controlled types. Create a custom
1156 Allocate which interfaces with the back end and the machinery in
1158 (Expand_Allocator_Expression): Add necessary calls to
1159 Complete_Controlled_Allocation. Remove the retrieval of finalization
1160 lists. Update the calls to Make_Adjust_Call. Generate a call to
1161 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
1162 the associated collection.
1163 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
1164 Code clean up. Remove the retrieval of finalization lists and
1166 Update the call to Make_Init_Call. Generate a call to
1167 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
1168 the associated collection.
1169 (Get_Allocator_Final_List): Removed. Finalization lists are not
1171 (Suitable_Element): Remove the mention of Name_uController.
1172 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
1173 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
1174 the left hand side, carry out the assignment and adjust the left hand
1176 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
1177 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
1178 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
1179 BIP_Collection and BIPcollection.
1180 (Build_Heap_Allocator): New routine used to allocate the return object
1181 of a build-in-place function onto a collection.
1182 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
1183 (Expand_Call): Do not replace direct calls to Deep routines with their
1185 (Expand_N_Extended_Return_Statement): Give all variables shorter names
1186 and update their occurrences. Add a special return flag to monitor the
1187 [ab]normal execution of the function. The flag is set right before the
1189 Rewrite the mechanism used to allocate a build-in-place return object
1190 on the heap or on a storage pool.
1191 (Is_Direct_Deep_Call): New routine.
1192 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
1193 build-in-place function call instead of a final list. Build a call to
1194 Set_Finalize_Address_Ptr to decorate the associated collection.
1195 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
1196 order to name the build-in-place function call's result for later
1197 finalization. Add a collection to a build-in-place function call
1198 instead of a final list.
1199 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
1200 build-in-place function call instead of a final list. Remove the code
1201 which moves one final list and transforms it into the actual in a
1202 nested build-in-place call.
1203 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
1204 build-in-place function call instead of a final list.
1205 (Move_Final_List): Removed.
1206 (Needs_BIP_Collection): New routine.
1207 (Needs_BIP_Final_List): Removed.
1208 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
1209 enumeration type BIP_Formal_Kind.
1210 Update the related comment.
1211 (Needs_BIP_Collection): New routine.
1212 (Needs_BIP_Final_List): Removed.
1213 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
1214 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
1215 majority of subprograms in this unit. Add Name_Finalize_Address to
1216 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
1217 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
1218 statements for an array type.
1219 (Build_Adjust_Statements): Create the adjust statements for a record
1221 (Build_Cleanup_Statements): New routine. A procedure which given any
1222 construct containing asynchronous calls, references to _master, or is a
1223 task body, a task allocation or a protected body produces the necessary
1224 runtime calls to clean up these constructs.
1225 (Build_Exception_Handler): New routine.
1226 (Build_Final_List): Removed.
1227 (Build_Finalization_Collection): New routine. A core procedure which
1228 creates a collection to service heap allocated controlled objects
1229 associated with an access-to-controlled type.
1230 (Build_Finalize_Statements): Create the finalization statements for a
1232 (Build_Finalizer): New routine. A core procedure which given any
1233 construct with declarations and/or statements detects all objects which
1234 need any type of clean up (controlled objects, protected objects) and
1235 generates all necessary code to clean up the said objects in the proper
1237 (Build_Finalizer_Call): New routine.
1238 (Build_Initialize_Statements): Create the initialization statements for
1239 an array type. The generated routine contains code to finalize partially
1241 (Build_Object_Declarations): New routine.
1242 (Build_Raise_Statement): New routine.
1243 (Clean_Simple_Protected_Objects): Removed.
1244 (Controller_Component): Removed.
1245 (Enclosing_Function): New routine.
1246 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
1247 either declarations or statements or both.
1248 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
1249 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
1251 (Find_Final_List): Removed.
1252 (Global_Flist_Ref): Removed.
1253 (In_Finalization_Root): Removed.
1254 (Insert_Actions_In_Scope_Around): Determine the range of the transient
1255 scope in terms of tree nodes. Process all transient variables within
1257 (Make_Adjust_Call): Rewritten. There is no longer an attach call
1258 generated after the adjust.
1259 (Make_Attach_Call): Removed.
1260 (Make_Call): New routine.
1261 (Make_Clean): Removed.
1262 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
1264 (Make_Deep_Proc): Rewritten to generate the new profile signature used
1266 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
1268 (Make_Final_Call): Modified to simply create a call to either
1269 Deep_Finalize or Finalize.
1270 (Make_Finalize_Address_Body): New routine.
1271 (Make_Finalize_Address_Stmts): New routine. A function which produces
1272 TSS primitive Finalize_Address used in conjunction with heap allocated
1274 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
1275 (Make_Init_Call): Rewritten. There is no longer an attach call
1276 generated after initialization.
1277 (Make_Local_Deep_Finalize): New routine.
1278 (Make_Set_Finalize_Address_Ptr_Call): New routine.
1279 (Make_Transient_Block): Remove the finalization list retrieval and
1281 (Needs_Finalization): Moved to Exp_Util.
1282 (Parent_Field_Type): New routine.
1283 (Preprocess_Components): New routine.
1284 (Process_Transient_Objects): New routine.
1285 (Wrap_HSS_In_Block): New routine.
1286 (Wrap_Transient_Declaration): Remove finalization list management and
1287 controller insertion.
1288 (Wrap_Transient_Expression): Code reformatting.
1289 (Wrap_Transient_Statement): Code reformatting.
1290 * exp_ch7.ads (Build_Final_List): Removed.
1291 (Build_Finalization_Collection): New routine.
1292 (Build_Raise_Statement): New routine.
1293 (Controller_Component): Removed.
1294 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
1295 (Find_Final_List): Removed.
1296 (In_Finalization_Root): Removed.
1297 (Is_Simple_Protected_Type): Update related comment.
1298 (Make_Adjust_Call): New parameter profile and associated comments.
1299 (Make_Attach_Call): Removed.
1300 (Make_Final_Call): New parameter profile and associated comments.
1301 (Make_Finalize_Address_Body): New routine.
1302 (Make_Init_Call): New parameter profile and associated comments.
1303 (Make_Local_Deep_Finalize): New routine.
1304 (Make_Set_Finalize_Address_Ptr_Call): New routine.
1305 (Needs_Finalization): Moved to Exp_Util.
1306 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
1307 (Expand_N_Protected_Body): Remove the handling of finalization lists.
1308 (Find_Protection_Type): Moved to Exp_Util.
1309 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
1310 (Make_DT): Update sequence of dispatch table initialization. Remove the
1311 initialization of field RC_Offset. Add initialization of field Needs_
1313 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
1314 Reimplement how an object is first finalized, then deallocated.
1315 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1317 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
1318 Register TSS_Finalize_Address with type TSS_Names.
1319 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
1320 procedure provides the interface between an allocation / deallocation
1321 and the support machinery in Ada.Finalization.Heap_Management.
1322 (Find_Init_Call): Code reformatting.
1323 (Find_Init_Call_In_List): Code reformatting.
1324 (Find_Protection_Type): Moved from Exp_Ch9.
1325 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
1326 (Has_Controlled_Coextensions): Removed.
1327 (Has_Controlled_Objects): New routine.
1328 (In_Library_Level_Package_Body): New routine.
1329 (Insert_Action_After): New routine.
1330 (Is_Finalizable_Transient): New routine. This predicate determines
1331 whether an object declaration is one of the many variants of controlled
1333 (Is_Null_Access_BIP_Func_Call): New routine.
1334 (Is_Non_BIP_Func_Call): New routine.
1335 (Is_Related_To_Func_Return): New routine.
1336 (Needs_Finalization): Moved from Exp_Ch7.
1337 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
1338 (Find_Protection_Type): Moved from Exp_Ch9.
1339 (Has_Controlled_Coextensions): Removed.
1340 (Has_Controlled_Objects): New routine.
1341 (In_Library_Level_Package_Body): New routine.
1342 (Insert_Action_After): New routine.
1343 (Is_Finalizable_Transient): New routine.
1344 (Is_Null_Access_BIP_Func_Call): New routine.
1345 (Is_Non_BIP_Func_Call): New routine.
1346 (Is_Related_To_Func_Return): New routine.
1347 (Needs_Finalization): Moved from Exp_ch7.
1348 * expander.adb (Expand): Add a case for N_Free_Statement.
1349 * freeze.adb (Freeze_All): Replace the generation of a finalization
1350 list with a collection for access-to-controlled types.
1351 (Freeze_Entity): Code reformatting.
1352 (Freeze_Record_Type): Remove the freezing of a record controller
1354 (Freeze_Subprogram): Code reformatting.
1355 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
1357 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
1358 has a library-level finalizer.
1359 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
1360 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
1361 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
1362 files. Add a-fihema to the list of object files.
1364 Alphabetize the associations in type Is_Parameterless_Attribute.
1365 * rtsfind.ads: Ada.Finalization_List.Controller and
1366 System.Finalization_Implementation are no longer a GNAT unit.
1367 Update the range of type Ada_Finalization_Child. Remove the following
1368 recoverable entities:
1370 RE_Attach_To_Final_List
1374 RE_Finalizable_Ptr_Ptr
1375 RE_Global_Final_List
1376 RE_Limited_Record_Controller
1379 RE_Record_Controller
1380 RE_Simple_List_Controller
1382 Add the following recoverable entities:
1384 RE_Add_Offset_To_Address
1388 RE_Exception_Identity
1389 RE_Finalization_Collection
1390 RE_Finalization_Collection_Ptr
1391 RE_Needs_Finalization
1392 RE_Save_Library_Occurrence
1393 RE_Set_Finalize_Address_Ptr
1394 RE_Set_Storage_Pool_Ptr
1396 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
1398 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
1399 (First_Stored_Discriminant): Remove the mention of Name_uController.
1400 * sem_aux.ads: Comment reformatting.
1401 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
1402 to redecorate an already existing class-wide type.
1403 (Decorate_Tagged_Type): New parameter profile and associated comment.
1404 Create a "shadow class-wide type" for a shadow entity.
1405 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
1406 of the final chain along with the associated comment.
1407 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
1408 Full_Desig and set it to the full view of the designated type.
1409 Initialize the finalization collection to empty.
1410 (Build_Derived_Record_Type): Alphabetize local variables. Code
1412 (Collect_Fixed_Components): Remove the mention of Name_uController.
1413 (Create_Constrained_Components): Remove the mention of Name_uController.
1414 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
1415 class-wide type of a shadow entity.
1416 (Process_Full_View): Update the machinery which marks type
1417 Limited_Controlled's entity as limited.
1418 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
1419 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
1420 list, instead make a collection build-in-place formal.
1421 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
1422 a designated type in order to establish a match between the renaming
1423 and the renamed entity.
1424 (Find_Selected_Component): Add guard to prevent spurious exceptions
1425 from being raised on .NET/JVM.
1426 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
1427 to the list of primitive that need special processing. Update arrays
1428 C_Names and D_Names.
1429 (Replace_Types): Handle class-wide types.
1430 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
1431 different parameter profile, look at the first formal.
1432 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
1433 use clauses for Exp_Util.
1434 * sem_res.adb: Remove with and use clauses for Elists.
1435 (Propagate_Coextensions): Removed.
1436 (Resolve_Allocator): Do not propagate the list of coextensions from one
1437 allocator to another.
1438 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
1439 Deaccessed_T to Desig_Typ.
1440 (Enter_Name): Remove the mention of Name_uController.
1441 (Gather_Components): Remove the mention of Name_uController.
1442 (Incomplete_Or_Private_View): New routine.
1443 (Is_Coextension_Root): Removed.
1444 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
1445 * sem_util.ads (Incomplete_Or_Private_View): New routine.
1446 (Is_Coextension_Root): Removed.
1447 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
1448 Controlled types are now derived from a null tagged record. Remove
1449 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
1450 * sinfo.adb (Coextensions): Removed.
1451 (Set_Coextensions): Removed.
1452 * sinfo.ads: Remove Coextensions from the explanation of node fields
1453 and its uses in nodes.
1454 Update the field usage of N_Allocator.
1455 (Coextensions): Removed along with its pragma Inline.
1456 (Set_Coextensions): Removed along with its pragma Inline.
1457 * snames.ads-tmpl: Remove names
1462 Name_uLocal_Final_List
1463 Name_Finalization_Root
1470 Name_Finalize_Address
1471 * s-pooglo.adb (Allocate): Add overriding indicator.
1472 (Deallocate): Add overriding indicator.
1473 (Storage_Size): Add overriding indicator.
1474 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
1475 than Finalize_Global_List.
1476 (Null_Finalize_Global_List): Removed.
1477 (Save_Library_Occurrence): New routine.
1478 * s-soflin.ads: Remove variable Finalize_Global_List along with its
1479 initialization. Add variable Finalize_Library_Objects along with its
1480 pragma Export. Add variables Library_Exception and
1481 Library_Exception_Set along with their pragma Export.
1482 (Null_Finalize_Global_List): Removed.
1483 (Save_Library_Occurrence): New routine.
1484 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
1485 rather than Finalize_Global_List.
1486 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
1487 of the constructed node.
1489 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1491 * link.c: Include "auto-host.h" before system headers.
1493 2011-08-03 Vincent Celier <celier@adacore.com>
1495 * make.adb (Gnatmake): Add to table Library_Projs only library projects
1496 that are not extended. Do not check if a library project that is
1497 extended should be regenerated. Do not add to table Library_Paths the
1498 libraries that are in extended projects. Link only with libraries that
1499 are in libray projects that are not extended.
1500 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
1501 for a library project that is extended.
1503 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1505 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
1506 conforming subprogram renamings that appear to be completions if they
1507 are not fully conformant.
1508 Such renamings are homographs but not completions.
1509 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
1510 names in a subprogram renaming that appears in an instance.
1512 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1514 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
1515 not immutably limited, build actual subtype from expression to provide
1516 proper bounds to caller.
1518 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1520 * sem_ch8.adb: Minor comment correction.
1522 2011-08-03 Thomas Quinot <quinot@adacore.com>
1524 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
1525 returning a limited array, use an extended return statement.
1527 2011-08-03 Vincent Celier <celier@adacore.com>
1529 * make.adb (Initialize): If --subdirs= is used, but no project file is
1530 specified, attempt to create the specify subdir if it does not already
1531 exist and use it as the object directory as if -D had been specified.
1533 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1535 * s-tpopsp-vms.adb: New file.
1536 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
1537 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
1539 2011-08-03 Emmanuel Briot <briot@adacore.com>
1541 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
1544 2011-08-03 Yannick Moy <moy@adacore.com>
1546 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
1547 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
1548 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
1549 detect that an array has static bounds.
1551 2011-08-03 Thomas Quinot <quinot@adacore.com>
1553 * exp_dist.adb: Minor reformatting.
1555 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1557 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
1558 (ATCB_Key): Removed, not always used.
1560 2011-08-03 Emmanuel Briot <briot@adacore.com>
1562 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
1563 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
1564 most remaining global variables.
1566 2011-08-03 Robert Dewar <dewar@adacore.com>
1568 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
1569 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
1572 2011-08-03 Javier Miranda <miranda@adacore.com>
1574 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
1575 that must be passed by copy in VM targets.
1577 2011-08-03 Emmanuel Briot <briot@adacore.com>
1579 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
1580 duplicates a similar htable now in the project tree.
1582 2011-08-03 Claire Dross <dross@adacore.com>
1584 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
1585 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
1586 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
1587 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
1588 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
1589 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
1590 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
1593 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1595 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
1596 (ATCB_Key): Removed, not always used.
1597 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
1599 * s-tpopsp-tls.adb: New file.
1600 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
1601 x86/x64/ia64/powerpc/sparc Linux.
1603 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1605 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
1606 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
1608 2011-08-03 Thomas Quinot <quinot@adacore.com>
1610 * rtsfind.ads, exp_dist.adb, exp_dist.ads
1611 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1612 Fix type selection for mapping integer types to PolyORB types.
1614 2011-08-03 Bob Duff <duff@adacore.com>
1616 * sem_ch7.adb: Minor comment clarification.
1618 2011-08-03 Bob Duff <duff@adacore.com>
1620 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
1621 an error analyzing a choice, skip further processing. Further
1622 processing could cause a crash or cascade errors.
1624 2011-08-03 Emmanuel Briot <briot@adacore.com>
1626 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
1627 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
1628 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
1629 prj-env.ads (Shared_Project_Tree_Data): new type
1630 An aggregate project and its aggregated trees need to share the common
1631 data structures used for lists of strings, packages,... This makes the
1632 code simpler since otherwise we have to pass the root tree (also used
1633 for the configuration file data) in addition to the current project
1634 tree. This also avoids ambiguities as to which tree should be used.
1635 And finally this saves a bit of memory.
1636 (For_Every_Project_Imported): new parameter Tree.
1637 Since aggregated projects are using a different tree, we need to let
1638 the caller know which tree to use to manipulate the returned project.
1640 2011-08-03 Robert Dewar <dewar@adacore.com>
1642 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
1643 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
1644 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
1645 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
1647 2011-08-03 Javier Miranda <miranda@adacore.com>
1649 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
1650 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
1652 2011-08-03 Bob Duff <duff@adacore.com>
1654 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
1657 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
1659 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
1660 g-sehash.ads: Fix typo. Update header.
1662 2011-08-03 Thomas Quinot <quinot@adacore.com>
1664 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
1667 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1669 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
1670 prefixes of private types along with records, since the selector may be
1672 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
1673 private types along with records, since the selector may be a
1676 2011-08-03 Emmanuel Briot <briot@adacore.com>
1678 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
1680 2011-08-03 Javier Miranda <miranda@adacore.com>
1682 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
1683 Tagged_Type_Expansion.
1685 2011-08-03 Yannick Moy <moy@adacore.com>
1688 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
1689 concatenation is the name of a constant
1691 2011-08-03 Emmanuel Briot <briot@adacore.com>
1693 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
1694 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
1695 (Process_Declarative_Items): new parameter Child_Env.
1697 2011-08-03 Yannick Moy <moy@adacore.com>
1699 * alfa.ads Update format of ALFA section in ALI file in order to add a
1700 mapping from bodies to specs when both are present
1701 (ALFA_Scope_Record): add components for spec file/scope
1702 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
1704 (Collect_ALFA): after all scopes have been collected, fill in the spec
1705 information when relevant
1706 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
1709 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1711 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
1712 code unit to decide whether to add internally generated subprograms.
1714 2011-08-03 Javier Miranda <miranda@adacore.com>
1716 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
1718 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
1721 2011-08-03 Emmanuel Briot <briot@adacore.com>
1723 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
1724 code with Makeutl.Get_Switches.
1725 * prj-tree.adb: Update comment.
1727 2011-08-03 Thomas Quinot <quinot@adacore.com>
1729 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
1730 subprogram with a limited formal that does not support external
1733 2011-08-03 Yannick Moy <moy@adacore.com>
1735 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
1737 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
1738 not from current unit in two phases, because it is not possible to
1739 change the table while iterating over its content.
1740 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
1742 2011-08-03 Sergey Rybin <rybin@adacore.com>
1744 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
1745 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
1747 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1749 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
1750 and the component type is composite, this is ambiguous for predefined
1751 concatenation, but if the node is not overloaded and the entity is a use
1752 -defined function its profile can be used to resolve that aggregate.
1754 2011-08-03 Robert Dewar <dewar@adacore.com>
1756 * exp_ch4.adb: Minor code cleanup.
1758 2011-08-03 Thomas Quinot <quinot@adacore.com>
1760 * exp_dist.adb: Do not generate distribution stubs if serious errors
1761 have been diagnosed.
1763 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1765 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
1766 the first formal of a primitive operation, go to the base type to
1767 handle properly an access to a derived type with constrained
1769 * sem_type.adb (Disambiguate): an immediately visible operator hides a
1770 user-defined function that is only use-visible.
1772 2011-08-03 Robert Dewar <dewar@adacore.com>
1774 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
1775 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
1776 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
1777 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
1778 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
1779 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
1780 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
1781 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
1783 2011-08-03 Robert Dewar <dewar@adacore.com>
1785 * repinfo.adb (List_Mechanism): Add handling of
1786 Convention_Ada_Pass_By_XXX.
1787 * sem_mech.adb (Set_Mechanism): Ditto.
1788 * sem_prag.adb (Process_Convention): Add entries for
1789 Convention_Ada_Pass_By_XXX.
1790 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
1792 2011-08-03 Pascal Obry <obry@adacore.com>
1794 * makeutl.adb: Minor reformatting.
1796 2011-08-03 Vincent Celier <celier@adacore.com>
1799 (Get_File_Name) If the file cannot be found when there are no config
1800 pragmas file and May_Fail is True, return No_File instead of the file
1801 name, to be consistent.
1803 2011-08-03 Pascal Obry <obry@adacore.com>
1805 * adaint.c (__gnat_is_executable_file_attr): Avoid access
1808 2011-08-03 Javier Miranda <miranda@adacore.com>
1811 (Same_Representation): In VM targets the representation of arrays with
1812 aliased components differs from arrays with non-aliased components.
1814 2011-08-03 Emmanuel Briot <briot@adacore.com>
1816 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
1817 not systematically lower case attribute indexes that contain no "."
1818 Fix definition of several Naming attributes, which take
1819 a unit name as index and therefore should be case insensitive.
1820 Minor refactoring (reduce length of variable names).
1822 2011-08-03 Emmanuel Briot <briot@adacore.com>
1824 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
1826 2011-08-03 Emmanuel Briot <briot@adacore.com>
1828 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
1829 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
1830 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
1831 prj-tree.ads (Prj.Tree.Environment): new type.
1833 2011-08-03 Emmanuel Briot <briot@adacore.com>
1835 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
1836 prj-tree.adb, prj-tree.ads (Environment): new type.
1838 2011-08-03 Emmanuel Briot <briot@adacore.com>
1840 * prj-tree.ads: Remove unused variable.
1842 2011-08-03 Yannick Moy <moy@adacore.com>
1844 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
1845 issuing messages related to SPARK restriction violation.
1847 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1849 * sem_ch6.adb: guard against error nodes in return statements.
1851 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1853 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
1854 a warning can only appear on a configuration file, so emit warning
1855 without further checks.
1857 2011-08-03 Arnaud Charlet <charlet@adacore.com>
1859 * s-interr.ads: add overriding keyword.
1861 2011-08-03 Geert Bosch <bosch@adacore.com>
1863 * exp_attr.adb: Fix minor typo.
1865 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1867 * par-ch4.adb: improve error recovery.
1869 2011-08-03 Emmanuel Briot <briot@adacore.com>
1871 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
1872 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
1875 2011-08-03 Emmanuel Briot <briot@adacore.com>
1877 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
1878 "external" as an attribute name in aggregate projects.
1880 2011-08-03 Jose Ruiz <ruiz@adacore.com>
1882 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
1883 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
1884 from 0, so we need to adjust.
1886 2011-08-03 Emmanuel Briot <briot@adacore.com>
1888 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
1889 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
1891 2011-08-03 Yannick Moy <moy@adacore.com>
1893 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
1894 restriction on overloaded entity if the entity is not an operator.
1896 2011-08-03 Yannick Moy <moy@adacore.com>
1898 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
1899 restrict.ads: Rename remaining Check_Formal_Restriction* into
1900 Check_SPARK_Restriction*.
1902 2011-08-03 Emmanuel Briot <briot@adacore.com>
1904 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
1905 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
1907 (Project_Empty): removed
1908 (Empty_Project): new parameter Qualifier
1909 This is used to have fields specific to aggregate projects, cleaner
1910 New field to store the list of aggregated projects.
1911 (Check_Aggregate_Project): removed
1912 (Process_Aggregated_Projects, Free): new subprograms.
1914 2011-08-03 Olivier Hainque <hainque@adacore.com>
1916 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
1918 2011-08-03 Ed Schonberg <schonberg@adacore.com>
1920 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
1921 explicit dereference of an unconstrained type, create a constrained
1922 subtype for it, as is done for function calls that return an
1925 2011-08-03 Thomas Quinot <quinot@adacore.com>
1927 * g-pehage.adb (Finalize): Avoid possible double-free.
1929 2011-08-03 Steve Baird <baird@adacore.com>
1931 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
1932 Elab_Spec/Body attrs in CodePeer_Mode.
1934 2011-08-03 Javier Miranda <miranda@adacore.com>
1936 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
1937 low bound is not known at compile time but they have no others choice.
1938 Done because in this case the bounds can be obtained directly from the
1941 2011-08-03 Ed Falis <falis@adacore.com>
1943 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
1944 on VxWorks SMP. Remove unusable constant ANY_CPU.
1946 2011-08-03 Emmanuel Briot <briot@adacore.com>
1948 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
1949 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
1950 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
1951 Prj.Env.Initialize_Empty): new subprograms
1952 (Get_Env, Find_Project): remove parameter Target_Name.
1954 2011-08-03 Gary Dismukes <dismukes@adacore.com>
1956 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
1957 as a condition for the delayed call to Derived_Subprograms done for the
1958 case of the rewriting of a derived type that constrains the
1959 discriminants of its parent type.
1960 Avoids redundant subprogram derivations for private subtype derivations.
1962 2011-08-03 Javier Miranda <miranda@adacore.com>
1964 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
1965 Build_Record_Aggr_Code.
1966 (Build_Record_Aggr_Code): Add missing support to initialize hidden
1967 discriminants in extension aggregates.
1969 2011-08-03 Emmanuel Briot <briot@adacore.com>
1971 * prj-pp.adb (Print): also output project qualifiers, since in
1972 particular "aggregate" is mandatory in an aggregate project.
1974 2011-08-03 Emmanuel Briot <briot@adacore.com>
1976 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
1977 (Debug_Output): new function.
1979 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
1981 * gnat_ugn.texi: Document -Wstack-usage.
1982 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
1984 2011-08-03 Thomas Quinot <quinot@adacore.com>
1986 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
1987 have keyword LIMITED.
1989 2011-08-03 Yannick Moy <moy@adacore.com>
1991 * alfa.adb, alfa.ads, alfa_test.adb: New files.
1992 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
1993 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
1994 section (does not happen in compiler, only if code directly calls
1996 * get_alfa.adb, get_alfa.ads: New files.
1997 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
1999 * lib-xref-alfa.adb: New file.
2000 * lib-xref.adb, lib-xref.ads
2001 (Xref_Entry): redefine information needed in cross-references for ALFA.
2002 Push ALFA treatments in separated local package.
2003 (Enclosing_Subpragram_Or_Package): treat specially subprogram
2004 identifiers. Return entity of package body instead of spec. Return
2005 Empty for a scope with no location.
2006 (Generate_Reference): adapt to new components for ALFA information.
2007 Remove the need for D references on definitions.
2008 (Is_Local_Reference): moved to ALFA local package
2009 (Output_References): extract subfunction as Extract_Source_Name
2010 (Output_Local_References): remove procedure, replaced by filtering of
2011 cross-references in package ALFA and printing in Put_ALFA.
2012 (Write_Entity_Name): remove procedure
2013 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
2014 print exact name of entity as it appears in source file
2015 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
2016 * put_alfa.adb, put_alfa.ads: New files.
2017 * xref_lib.adb (Search_Xref): protect read of cross-references against
2018 reading other sections of the ALI file, in gnatxref
2019 (Search): protect read of cross-references against reading other
2020 sections of the ALI file, in gnatfind.
2021 * gcc-interface/Make-lang.in: Update dependencies.
2023 2011-08-03 Thomas Quinot <quinot@adacore.com>
2025 * sem_ch3.adb: Minor reformatting.
2027 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2029 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
2030 raising an exception.
2032 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2034 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
2035 type, always use 1 as the lower bound or string, even if lower bound of
2036 context is not static, to handle properly null strings in a non-static
2039 2011-08-03 Bob Duff <duff@adacore.com>
2041 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
2042 always legal on the right-hand side of an assignment statement; there
2043 is always an applicable index constraint in this case. Therefore, the
2044 check for Pkind = N_Assignment_Statement is now unconditional -- it
2045 doesn't depend on whether Is_Constrained (Typ).
2047 2011-08-03 Robert Dewar <dewar@adacore.com>
2049 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
2051 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2053 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
2054 for an itype created within a generic unit.
2056 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2058 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
2059 suppresses all inlining.
2061 2011-08-03 Robert Dewar <dewar@adacore.com>
2063 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
2064 exp_aggr.adb: Minor reformatting.
2066 2011-08-03 Thomas Quinot <quinot@adacore.com>
2068 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
2069 tagged assignment when discriminant checks are suppressed. This is
2070 useless and extremely costly in terms of static stack usage.
2072 2011-08-03 Bob Duff <duff@adacore.com>
2074 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
2075 of generics, because this leads to the wrong entity in the wrong scope,
2076 causing (e.g.) pragma Export_Procedure to get an error if the entity is
2078 (Process_Interface_Name): Follow Alias for instances of generics, to
2079 correct for the above change.
2081 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2083 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
2084 is an integer literal it is always safe to replace the reference. In
2085 addition, if the reference appears in the generated code for an object
2086 declaration it is necessary to copy because otherwise the reference
2087 might be to the uninitilized value of the discriminant of the object
2090 2011-08-03 Pascal Obry <obry@adacore.com>
2092 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
2093 ACL used, in this case we want to check for ending .exe, not .exe
2094 anywhere in the path.
2096 2011-08-03 Sergey Rybin <rybin@adacore.com>
2098 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2099 the tree structure (semantic decoration of references to record
2102 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2104 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
2105 choices of a named array aggregate, bail out when any choices are
2106 marked as Errors_Posted.
2108 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2110 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
2111 in which entity is frozen, to handle properly loop variables in
2114 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2116 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
2117 subtype is not static, compute the upper bound using attributes, to
2118 handle properly index types that are not integer types.
2120 2011-08-03 Bob Duff <duff@adacore.com>
2122 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
2123 Update copyright notice.
2125 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2127 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
2128 Original_Discriminant if within an instance.
2129 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2131 2011-08-03 Thomas Quinot <quinot@adacore.com>
2133 * einfo.ads: Minor reformatting.
2135 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2137 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
2138 composite type with an unfrozen subcomponent, in the profile of a
2139 primitive operation.
2141 2011-08-03 Robert Dewar <dewar@adacore.com>
2143 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
2145 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2147 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
2148 unconstrained type with discriminants is initialized with an aggregate,
2149 use the constrained subtype of the aggregate as the type of the object,
2150 because it is immutable, and this allows the back-end to generate no
2151 code for the object declaration.
2153 2011-08-03 Robert Dewar <dewar@adacore.com>
2155 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
2156 comparison operand is variable, and turns out to be zero or negative.
2158 2011-08-03 Javier Miranda <miranda@adacore.com>
2161 (Expand_Dispatching_Constructor_Call): Disable expansion of
2162 code required for native targets. Done to avoid generating
2163 references to unavailable runtime entities in VM targets.
2165 (Expand_N_Object_Declaration): Add missing support to handle
2166 the explicit initialization of class-wide interface objects.
2169 2011-08-03 Matthew Heaney <heaney@adacore.com>
2171 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
2173 2011-08-03 Matthew Heaney <heaney@adacore.com>
2175 * a-cbdlli.adb (Splice): move source items from first to last
2177 2011-08-03 Yannick Moy <moy@adacore.com>
2179 * sem_util.ads: comment added.
2181 2011-08-03 Javier Miranda <miranda@adacore.com>
2184 (Expand_Record_Aggregate): In VM targets disable the expansion into
2185 assignments of aggregates whose type is not known at compile time.
2187 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2189 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
2190 protected entries and task entries, to build the proper renaming
2191 declaration for entry formals, used in debugging.
2192 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
2193 parameters in the same way.
2195 2011-08-02 Robert Dewar <dewar@adacore.com>
2197 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
2198 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
2199 code reorganization.
2201 2011-08-02 Robert Dewar <dewar@adacore.com>
2203 * debug.adb: Debug flag d.P to suppress length comparison optimization
2204 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
2205 comparison of Length by comparing First/Last instead.
2207 2011-08-02 Matthew Heaney <heaney@adacore.com>
2209 * a-cobove.ads: Code clean up.
2211 2011-08-02 Vincent Celier <celier@adacore.com>
2213 * adaint.c (file_names_case_sensitive_cache): New static int.
2214 (__gnat_get_file_names_case_sensitive): Cache the return value in
2215 file_names_case_sensitive_cache at the first invocation, to avoid
2216 multiple calls to getenv.
2218 2011-08-02 Bob Duff <duff@adacore.com>
2220 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
2222 2011-08-02 Yannick Moy <moy@adacore.com>
2224 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
2225 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
2226 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
2227 indicate that we are in a precondition or postcondition. This is used in
2228 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
2229 decide whether to flag the spec or body of the current subprogram as
2232 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
2234 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
2236 * a-extiin.ads: New file.
2238 2011-08-02 Bob Duff <duff@adacore.com>
2240 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
2241 now raises Name_Error instead of Use_Error in certain cases. The other
2242 parts of this AI were already implemented properly.
2244 2011-08-02 Vincent Celier <celier@adacore.com>
2246 * link.c: Only import "auto-host.h" when building the gnattools.
2248 2011-08-02 Yannick Moy <moy@adacore.com>
2250 * sem_util.adb: Inter-unit inlining does not work for a subprogram
2251 which calls a local subprogram, so extract subprogram
2252 from Mark_Non_ALFA_Subprogram_Body.
2254 2011-08-02 Javier Miranda <miranda@adacore.com>
2257 (Extract_Dispatching_Call): If the type of the dispatching object is an
2258 access type then return an explicit dereference in the Object out-mode
2261 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2263 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
2264 compatibility checks for all indexes of an array subtype, not just the
2265 first. Reset Has_Dynamic_Range_Check on the subtype before each
2266 potential check to ensure that Insert_Range_Checks will not elide any
2267 of the dynamic checks.
2269 2011-08-02 Yannick Moy <moy@adacore.com>
2271 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
2272 SPARK restriction at parsing time.
2273 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
2274 directive only if the SPARK restriction is set for this unit.
2276 2011-08-02 Yannick Moy <moy@adacore.com>
2278 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
2279 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
2280 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
2281 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
2282 Mark_Non_ALFA_Subprogram_Body.
2283 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
2286 2011-08-02 Yannick Moy <moy@adacore.com>
2288 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
2291 2011-08-02 Robert Dewar <dewar@adacore.com>
2293 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
2294 exp_ch3.adb: Minor reformatting.
2296 2011-08-02 Emmanuel Briot <briot@adacore.com>
2298 * adaint.c (__gnat_locate_exec_on_path): only returns executable
2299 files, not any regular file.
2300 (__gnat_locate_file_with_predicate): new subprogram.
2302 2011-08-02 Yannick Moy <moy@adacore.com>
2304 * sinfo.adb, sinfo.ads: Restrict the use of flags
2305 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
2306 nodes, plus N_Subtype_Declaration for the 2nd one.
2308 2011-08-02 Sergey Rybin <rybin@adacore.com>
2310 * gnat_rm.texi: Ramification of pragma Eliminate documentation
2311 - fix bugs in the description of Source_Trace;
2312 - get rid of UNIT_NAME;
2314 2011-08-02 Javier Miranda <miranda@adacore.com>
2317 (Build_Dispatching_Requeue): Adding support for VM targets
2318 since we cannot directly reference the Tag entity.
2319 * exp_sel.adb (Build_K): Adding support for VM targets.
2320 (Build_S_Assignment): Adding support for VM targets.
2322 (Default_Prim_Op_Position): In VM targets do not restrict availability
2323 of predefined interface primitives to compiling in Ada 2005 mode.
2324 (Is_Predefined_Interface_Primitive): In VM targets this service is not
2325 restricted to compiling in Ada 2005 mode.
2326 (Make_VM_TSD): Generate code that declares and initializes the OSD
2327 record. Needed to support dispatching calls through synchronized
2330 (Make_Predefined_Primitive_Specs): Enable generation of predefined
2331 primitives associated with synchronized interfaces.
2332 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
2333 primitives associated with synchronized interfaces.
2335 2011-08-02 Yannick Moy <moy@adacore.com>
2337 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
2338 statements hidden in SPARK if preceded by the HIDE directive
2339 (Parse_Exception_Handlers): mark each exception handler in a sequence of
2340 exception handlers as hidden in SPARK if preceded by the HIDE directive
2341 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
2342 if starting with the HIDE directive
2343 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
2344 starting with the HIDE directive; mark the declarations in a private
2345 part as hidden in SPARK if the private part starts with the HIDE
2347 * restrict.adb, restrict.ads
2348 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
2349 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
2350 argument node belongs to a part which is hidden in SPARK
2351 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
2352 parts in SPARK; protect the possibly costly call to
2353 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
2354 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
2355 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
2356 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
2358 (Scan): recognize special comment starting with '#' and followed by
2359 SPARK keyword "hide" as a HIDE directive.
2361 2011-08-02 Yannick Moy <moy@adacore.com>
2363 * types.ads, erroutc.ads: Minor reformatting.
2365 2011-08-02 Vincent Celier <celier@adacore.com>
2367 * link.c: Add response file support for cross platforms.
2369 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2371 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
2372 in an association, set parent field of copy before partial analysis.
2373 * sem_res.adb (Resolve_Slice): create reference to itype only when
2374 expansion is enabled.
2376 2011-08-02 Yannick Moy <moy@adacore.com>
2378 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
2379 for new flag denoting which subprogram bodies are in ALFA
2380 * restrict.adb, sem_ch7.adb: Update comment
2381 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2382 sem_ch9.adb, sem_res.adb: Add calls to
2383 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
2384 * sem_ch6.adb (Analyze_Function_Return): add calls to
2385 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
2386 middle of the body, and extended return.
2387 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
2388 False when missing return.
2389 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
2390 to True for subprograms whose spec is in ALFA. Remove later on the flag
2391 on the entity used for a subprogram body when there exists a separate
2393 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
2394 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
2395 False, otherwise do nothing.
2397 2011-08-02 Robert Dewar <dewar@adacore.com>
2399 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2401 2011-08-02 Yannick Moy <moy@adacore.com>
2403 * sem_ch4.ads: minor formatting.
2405 2011-08-02 Yannick Moy <moy@adacore.com>
2407 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
2408 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
2409 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
2410 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
2411 opt.ads: cleanup of SPARK mode
2413 2011-08-02 Yannick Moy <moy@adacore.com>
2415 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
2417 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
2418 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
2420 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
2421 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
2422 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
2423 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
2425 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
2427 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
2428 functions whose return type is not in ALFA.
2429 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
2431 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
2432 parameter's type is not in ALFA.
2433 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
2436 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2438 * sem_ch6 (Analyze_Expression_Function): treat the function as
2439 Inline_Always, and introduce a subprogram declaration for it when it is
2441 * inline.adb (Add_Inlined_Body): recognize bodies that come from
2442 expression functions, so that the back-end can determine whether they
2443 can in fact be inlined.
2444 * sem_util.adb (Is_Expression_Function): predicate to determine whether
2445 a function body comes from an expression function.
2447 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2449 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
2450 null exclusions to test Can_Never_Be_Null on the anonymous access types
2451 of the formals rather than testing the formals themselves. Exclude this
2452 check in cases where the Old_Formal is marked as a controlling formal,
2453 to avoid issuing spurious errors for bodies completing dispatching
2454 operations (due to the flag not getting set on controlling access
2455 formals in body specs).
2456 (Find_Corresponding_Spec): When checking full and subtype conformance of
2457 subprogram bodies in instances, pass Designated and E in that order, for
2458 consistency with the expected order of the formals (New_Id followed by
2461 2011-08-02 Robert Dewar <dewar@adacore.com>
2463 * sem_ch8.adb: Minor reformatting.
2465 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2467 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
2468 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
2469 primitive operations of class-wide actuals.
2471 2011-08-02 Javier Miranda <miranda@adacore.com>
2473 * exp_atag.ads, exp_atag.adb
2474 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
2475 since its value is implicitly passed in argument Typ.
2476 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
2477 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
2478 Build_Common_Dispatching_Select_Statements.
2480 2011-08-02 Robert Dewar <dewar@adacore.com>
2482 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
2483 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
2486 2011-08-02 Robert Dewar <dewar@adacore.com>
2488 * sem_res.adb: Minor reformatting.
2489 * sem_prag.adb: Minor reformatting.
2491 2011-08-02 Javier Miranda <miranda@adacore.com>
2493 * exp_atag.adb, exp_atags.ads
2494 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
2495 by the tagged type Entity. Required to use this routine in the VM
2496 targets since we do not have available the Tag entity in the VM
2499 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
2500 Ada.Tags has not been previously loaded.
2502 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
2503 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
2505 (Enclosing_Dynamic_Scope): Add missing support to handle the full
2506 view of enclosing scopes. Required to handle enclosing scopes that
2507 are synchronized types whose full view is a task type.
2509 (Build_VM_TSDs): Minor code improvement to avoid generating and
2510 analyzing lists with empty nodes.
2511 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
2512 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
2513 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
2514 (Make_Disp_Timed_Select_Body): Add support for VM targets.
2515 (Make_Select_Specific_Data_Table): Add support for VM targets.
2516 (Make_VM_TSD): Generate code to initialize the SSD structure of
2519 2011-08-02 Yannick Moy <moy@adacore.com>
2521 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
2522 cross-references section in ALI.
2523 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
2524 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
2526 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
2527 subprogram or package entity of a node
2528 (Is_Local_Reference_Type): new function returns True for references
2529 selected in local cross-references.
2530 (Lt): function extracted from Lt in Output_References
2531 (Write_Entity_Name): function extracted from Output_References
2532 (Generate_Definition): generate reference with type 'D' for definition
2533 of objects (object declaration and parameter specification), with
2534 appropriate locations and units, for use in local cross-references.
2535 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
2536 references of type 'I' for initialization in object definition.
2537 (Output_References): move part of function Lt and procedure
2538 Write_Entity_Name outside of the body. Ignore references of types 'D'
2539 and 'I' introduced for local cross-references.
2540 (Output_Local_References): new procedure to output the local
2541 cross-references sections.
2542 (Lref_Entity_Status): new array defining whether an entity is a local
2543 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
2544 with 'I' type when initialization expression is present.
2545 * get_scos.adb, get_scos.ads: Correct comments and typos
2547 2011-08-02 Javier Miranda <miranda@adacore.com>
2549 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
2551 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
2553 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
2556 2011-08-02 Vincent Celier <celier@adacore.com>
2558 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
2559 (No_Space_Img): New function
2560 (Find_Excluded_Sources): When reading from a file, record the file name
2561 and the line number for each excluded source.
2562 (Mark_Excluded_Sources): When reporting an error, if the excluded
2563 sources were read from a file, include file name and line number in
2566 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2568 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
2570 2011-08-02 Robert Dewar <dewar@adacore.com>
2572 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
2574 2011-08-02 Javier Miranda <miranda@adacore.com>
2576 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
2577 generation of TSDs to the DOTNET compiler.
2578 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
2579 generation of TSDs to the DOTNET compiler.
2581 2011-08-02 Javier Miranda <miranda@adacore.com>
2583 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
2584 record of all the tagged types declared inside library level package
2585 declarations, library level package bodies or library level subprograms.
2586 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
2587 associated with a given tagged type.
2588 (Build_VM_TSDs): New subprogram.
2589 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
2590 compilation units that are subprograms.
2591 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
2592 compilation units that are package bodies.
2593 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
2594 units that are a package declaration or a package instantiation.
2595 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
2596 reorganization to improve the error generated by the frontend when the
2597 function Ada.Tags.Secondary_Tag is not available.
2598 * rtsfind.ads (RE_Register_TSD): New runtime entity.
2599 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
2601 2011-08-02 Javier Miranda <miranda@adacore.com>
2603 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
2605 2011-08-02 Robert Dewar <dewar@adacore.com>
2607 * s-imenne.ads: Minor reformatting.
2609 2011-08-02 Robert Dewar <dewar@adacore.com>
2611 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
2612 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
2613 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
2615 2011-08-02 Robert Dewar <dewar@adacore.com>
2617 * einfo.ads (Materialize_Entity): Document this is only for renamings
2618 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
2619 required debug information in the case where we transform the object
2620 declaration into a renaming declaration.
2621 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
2623 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
2626 2011-08-02 Robert Dewar <dewar@adacore.com>
2628 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
2629 Suppress_Init_Procs.
2630 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
2631 Suppress_Initialization/Initialization_Suppressed.
2632 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
2633 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
2634 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
2635 * sem_prag.adb: New processing for pragma Suppress_Initialization.
2637 2011-08-02 Robert Dewar <dewar@adacore.com>
2639 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
2642 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2644 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
2645 only have inheritable classwide pre/postconditions.
2647 2011-08-02 Javier Miranda <miranda@adacore.com>
2649 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
2650 * rtsfind.ads (RE_Check_TSD): New runtime entity.
2651 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
2652 checks if the external tag of a type is the same as the external tag
2653 of some other declaration.
2655 2011-08-02 Thomas Quinot <quinot@adacore.com>
2657 * s-taskin.ads: Minor reformatting.
2659 2011-08-02 Emmanuel Briot <briot@adacore.com>
2661 * g-comlin.adb (Display_Help): swap the order in which it prints the
2662 short help and the general usage.
2664 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2666 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
2667 the aspect declarations and attach them to the generic copy for
2668 subsequent analysis.
2669 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
2670 declarations of the generic tree to the new subprogram declarations.
2671 * sem_attr.adb (Check_Precondition_Postcondition): recognize
2672 conditions that apply to a subprogram instance.
2674 2011-08-02 Robert Dewar <dewar@adacore.com>
2676 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
2678 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2680 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
2681 private type with a tagged full view is not derived in the immediate
2682 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
2684 2011-08-02 Robert Dewar <dewar@adacore.com>
2686 * exp_ch4.adb: Minor reformatting.
2688 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2690 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
2691 Ada2012 iterator, the loop will be rewritten during expansion into a
2692 while loop with a cursor and an element declaration. Do not analyze the
2693 body in this case, because if the container is for indefinite types the
2694 actual subtype of the elements will only be determined when the cursor
2695 declaration is analyzed.
2697 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2699 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
2700 size/alignment related attributes in CodePeer_Mode.
2702 2011-08-02 Gary Dismukes <dismukes@adacore.com>
2704 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
2705 Prepend_Element, since this can result in the operation getting the
2706 wrong slot in the full type's dispatch table if the full type has
2707 inherited operations. The incomplete type's operation will get added
2708 to the proper position in the full type's primitives
2709 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
2710 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
2711 dispatching operations, since there are cases where nonprimitive
2712 subprograms can get added to the list of incomplete dependents (such
2713 as subprograms in nested packages).
2714 * sem_ch6.adb (Process_Formals): First, remove test for being in a
2715 private part when determining whether to add a primitive with a
2716 parameter of a tagged incomplete type to the Private_Dependents list.
2717 Such primitives can also occur in the visible part, and should not have
2718 been excluded from being private dependents.
2719 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
2720 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
2721 list of a Taft-amendment incomplete type is a primitive before issuing
2722 an error that the full type must appear in the same unit. There are
2723 cases where nonprimitives can be in the list (such as subprograms in
2725 * sem_disp.adb (Derives_From): Use correct condition for checking that
2726 a formal's type is derived from the type of the corresponding formal in
2727 the parent subprogram (the condition was completely wrong). Add
2728 checking that was missing for controlling result types being derived
2729 from the result type of the parent operation.
2731 2011-08-02 Yannick Moy <moy@adacore.com>
2733 * errout.adb (First_Node): minor renaming
2734 * restrict.adb (Check_Formal_Restriction): put restriction warning on
2737 2011-08-02 Yannick Moy <moy@adacore.com>
2739 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
2740 before accessing operands.
2741 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
2742 decide whether an initialization expression respects SPARK rules, as
2743 the plain node is the expanded one. This allows for more valid warnings
2745 * gnat_rm.texi: Minor update.
2747 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2749 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
2752 2011-08-02 Robert Dewar <dewar@adacore.com>
2754 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
2756 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2758 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
2759 loop statements and the element renaming declaration with a block when
2760 the element type is controlled.
2762 2011-08-02 Yannick Moy <moy@adacore.com>
2764 * sinfo.ads: Minor formatting.
2766 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2768 * sem_aggr.adb (Add_Association): if the association has a box and no
2769 expression, use the Sloc of the aggregate itself for the new
2771 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
2774 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2776 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
2777 When a container is provided via a function call, generate a renaming
2778 of the function result. This avoids the creation of a transient scope
2779 and the premature finalization of the container.
2780 * exp_ch7.adb (Is_Container_Cursor): Removed.
2781 (Wrap_Transient_Declaration): Remove the supression of the finalization
2782 of the list controller when the declaration denotes a container cursor,
2785 2011-08-02 Yannick Moy <moy@adacore.com>
2787 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
2788 node is from source, instead of the original node being from source.
2790 (Resolve_Array_Aggregate): refine the check for a static expression, to
2791 recognize also static ranges
2792 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
2793 Array_Type_Declaration): postpone the test for the type being a subtype
2794 mark after the type has been resolved, so that component-selection and
2795 expanded-name are discriminated.
2796 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
2797 to distinguish the case of an iteration scheme, so that an error is
2798 issed on a non-static range in SPARK except in an iteration scheme.
2799 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
2800 In_Iter_Schm = True.
2801 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
2802 user-defined operators so that they are allowed in renaming
2804 (Find_Selected_Component): refine the check for prefixing of operators
2805 so that they are allowed in renaming. Move the checks for restrictions
2806 on selector name after analysis discriminated between
2807 component-selection and expanded-name.
2808 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
2809 concatenation argument of string type if it is static.
2810 * sem_util.adb, sem_util.ads
2811 (Check_Later_Vs_Basic_Declarations): add a new function
2812 Is_Later_Declarative_Item to decice which declarations are allowed as
2813 later items, in the two different modes Ada 83 and SPARK. In the SPARK
2814 mode, add that renamings are considered as later items.
2815 (Enclosing_Package): new function to return the enclosing package
2816 (Enter_Name): correct the rule for homonyms in SPARK
2817 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
2818 from source (result of expansion) to avoid issuing wrong warnings.
2820 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2822 * errout.adb: On anything but an expression First_Node returns its
2825 2011-08-02 Pascal Obry <obry@adacore.com>
2827 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
2829 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
2831 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
2832 Set the associated loop as the related expression of internally
2834 * exp_ch7.adb (Is_Container_Cursor): New routine.
2835 (Wrap_Transient_Declaration): Supress the finalization of the list
2836 controller when the declaration denotes a container cursor.
2838 2011-08-02 Yannick Moy <moy@adacore.com>
2840 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
2842 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
2843 expression is a simple expression. This check cannot be performed in
2844 the semantics, so just drop it.
2845 (P_Index_Or_Discriminant_Constraint): move check that the index or
2846 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
2847 semantics. Other cases were previously checked in the semantics.
2848 * par-ch4.adb (P_Name): move checks that a selector name is not
2849 character literal or an operator symbol to Find_Selected_Component in
2851 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
2852 declarations are not placed after later declarations in a separate
2853 procedure in Sem_Util (possibly not the best choice?), to be used both
2854 during parsing, for Ada 83 mode, and during semantic analysis, for
2856 * par-endh.adb (Check_End): move check that end label is not missing
2857 to Process_End_Label in the semantics
2858 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
2859 the special case for SPARK restriction
2860 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
2861 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
2862 parameter Force to issue the error message even on internal node (used
2863 for generated end label). Call Check_Restriction to check when an error
2864 must be issued. In SPARK mode, issue an error message even if the
2865 restriction is not set.
2866 (Check_Restriction): new procedure with an additional out parameter to
2867 inform the caller that a message has been issued
2868 * sem_aggr.adb: Minor modification of message
2869 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
2870 instead of issuing an error message directly
2871 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
2872 declarations are not placed after later declarations, by calling
2873 Check_Later_Vs_Basic_Declarations
2874 (Analyze_Subtype_Declaration): move here the check that an index or
2875 discriminant constraint must be a subtype mark. Change the check that
2876 a subtype of String must start at one so that it works on subtype marks.
2877 * sem_ch4.adb (Analyze_Call): move here the check that a named
2878 association cannot follow a positional one in a call
2879 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
2880 instead of issuing an error message directly
2881 * sem_ch8.adb (Find_Selected_Component): move here the check that a
2882 selector name is not a character literal or an operator symbol. Move
2883 here the check that the prefix of an expanded name cannot be a
2884 subprogram or a loop statement.
2885 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
2886 procedure called from parsing and semantics to check that basic
2887 declarations are not placed after later declarations
2888 (Process_End_Label): move here the check that end label is not missing
2890 2011-08-02 Arnaud Charlet <charlet@adacore.com>
2892 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
2893 representation clause in codepeer mode, since it confuses CodePeer and
2894 does not bring useful info.
2896 2011-08-02 Ed Falis <falis@adacore.com>
2898 * init.c: initialize fp hw on MILS.
2900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2902 * errout.adb (First_Node): for bodies, return the node itself (small
2903 optimization). For other nodes, do not check source_unit if the node
2904 comes from Standard.
2906 2011-08-02 Robert Dewar <dewar@adacore.com>
2908 * exp_ch3.adb: Minor comment additions.
2909 * sem_ch13.adb: Minor reformatting.
2911 2011-08-02 Pascal Obry <obry@adacore.com>
2913 * make.adb, makeutl.adb: Removes some superfluous directory separator.
2915 2011-08-02 Robert Dewar <dewar@adacore.com>
2917 * sem_attr.adb: Minor reformatting.
2919 2011-08-02 Robert Dewar <dewar@adacore.com>
2921 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
2922 (Has_Default_Component_Value): Removed
2923 * einfo.ads Comment updates
2924 (Has_Default_Aspect): Replaces Has_Default_Value
2925 (Has_Default_Component_Value): Removed
2927 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
2929 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
2930 (Get_Simple_Init_Val): Handle Default_Value aspect
2931 (Needs_Simple_Initialization): Handle Default_Value aspect
2932 * exp_ch3.ads: Needs_Simple_Initialization
2933 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
2934 * par-prag.adb (Pragma_Default[_Component]Value) Removed
2936 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
2937 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
2938 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
2940 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2942 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
2943 package containing iteration primitives.
2944 exp_ch5.adb (Expand_Iterator_Loop): ditto.
2946 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2948 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
2949 "of", pre-analyze expression in case it is a function call with
2950 finalization actions that must be placed ahead of the loop.
2951 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
2952 on an Ada2012 iterator, insert them ahead of the rewritten loop.
2954 2011-08-02 Geert Bosch <bosch@adacore.com>
2956 * cstand.adb (Create_Float_Types): Only consider C's long double for
2957 Long_Long_Float, in addition to double.
2959 2011-08-02 Robert Dewar <dewar@adacore.com>
2961 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
2962 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
2963 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
2966 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2968 * sem_attr.adb: handle properly 'Result when it is a prefix of an
2971 2011-08-02 Javier Miranda <miranda@adacore.com>
2973 * einfo.ads, einfo.adb
2974 (Original_Access_Type): Move this attribute to Node26 since there was
2975 an undocumented use of Node21 in E_Access_Subprogram_Type entities
2976 which causes conflicts and breaks the generation of the .NET compiler.
2977 (Interface_Name): Add missing documentation on JGNAT only uses of
2980 2011-08-02 Geert Bosch <bosch@adacore.com>
2982 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
2983 (Find_Back_End_Float_Type): Likewise
2984 (Create_Back_End_Float_Types): Likewise
2985 (Create_Float_Types): Likewise
2986 (Register_Float_Type): Likewise
2987 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
2988 Nlist and split out type selection in new local Find_Base_Type function.
2989 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
2991 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
2993 2011-08-02 Robert Dewar <dewar@adacore.com>
2995 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
2997 * opt.ads: Minor comment change.
2998 * sem_ch12.adb: Minor code reorganization.
3000 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3002 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
3003 subtype's list of rep items to the list on the full subtype in the case
3004 where the lists are the same.
3006 2011-08-02 Geert Bosch <bosch@adacore.com>
3008 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
3009 using the one from System.Strings, which also deallocates all strings.
3011 2011-08-02 Geert Bosch <bosch@adacore.com>
3013 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
3015 * gcc-interface/Make-lang.in: Update dependencies.
3017 2011-08-02 Olivier Hainque <hainque@adacore.com>
3019 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
3022 2011-08-02 Javier Miranda <miranda@adacore.com>
3024 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
3025 associated with anonymous access to subprograms.
3027 2011-08-02 Geert Bosch <bosch@adacore.com>
3030 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
3031 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
3032 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
3033 (Add_Symbol_Definition): Move to switch-c.adb
3034 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
3035 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
3036 (Add_Symbol_Definition): Move to switch-c.adb.
3037 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
3039 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3041 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
3042 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
3044 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
3045 (Add_Symbol_Definition): Moved from Prepcomp.
3046 * switch-c.ads: Update copyright notice. Use String_List instead of
3047 Argument_List, removing dependency on System.OS_Lib.
3049 2011-08-02 Yannick Moy <moy@adacore.com>
3051 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
3052 mode on initialization expression which does not respect SPARK
3054 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
3055 if the tree referenced by its argument represents an initialization
3056 expression in SPARK, suitable for initializing an object in an object
3059 2011-08-02 Javier Miranda <miranda@adacore.com>
3061 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
3062 internally generated access to subprogram with its associated protected
3064 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
3066 2011-08-02 Geert Bosch <bosch@adacore.com>
3068 * cstand.adb (Register_Float_Type): Print information about type to
3069 register, if the Debug_Flag_Dot_B is set.
3070 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
3071 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
3072 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
3073 with a requested precision of more than Max_Digits digits and no more
3074 than Max_Base_Digits digits, if a range specification is present and the
3075 Predefined_Float_Types list has a suitable type to derive from.
3076 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
3077 case of type completion with pragma Import
3079 (Process_Import_Predefined_Type): Processing to complete a type
3080 with pragma Import. Currently supports floating point types only.
3081 (Set_Convention_From_Pragma): Do nothing without underlying type.
3082 (Process_Convention): Guard against absence of underlying type,
3083 which may happen when importing incomplete types.
3084 (Process_Import_Or_Interface): Handle case of importing predefined
3085 types. Tweak error message.
3087 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3089 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
3090 functions to previous change. Reorganize code slightly.
3092 2011-08-02 Geert Bosch <bosch@adacore.com>
3094 * back_end.ads (Register_Type_Proc): New call back procedure type for
3095 allowing the back end to provide information about available types.
3096 (Register_Back_End_Types): New procedure to register back end types.
3097 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
3099 * cstand.adb (Back_End_Float_Types): New list for floating point types
3100 supported by the back end.
3101 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
3102 (Copy_Float_Type): New procedure to make new copies of predefined types.
3103 (Register_Float_Type): New call back procedure to populate the BEFT list
3104 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
3105 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
3106 (Create_Float_Types): New procedure to create entities for floating
3107 point types predefined in Standard, and put these and any remaining
3108 BEFTs on the Predefined_Float_Types list.
3109 * stand.ads (Predefined_Float_Types): New list for predefined floating
3110 point types that do not have declarations in package Standard.
3112 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3114 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
3115 entity node for the unit containing the parameter.
3116 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
3117 (Add_Inlined_Subprogram): Likewise.
3118 * gcc-interface/Make-lang.in: Update dependencies.
3120 2011-08-02 Thomas Quinot <quinot@adacore.com>
3122 * s-stusta.adb (Print): Make sure Pos is always initialized to a
3125 2011-08-02 Geert Bosch <bosch@adacore.com>
3127 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
3129 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3131 * sem_type.adb (Covers): Move trivial case to the top and reuse the
3132 computed value of Base_Type.
3134 2011-08-02 Yannick Moy <moy@adacore.com>
3136 * restrict.adb (Check_Restriction): issue an error for any use of
3137 class-wide, even if the No_Dispatch restriction is not set.
3138 * sem_aggr.adb: Correct typos in comments and messages in formal mode
3139 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
3140 when completing a private extension, the type named in the private part
3141 is not the same as that named in the visible part.
3142 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
3143 of an inherited primitive operations of a tagged type or type extension
3144 that returns the tagged type.
3145 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
3146 function which returns True for an implicit operation inherited by the
3147 derived type declaration for the argument type.
3148 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
3151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3153 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
3154 Process_Bounds, to perform analysis with expansion of a range or an
3155 expression that is the iteration scheme for a loop.
3156 (Analyze_Iterator_Specification): If domain of iteration is given by a
3157 function call with a controlled result, as is the case if call returns
3158 a predefined container, ensure that finalization actions are properly
3160 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
3162 2011-08-02 Javier Miranda <miranda@adacore.com>
3164 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
3165 * gcc-interface/Make-lang.in: Update dependencies.
3167 2011-08-02 Javier Miranda <miranda@adacore.com>
3169 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
3170 determine if the analysis is performed using N or Original_Node (N).
3171 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
3172 functionality of routine Is_Variable avoids code duplication.
3173 * checks.adb (Determine_Range): Handle temporaries generated by
3174 Remove_Side_Effects.
3176 2011-08-02 Javier Miranda <miranda@adacore.com>
3178 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
3179 expansion of the condition. Required since the previous analysis was
3180 done with expansion disabled (see Resolve_Quantified_Expression) and
3181 hence checks were not inserted and record comparisons have not been
3184 2011-08-02 Ed Falis <falis@adacore.com>
3186 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
3189 2011-08-02 Bob Duff <duff@adacore.com>
3191 * opt.ads: Minor comment fix.
3193 2011-08-02 Bob Duff <duff@adacore.com>
3195 * sem_ch12.adb (Analyze_Package_Instantiation,
3196 Analyze_Subprogram_Instantiation): Turn off style checking while
3197 analyzing an instance. Whatever style checks that apply to the generic
3198 unit should apply, so it makes no sense to apply them in an instance.
3199 This was causing trouble when compiling an instance of a runtime
3200 unit that violates the -gnatyO switch.
3201 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
3202 one of the two case statements, causing spurious errors.
3204 2011-08-02 Robert Dewar <dewar@adacore.com>
3206 * uname.adb: Minor reformatting.
3207 * gnatcmd.adb: Minor reformatting.
3208 * exp_attr.adb: Minor reformatting.
3210 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3212 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
3213 No_Dispatching_Calls, do not look for the Assign primitive, because
3214 predefined primitives are not created in this case.
3216 2011-08-02 Bob Duff <duff@adacore.com>
3218 * stylesw.ads: Minor comment fixes.
3220 2011-08-02 Robert Dewar <dewar@adacore.com>
3222 * freeze.adb (Add_To_Result): New procedure.
3224 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3226 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
3227 time, if the specific run-time routines for handling streams of strings
3228 are not available, use the default mechanism.
3230 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3232 * s-regpat.ads: Fix typo.
3234 2011-08-02 Vincent Celier <celier@adacore.com>
3236 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
3237 not null, call it to create the in memory config project file without
3238 parsing an existing default config project file.
3240 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3242 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
3244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3246 * sem_elim.adb: an abstract subprogram does not need an eliminate
3247 pragma for its descendant to be eliminable.
3249 2011-08-02 Ed Falis <falis@adacore.com>
3251 * init.c: revert to handling before previous checkin for VxWorks
3252 * s-intman-vxworks.adb: delete unnecessary declarations related to
3253 using Ada interrupt facilities for handling signals.
3254 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
3255 * s-intman-vxworks.ads: Import __gnat_install_handler as
3256 Initialize_Interrupts.
3257 * s-taprop-vxworks.adb: Delete Signal_Mask.
3258 (Abort_Handler): change construction of mask to unblock exception
3261 2011-08-02 Jerome Guitton <guitton@adacore.com>
3263 * a-except-2005.adb (Raise_From_Signal_Handler): Call
3264 Debug_Raise_Exception before propagation starts.
3266 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3268 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
3269 to Restriction_Check_Required.
3270 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
3271 * sem_res.adb (Resolve_Call): Likewise.
3272 * sem_attr.adb (Check_Stream_Attribute): Likewise.
3274 2011-08-02 Bob Duff <duff@adacore.com>
3276 * stylesw.ads: Update comment.
3277 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
3278 * errout.ads: Remove obsolete comment.
3280 2011-08-02 Javier Miranda <miranda@adacore.com>
3282 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
3283 (Set_Is_Safe_To_Reevaluate): new procedure.
3284 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
3285 assignment is allowed on safe-to-reevaluate variables.
3286 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
3287 temporary created to remove side effects in expressions that use
3288 the secondary stack as safe-to-reevaluate.
3289 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
3290 variables that are not true constants.
3292 2011-08-02 Robert Dewar <dewar@adacore.com>
3294 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
3295 sem_res.adb, sem_ch6.adb: Minor reformatting.
3297 2011-08-02 Jerome Guitton <guitton@adacore.com>
3299 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
3301 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3303 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
3304 not set Overridden_Operation if subprogram is an initialization
3307 2011-08-02 Yannick Moy <moy@adacore.com>
3309 * par-ch6.adb: Correct obsolete name in comments
3310 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
3311 which takes two message arguments (existing function takes one), with
3312 second message used for continuation.
3313 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
3314 block statements that originate from a source block statement, not
3315 generated block statements
3316 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
3317 symmetry with procedure case
3318 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
3319 function to issue an error in formal mode if a package specification
3320 contains more than one tagged type or type extension.
3321 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
3322 parameters matching formals of tagged types are objects (or ancestor
3323 type conversions of objects), not general expressions. Issue an error
3324 on view conversions that are not involving ancestor conversion of an
3326 (Resolve_Type_Conversion): in formal mode, issue an error on the
3327 operand of an ancestor type conversion which is not an object
3328 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
3329 procedure so that it works also for actuals of function calls
3330 (Is_Actual_Tagged_Parameter): new function which determines if its
3331 argument is an actual parameter of a formal of tagged type in a
3333 (Is_SPARK_Object_Reference): new function which determines if the tree
3334 referenced by its argument represents an object in SPARK
3336 2011-08-02 Robert Dewar <dewar@adacore.com>
3338 * sem_ch3.adb: Minor reformatting
3339 Minor comment addition
3340 Minor error msg text change
3342 2011-08-02 Javier Miranda <miranda@adacore.com>
3344 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
3345 function. Used to be more precise when we generate a variable plus one
3346 assignment to remove side effects in the evaluation of the Bound
3348 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
3349 of the bound expression to force its re-analysis and thus expand the
3350 associated transient scope (if required). Code cleanup replacing the
3351 previous code that declared the constant entity by an invocation to
3352 routine Force_Evaluation which centralizes this work in the frontend.
3354 2011-08-02 Robert Dewar <dewar@adacore.com>
3356 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
3357 (Base_Type): Now uses improved Is_Base_Type function
3358 * einfo.ads (Base_Type): Inline this function
3360 2011-08-02 Robert Dewar <dewar@adacore.com>
3362 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
3363 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
3365 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3367 * gcc-interface/Make-lang.in: Update dependencies.
3368 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
3371 2011-08-02 Yannick Moy <moy@adacore.com>
3373 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
3374 non-simple expression used in delta constraint
3375 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
3376 index constraint which is not a subtype mark
3377 * par.adb: With and use Restrict
3378 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
3379 mode on component type which is not a subtype mark and default
3380 expression on component
3381 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
3382 of string which does not have a lower index bound equal to 1
3383 (Array_Type_Declaration): issue an error in formal mode on index or
3384 component type which is not a subtype mark, and on aliased keyword on
3386 (Derived_Type_Declaration): issue an error in formal mode on interface,
3387 limited or abstract type
3388 (Record_Type_Declaration): issue an error in formal mode on interface
3389 (Record_Type_Definition): issue an error in formal mode on tagged types
3390 and type extensions not declared in the specification of a library unit
3391 package; on null non-tagged record; on variant part
3393 2011-08-02 Vincent Celier <celier@adacore.com>
3395 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
3396 not declared for qualified library project when Library_Name is not
3397 declared, but Library_Dir is.
3399 2011-08-02 Robert Dewar <dewar@adacore.com>
3401 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
3402 pragmas (affects aspects [Component_]Default_Value
3403 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
3404 component type for the resolution
3406 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3408 * einfo.adb (Base_Type): Tune implementation for speed.
3410 2011-08-02 Robert Dewar <dewar@adacore.com>
3412 * freeze.adb: Minor reformatting.
3414 2011-08-02 Thomas Quinot <quinot@adacore.com>
3416 * scos.ads: Update comments.
3418 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3420 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
3421 base type, because the parent may be a subtype of a private type whose
3422 convention is established in a private part.
3424 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
3426 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
3427 statement in a block when the expansion of the return expression has
3428 created a finalization chain.
3429 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
3430 with the parent node.
3431 Add N_Extended_Return_Statement to handle the case where a transient
3432 object declaration appears in the Return_Object_Declarations list of
3433 an extended return statement.
3435 2011-08-02 Matthew Gingell <gingell@adacore.com>
3437 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
3438 unused parameter 'name'.
3440 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3442 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
3443 inherited operation, check whether its alias, which is the source
3444 operastion that it renames, has been marked eliminated.
3446 2011-08-02 Javier Miranda <miranda@adacore.com>
3448 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
3449 in-mode parameter whose type is an access type since it can be used to
3450 modify its designated object. Enforce code that handles as safe an
3451 access type that is not access-to-constant but it is the result of a
3452 previous removal of side-effects.
3453 (Remove_Side_Effects): Minor code reorganization of cases which require
3454 no action. Done to incorporate documentation on new cases uncovered
3455 working in this ticket: no action needed if this routine was invoked
3456 too early and the nodes are not yet decorated.
3457 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
3458 to routine Remove_Side_Effects by calls to Force_Evaluation since they
3459 were issued with actuals that are implicitly provided by
3462 2011-08-02 Robert Dewar <dewar@adacore.com>
3464 * sem_ch3.adb, sem_res.adb: Minor reformatting.
3466 2011-08-02 Yannick Moy <moy@adacore.com>
3468 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
3469 to issue an error in formal mode on attribute not supported in this mode
3470 (Analyze_Attribute): issue errors on standard attributes not supported
3472 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
3473 comment, and issue error in formal mode on modulus which is not a power
3475 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
3477 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
3479 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
3480 operator on modular type (except 'not').
3482 2011-08-02 Robert Dewar <dewar@adacore.com>
3484 * gnat_rm.texi: Minor reformatting.
3486 2011-08-02 Arnaud Charlet <charlet@adacore.com>
3488 * s-osinte-linux.ads: Minor comment update and reformatting.
3489 * i-cexten.ads: Make this unit pure, as for its parent.
3490 Will allow its usage in more contexts if needed.
3492 2011-08-02 Robert Dewar <dewar@adacore.com>
3494 * s-utf_32.ads: Minor comment fix.
3496 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3498 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
3499 operation of a tagged synchronized type, handle the case where the
3500 controlling argument is overloaded.
3502 2011-08-02 Yannick Moy <moy@adacore.com>
3504 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
3505 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
3506 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
3507 SPARK mode and formal verification mode on processing SPARK restriction
3508 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
3509 requiring consistency checking.
3511 2011-08-02 Robert Dewar <dewar@adacore.com>
3513 * sem_res.adb: Minor reformatting.
3515 2011-08-02 Robert Dewar <dewar@adacore.com>
3517 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3518 a-cforse.ads: Remove unneeded with of Ada.Containers
3519 Remove commented out pragma Inline's
3520 Move specifications of new subprograms to the actual specs
3522 2011-08-02 Yannick Moy <moy@adacore.com>
3524 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3525 a-cforse.ads: Update comments.
3527 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3529 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
3531 2011-08-02 Robert Dewar <dewar@adacore.com>
3533 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3534 a-cforse.ads, a-cofove.ads: Minor reformatting.
3536 2011-08-02 Claire Dross <dross@adacore.com>
3538 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3539 a-cofove.ads: Add comments.
3541 2011-08-02 Yannick Moy <moy@adacore.com>
3543 * gnat_rm.texi: Document formal containers.
3545 2011-08-02 Emmanuel Briot <briot@adacore.com>
3547 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
3550 2011-08-02 Robert Dewar <dewar@adacore.com>
3552 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
3555 2011-08-02 Robert Dewar <dewar@adacore.com>
3557 * aspects.adb: New aspects Default_Value and Default_Component_Value
3558 New format of Aspect_Names table checks for omitted entries
3559 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
3560 handling of boolean aspects for derived types.
3561 New aspects Default_Value and Default_Component_Value
3562 New format of Aspect_Names table checks for omitted entries
3563 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
3564 (Has_Default_Value): New flag
3565 (Has_Default_Component_Value): New flag
3566 (Has_Default_Value): New flag
3567 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
3569 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
3570 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
3571 Default_Value and Default_Component_Value
3572 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
3573 New aspects Default_Value and Default_Component_Value
3574 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
3575 * sprint.adb: Print N_Aspect_Specification node when called from gdb
3577 2011-08-02 Vincent Celier <celier@adacore.com>
3579 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
3580 inherit library kind.
3582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3584 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
3587 2011-08-02 Robert Dewar <dewar@adacore.com>
3589 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
3591 2011-08-02 Yannick Moy <moy@adacore.com>
3593 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
3595 2011-08-02 Robert Dewar <dewar@adacore.com>
3597 * impunit.adb: Add comment.
3599 2011-08-02 Yannick Moy <moy@adacore.com>
3601 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
3602 qualification of aggregates in formal mode
3603 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
3605 (Resolve_Aggregate): complete the test that an aggregate is adequately
3606 qualified in formal mode
3608 2011-08-02 Pascal Obry <obry@adacore.com>
3610 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
3611 * mlib-prj.adb: Supress warning when compiling binder generated file.
3612 (Build_Library): Supress all warnings when compiling the binder
3615 2011-08-02 Yannick Moy <moy@adacore.com>
3617 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
3619 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
3620 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
3621 Add with/use clauses to make Check_Formal_Restriction visible
3623 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3625 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
3626 in-parameters when type of the generic formal is private in the generic
3627 spec and non-private in the body.
3629 2011-08-02 Claire Dross <dross@adacore.com>
3631 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
3632 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
3633 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
3634 * impunit.adb, Makefile.rtl: Take new files into account.
3636 2011-08-02 Robert Dewar <dewar@adacore.com>
3638 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
3639 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3641 2011-08-02 Yannick Moy <moy@adacore.com>
3643 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
3645 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
3646 matching static array bounds, taking into account the special case of
3648 * sem_ch3.adb: Typo in comment.
3650 2011-08-02 Yannick Moy <moy@adacore.com>
3652 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
3653 which issues an error in formal mode if its argument node is originally
3655 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
3656 has a discriminant specification so that it does not include the case
3658 (Derived_Type_Declaration): move here the test that a derived type has a
3659 discriminant specification
3660 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
3661 first element of a component association before accessing its choices
3662 (presence of component association is not enough)
3663 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
3664 declaration is a library item before accessing the next element in a
3665 list, as library items are not member of lists
3666 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3667 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
3668 Check_Formal_Restriction whenever possible.
3670 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3672 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
3673 reference when needed.
3675 2011-08-02 Bob Duff <duff@adacore.com>
3677 * gnat_ugn.texi: Fix typo.
3679 2011-08-02 Vincent Celier <celier@adacore.com>
3681 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
3682 archive file name. Do not use the full path name of archives for Open
3685 2011-08-02 Robert Dewar <dewar@adacore.com>
3687 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
3688 Analyze_Aspect_Specifications
3690 (Analyze_Aspect_Specifications): New handling for boolean aspects
3691 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
3692 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
3693 sequence for Analyze_Aspect_Specifications
3694 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
3695 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
3697 2011-08-02 Robert Dewar <dewar@adacore.com>
3699 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
3700 aspects, since these no longer exist.
3702 2011-08-02 Robert Dewar <dewar@adacore.com>
3704 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
3705 semicolon, do not try to see if there are aspects following it.
3706 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
3709 2011-08-02 Robert Dewar <dewar@adacore.com>
3711 * sem_ch8.adb, aspects.ads: Minor reformatting.
3713 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
3715 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
3716 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
3718 (Analyze_Aspect_Specifications): ...here. Call above procedure.
3720 2011-08-02 Yannick Moy <moy@adacore.com>
3722 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
3723 mode on subprogram declaration outside of package specification, unless
3724 it is followed by a pragma Import
3725 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
3726 Access_Type_Declaration): issue error in formal mode on access type
3727 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
3729 (Analyze_Object_Declaration): issue error in formal mode on object
3730 declaration which does not respect SPARK restrictions
3731 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
3732 declaration which does not respect SPARK restrictions
3733 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
3734 error in formal mode on digits or delta constraint
3735 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
3736 decimal fixed point type
3737 (Derived_Type_Declaration): issue error in formal mode on derived type
3738 other than type extensions of tagged record types
3739 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
3740 with check on access definition
3741 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
3742 mode on protected definition.
3743 (Analyze_Task_Definition): issue error in formal mode on task definition
3745 2011-08-02 Robert Dewar <dewar@adacore.com>
3747 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
3749 2011-08-02 Javier Miranda <miranda@adacore.com>
3751 * sem_ch6.adb (Can_Override_Operator): New function.
3752 (Verify_Overriding_Indicator): Add missing code to check overriding
3753 indicator in operators. Fixes regression.
3754 (Check_Overriding_Indicator): Minor reformating after replacing the
3755 code that evaluates if the subprogram can override an operator by
3756 invocations to the above new function.
3758 (Write_Field26_Name): Add missing code to ensure that, following
3759 the documentation in einfo.ads, this field is not shown as attribute
3760 "Static_Initialization" on non-dispatching functions.
3762 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3764 * sem_res.adb (Resolve_Call): A call to
3765 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
3766 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
3767 i.e., when the second parameter is of type Time_Span.
3769 2011-08-02 Vincent Celier <celier@adacore.com>
3771 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
3772 with an archive instead of -L<library dir> -l<library name>.
3774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3776 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
3777 mark the base types In_Use in addition to making the operations
3780 2011-08-02 Ed Falis <falis@adacore.com>
3782 * init.c: add and setup __gnat_signal_mask for the exception signals
3783 * s-inmaop-vxworks.adb: new file.
3784 * s-intman-vxworks.adb: remove unnecessary initializations and
3786 * s-intman-vxworks.ads: remove unnecessary variable
3787 * s-taprop-vxworks.adb: simplify signal initialization
3789 2011-08-02 Robert Dewar <dewar@adacore.com>
3791 * sem_ch8.adb: Minor code reorganization, comment updates.
3793 2011-08-02 Robert Dewar <dewar@adacore.com>
3795 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
3796 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
3798 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
3799 (Matching_Static_Array_Bounds): Moved here from Sem_Res
3801 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3803 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
3804 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
3805 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
3806 use_type_clauses, to handle more efficiently use_type and use_all_type
3808 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
3809 Ada2012 Use_All_Type clause.
3810 (Use_Class_Wide_Operations): new procedure.
3812 2011-08-02 Robert Dewar <dewar@adacore.com>
3814 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
3815 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
3816 expression to expression function.
3818 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3820 * sem_ch4.adb: transform simple Ada2012 membership into equality only
3821 if types are compatible.
3823 2011-08-02 Yannick Moy <moy@adacore.com>
3825 * sem_res.adb (Matching_Static_Array_Bounds): new function which
3826 returns True if its argument array types have same dimension and same
3827 static bounds at each index.
3828 (Resolve_Actuals): issue an error in formal mode on actuals passed as
3829 OUT or IN OUT paramaters which are not view conversions in SPARK.
3830 (Resolve_Arithmetic_Op): issue an error in formal mode on
3831 multiplication or division with operands of fixed point types which are
3832 not qualified or explicitly converted.
3833 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
3834 Boolean or array type (except String) operands.
3835 (Resolve_Equality_Op): issue an error in formal mode on equality
3836 operators for array types other than String with non-matching static
3838 (Resolve_Logical_Op): issue an error in formal mode on logical operators
3839 for array types with non-matching static bounds. Factorize the code in
3840 Matching_Static_Array_Bounds.
3841 (Resolve_Qualified_Expression): issue an error in formal mode on
3842 qualified expressions for array types with non-matching static bounds.
3843 (Resolve_Type_Conversion): issue an error in formal mode on type
3844 conversion for array types with non-matching static bounds
3846 2011-08-02 Robert Dewar <dewar@adacore.com>
3848 * par-ch10.adb: Minor code reorganization (use Nkind_In).
3850 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3852 * par-ch9.adb: save location of entry for proper error message.
3854 2011-08-02 Javier Miranda <miranda@adacore.com>
3856 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
3857 (Use_Full_View) which permits this routine to climb through the
3858 ancestors using the full-view of private parents.
3859 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
3860 Use_Full_View to true in calls to Is_Ancestor.
3861 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
3862 true in call to Is_Ancestor.
3863 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
3864 Use_Full_View to true in call to Is_Ancestor.
3865 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
3866 call to Is_Ancestor.
3867 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
3868 Use_Full_View to true in calls to Is_Ancestor.
3869 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
3870 Make_Select_Specific_Data_Table, Register_Primitive,
3871 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
3872 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
3873 to true in call to Is_Ancestor.
3874 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
3875 Use_Full_View to true in calls to Is_Ancestor.
3877 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
3878 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
3880 2011-08-02 Robert Dewar <dewar@adacore.com>
3882 * gnat_rm.texi: Minor reformatting.
3883 * sem_prag.adb: Minor reformatting.
3885 2011-08-02 Tristan Gingold <gingold@adacore.com>
3887 * vms_data.ads: Add VMS qualifier for -gnateP.
3889 2011-08-02 Robert Dewar <dewar@adacore.com>
3891 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
3892 * par-ch7.adb (P_Package): Proper placement of aspects for package
3894 * par-endh.adb (Check_End): Ad Is_Sloc parameter
3895 (End_Statements): Add Is_Sloc parameterr
3896 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
3897 (Check_End): Ad Is_Sloc parameter
3898 (End_Statements): Add Is_Sloc parameterr
3900 2011-08-02 Vincent Celier <celier@adacore.com>
3902 * ug_words: Add VMS qualifier equivalent to -gnateP:
3903 /SYMBOL_PREPROCESSING.
3905 2011-08-02 Jose Ruiz <ruiz@adacore.com>
3907 * gnat-style.texi: For hexadecimal numeric literals the typical
3908 grouping of digits is 4 to represent 2 bytes.
3909 A procedure spec which is split into several lines is indented two
3912 2011-08-02 Yannick Moy <moy@adacore.com>
3914 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
3915 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
3916 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
3918 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
3919 choice in array aggregate
3920 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
3922 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
3923 positional and named aggregate for record, or others in record
3924 aggregate, or multiple choice in record aggregate
3925 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
3926 array operands to logical operations AND, OR and XOR do not have the
3927 same static lower and higher bounds
3928 * sem_ch5.adb, sinfo.ads: Correct typos in comments
3930 2011-08-01 Robert Dewar <dewar@adacore.com>
3932 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
3933 Replaces Last_Source_Node_In_Sequence.
3934 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
3935 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
3936 parens and blank in string (this was inconsistently implemented).
3938 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
3939 blank in string (this was inconsistently implemented).
3941 (Set_Global_Switches): Set formal mode switches appropriately
3942 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
3944 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
3945 call Set_Error_Msg_Lang to set "spark" as language name.
3946 * par.adb: Remove unnecessary call to set formal language for errout
3947 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
3948 appropriately and call Set_Error_Msg_Lang to set "spark" as language
3950 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
3951 calls to it, moved after resolution so that types are known
3952 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
3953 result of concatenation is not of type String
3954 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
3955 concatenation is not properly restricted
3956 * gnat_rm.texi: Add doc on pragma Spark_95.
3957 * gcc-interface/Makefile.in: Remove obsolete target pairs for
3958 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
3959 * gcc-interface/Make-lang.in: Update dependencies.
3961 2011-08-01 Javier Miranda <miranda@adacore.com>
3963 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
3964 condition that detects if the overridden operation must replace an
3967 2011-08-01 Javier Miranda <miranda@adacore.com>
3969 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
3970 code declarations inserted by Insert_Actions in each alternative of the
3971 N_Case_Expression node.
3973 2011-08-01 Robert Dewar <dewar@adacore.com>
3975 * sem_ch6.adb: Minor code reorganization.
3976 * sem_util.adb: Minor reformatting.
3978 2011-08-01 Pascal Obry <obry@adacore.com>
3980 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
3981 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
3983 2011-08-01 Yannick Moy <moy@adacore.com>
3985 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
3986 literal or operator symbol which is prefixed
3987 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
3988 mode on access attributes.
3989 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
3990 that concatenation operands are properly restricted in formal mode
3991 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
3992 Analyze_Concatenation_Operand. Issue an error in formal mode if the
3993 result of the concatenation has a type different from String.
3994 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
3995 Analyze_Quantified_Expression, Analyze_Slice,
3996 Analyze_Null): issue an error in formal mode on unsupported constructs
3998 (Analyze_Block_Statement): only issue error on source block statement
3999 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
4000 function which returns the last node in a list of nodes for which
4001 Comes_From_Source returns True, if any
4002 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
4003 Last_Source_Node_In_Sequence
4004 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4005 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
4006 mode on unsupported constructs
4007 * sem_ch9.adb Do not return after issuing error in formal mode, as the
4008 rest of the actions may be needed later on since the error is marked as
4010 * sinfo.ads: Typos in comments.
4012 2011-08-01 Pascal Obry <obry@adacore.com>
4014 * projects.texi: Minor editing.
4016 2011-08-01 Yannick Moy <moy@adacore.com>
4018 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
4019 insertion character ~~
4020 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
4021 (Set_Error_Msg_Lang): new procedure which fixes the language for use
4022 with insertion character ~~
4023 (Set_Msg_Text): treat insertion character ~~
4024 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
4025 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
4026 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
4027 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
4028 errors related to the formal language restriction not serious
4029 (insertion character |).
4030 * par.adb (Par): set formal language for error messages if needed
4031 * sem_ch6.adb (Check_Missing_Return): take into account possible
4032 generated statements at the end of the function
4033 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
4034 enumeration value to define a new pragma SPARK_95
4035 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
4036 SPARK_Version): new type and variables to store the SPARK version
4038 (SPARK_Mode): return True when SPARK_Version is set
4039 * par-prag.adb: Correct indentation
4040 (Prag): take Pragma_SPARK_95 into account
4041 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
4044 2011-08-01 Robert Dewar <dewar@adacore.com>
4046 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
4047 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
4048 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
4050 2011-08-01 Pascal Obry <obry@adacore.com>
4052 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
4053 Target_Name to Get_Path call.
4054 (Parse_Single_Project): Likewise.
4055 (Post_Parse_Context_Clause): Likewise.
4056 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
4057 Call Initialise_Project_Path with the proper Target_Name.
4058 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
4060 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
4061 with the proper Target_Name.
4062 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
4064 (Parse_Project_And_Apply_Config): Likewise.
4065 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
4066 This is fine as this part of the code is supporting only native
4068 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
4069 is fine as this part of the code is supporting only native compilation.
4071 2011-08-01 Yannick Moy <moy@adacore.com>
4073 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
4074 of homonym, unless the homonym is one of the cases allowed in SPARK
4075 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
4076 package declaration occurring after a body.
4078 2011-08-01 Robert Dewar <dewar@adacore.com>
4080 * checks.adb, exp_ch4.adb: Minor reformatting.
4082 2011-08-01 Javier Miranda <miranda@adacore.com>
4084 * einfo.ads (Access_Disp_Table): Fix documentation.
4085 (Dispatch_Table_Wrappers): Fix documentation.
4087 2011-08-01 Pascal Obry <obry@adacore.com>
4089 * prj-env.adb, prj-env.ads: Minor reformatting.
4091 2011-08-01 Yannick Moy <moy@adacore.com>
4093 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
4094 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
4095 procedures out of these packages.
4096 * errout.ads, errout.adb
4097 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
4098 procedures in of this package
4099 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
4100 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
4101 on misplaced later vs initial declarations, like in Ada 83
4102 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
4103 formal mode on attribute of private type whose full type declaration
4105 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
4106 package declaration inside a package specification
4107 (Analyze_Full_Type_Declaration): issue error in formal mode on
4108 controlled type or discriminant type
4109 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
4110 user-defined operator means that it should come from the source
4111 (New_Overloaded_Entity): issue error in formal mode on overloaded
4113 * sem_ch6.ads, sem_ch13.ads: typos in comments.
4115 2011-08-01 Thomas Quinot <quinot@adacore.com>
4117 * atree.adb: Minor reformatting.
4118 * checks.adb: Minor reformatting.
4120 2011-08-01 Vincent Celier <celier@adacore.com>
4122 * s-parame-vms-ia64.ads: Fix typo in comment
4124 * s-parame-vms-restrict.ads: Removed, unused.
4126 2011-08-01 Javier Miranda <miranda@adacore.com>
4129 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
4131 (Constrain_Index): Remove side effects in the evaluation of the bounds.
4132 * sem_ch3.ads, sem_ch3.adb
4133 (Is_Constant_Bound): New extended version of the subprogram that was
4134 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
4135 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
4136 * sem_aux.ads (Constant_Value): Fix typo in comment.
4137 * checks.adb (Generate_Index_Checks): New implementation which, for
4138 array objects with constant bounds, generates the runtime check
4139 referencing the bounds of the array type. For other cases this routine
4140 provides its previous behavior obtaining such values from the array
4142 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
4144 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
4145 we cannot have semantic interpretations of the new node.
4147 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4149 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
4152 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4154 * sem_ch8.adb: Minor code editing.
4155 * s-vxwext.adb: Remove trailing space.
4156 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
4157 consistency with other files.
4159 2011-08-01 Thomas Quinot <quinot@adacore.com>
4161 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
4163 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4165 * par-ch10.adb: reject parameterized expressions as compilation unit.
4166 * sem_ch4.adb: handle properly conditional expression with overloaded
4167 then_clause and no else_clause.
4169 2011-08-01 Tristan Gingold <gingold@adacore.com>
4171 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
4172 like done by System.Aux_DEC.
4173 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
4175 2011-08-01 Yannick Moy <moy@adacore.com>
4177 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
4178 missing label at end of declaration (subprogram or package)
4179 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
4180 of positional and named parameter association
4181 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
4182 Error_Msg_SP which adds a prefix to the error message giving the name
4183 of the formal language analyzed
4184 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
4185 access result type in subprogram, unconstrained array as result type,.
4186 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
4188 * sem_ch8.adb: Code clean up.
4190 2011-08-01 Javier Miranda <miranda@adacore.com>
4192 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
4193 * einfo.ads (Access_Disp_Table): Fix documentation.
4194 (Dispatch_Table_Wrappers): Fix documentation.
4195 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
4196 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
4197 to enforce the documentation of this attribute.
4198 (Set_Is_Interface): Cleanup the assertion.
4199 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
4200 the Underlying_Type entity before reading attribute Access_Disp_Table.
4201 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
4202 Locate the Underlying_Type before reading attribute Access_Disp_Table.
4203 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
4204 the Underlying_Type entity before reading attribute Access_Disp_Table.
4205 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
4206 Locate the Underlying_Type entity before reading attribute
4209 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4211 * s-poosiz.ads: Additional overriding indicators.
4213 2011-08-01 Yannick Moy <moy@adacore.com>
4215 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
4217 (Analyze_Iteration_Scheme): issue error in formal mode when loop
4218 parameter specification does not include a subtype mark.
4219 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
4220 formal mode on abstract subprogram.
4221 (Analyze_Subprogram_Specification): issue error in formal mode on
4222 user-defined operator.
4223 (Process_Formals): issue error in formal mode on access parameter and
4225 * sem_ch9.adb (Analyze_Abort_Statement,
4226 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
4227 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
4228 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
4229 Analyze_Requeue, Analyze_Selective_Accept,
4230 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
4231 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
4232 issue error in formal mode on user-defined raise statement.
4234 2011-08-01 Thomas Quinot <quinot@adacore.com>
4236 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
4237 declaration being hidden when overriding an implicit inherited
4239 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
4240 (-gnats), do not complain about a source file that contains only a
4243 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4245 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
4246 variable if already set.
4248 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4250 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
4251 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
4252 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
4253 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
4254 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
4255 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
4256 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
4257 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
4258 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
4259 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
4260 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
4261 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
4262 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
4263 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
4264 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
4265 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
4266 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
4267 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
4268 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
4269 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
4270 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
4271 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
4272 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
4273 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
4274 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
4275 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
4276 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
4277 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
4278 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
4279 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
4280 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
4281 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
4282 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
4283 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
4284 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
4285 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
4286 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
4287 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
4288 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
4289 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
4290 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
4291 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
4292 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
4293 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
4294 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
4295 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
4296 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
4297 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
4298 s-osinte-mingw.ads: Update to GPLv3 run-time license.
4299 Use GNAT instead of GNARL.
4301 2011-08-01 Bob Duff <duff@adacore.com>
4303 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
4304 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
4305 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
4308 2011-08-01 Yannick Moy <moy@adacore.com>
4310 * debug.adb (d.D) reverve flag for the SPARK mode
4311 (d.E) reverve flag for SPARK generation mode
4312 (d.F) reverve flag for Why generation mode
4313 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
4314 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
4315 functions which return True when the corresponding modes are set
4316 (Formal_Language): return "spark" or "alfa" when in formal verification
4318 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
4319 Error_Msg to prefix the error message with a tag giving the formal
4321 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
4322 message with a tag giving the formal language
4323 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
4325 (Analyze_Case_Statement): issue error in formal mode on case statement
4326 with a single "others" case alternative
4327 (Analyze_Exit_Statement): issue errors in formal mode on exit
4328 statements which do not respect SPARK restrictions
4329 (Analyze_Goto_Statement): issue error in formal mode on goto statement
4330 (Check_Unreachable_Code): always issue an error (not a warning) in
4331 formal mode on unreachable code (concerns both code after an infinite
4332 loop and after an unconditional jump, both not allowed in SPARK)
4333 * sem_ch6.adb (Analyze_Return_Statement): add call to
4334 Set_Return_Present for a procedure containing a return statement
4335 (already done for functions in Analyze_Function_Return)
4336 (Analyze_Function_Return): issue error in formal mode on extended
4337 return or if return is not last statement in function
4338 (Check_Missing_Return): issue error in formal mode if function does
4339 not end with return or if procedure contains a return
4340 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
4341 function to detect if there is an inner scope of its parameter S which
4344 2011-08-01 Thomas Quinot <quinot@adacore.com>
4346 * sem_ch6.ads: Minor reformatting.
4348 2011-08-01 Javier Miranda <miranda@adacore.com>
4350 * sem_util.adb (Abstract_Interface_List): Complete condition when
4351 processing private type declarations to avoid reading unavailable
4353 (Is_Synchronized_Tagged_Type): Complete condition when processing
4354 private extension declaration nodes to avoid reading unavailable
4357 2011-08-01 Thomas Quinot <quinot@adacore.com>
4359 * sem_ch3.adb: Minor reformatting.
4361 2011-08-01 Thomas Quinot <quinot@adacore.com>
4363 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
4364 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
4365 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
4366 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
4367 for VMS, instead parametrize the common implementation with
4368 System.Parameters declarations.
4370 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
4372 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
4374 2011-08-01 Tristan Gingold <gingold@adacore.com>
4376 * seh_init.c: Fix SEH handler installation on win64.
4378 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4380 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
4381 double analysis of an anonymous access to subprogram, because it can
4382 lead to improper sharing of profiles and a back-end crash.
4384 2011-08-01 Robert Dewar <dewar@adacore.com>
4386 * make.adb, sem_ch4.adb: Minor reformatting.
4387 * gcc-interface/Make-lang.in: Update dependencies.
4388 * sem_util.adb, exp_ch5.adb: Minor reformatting.
4390 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4392 * gnat_rm.texi: Fix definition of Long_Integer.
4394 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4396 * exp_aggr.adb: check limit size of static aggregate unconditionally,
4397 to prevent storage exhaustion.
4398 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
4399 finalized is a function body, insert the cleanup code before the final
4400 return statement, to prevent spurious warnings.
4401 * s-pooglo.ads: add overriding indicator.
4403 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4405 * sem_ch4.adb (Operator_Check): improve error message when both a
4406 with_clause and a use_clause are needed to make operator usage legal.
4407 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
4408 determine whether a compilation unit is visible within an other,
4409 either through a with_clause in the current unit, or a with_clause in
4410 its library unit or one one of its parents.
4412 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4414 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
4415 over an arbitrary expression of an array or container type.
4416 * lib-xref.adb: clarify comment.
4418 2011-08-01 Bob Duff <duff@adacore.com>
4420 * einfo.ads: Minor reformatting.
4421 * debug.adb: Minor comment improvement.
4423 2011-08-01 Javier Miranda <miranda@adacore.com>
4425 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
4426 consider hidden subprograms as valid candidates.
4428 2011-08-01 Arnaud Charlet <charlet@adacore.com>
4430 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
4432 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
4434 * gnat_ugn.texi: Fix typo.
4436 2011-08-01 Robert Dewar <dewar@adacore.com>
4438 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
4439 lib-xref.adb: Minor reformatting
4441 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4443 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
4444 when to generate a call to Move_Final_List.
4445 (Has_Controlled_Parts): Remove this function.
4447 2011-08-01 Geert Bosch <bosch@adacore.com>
4449 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
4452 2011-08-01 Thomas Quinot <quinot@adacore.com>
4454 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
4455 explicit raise of a predefined exception as Comes_From_Source if the
4456 original N_Raise_Statement comes from source.
4458 2011-08-01 Robert Dewar <dewar@adacore.com>
4460 * sinfo.ads: Add comment.
4461 * sem_ch6.adb: Minor reformatting.
4463 2011-08-01 Robert Dewar <dewar@adacore.com>
4465 * freeze.adb (Freeze_Entity): Refine check for bad component size
4466 clause to avoid rejecting confirming clause when atomic/aliased present.
4468 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4470 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
4471 better determine whether an entity reference is a write.
4472 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
4474 * lib-xref.adb (Output_References): Do no suppress a read reference at
4475 the same location as an immediately preceeding modify-reference, to
4476 handle properly in-out actuals.
4478 2011-08-01 Tristan Gingold <gingold@adacore.com>
4480 * env.c (__gnat_setenv) [VMS]: Refine previous change.
4482 2011-08-01 Quentin Ochem <ochem@adacore.com>
4484 * i-cstrin.adb (New_String): Changed implementation, now uses only the
4485 heap to compute the result.
4487 2011-08-01 Robert Dewar <dewar@adacore.com>
4489 * atree.ads: Minor reformatting.
4491 2011-08-01 Emmanuel Briot <briot@adacore.com>
4493 * g-expect.adb (Get_Command_Output): Fix memory leak.
4495 2011-08-01 Geert Bosch <bosch@adacore.com>
4497 * cstand.adb (P_Float_Type): New procedure to print the definition of
4498 predefined fpt types.
4499 (P_Mixed_Name): New procedure to print a name using mixed case
4500 (Print_Standard): Use P_Float_Type for printing floating point types
4501 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
4502 precision IEEE float.
4504 2011-08-01 Thomas Quinot <quinot@adacore.com>
4506 * sem_ch3.adb: Minor reformatting.
4508 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4510 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
4511 the completion of a generic function, insert the new body rather than
4512 rewriting the original.
4514 2011-08-01 Yannick Moy <moy@adacore.com>
4516 * sinfo.ads, errout.ads: Typos in comments.
4518 2011-08-01 Robert Dewar <dewar@adacore.com>
4520 * par-endh.adb: Minor reformatting.
4522 2011-08-01 Robert Dewar <dewar@adacore.com>
4524 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
4525 (Pre_Post_Aspects): New subtype.
4526 * par-ch12.adb (P_Generic): New syntax for aspects in packages
4527 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
4528 * par-ch7.adb (P_Package): Remove Decl parameter
4529 (P_Package): Handle new syntax for aspects (before IS)
4530 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
4532 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
4533 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
4534 (P_Package): Remove Decl parameter
4535 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
4537 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
4539 * sem_util.ads, sem_util.adb (Static_Boolean): New function
4540 * sinfo.ads: Document new syntax for aspects in packages etc.
4541 * sprint.adb: Handle new syntax of aspects before IS in package
4543 2011-08-01 Thomas Quinot <quinot@adacore.com>
4545 * atree.ads: Minor reformatting.
4546 * sem_prag.adb: Minor reformatting.
4548 2011-08-01 Robert Dewar <dewar@adacore.com>
4550 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
4551 case expr alternative.
4553 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4555 * sem_ch12.adb: Fix typo.
4557 2011-08-01 Geert Bosch <bosch@adacore.com>
4559 * sem_prag.adb (Check_No_Link_Name): New procedure.
4560 (Process_Import_Or_Interface): Use Check_No_Link_Name.
4561 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
4562 instead of Standard_Long_Long_Float_Size global. Preparation for
4563 eventual removal of per type constants.
4564 * exp_util.ads (Get_Stream_Size): New function returning the stream
4565 size value of subtype E.
4566 * exp_util.adb (Get_Stream_Size): Implement new function.
4567 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
4569 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
4571 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
4573 2011-08-01 Geert Bosch <bosch@adacore.com>
4575 * cstand.adb: Fix comments.
4576 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
4579 2011-08-01 Robert Dewar <dewar@adacore.com>
4581 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
4583 2011-08-01 Geert Bosch <bosch@adacore.com>
4585 * atree.ads: Fix comment.
4587 2011-08-01 Robert Dewar <dewar@adacore.com>
4589 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
4590 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
4591 * par.adb: Add with for Namet.Sp.
4592 * par-tchk.adb: Minor reformatting.
4594 2011-08-01 Vincent Celier <celier@adacore.com>
4596 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
4597 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
4598 of the init procedure of a SAL.
4599 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
4602 2011-08-01 Thomas Quinot <quinot@adacore.com>
4604 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
4607 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4609 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
4611 2011-08-01 Thomas Quinot <quinot@adacore.com>
4613 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
4614 conformant with its spec (return True only for types that have
4615 an overriding Initialize primitive operation that prevents them from
4616 having preelaborable initialization).
4617 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
4618 initialization for controlled types in Ada 2005 or later mode.
4620 2011-08-01 Robert Dewar <dewar@adacore.com>
4622 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
4624 (Same_Aspect): New function.
4625 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
4626 Type_Invariant, Precondition, Postcondition.
4627 * snames.ads-tmpl: Add Name_Type_Invariant.
4629 2011-08-01 Robert Dewar <dewar@adacore.com>
4631 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
4633 (Freeze_All_Ent): Fix error in handling inherited aspects.
4634 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
4635 already analyzed, but don't skip entire processing of a declaration,
4636 that's wrong in some cases of declarations being rewritten.
4637 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
4638 Don't delay for integer, string literals
4639 Treat predicates in usual manner for delay, remove special case code,
4641 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
4642 (Build_Predicate_Function): Update saved expression in aspect
4643 (Build_Invariant_Procedure): Update saved expression in aspect
4644 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
4645 of replacement of discriminant references if the reference is simple.
4647 2011-08-01 Robert Dewar <dewar@adacore.com>
4649 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
4650 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
4651 Static_Predicate and Dynamic_Predicate.
4652 (Build_Predicate_Function): Add processing for Static_Predicate
4653 and Dynamic_Predicate.
4654 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
4655 (From_Static_Predicate): New flag
4656 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
4658 2011-08-01 Robert Dewar <dewar@adacore.com>
4660 * usage.adb: Documentation cleanup for Ada version modes in usage.
4661 * expander.adb: Minor reformatting.
4663 2011-08-01 Robert Dewar <dewar@adacore.com>
4665 * atree.ads: Minor comment fix.
4666 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
4667 a-witeio.ads, sem_prag.adb: Minor reformatting.
4669 2011-08-01 Doug Rupp <rupp@adacore.com>
4671 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
4672 pointers. Use descrip.h header file for convenience. Add some
4675 2011-08-01 Robert Dewar <dewar@adacore.com>
4677 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
4678 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
4679 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
4681 (Check_Aspect_At_End_Of_Declarations): New procedure
4682 (Analye_Aspect_Specification): Minor changes for above procedures
4683 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
4684 specification node as well.
4686 2011-08-01 Pascal Obry <obry@adacore.com>
4688 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
4689 Windows files. Use GetFilesAttributes() in this case to check for file
4690 existence instead of returning with an error code.
4692 2011-08-01 Vincent Celier <celier@adacore.com>
4694 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
4695 High is above Source length.
4697 2011-08-01 Robert Dewar <dewar@adacore.com>
4699 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
4701 2011-08-01 Robert Dewar <dewar@adacore.com>
4703 * aspects.ads (Boolean_Aspects): New subtype.
4704 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
4705 for derived types in cases where the parent type and derived type have
4707 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
4708 with aspects when parent type also has aspects.
4709 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
4710 boolean expression at this point).
4711 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
4712 accordance with final decision on the Ada 2012 feature.
4713 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
4715 2011-08-01 Matthew Heaney <heaney@adacore.com>
4717 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
4719 2011-08-01 Pascal Obry <obry@adacore.com>
4721 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
4722 Fix Replace_Slice when High is above current string size.
4723 (Replace_Slice): Fix DL computation when High is above current
4726 2011-08-01 Gary Dismukes <dismukes@adacore.com>
4728 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
4730 2011-08-01 Matthew Heaney <heaney@adacore.com>
4732 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
4735 2011-08-01 Pascal Obry <obry@adacore.com>
4737 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
4740 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4742 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
4743 access to protected subprograms in generic bodies.
4744 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
4745 protected type, indicate that the convention of the subprogram is
4746 Convention_Protected, because it may be used in subsequent declarations
4747 within the protected declaration.
4749 2011-08-01 Vincent Celier <celier@adacore.com>
4751 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
4752 and "final" procedures when the name of the library is "ada", to avoid
4753 duplicate symbols "adainit" and "adafinal" in executables.
4755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
4757 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
4758 quantified expression that appears within a postcondition and uses the
4759 Ada2012 'Result attribute.
4761 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4763 * init.c (__gnat_error_handler): Cast reason to int.
4764 (__gnat_install_handler): Explain sa_sigaction use.
4766 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4768 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
4769 subprogram has copy-in copy-out parameters, try to promote the mode of
4770 the return type if it is passed in registers.
4772 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4774 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
4775 left operand as addressable.
4777 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
4779 * gcc-interface/gigi.h (build_function_stub): Remove.
4780 (build_return_expr): Likewise.
4781 (convert_vms_descriptor): Declare.
4782 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
4783 (build_function_stub): Move to...
4784 * gcc-interface/utils2.c (build_return_expr): Move to...
4785 * gcc-interface/trans.c (build_function_stub): ...here.
4786 (build_return_expr): ...here.
4787 (Subprogram_Body_to_gnu): Add local variable for language_function.
4788 Disconnect the parameter attributes cache, if any, once done with it.
4789 Call end_subprog_body only after setting the end_locus.
4790 Build the stub associated with the function, if any, at the very end.
4791 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
4792 variables and streamline control flow.
4794 2011-07-23 Arnaud Charlet <charlet@adacore.com>
4797 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
4800 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4803 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
4804 Assign to act.sa_sigaction.
4805 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
4806 current->return_address to char * before arithmetic.
4808 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4810 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
4811 Correct argument types.
4812 Extract code from reason.
4813 (__gnat_install_handler): Assign to act.sa_sigaction.
4815 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
4817 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
4818 (GNAT1_OBJS): ...here.
4820 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
4823 * g-socthi-mingw.adb (Fill): Fix formatting.
4825 * gcc-interface/gigi.h: Move around comment.
4827 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4830 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
4832 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
4835 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
4837 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
4839 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
4840 range comparison if Pmode is SImode.
4842 2011-07-12 Laurent GUERBY <laurent@guerby.net>
4843 Eric Botcazou <ebotcazou@adacore.com>
4845 * adadecode.c: Wrap up in extern "C" block.
4846 * adadecode.h: Likewise.
4847 * adaint.c: Likewise. Remove 'const' keyword.
4848 * adaint.h: Likewise.
4850 * atree.h: Likewise.
4852 * cstreams.c: Likewise.
4856 * final.c: Likewise.
4858 * initialize.c: Likewise.
4860 * namet.h: Likewise.
4861 * nlists.h: Likewise.
4862 * raise.c: Likewise.
4863 * raise.h: Likewise.
4864 * repinfo.h: Likewise.
4865 * seh_init.c: Likewise.
4866 * targext.c: Likewise.
4867 * tracebak.c: Likewise.
4868 * uintp.h: Likewise.
4869 * urealp.h: Likewise.
4870 * xeinfo.adb: Wrap up generated C code in extern "C" block.
4871 * xsinfo.adb: Likewise.
4872 * xsnamest.adb: Likewise.
4873 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
4874 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
4875 * gcc-interface/misc.c: Likewise.
4876 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
4877 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
4878 ada/targext.o here...
4879 (GNAT_ADA_OBJS): ...and not here.
4880 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
4881 (GNATBIND_OBJS): Reorder.
4883 2011-07-07 Richard Henderson <rth@redhat.com>
4885 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
4886 dwarf2out_frame_init.
4888 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
4890 * gcc-interface/misc.c (gnat_init): Tweak previous change.
4892 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4895 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
4897 2011-07-06 Richard Guenther <rguenther@suse.de>
4899 * gcc-interface/misc.c (gnat_init): Merge calls to
4900 build_common_tree_nodes and build_common_tree_nodes_2.
4901 Re-initialize boolean_false_node.
4903 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
4904 Olivier Hainque <hainque@adacore.com>
4905 Nicolas Setton <setton@adacore.com>
4907 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
4908 the type according to the ARTIFICIAL_P parameter.
4909 (create_type_decl): Likewise.
4910 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
4912 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
4914 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
4915 (gnatbind): Likewise.
4917 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4919 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
4921 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4923 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
4924 local variable throughout. Remove useless call to Base_Type.
4925 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
4926 Take it also into account for the volatileness of the field. Set the
4927 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
4929 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4931 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
4932 on a dereference built for a by-ref object if it has an address clause.
4934 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
4936 * einfo.ads (Address_Taken): Document use for the second argument of
4937 Asm_Input and Asm_Output attributes.
4938 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
4939 argument is an entity name, then set Address_Taken on it.
4940 <Attribute_Asm_Output>: Likewise.
4941 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
4942 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
4943 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
4944 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
4946 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
4949 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
4951 2011-06-14 Joseph Myers <joseph@codesourcery.com>
4953 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
4954 (ada/utils.o): Update dependencies.
4955 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
4956 ../../../libcpp/libcpp.a.
4957 * gcc-interface/utils.c: Include common/common-target.h.
4958 (process_attributes): Use targetm_common.have_named_sections.
4960 2011-06-07 Richard Guenther <rguenther@suse.de>
4962 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
4965 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4967 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
4968 TREE_THIS_NOTRAP flag.
4970 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4972 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
4975 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4977 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
4978 constants whose full view has discriminants specially.
4980 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
4982 * gcc-interface/utils.c: Include diagnostic.h.
4983 (gnat_write_global_declarations): Output debug information for all
4984 global type declarations before finalizing the compilation unit.
4985 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
4987 2011-05-25 Jakub Jelinek <jakub@redhat.com>
4989 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
4991 2011-05-25 Kai Tietz <ktietz@redhat.com>
4993 * adaint.c (__gnat_to_canonical_file_list_next): Use array
4994 initialization instead of const/none-const pointer assignment.
4996 2011-05-24 Joseph Myers <joseph@codesourcery.com>
4998 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
4999 $(EXTRA_GNAT1_OBJS).
5000 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
5001 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
5002 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
5003 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
5004 libcommon-target.a instead of prefix.o.
5006 2011-05-21 Joseph Myers <joseph@codesourcery.com>
5009 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
5011 2011-05-20 Joseph Myers <joseph@codesourcery.com>
5013 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
5014 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
5015 instead of version.o.
5017 2011-05-18 Kai Tietz <ktietz@redhat.com>
5019 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
5020 boolean_false_node instead of integer_zero_node.
5021 (convert_with_check): Likewise.
5022 * gcc-interface/decl.c (choices_to_gnu): Likewise.
5024 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
5026 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
5027 type of the parameter is an unconstrained array, convert the actual to
5028 the type of the formal in the In Out and Out cases as well.
5030 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5032 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
5033 call build_function_type_array or build_varargs_function_type_array
5035 (create_subprog_type): Don't call build_function_type; call
5036 build_function_type_vec instead.
5038 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
5040 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
5041 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
5042 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
5044 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
5046 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
5048 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
5049 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
5051 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5053 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
5055 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
5057 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
5058 instead of accessing TYPE_ARG_TYPES directly.
5059 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
5061 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
5064 * gcc-interface/gigi.h (get_variant_part): Declare.
5065 * gcc-interface/decl.c (get_variant_part): Make global.
5066 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
5067 types have the same constant size, are record types and T1 has a
5068 variant part while T2 doesn't.
5070 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
5072 * gcc-interface/utils.c (begin_subprog_body): Do not call
5074 (end_subprog_body): Likewise.
5076 2011-05-04 Richard Guenther <rguenther@suse.de>
5078 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
5080 (pos_to_constructor): Likewise.
5082 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
5083 Eric Botcazou <ebotcazou@adacore.com>
5085 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
5086 of build_function_type. Adjust calls to...
5087 (build_raise_check): ...this. Do not take a void_tree parameter.
5088 Call build_function_type_list instead of build_function_type.
5089 Fix head comment and swap couple of conditional blocks.
5091 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
5093 * gnatvsn.ads (Library_Version): Bump to 4.7.
5094 (Current_Year): Bump to 2011.
5096 2011-04-29 Michael Matz <matz@suse.de>
5098 * gcc-interface/misc.c (gnat_handle_option): Set
5099 warn_maybe_uninitialized.
5101 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
5103 * gnat_ugn.texi (Complexity Metrics Control): Update link to
5104 the Watson/McCabe paper.
5106 2011-04-23 Jim Meyering <meyering@redhat.com>
5108 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
5110 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
5112 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
5115 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
5117 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
5119 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
5120 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
5121 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
5122 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
5123 <all>: Do not set flags on the reused DECL node coming from an alias.
5124 Set DECL_IGNORED_P on the DECL node built for subprograms if they
5125 don't need debug info here...
5126 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
5127 (gigi): Adjust calls to create_subprog_decl.
5128 (build_raise_check): Likewise.
5129 (establish_gnat_vms_condition_handler): Likewise.
5130 (Compilation_Unit_to_gnu): Likewise.
5131 (gnat_to_gnu): Likewise.
5133 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
5135 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
5136 (NO_REORDER_ADAFLAGS): New variable.
5137 (EXTRA_GNATTOOLS): Always define.
5138 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
5139 Clean up and adjust list of files compiled with special options.
5140 * gcc-interface/Make-lang.in: Likewise.
5141 (ada/decl.o): Cosmetical change.
5142 (ada/misc.o): Remove dependency on $(PLUGIN_H).
5144 2011-04-20 Jim Meyering <meyering@redhat.com>
5146 * initialize.c (__gnat_initialize): Remove useless if-before-free.
5148 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
5150 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
5151 $(CFLAGS) on the link line.
5153 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
5155 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
5156 padded type built for the return type if it is unconstrained.
5158 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
5160 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
5162 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
5164 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
5165 before calling TREE_CHAIN.
5166 * gcc-interface/misc.c (gnat_init_ts): New function.
5167 (LANG_HOOKS_INIT_TS): Define.
5169 2011-04-12 Martin Jambor <mjambor@suse.cz>
5171 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
5172 instead of cgraph_node.
5174 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
5176 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
5177 alignment on fields of the RETURN type built for the Copy-In Copy-Out
5180 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
5182 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
5183 of aggregate types that contain a placeholder.
5185 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
5187 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
5189 (handle_type_generic_attribute): Likewise.
5191 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
5194 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
5196 2011-04-04 Kai Tietz <ktietz@redhat.com>
5199 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
5202 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5204 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
5205 type case, do not strip a padding type around the array type.
5207 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5209 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
5212 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5214 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
5215 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
5216 code for -feliminate-unused-debug-types.
5217 (gnat_post_options): Likewise.
5219 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5221 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
5222 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
5225 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5227 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
5228 DECL_ARTIFICIAL flag on enumeration types.
5230 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5232 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
5233 fat pointer types artificial unconditionally.
5234 <E_Array_Subtype>: Attach the base array type as a parallel type if it
5237 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5239 * gcc-interface/gigi.h (get_dummy_type): Declare.
5240 (build_dummy_unc_pointer_types): Likewise.
5241 (finish_fat_pointer_type): Likewise.
5242 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
5243 fat pointer type has been built, complete it in place.
5244 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
5245 and thin pointers. Remove useless variable.
5246 (finish_fat_pointer_type): Make global and move to...
5247 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
5248 (get_dummy_type): New function.
5249 (build_dummy_unc_pointer_types): Likewise.
5250 (gnat_pushdecl): Propage the name to the anonymous variants only.
5251 (update_pointer_to): Only adjust the pointer types in the unconstrained
5254 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5256 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
5257 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
5258 if this is a Taft amendment type and the full declaration is available.
5259 * gcc-interface/trans.c (process_type): Likewise.
5260 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
5261 (process_freeze_entity): Likewise.
5262 * gcc-interface/utils.c (dummy_global): New static variable.
5263 (gnat_write_global_declarations): If there are types declared as used
5264 at the global level, insert them in the global hash table.
5266 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5268 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
5269 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
5270 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
5272 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
5273 flag of the type accordingly.
5274 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
5276 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
5278 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
5279 finalizing types when updating the pointers to the designated type.
5280 <all>: Finalize the deferred types even if we didn't defer processing
5281 of incomplete types in this invocation.
5283 2011-04-01 Olivier Hainque <hainque@adacore.com>
5284 Nicolas Setton <setton@adacore.com>
5285 Eric Botcazou <ebotcazou@adacore.com>
5287 * gcc-interface/misc.c (gnat_descriptive_type): New function.
5288 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
5290 2011-03-28 Kai Tietz <ktietz@redhat.com>
5292 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
5294 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
5295 * system-mingw.ads (System): Change ZCX_By_Default default to True.
5297 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
5299 2011-03-28 Tristan Gingold <gingold@adacore.com>
5302 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
5303 Use ada output of gnatbind.
5304 (ada/b_gnatb.adb): Ditto.
5305 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
5306 (ada.mostlyclean, ada.stage1)
5307 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
5308 (ada.stagefeedback): Adjust.
5309 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
5310 Use ada output of gnatbind.
5311 (b_gnatm.adb): Ditto.
5312 (b_gnatl.o, b_gnatm.o): New rules.
5314 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5316 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
5317 for the padded type built to support a specified size or alignment.
5319 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5321 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
5322 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
5323 unconditionally to the end of the unit when the designated type is
5325 <all>: Rename local variable. Attempt to un-defer types only and do it
5326 for limited_with'ed types as well.
5327 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
5328 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
5329 consistently and remove redundant call to finalize_from_with_types.
5331 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
5333 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
5334 subprograms without a previous spec declared in the same unit.
5335 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
5336 subprograms at the end of the unit instead of at the beginning.
5337 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
5338 isn't public for the special handling of non-inline functions nested
5339 inside inline external functions.
5341 2011-03-25 Jeff Law <law@redhat.com>
5343 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
5345 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
5347 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
5348 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
5349 to compute Set_Size_Depends_On_Discriminant.
5350 (Layout_Type): Call it on array types in back-end layout mode.
5351 * sem_util.adb (Requires_Transient_Scope): Return true for array
5352 types only if the size depends on the value of discriminants.
5353 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
5354 type if the RHS is a call to a function that returns an unconstrained
5355 type with default discriminant.
5357 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
5359 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
5360 non-conversion to the nominal result type at the end.
5362 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5364 * gcc-interface/trans.c (create_temporary): New function taken from...
5365 (create_init_temporary): ...here. Call it.
5366 (call_to_gnu): Create the temporary for the return value early, if any.
5367 Create it for a function with copy-in/copy-out parameters if there is
5368 no target; in other cases of copy-in/copy-out, use another temporary.
5369 Push the new binding level lazily. Add and rename local variables.
5371 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5373 * gcc-interface/decl.c (validate_size): Improve comments and tweak
5375 (set_rm_size): Likewise.
5377 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
5379 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
5380 for the padded type built in order to support a specified alignment.
5381 Fix incorrect formatting.
5383 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5386 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
5388 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5390 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
5391 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
5392 to the end of the list. Adjust recursive call. Rename local variable.
5393 If REORDER is true, reorder components of the record type.
5394 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
5395 components_to_record and adjust the parameter list.
5397 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
5399 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
5400 disabled, use the variable for bounds of loop iteration scheme.
5402 2011-03-21 Kai Tietz <ktietz@redhat.com>
5405 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
5407 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5409 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
5410 out whether the expression is read-only. Short-circuit placeholder
5411 case and rename a couple of local variables.
5413 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
5415 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
5416 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
5417 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
5418 (convert): Deal with conversions from a smaller form type specially.
5420 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
5422 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
5423 its argument, except for the special -I- switch.
5425 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
5427 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
5430 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
5432 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
5434 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
5436 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
5438 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
5439 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
5440 instead of GNAT_FORMAL. Protect the expression against multiple uses.
5441 Do not generate the check directly, instead instantiate the template
5442 check present in the descriptor.
5443 (make_descriptor_field): Move around.
5444 (build_vms_descriptor32): Build a template check in the POINTER field.
5445 (build_vms_descriptor): Remove useless suffixes.
5446 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
5448 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
5451 * targext.c: Include target files if IN_RTS is defined.
5453 2011-01-26 Richard Guenther <rguenther@suse.de>
5456 * targext.c: Include config.h.
5457 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
5460 2011-01-04 Pascal Obry <obry@adacore.com>
5461 Eric Botcazou <ebotcazou@adacore.com>
5463 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
5465 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5467 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
5468 end-of-case on the end label and its associated gotos, if any.
5470 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5472 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
5473 expressions of the parameter cache within the statement group of
5476 2011-01-04 Olivier Hainque <hainque@adacore.com>
5477 Eric Botcazou <ebotcazou@adacore.com>
5479 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
5480 (set_end_locus_from_node): New function.
5481 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
5482 make and the function end_locus.
5483 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
5484 for the elaboration subprogram.
5485 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
5486 set the end_locus of the expression as well.
5488 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
5491 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
5492 variables that are referenced in exception handlers volatile.
5496 Copyright (C) 2011 Free Software Foundation, Inc.
5498 Copying and distribution of this file, with or without modification,
5499 are permitted in any medium without royalty provided the copyright
5500 notice and this notice are preserved.
5502 * gnat_rm.texi: Ramification of pragma Eliminate documentation
5503 - fix bugs in the description of Source_Trace;
5504 - get rid of UNIT_NAME;
5506 2011-08-02 Javier Miranda <miranda@adacore.com>
5509 (Build_Dispatching_Requeue): Adding support for VM targets
5510 since we cannot directly reference the Tag entity.
5511 * exp_sel.adb (Build_K): Adding support for VM targets.
5512 (Build_S_Assignment): Adding support for VM targets.
5514 (Default_Prim_Op_Position): In VM targets do not restrict availability
5515 of predefined interface primitives to compiling in Ada 2005 mode.
5516 (Is_Predefined_Interface_Primitive): In VM targets this service is not
5517 restricted to compiling in Ada 2005 mode.
5518 (Make_VM_TSD): Generate code that declares and initializes the OSD
5519 record. Needed to support dispatching calls through synchronized
5522 (Make_Predefined_Primitive_Specs): Enable generation of predefined
5523 primitives associated with synchronized interfaces.
5524 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5525 primitives associated with synchronized interfaces.
5527 2011-08-02 Yannick Moy <moy@adacore.com>
5529 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5530 statements hidden in SPARK if preceded by the HIDE directive
5531 (Parse_Exception_Handlers): mark each exception handler in a sequence of
5532 exception handlers as hidden in SPARK if preceded by the HIDE directive
5533 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5534 if starting with the HIDE directive
5535 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5536 starting with the HIDE directive; mark the declarations in a private
5537 part as hidden in SPARK if the private part starts with the HIDE
5539 * restrict.adb, restrict.ads
5540 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5541 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5542 argument node belongs to a part which is hidden in SPARK
5543 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5544 parts in SPARK; protect the possibly costly call to
5545 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5546 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5547 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5548 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5550 (Scan): recognize special comment starting with '#' and followed by
5551 SPARK keyword "hide" as a HIDE directive.
5553 2011-08-02 Yannick Moy <moy@adacore.com>
5555 * types.ads, erroutc.ads: Minor reformatting.
5557 2011-08-02 Vincent Celier <celier@adacore.com>
5559 * link.c: Add response file support for cross platforms.
5561 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5563 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5564 in an association, set parent field of copy before partial analysis.
5565 * sem_res.adb (Resolve_Slice): create reference to itype only when
5566 expansion is enabled.
5568 2011-08-02 Yannick Moy <moy@adacore.com>
5570 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5571 for new flag denoting which subprogram bodies are in ALFA
5572 * restrict.adb, sem_ch7.adb: Update comment
5573 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5574 sem_ch9.adb, sem_res.adb: Add calls to
5575 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5576 * sem_ch6.adb (Analyze_Function_Return): add calls to
5577 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5578 middle of the body, and extended return.
5579 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5580 False when missing return.
5581 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5582 to True for subprograms whose spec is in ALFA. Remove later on the flag
5583 on the entity used for a subprogram body when there exists a separate
5585 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5586 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5587 False, otherwise do nothing.
5589 2011-08-02 Robert Dewar <dewar@adacore.com>
5591 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5593 2011-08-02 Yannick Moy <moy@adacore.com>
5595 * sem_ch4.ads: minor formatting.
5597 2011-08-02 Yannick Moy <moy@adacore.com>
5599 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5600 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5601 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5602 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5603 opt.ads: cleanup of SPARK mode
5605 2011-08-02 Yannick Moy <moy@adacore.com>
5607 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5609 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5610 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5612 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5613 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5614 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5615 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5617 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5619 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5620 functions whose return type is not in ALFA.
5621 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5623 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5624 parameter's type is not in ALFA.
5625 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5628 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5630 * sem_ch6 (Analyze_Expression_Function): treat the function as
5631 Inline_Always, and introduce a subprogram declaration for it when it is
5633 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5634 expression functions, so that the back-end can determine whether they
5635 can in fact be inlined.
5636 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5637 a function body comes from an expression function.
5639 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5641 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5642 null exclusions to test Can_Never_Be_Null on the anonymous access types
5643 of the formals rather than testing the formals themselves. Exclude this
5644 check in cases where the Old_Formal is marked as a controlling formal,
5645 to avoid issuing spurious errors for bodies completing dispatching
5646 operations (due to the flag not getting set on controlling access
5647 formals in body specs).
5648 (Find_Corresponding_Spec): When checking full and subtype conformance of
5649 subprogram bodies in instances, pass Designated and E in that order, for
5650 consistency with the expected order of the formals (New_Id followed by
5653 2011-08-02 Robert Dewar <dewar@adacore.com>
5655 * sem_ch8.adb: Minor reformatting.
5657 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5659 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5660 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5661 primitive operations of class-wide actuals.
5663 2011-08-02 Javier Miranda <miranda@adacore.com>
5665 * exp_atag.ads, exp_atag.adb
5666 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5667 since its value is implicitly passed in argument Typ.
5668 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5669 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5670 Build_Common_Dispatching_Select_Statements.
5672 2011-08-02 Robert Dewar <dewar@adacore.com>
5674 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5675 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5678 2011-08-02 Robert Dewar <dewar@adacore.com>
5680 * sem_res.adb: Minor reformatting.
5681 * sem_prag.adb: Minor reformatting.
5683 2011-08-02 Javier Miranda <miranda@adacore.com>
5685 * exp_atag.adb, exp_atags.ads
5686 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5687 by the tagged type Entity. Required to use this routine in the VM
5688 targets since we do not have available the Tag entity in the VM
5691 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5692 Ada.Tags has not been previously loaded.
5694 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5695 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5697 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5698 view of enclosing scopes. Required to handle enclosing scopes that
5699 are synchronized types whose full view is a task type.
5701 (Build_VM_TSDs): Minor code improvement to avoid generating and
5702 analyzing lists with empty nodes.
5703 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5704 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5705 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5706 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5707 (Make_Select_Specific_Data_Table): Add support for VM targets.
5708 (Make_VM_TSD): Generate code to initialize the SSD structure of
5711 2011-08-02 Yannick Moy <moy@adacore.com>
5713 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5714 cross-references section in ALI.
5715 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5716 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5718 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5719 subprogram or package entity of a node
5720 (Is_Local_Reference_Type): new function returns True for references
5721 selected in local cross-references.
5722 (Lt): function extracted from Lt in Output_References
5723 (Write_Entity_Name): function extracted from Output_References
5724 (Generate_Definition): generate reference with type 'D' for definition
5725 of objects (object declaration and parameter specification), with
5726 appropriate locations and units, for use in local cross-references.
5727 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5728 references of type 'I' for initialization in object definition.
5729 (Output_References): move part of function Lt and procedure
5730 Write_Entity_Name outside of the body. Ignore references of types 'D'
5731 and 'I' introduced for local cross-references.
5732 (Output_Local_References): new procedure to output the local
5733 cross-references sections.
5734 (Lref_Entity_Status): new array defining whether an entity is a local
5735 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5736 with 'I' type when initialization expression is present.
5737 * get_scos.adb, get_scos.ads: Correct comments and typos
5739 2011-08-02 Javier Miranda <miranda@adacore.com>
5741 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5743 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5745 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5748 2011-08-02 Vincent Celier <celier@adacore.com>
5750 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5751 (No_Space_Img): New function
5752 (Find_Excluded_Sources): When reading from a file, record the file name
5753 and the line number for each excluded source.
5754 (Mark_Excluded_Sources): When reporting an error, if the excluded
5755 sources were read from a file, include file name and line number in
5758 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5760 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5762 2011-08-02 Robert Dewar <dewar@adacore.com>
5764 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5766 2011-08-02 Javier Miranda <miranda@adacore.com>
5768 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5769 generation of TSDs to the DOTNET compiler.
5770 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5771 generation of TSDs to the DOTNET compiler.
5773 2011-08-02 Javier Miranda <miranda@adacore.com>
5775 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5776 record of all the tagged types declared inside library level package
5777 declarations, library level package bodies or library level subprograms.
5778 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5779 associated with a given tagged type.
5780 (Build_VM_TSDs): New subprogram.
5781 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5782 compilation units that are subprograms.
5783 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5784 compilation units that are package bodies.
5785 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5786 units that are a package declaration or a package instantiation.
5787 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5788 reorganization to improve the error generated by the frontend when the
5789 function Ada.Tags.Secondary_Tag is not available.
5790 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5791 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5793 2011-08-02 Javier Miranda <miranda@adacore.com>
5795 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5797 2011-08-02 Robert Dewar <dewar@adacore.com>
5799 * s-imenne.ads: Minor reformatting.
5801 2011-08-02 Robert Dewar <dewar@adacore.com>
5803 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5804 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5805 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5807 2011-08-02 Robert Dewar <dewar@adacore.com>
5809 * einfo.ads (Materialize_Entity): Document this is only for renamings
5810 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5811 required debug information in the case where we transform the object
5812 declaration into a renaming declaration.
5813 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5815 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5818 2011-08-02 Robert Dewar <dewar@adacore.com>
5820 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5821 Suppress_Init_Procs.
5822 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5823 Suppress_Initialization/Initialization_Suppressed.
5824 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5825 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5826 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5827 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5829 2011-08-02 Robert Dewar <dewar@adacore.com>
5831 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5834 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5836 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5837 only have inheritable classwide pre/postconditions.
5839 2011-08-02 Javier Miranda <miranda@adacore.com>
5841 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5842 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5843 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5844 checks if the external tag of a type is the same as the external tag
5845 of some other declaration.
5847 2011-08-02 Thomas Quinot <quinot@adacore.com>
5849 * s-taskin.ads: Minor reformatting.
5851 2011-08-02 Emmanuel Briot <briot@adacore.com>
5853 * g-comlin.adb (Display_Help): swap the order in which it prints the
5854 short help and the general usage.
5856 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5858 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5859 the aspect declarations and attach them to the generic copy for
5860 subsequent analysis.
5861 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5862 declarations of the generic tree to the new subprogram declarations.
5863 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5864 conditions that apply to a subprogram instance.
5866 2011-08-02 Robert Dewar <dewar@adacore.com>
5868 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5870 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5872 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5873 private type with a tagged full view is not derived in the immediate
5874 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5876 2011-08-02 Robert Dewar <dewar@adacore.com>
5878 * exp_ch4.adb: Minor reformatting.
5880 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5882 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5883 Ada2012 iterator, the loop will be rewritten during expansion into a
5884 while loop with a cursor and an element declaration. Do not analyze the
5885 body in this case, because if the container is for indefinite types the
5886 actual subtype of the elements will only be determined when the cursor
5887 declaration is analyzed.
5889 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5891 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5892 size/alignment related attributes in CodePeer_Mode.
5894 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5896 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5897 Prepend_Element, since this can result in the operation getting the
5898 wrong slot in the full type's dispatch table if the full type has
5899 inherited operations. The incomplete type's operation will get added
5900 to the proper position in the full type's primitives
5901 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5902 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5903 dispatching operations, since there are cases where nonprimitive
5904 subprograms can get added to the list of incomplete dependents (such
5905 as subprograms in nested packages).
5906 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5907 private part when determining whether to add a primitive with a
5908 parameter of a tagged incomplete type to the Private_Dependents list.
5909 Such primitives can also occur in the visible part, and should not have
5910 been excluded from being private dependents.
5911 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5912 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5913 list of a Taft-amendment incomplete type is a primitive before issuing
5914 an error that the full type must appear in the same unit. There are
5915 cases where nonprimitives can be in the list (such as subprograms in
5917 * sem_disp.adb (Derives_From): Use correct condition for checking that
5918 a formal's type is derived from the type of the corresponding formal in
5919 the parent subprogram (the condition was completely wrong). Add
5920 checking that was missing for controlling result types being derived
5921 from the result type of the parent operation.
5923 2011-08-02 Yannick Moy <moy@adacore.com>
5925 * errout.adb (First_Node): minor renaming
5926 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5929 2011-08-02 Yannick Moy <moy@adacore.com>
5931 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5932 before accessing operands.
5933 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5934 decide whether an initialization expression respects SPARK rules, as
5935 the plain node is the expanded one. This allows for more valid warnings
5937 * gnat_rm.texi: Minor update.
5939 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5941 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5944 2011-08-02 Robert Dewar <dewar@adacore.com>
5946 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5948 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5950 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5951 loop statements and the element renaming declaration with a block when
5952 the element type is controlled.
5954 2011-08-02 Yannick Moy <moy@adacore.com>
5956 * sinfo.ads: Minor formatting.
5958 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5960 * sem_aggr.adb (Add_Association): if the association has a box and no
5961 expression, use the Sloc of the aggregate itself for the new
5963 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5966 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5968 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5969 When a container is provided via a function call, generate a renaming
5970 of the function result. This avoids the creation of a transient scope
5971 and the premature finalization of the container.
5972 * exp_ch7.adb (Is_Container_Cursor): Removed.
5973 (Wrap_Transient_Declaration): Remove the supression of the finalization
5974 of the list controller when the declaration denotes a container cursor,
5977 2011-08-02 Yannick Moy <moy@adacore.com>
5979 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5980 node is from source, instead of the original node being from source.
5982 (Resolve_Array_Aggregate): refine the check for a static expression, to
5983 recognize also static ranges
5984 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5985 Array_Type_Declaration): postpone the test for the type being a subtype
5986 mark after the type has been resolved, so that component-selection and
5987 expanded-name are discriminated.
5988 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5989 to distinguish the case of an iteration scheme, so that an error is
5990 issed on a non-static range in SPARK except in an iteration scheme.
5991 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5992 In_Iter_Schm = True.
5993 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5994 user-defined operators so that they are allowed in renaming
5996 (Find_Selected_Component): refine the check for prefixing of operators
5997 so that they are allowed in renaming. Move the checks for restrictions
5998 on selector name after analysis discriminated between
5999 component-selection and expanded-name.
6000 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6001 concatenation argument of string type if it is static.
6002 * sem_util.adb, sem_util.ads
6003 (Check_Later_Vs_Basic_Declarations): add a new function
6004 Is_Later_Declarative_Item to decice which declarations are allowed as
6005 later items, in the two different modes Ada 83 and SPARK. In the SPARK
6006 mode, add that renamings are considered as later items.
6007 (Enclosing_Package): new function to return the enclosing package
6008 (Enter_Name): correct the rule for homonyms in SPARK
6009 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6010 from source (result of expansion) to avoid issuing wrong warnings.
6012 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6014 * errout.adb: On anything but an expression First_Node returns its
6017 2011-08-02 Pascal Obry <obry@adacore.com>
6019 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6021 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6023 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6024 Set the associated loop as the related expression of internally
6026 * exp_ch7.adb (Is_Container_Cursor): New routine.
6027 (Wrap_Transient_Declaration): Supress the finalization of the list
6028 controller when the declaration denotes a container cursor.
6030 2011-08-02 Yannick Moy <moy@adacore.com>
6032 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6034 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6035 expression is a simple expression. This check cannot be performed in
6036 the semantics, so just drop it.
6037 (P_Index_Or_Discriminant_Constraint): move check that the index or
6038 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6039 semantics. Other cases were previously checked in the semantics.
6040 * par-ch4.adb (P_Name): move checks that a selector name is not
6041 character literal or an operator symbol to Find_Selected_Component in
6043 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6044 declarations are not placed after later declarations in a separate
6045 procedure in Sem_Util (possibly not the best choice?), to be used both
6046 during parsing, for Ada 83 mode, and during semantic analysis, for
6048 * par-endh.adb (Check_End): move check that end label is not missing
6049 to Process_End_Label in the semantics
6050 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6051 the special case for SPARK restriction
6052 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6053 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6054 parameter Force to issue the error message even on internal node (used
6055 for generated end label). Call Check_Restriction to check when an error
6056 must be issued. In SPARK mode, issue an error message even if the
6057 restriction is not set.
6058 (Check_Restriction): new procedure with an additional out parameter to
6059 inform the caller that a message has been issued
6060 * sem_aggr.adb: Minor modification of message
6061 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6062 instead of issuing an error message directly
6063 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6064 declarations are not placed after later declarations, by calling
6065 Check_Later_Vs_Basic_Declarations
6066 (Analyze_Subtype_Declaration): move here the check that an index or
6067 discriminant constraint must be a subtype mark. Change the check that
6068 a subtype of String must start at one so that it works on subtype marks.
6069 * sem_ch4.adb (Analyze_Call): move here the check that a named
6070 association cannot follow a positional one in a call
6071 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6072 instead of issuing an error message directly
6073 * sem_ch8.adb (Find_Selected_Component): move here the check that a
6074 selector name is not a character literal or an operator symbol. Move
6075 here the check that the prefix of an expanded name cannot be a
6076 subprogram or a loop statement.
6077 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6078 procedure called from parsing and semantics to check that basic
6079 declarations are not placed after later declarations
6080 (Process_End_Label): move here the check that end label is not missing
6082 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6084 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6085 representation clause in codepeer mode, since it confuses CodePeer and
6086 does not bring useful info.
6088 2011-08-02 Ed Falis <falis@adacore.com>
6090 * init.c: initialize fp hw on MILS.
6092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6094 * errout.adb (First_Node): for bodies, return the node itself (small
6095 optimization). For other nodes, do not check source_unit if the node
6096 comes from Standard.
6098 2011-08-02 Robert Dewar <dewar@adacore.com>
6100 * exp_ch3.adb: Minor comment additions.
6101 * sem_ch13.adb: Minor reformatting.
6103 2011-08-02 Pascal Obry <obry@adacore.com>
6105 * make.adb, makeutl.adb: Removes some superfluous directory separator.
6107 2011-08-02 Robert Dewar <dewar@adacore.com>
6109 * sem_attr.adb: Minor reformatting.
6111 2011-08-02 Robert Dewar <dewar@adacore.com>
6113 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6114 (Has_Default_Component_Value): Removed
6115 * einfo.ads Comment updates
6116 (Has_Default_Aspect): Replaces Has_Default_Value
6117 (Has_Default_Component_Value): Removed
6119 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6121 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6122 (Get_Simple_Init_Val): Handle Default_Value aspect
6123 (Needs_Simple_Initialization): Handle Default_Value aspect
6124 * exp_ch3.ads: Needs_Simple_Initialization
6125 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6126 * par-prag.adb (Pragma_Default[_Component]Value) Removed
6128 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6129 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6130 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6132 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6134 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6135 package containing iteration primitives.
6136 exp_ch5.adb (Expand_Iterator_Loop): ditto.
6138 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6140 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6141 "of", pre-analyze expression in case it is a function call with
6142 finalization actions that must be placed ahead of the loop.
6143 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6144 on an Ada2012 iterator, insert them ahead of the rewritten loop.
6146 2011-08-02 Geert Bosch <bosch@adacore.com>
6148 * cstand.adb (Create_Float_Types): Only consider C's long double for
6149 Long_Long_Float, in addition to double.
6151 2011-08-02 Robert Dewar <dewar@adacore.com>
6153 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6154 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6155 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6158 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6160 * sem_attr.adb: handle properly 'Result when it is a prefix of an
6163 2011-08-02 Javier Miranda <miranda@adacore.com>
6165 * einfo.ads, einfo.adb
6166 (Original_Access_Type): Move this attribute to Node26 since there was
6167 an undocumented use of Node21 in E_Access_Subprogram_Type entities
6168 which causes conflicts and breaks the generation of the .NET compiler.
6169 (Interface_Name): Add missing documentation on JGNAT only uses of
6172 2011-08-02 Geert Bosch <bosch@adacore.com>
6174 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6175 (Find_Back_End_Float_Type): Likewise
6176 (Create_Back_End_Float_Types): Likewise
6177 (Create_Float_Types): Likewise
6178 (Register_Float_Type): Likewise
6179 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6180 Nlist and split out type selection in new local Find_Base_Type function.
6181 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6183 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6185 2011-08-02 Robert Dewar <dewar@adacore.com>
6187 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6189 * opt.ads: Minor comment change.
6190 * sem_ch12.adb: Minor code reorganization.
6192 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6194 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6195 subtype's list of rep items to the list on the full subtype in the case
6196 where the lists are the same.
6198 2011-08-02 Geert Bosch <bosch@adacore.com>
6200 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6201 using the one from System.Strings, which also deallocates all strings.
6203 2011-08-02 Geert Bosch <bosch@adacore.com>
6205 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6207 * gcc-interface/Make-lang.in: Update dependencies.
6209 2011-08-02 Olivier Hainque <hainque@adacore.com>
6211 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6214 2011-08-02 Javier Miranda <miranda@adacore.com>
6216 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6217 associated with anonymous access to subprograms.
6219 2011-08-02 Geert Bosch <bosch@adacore.com>
6222 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6223 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6224 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6225 (Add_Symbol_Definition): Move to switch-c.adb
6226 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6227 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6228 (Add_Symbol_Definition): Move to switch-c.adb.
6229 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6231 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6233 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6234 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6236 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6237 (Add_Symbol_Definition): Moved from Prepcomp.
6238 * switch-c.ads: Update copyright notice. Use String_List instead of
6239 Argument_List, removing dependency on System.OS_Lib.
6241 2011-08-02 Yannick Moy <moy@adacore.com>
6243 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6244 mode on initialization expression which does not respect SPARK
6246 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6247 if the tree referenced by its argument represents an initialization
6248 expression in SPARK, suitable for initializing an object in an object
6251 2011-08-02 Javier Miranda <miranda@adacore.com>
6253 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6254 internally generated access to subprogram with its associated protected
6256 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6258 2011-08-02 Geert Bosch <bosch@adacore.com>
6260 * cstand.adb (Register_Float_Type): Print information about type to
6261 register, if the Debug_Flag_Dot_B is set.
6262 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6263 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6264 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6265 with a requested precision of more than Max_Digits digits and no more
6266 than Max_Base_Digits digits, if a range specification is present and the
6267 Predefined_Float_Types list has a suitable type to derive from.
6268 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6269 case of type completion with pragma Import
6271 (Process_Import_Predefined_Type): Processing to complete a type
6272 with pragma Import. Currently supports floating point types only.
6273 (Set_Convention_From_Pragma): Do nothing without underlying type.
6274 (Process_Convention): Guard against absence of underlying type,
6275 which may happen when importing incomplete types.
6276 (Process_Import_Or_Interface): Handle case of importing predefined
6277 types. Tweak error message.
6279 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6281 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6282 functions to previous change. Reorganize code slightly.
6284 2011-08-02 Geert Bosch <bosch@adacore.com>
6286 * back_end.ads (Register_Type_Proc): New call back procedure type for
6287 allowing the back end to provide information about available types.
6288 (Register_Back_End_Types): New procedure to register back end types.
6289 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6291 * cstand.adb (Back_End_Float_Types): New list for floating point types
6292 supported by the back end.
6293 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6294 (Copy_Float_Type): New procedure to make new copies of predefined types.
6295 (Register_Float_Type): New call back procedure to populate the BEFT list
6296 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6297 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6298 (Create_Float_Types): New procedure to create entities for floating
6299 point types predefined in Standard, and put these and any remaining
6300 BEFTs on the Predefined_Float_Types list.
6301 * stand.ads (Predefined_Float_Types): New list for predefined floating
6302 point types that do not have declarations in package Standard.
6304 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6306 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6307 entity node for the unit containing the parameter.
6308 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6309 (Add_Inlined_Subprogram): Likewise.
6310 * gcc-interface/Make-lang.in: Update dependencies.
6312 2011-08-02 Thomas Quinot <quinot@adacore.com>
6314 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6317 2011-08-02 Geert Bosch <bosch@adacore.com>
6319 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6321 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6323 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6324 computed value of Base_Type.
6326 2011-08-02 Yannick Moy <moy@adacore.com>
6328 * restrict.adb (Check_Restriction): issue an error for any use of
6329 class-wide, even if the No_Dispatch restriction is not set.
6330 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6331 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6332 when completing a private extension, the type named in the private part
6333 is not the same as that named in the visible part.
6334 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6335 of an inherited primitive operations of a tagged type or type extension
6336 that returns the tagged type.
6337 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6338 function which returns True for an implicit operation inherited by the
6339 derived type declaration for the argument type.
6340 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6345 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6346 Process_Bounds, to perform analysis with expansion of a range or an
6347 expression that is the iteration scheme for a loop.
6348 (Analyze_Iterator_Specification): If domain of iteration is given by a
6349 function call with a controlled result, as is the case if call returns
6350 a predefined container, ensure that finalization actions are properly
6352 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6354 2011-08-02 Javier Miranda <miranda@adacore.com>
6356 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6357 * gcc-interface/Make-lang.in: Update dependencies.
6359 2011-08-02 Javier Miranda <miranda@adacore.com>
6361 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6362 determine if the analysis is performed using N or Original_Node (N).
6363 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6364 functionality of routine Is_Variable avoids code duplication.
6365 * checks.adb (Determine_Range): Handle temporaries generated by
6366 Remove_Side_Effects.
6368 2011-08-02 Javier Miranda <miranda@adacore.com>
6370 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6371 expansion of the condition. Required since the previous analysis was
6372 done with expansion disabled (see Resolve_Quantified_Expression) and
6373 hence checks were not inserted and record comparisons have not been
6376 2011-08-02 Ed Falis <falis@adacore.com>
6378 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6381 2011-08-02 Bob Duff <duff@adacore.com>
6383 * opt.ads: Minor comment fix.
6385 2011-08-02 Bob Duff <duff@adacore.com>
6387 * sem_ch12.adb (Analyze_Package_Instantiation,
6388 Analyze_Subprogram_Instantiation): Turn off style checking while
6389 analyzing an instance. Whatever style checks that apply to the generic
6390 unit should apply, so it makes no sense to apply them in an instance.
6391 This was causing trouble when compiling an instance of a runtime
6392 unit that violates the -gnatyO switch.
6393 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6394 one of the two case statements, causing spurious errors.
6396 2011-08-02 Robert Dewar <dewar@adacore.com>
6398 * uname.adb: Minor reformatting.
6399 * gnatcmd.adb: Minor reformatting.
6400 * exp_attr.adb: Minor reformatting.
6402 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6404 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6405 No_Dispatching_Calls, do not look for the Assign primitive, because
6406 predefined primitives are not created in this case.
6408 2011-08-02 Bob Duff <duff@adacore.com>
6410 * stylesw.ads: Minor comment fixes.
6412 2011-08-02 Robert Dewar <dewar@adacore.com>
6414 * freeze.adb (Add_To_Result): New procedure.
6416 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6418 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6419 time, if the specific run-time routines for handling streams of strings
6420 are not available, use the default mechanism.
6422 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6424 * s-regpat.ads: Fix typo.
6426 2011-08-02 Vincent Celier <celier@adacore.com>
6428 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6429 not null, call it to create the in memory config project file without
6430 parsing an existing default config project file.
6432 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6434 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6436 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6438 * sem_elim.adb: an abstract subprogram does not need an eliminate
6439 pragma for its descendant to be eliminable.
6441 2011-08-02 Ed Falis <falis@adacore.com>
6443 * init.c: revert to handling before previous checkin for VxWorks
6444 * s-intman-vxworks.adb: delete unnecessary declarations related to
6445 using Ada interrupt facilities for handling signals.
6446 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6447 * s-intman-vxworks.ads: Import __gnat_install_handler as
6448 Initialize_Interrupts.
6449 * s-taprop-vxworks.adb: Delete Signal_Mask.
6450 (Abort_Handler): change construction of mask to unblock exception
6453 2011-08-02 Jerome Guitton <guitton@adacore.com>
6455 * a-except-2005.adb (Raise_From_Signal_Handler): Call
6456 Debug_Raise_Exception before propagation starts.
6458 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6460 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6461 to Restriction_Check_Required.
6462 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6463 * sem_res.adb (Resolve_Call): Likewise.
6464 * sem_attr.adb (Check_Stream_Attribute): Likewise.
6466 2011-08-02 Bob Duff <duff@adacore.com>
6468 * stylesw.ads: Update comment.
6469 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6470 * errout.ads: Remove obsolete comment.
6472 2011-08-02 Javier Miranda <miranda@adacore.com>
6474 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6475 (Set_Is_Safe_To_Reevaluate): new procedure.
6476 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6477 assignment is allowed on safe-to-reevaluate variables.
6478 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6479 temporary created to remove side effects in expressions that use
6480 the secondary stack as safe-to-reevaluate.
6481 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6482 variables that are not true constants.
6484 2011-08-02 Robert Dewar <dewar@adacore.com>
6486 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6487 sem_res.adb, sem_ch6.adb: Minor reformatting.
6489 2011-08-02 Jerome Guitton <guitton@adacore.com>
6491 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6493 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6495 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6496 not set Overridden_Operation if subprogram is an initialization
6499 2011-08-02 Yannick Moy <moy@adacore.com>
6501 * par-ch6.adb: Correct obsolete name in comments
6502 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6503 which takes two message arguments (existing function takes one), with
6504 second message used for continuation.
6505 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6506 block statements that originate from a source block statement, not
6507 generated block statements
6508 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6509 symmetry with procedure case
6510 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6511 function to issue an error in formal mode if a package specification
6512 contains more than one tagged type or type extension.
6513 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6514 parameters matching formals of tagged types are objects (or ancestor
6515 type conversions of objects), not general expressions. Issue an error
6516 on view conversions that are not involving ancestor conversion of an
6518 (Resolve_Type_Conversion): in formal mode, issue an error on the
6519 operand of an ancestor type conversion which is not an object
6520 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6521 procedure so that it works also for actuals of function calls
6522 (Is_Actual_Tagged_Parameter): new function which determines if its
6523 argument is an actual parameter of a formal of tagged type in a
6525 (Is_SPARK_Object_Reference): new function which determines if the tree
6526 referenced by its argument represents an object in SPARK
6528 2011-08-02 Robert Dewar <dewar@adacore.com>
6530 * sem_ch3.adb: Minor reformatting
6531 Minor comment addition
6532 Minor error msg text change
6534 2011-08-02 Javier Miranda <miranda@adacore.com>
6536 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6537 function. Used to be more precise when we generate a variable plus one
6538 assignment to remove side effects in the evaluation of the Bound
6540 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6541 of the bound expression to force its re-analysis and thus expand the
6542 associated transient scope (if required). Code cleanup replacing the
6543 previous code that declared the constant entity by an invocation to
6544 routine Force_Evaluation which centralizes this work in the frontend.
6546 2011-08-02 Robert Dewar <dewar@adacore.com>
6548 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6549 (Base_Type): Now uses improved Is_Base_Type function
6550 * einfo.ads (Base_Type): Inline this function
6552 2011-08-02 Robert Dewar <dewar@adacore.com>
6554 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6555 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6557 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6559 * gcc-interface/Make-lang.in: Update dependencies.
6560 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6563 2011-08-02 Yannick Moy <moy@adacore.com>
6565 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6566 non-simple expression used in delta constraint
6567 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6568 index constraint which is not a subtype mark
6569 * par.adb: With and use Restrict
6570 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6571 mode on component type which is not a subtype mark and default
6572 expression on component
6573 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6574 of string which does not have a lower index bound equal to 1
6575 (Array_Type_Declaration): issue an error in formal mode on index or
6576 component type which is not a subtype mark, and on aliased keyword on
6578 (Derived_Type_Declaration): issue an error in formal mode on interface,
6579 limited or abstract type
6580 (Record_Type_Declaration): issue an error in formal mode on interface
6581 (Record_Type_Definition): issue an error in formal mode on tagged types
6582 and type extensions not declared in the specification of a library unit
6583 package; on null non-tagged record; on variant part
6585 2011-08-02 Vincent Celier <celier@adacore.com>
6587 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6588 not declared for qualified library project when Library_Name is not
6589 declared, but Library_Dir is.
6591 2011-08-02 Robert Dewar <dewar@adacore.com>
6593 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6594 pragmas (affects aspects [Component_]Default_Value
6595 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6596 component type for the resolution
6598 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6600 * einfo.adb (Base_Type): Tune implementation for speed.
6602 2011-08-02 Robert Dewar <dewar@adacore.com>
6604 * freeze.adb: Minor reformatting.
6606 2011-08-02 Thomas Quinot <quinot@adacore.com>
6608 * scos.ads: Update comments.
6610 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6612 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6613 base type, because the parent may be a subtype of a private type whose
6614 convention is established in a private part.
6616 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6618 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6619 statement in a block when the expansion of the return expression has
6620 created a finalization chain.
6621 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6622 with the parent node.
6623 Add N_Extended_Return_Statement to handle the case where a transient
6624 object declaration appears in the Return_Object_Declarations list of
6625 an extended return statement.
6627 2011-08-02 Matthew Gingell <gingell@adacore.com>
6629 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6630 unused parameter 'name'.
6632 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6634 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6635 inherited operation, check whether its alias, which is the source
6636 operastion that it renames, has been marked eliminated.
6638 2011-08-02 Javier Miranda <miranda@adacore.com>
6640 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6641 in-mode parameter whose type is an access type since it can be used to
6642 modify its designated object. Enforce code that handles as safe an
6643 access type that is not access-to-constant but it is the result of a
6644 previous removal of side-effects.
6645 (Remove_Side_Effects): Minor code reorganization of cases which require
6646 no action. Done to incorporate documentation on new cases uncovered
6647 working in this ticket: no action needed if this routine was invoked
6648 too early and the nodes are not yet decorated.
6649 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6650 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6651 were issued with actuals that are implicitly provided by
6654 2011-08-02 Robert Dewar <dewar@adacore.com>
6656 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6658 2011-08-02 Yannick Moy <moy@adacore.com>
6660 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6661 to issue an error in formal mode on attribute not supported in this mode
6662 (Analyze_Attribute): issue errors on standard attributes not supported
6664 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6665 comment, and issue error in formal mode on modulus which is not a power
6667 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6669 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6671 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6672 operator on modular type (except 'not').
6674 2011-08-02 Robert Dewar <dewar@adacore.com>
6676 * gnat_rm.texi: Minor reformatting.
6678 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6680 * s-osinte-linux.ads: Minor comment update and reformatting.
6681 * i-cexten.ads: Make this unit pure, as for its parent.
6682 Will allow its usage in more contexts if needed.
6684 2011-08-02 Robert Dewar <dewar@adacore.com>
6686 * s-utf_32.ads: Minor comment fix.
6688 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6690 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6691 operation of a tagged synchronized type, handle the case where the
6692 controlling argument is overloaded.
6694 2011-08-02 Yannick Moy <moy@adacore.com>
6696 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6697 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6698 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6699 SPARK mode and formal verification mode on processing SPARK restriction
6700 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6701 requiring consistency checking.
6703 2011-08-02 Robert Dewar <dewar@adacore.com>
6705 * sem_res.adb: Minor reformatting.
6707 2011-08-02 Robert Dewar <dewar@adacore.com>
6709 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6710 a-cforse.ads: Remove unneeded with of Ada.Containers
6711 Remove commented out pragma Inline's
6712 Move specifications of new subprograms to the actual specs
6714 2011-08-02 Yannick Moy <moy@adacore.com>
6716 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6717 a-cforse.ads: Update comments.
6719 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6721 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6723 2011-08-02 Robert Dewar <dewar@adacore.com>
6725 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6726 a-cforse.ads, a-cofove.ads: Minor reformatting.
6728 2011-08-02 Claire Dross <dross@adacore.com>
6730 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6731 a-cofove.ads: Add comments.
6733 2011-08-02 Yannick Moy <moy@adacore.com>
6735 * gnat_rm.texi: Document formal containers.
6737 2011-08-02 Emmanuel Briot <briot@adacore.com>
6739 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6742 2011-08-02 Robert Dewar <dewar@adacore.com>
6744 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6747 2011-08-02 Robert Dewar <dewar@adacore.com>
6749 * aspects.adb: New aspects Default_Value and Default_Component_Value
6750 New format of Aspect_Names table checks for omitted entries
6751 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6752 handling of boolean aspects for derived types.
6753 New aspects Default_Value and Default_Component_Value
6754 New format of Aspect_Names table checks for omitted entries
6755 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6756 (Has_Default_Value): New flag
6757 (Has_Default_Component_Value): New flag
6758 (Has_Default_Value): New flag
6759 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6761 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6762 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6763 Default_Value and Default_Component_Value
6764 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6765 New aspects Default_Value and Default_Component_Value
6766 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6767 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6769 2011-08-02 Vincent Celier <celier@adacore.com>
6771 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6772 inherit library kind.
6774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6776 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6779 2011-08-02 Robert Dewar <dewar@adacore.com>
6781 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6783 2011-08-02 Yannick Moy <moy@adacore.com>
6785 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6787 2011-08-02 Robert Dewar <dewar@adacore.com>
6789 * impunit.adb: Add comment.
6791 2011-08-02 Yannick Moy <moy@adacore.com>
6793 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6794 qualification of aggregates in formal mode
6795 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6797 (Resolve_Aggregate): complete the test that an aggregate is adequately
6798 qualified in formal mode
6800 2011-08-02 Pascal Obry <obry@adacore.com>
6802 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6803 * mlib-prj.adb: Supress warning when compiling binder generated file.
6804 (Build_Library): Supress all warnings when compiling the binder
6807 2011-08-02 Yannick Moy <moy@adacore.com>
6809 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6811 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6812 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6813 Add with/use clauses to make Check_Formal_Restriction visible
6815 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6817 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6818 in-parameters when type of the generic formal is private in the generic
6819 spec and non-private in the body.
6821 2011-08-02 Claire Dross <dross@adacore.com>
6823 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6824 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6825 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6826 * impunit.adb, Makefile.rtl: Take new files into account.
6828 2011-08-02 Robert Dewar <dewar@adacore.com>
6830 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6831 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6833 2011-08-02 Yannick Moy <moy@adacore.com>
6835 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6837 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6838 matching static array bounds, taking into account the special case of
6840 * sem_ch3.adb: Typo in comment.
6842 2011-08-02 Yannick Moy <moy@adacore.com>
6844 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6845 which issues an error in formal mode if its argument node is originally
6847 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6848 has a discriminant specification so that it does not include the case
6850 (Derived_Type_Declaration): move here the test that a derived type has a
6851 discriminant specification
6852 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6853 first element of a component association before accessing its choices
6854 (presence of component association is not enough)
6855 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6856 declaration is a library item before accessing the next element in a
6857 list, as library items are not member of lists
6858 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6859 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6860 Check_Formal_Restriction whenever possible.
6862 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6864 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6865 reference when needed.
6867 2011-08-02 Bob Duff <duff@adacore.com>
6869 * gnat_ugn.texi: Fix typo.
6871 2011-08-02 Vincent Celier <celier@adacore.com>
6873 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6874 archive file name. Do not use the full path name of archives for Open
6877 2011-08-02 Robert Dewar <dewar@adacore.com>
6879 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6880 Analyze_Aspect_Specifications
6882 (Analyze_Aspect_Specifications): New handling for boolean aspects
6883 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6884 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6885 sequence for Analyze_Aspect_Specifications
6886 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6887 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6889 2011-08-02 Robert Dewar <dewar@adacore.com>
6891 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6892 aspects, since these no longer exist.
6894 2011-08-02 Robert Dewar <dewar@adacore.com>
6896 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6897 semicolon, do not try to see if there are aspects following it.
6898 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6901 2011-08-02 Robert Dewar <dewar@adacore.com>
6903 * sem_ch8.adb, aspects.ads: Minor reformatting.
6905 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6907 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6908 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6910 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6912 2011-08-02 Yannick Moy <moy@adacore.com>
6914 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6915 mode on subprogram declaration outside of package specification, unless
6916 it is followed by a pragma Import
6917 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6918 Access_Type_Declaration): issue error in formal mode on access type
6919 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6921 (Analyze_Object_Declaration): issue error in formal mode on object
6922 declaration which does not respect SPARK restrictions
6923 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6924 declaration which does not respect SPARK restrictions
6925 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6926 error in formal mode on digits or delta constraint
6927 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6928 decimal fixed point type
6929 (Derived_Type_Declaration): issue error in formal mode on derived type
6930 other than type extensions of tagged record types
6931 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6932 with check on access definition
6933 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6934 mode on protected definition.
6935 (Analyze_Task_Definition): issue error in formal mode on task definition
6937 2011-08-02 Robert Dewar <dewar@adacore.com>
6939 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6941 2011-08-02 Javier Miranda <miranda@adacore.com>
6943 * sem_ch6.adb (Can_Override_Operator): New function.
6944 (Verify_Overriding_Indicator): Add missing code to check overriding
6945 indicator in operators. Fixes regression.
6946 (Check_Overriding_Indicator): Minor reformating after replacing the
6947 code that evaluates if the subprogram can override an operator by
6948 invocations to the above new function.
6950 (Write_Field26_Name): Add missing code to ensure that, following
6951 the documentation in einfo.ads, this field is not shown as attribute
6952 "Static_Initialization" on non-dispatching functions.
6954 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6956 * sem_res.adb (Resolve_Call): A call to
6957 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6958 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6959 i.e., when the second parameter is of type Time_Span.
6961 2011-08-02 Vincent Celier <celier@adacore.com>
6963 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6964 with an archive instead of -L<library dir> -l<library name>.
6966 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6968 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6969 mark the base types In_Use in addition to making the operations
6972 2011-08-02 Ed Falis <falis@adacore.com>
6974 * init.c: add and setup __gnat_signal_mask for the exception signals
6975 * s-inmaop-vxworks.adb: new file.
6976 * s-intman-vxworks.adb: remove unnecessary initializations and
6978 * s-intman-vxworks.ads: remove unnecessary variable
6979 * s-taprop-vxworks.adb: simplify signal initialization
6981 2011-08-02 Robert Dewar <dewar@adacore.com>
6983 * sem_ch8.adb: Minor code reorganization, comment updates.
6985 2011-08-02 Robert Dewar <dewar@adacore.com>
6987 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6988 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6990 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6991 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6993 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6995 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6996 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6997 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6998 use_type_clauses, to handle more efficiently use_type and use_all_type
7000 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7001 Ada2012 Use_All_Type clause.
7002 (Use_Class_Wide_Operations): new procedure.
7004 2011-08-02 Robert Dewar <dewar@adacore.com>
7006 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7007 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7008 expression to expression function.
7010 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7012 * sem_ch4.adb: transform simple Ada2012 membership into equality only
7013 if types are compatible.
7015 2011-08-02 Yannick Moy <moy@adacore.com>
7017 * sem_res.adb (Matching_Static_Array_Bounds): new function which
7018 returns True if its argument array types have same dimension and same
7019 static bounds at each index.
7020 (Resolve_Actuals): issue an error in formal mode on actuals passed as
7021 OUT or IN OUT paramaters which are not view conversions in SPARK.
7022 (Resolve_Arithmetic_Op): issue an error in formal mode on
7023 multiplication or division with operands of fixed point types which are
7024 not qualified or explicitly converted.
7025 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7026 Boolean or array type (except String) operands.
7027 (Resolve_Equality_Op): issue an error in formal mode on equality
7028 operators for array types other than String with non-matching static
7030 (Resolve_Logical_Op): issue an error in formal mode on logical operators
7031 for array types with non-matching static bounds. Factorize the code in
7032 Matching_Static_Array_Bounds.
7033 (Resolve_Qualified_Expression): issue an error in formal mode on
7034 qualified expressions for array types with non-matching static bounds.
7035 (Resolve_Type_Conversion): issue an error in formal mode on type
7036 conversion for array types with non-matching static bounds
7038 2011-08-02 Robert Dewar <dewar@adacore.com>
7040 * par-ch10.adb: Minor code reorganization (use Nkind_In).
7042 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7044 * par-ch9.adb: save location of entry for proper error message.
7046 2011-08-02 Javier Miranda <miranda@adacore.com>
7048 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7049 (Use_Full_View) which permits this routine to climb through the
7050 ancestors using the full-view of private parents.
7051 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7052 Use_Full_View to true in calls to Is_Ancestor.
7053 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7054 true in call to Is_Ancestor.
7055 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7056 Use_Full_View to true in call to Is_Ancestor.
7057 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7058 call to Is_Ancestor.
7059 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7060 Use_Full_View to true in calls to Is_Ancestor.
7061 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7062 Make_Select_Specific_Data_Table, Register_Primitive,
7063 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7064 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7065 to true in call to Is_Ancestor.
7066 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7067 Use_Full_View to true in calls to Is_Ancestor.
7069 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7070 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7072 2011-08-02 Robert Dewar <dewar@adacore.com>
7074 * gnat_rm.texi: Minor reformatting.
7075 * sem_prag.adb: Minor reformatting.
7077 2011-08-02 Tristan Gingold <gingold@adacore.com>
7079 * vms_data.ads: Add VMS qualifier for -gnateP.
7081 2011-08-02 Robert Dewar <dewar@adacore.com>
7083 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7084 * par-ch7.adb (P_Package): Proper placement of aspects for package
7086 * par-endh.adb (Check_End): Ad Is_Sloc parameter
7087 (End_Statements): Add Is_Sloc parameterr
7088 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7089 (Check_End): Ad Is_Sloc parameter
7090 (End_Statements): Add Is_Sloc parameterr
7092 2011-08-02 Vincent Celier <celier@adacore.com>
7094 * ug_words: Add VMS qualifier equivalent to -gnateP:
7095 /SYMBOL_PREPROCESSING.
7097 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7099 * gnat-style.texi: For hexadecimal numeric literals the typical
7100 grouping of digits is 4 to represent 2 bytes.
7101 A procedure spec which is split into several lines is indented two
7104 2011-08-02 Yannick Moy <moy@adacore.com>
7106 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7107 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7108 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7110 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7111 choice in array aggregate
7112 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7114 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7115 positional and named aggregate for record, or others in record
7116 aggregate, or multiple choice in record aggregate
7117 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7118 array operands to logical operations AND, OR and XOR do not have the
7119 same static lower and higher bounds
7120 * sem_ch5.adb, sinfo.ads: Correct typos in comments
7122 2011-08-01 Robert Dewar <dewar@adacore.com>
7124 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7125 Replaces Last_Source_Node_In_Sequence.
7126 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7127 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7128 parens and blank in string (this was inconsistently implemented).
7130 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7131 blank in string (this was inconsistently implemented).
7133 (Set_Global_Switches): Set formal mode switches appropriately
7134 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7136 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7137 call Set_Error_Msg_Lang to set "spark" as language name.
7138 * par.adb: Remove unnecessary call to set formal language for errout
7139 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7140 appropriately and call Set_Error_Msg_Lang to set "spark" as language
7142 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7143 calls to it, moved after resolution so that types are known
7144 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7145 result of concatenation is not of type String
7146 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7147 concatenation is not properly restricted
7148 * gnat_rm.texi: Add doc on pragma Spark_95.
7149 * gcc-interface/Makefile.in: Remove obsolete target pairs for
7150 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7151 * gcc-interface/Make-lang.in: Update dependencies.
7153 2011-08-01 Javier Miranda <miranda@adacore.com>
7155 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7156 condition that detects if the overridden operation must replace an
7159 2011-08-01 Javier Miranda <miranda@adacore.com>
7161 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7162 code declarations inserted by Insert_Actions in each alternative of the
7163 N_Case_Expression node.
7165 2011-08-01 Robert Dewar <dewar@adacore.com>
7167 * sem_ch6.adb: Minor code reorganization.
7168 * sem_util.adb: Minor reformatting.
7170 2011-08-01 Pascal Obry <obry@adacore.com>
7172 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7173 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7175 2011-08-01 Yannick Moy <moy@adacore.com>
7177 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7178 literal or operator symbol which is prefixed
7179 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7180 mode on access attributes.
7181 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7182 that concatenation operands are properly restricted in formal mode
7183 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7184 Analyze_Concatenation_Operand. Issue an error in formal mode if the
7185 result of the concatenation has a type different from String.
7186 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7187 Analyze_Quantified_Expression, Analyze_Slice,
7188 Analyze_Null): issue an error in formal mode on unsupported constructs
7190 (Analyze_Block_Statement): only issue error on source block statement
7191 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7192 function which returns the last node in a list of nodes for which
7193 Comes_From_Source returns True, if any
7194 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7195 Last_Source_Node_In_Sequence
7196 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7197 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7198 mode on unsupported constructs
7199 * sem_ch9.adb Do not return after issuing error in formal mode, as the
7200 rest of the actions may be needed later on since the error is marked as
7202 * sinfo.ads: Typos in comments.
7204 2011-08-01 Pascal Obry <obry@adacore.com>
7206 * projects.texi: Minor editing.
7208 2011-08-01 Yannick Moy <moy@adacore.com>
7210 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7211 insertion character ~~
7212 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7213 (Set_Error_Msg_Lang): new procedure which fixes the language for use
7214 with insertion character ~~
7215 (Set_Msg_Text): treat insertion character ~~
7216 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7217 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7218 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7219 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7220 errors related to the formal language restriction not serious
7221 (insertion character |).
7222 * par.adb (Par): set formal language for error messages if needed
7223 * sem_ch6.adb (Check_Missing_Return): take into account possible
7224 generated statements at the end of the function
7225 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7226 enumeration value to define a new pragma SPARK_95
7227 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7228 SPARK_Version): new type and variables to store the SPARK version
7230 (SPARK_Mode): return True when SPARK_Version is set
7231 * par-prag.adb: Correct indentation
7232 (Prag): take Pragma_SPARK_95 into account
7233 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7236 2011-08-01 Robert Dewar <dewar@adacore.com>
7238 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7239 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7240 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7242 2011-08-01 Pascal Obry <obry@adacore.com>
7244 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7245 Target_Name to Get_Path call.
7246 (Parse_Single_Project): Likewise.
7247 (Post_Parse_Context_Clause): Likewise.
7248 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7249 Call Initialise_Project_Path with the proper Target_Name.
7250 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7252 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7253 with the proper Target_Name.
7254 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7256 (Parse_Project_And_Apply_Config): Likewise.
7257 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7258 This is fine as this part of the code is supporting only native
7260 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7261 is fine as this part of the code is supporting only native compilation.
7263 2011-08-01 Yannick Moy <moy@adacore.com>
7265 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7266 of homonym, unless the homonym is one of the cases allowed in SPARK
7267 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7268 package declaration occurring after a body.
7270 2011-08-01 Robert Dewar <dewar@adacore.com>
7272 * checks.adb, exp_ch4.adb: Minor reformatting.
7274 2011-08-01 Javier Miranda <miranda@adacore.com>
7276 * einfo.ads (Access_Disp_Table): Fix documentation.
7277 (Dispatch_Table_Wrappers): Fix documentation.
7279 2011-08-01 Pascal Obry <obry@adacore.com>
7281 * prj-env.adb, prj-env.ads: Minor reformatting.
7283 2011-08-01 Yannick Moy <moy@adacore.com>
7285 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7286 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7287 procedures out of these packages.
7288 * errout.ads, errout.adb
7289 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7290 procedures in of this package
7291 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7292 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7293 on misplaced later vs initial declarations, like in Ada 83
7294 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7295 formal mode on attribute of private type whose full type declaration
7297 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7298 package declaration inside a package specification
7299 (Analyze_Full_Type_Declaration): issue error in formal mode on
7300 controlled type or discriminant type
7301 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7302 user-defined operator means that it should come from the source
7303 (New_Overloaded_Entity): issue error in formal mode on overloaded
7305 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7307 2011-08-01 Thomas Quinot <quinot@adacore.com>
7309 * atree.adb: Minor reformatting.
7310 * checks.adb: Minor reformatting.
7312 2011-08-01 Vincent Celier <celier@adacore.com>
7314 * s-parame-vms-ia64.ads: Fix typo in comment
7316 * s-parame-vms-restrict.ads: Removed, unused.
7318 2011-08-01 Javier Miranda <miranda@adacore.com>
7321 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7323 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7324 * sem_ch3.ads, sem_ch3.adb
7325 (Is_Constant_Bound): New extended version of the subprogram that was
7326 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7327 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7328 * sem_aux.ads (Constant_Value): Fix typo in comment.
7329 * checks.adb (Generate_Index_Checks): New implementation which, for
7330 array objects with constant bounds, generates the runtime check
7331 referencing the bounds of the array type. For other cases this routine
7332 provides its previous behavior obtaining such values from the array
7334 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7336 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7337 we cannot have semantic interpretations of the new node.
7339 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7341 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7344 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7346 * sem_ch8.adb: Minor code editing.
7347 * s-vxwext.adb: Remove trailing space.
7348 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7349 consistency with other files.
7351 2011-08-01 Thomas Quinot <quinot@adacore.com>
7353 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7355 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7357 * par-ch10.adb: reject parameterized expressions as compilation unit.
7358 * sem_ch4.adb: handle properly conditional expression with overloaded
7359 then_clause and no else_clause.
7361 2011-08-01 Tristan Gingold <gingold@adacore.com>
7363 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7364 like done by System.Aux_DEC.
7365 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7367 2011-08-01 Yannick Moy <moy@adacore.com>
7369 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7370 missing label at end of declaration (subprogram or package)
7371 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7372 of positional and named parameter association
7373 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7374 Error_Msg_SP which adds a prefix to the error message giving the name
7375 of the formal language analyzed
7376 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7377 access result type in subprogram, unconstrained array as result type,.
7378 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7380 * sem_ch8.adb: Code clean up.
7382 2011-08-01 Javier Miranda <miranda@adacore.com>
7384 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7385 * einfo.ads (Access_Disp_Table): Fix documentation.
7386 (Dispatch_Table_Wrappers): Fix documentation.
7387 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7388 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7389 to enforce the documentation of this attribute.
7390 (Set_Is_Interface): Cleanup the assertion.
7391 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7392 the Underlying_Type entity before reading attribute Access_Disp_Table.
7393 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7394 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7395 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7396 the Underlying_Type entity before reading attribute Access_Disp_Table.
7397 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7398 Locate the Underlying_Type entity before reading attribute
7401 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7403 * s-poosiz.ads: Additional overriding indicators.
7405 2011-08-01 Yannick Moy <moy@adacore.com>
7407 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7409 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7410 parameter specification does not include a subtype mark.
7411 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7412 formal mode on abstract subprogram.
7413 (Analyze_Subprogram_Specification): issue error in formal mode on
7414 user-defined operator.
7415 (Process_Formals): issue error in formal mode on access parameter and
7417 * sem_ch9.adb (Analyze_Abort_Statement,
7418 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7419 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7420 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7421 Analyze_Requeue, Analyze_Selective_Accept,
7422 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7423 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7424 issue error in formal mode on user-defined raise statement.
7426 2011-08-01 Thomas Quinot <quinot@adacore.com>
7428 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7429 declaration being hidden when overriding an implicit inherited
7431 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7432 (-gnats), do not complain about a source file that contains only a
7435 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7437 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7438 variable if already set.
7440 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7442 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7443 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7444 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7445 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7446 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7447 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7448 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7449 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7450 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7451 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7452 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7453 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7454 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7455 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7456 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7457 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7458 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7459 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7460 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7461 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7462 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7463 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7464 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7465 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7466 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7467 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7468 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7469 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7470 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7471 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7472 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7473 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7474 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7475 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7476 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7477 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7478 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7479 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7480 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7481 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7482 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7483 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7484 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7485 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7486 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7487 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7488 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7489 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7490 s-osinte-mingw.ads: Update to GPLv3 run-time license.
7491 Use GNAT instead of GNARL.
7493 2011-08-01 Bob Duff <duff@adacore.com>
7495 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7496 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7497 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7500 2011-08-01 Yannick Moy <moy@adacore.com>
7502 * debug.adb (d.D) reverve flag for the SPARK mode
7503 (d.E) reverve flag for SPARK generation mode
7504 (d.F) reverve flag for Why generation mode
7505 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7506 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
7507 functions which return True when the corresponding modes are set
7508 (Formal_Language): return "spark" or "alfa" when in formal verification
7510 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7511 Error_Msg to prefix the error message with a tag giving the formal
7513 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7514 message with a tag giving the formal language
7515 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7517 (Analyze_Case_Statement): issue error in formal mode on case statement
7518 with a single "others" case alternative
7519 (Analyze_Exit_Statement): issue errors in formal mode on exit
7520 statements which do not respect SPARK restrictions
7521 (Analyze_Goto_Statement): issue error in formal mode on goto statement
7522 (Check_Unreachable_Code): always issue an error (not a warning) in
7523 formal mode on unreachable code (concerns both code after an infinite
7524 loop and after an unconditional jump, both not allowed in SPARK)
7525 * sem_ch6.adb (Analyze_Return_Statement): add call to
7526 Set_Return_Present for a procedure containing a return statement
7527 (already done for functions in Analyze_Function_Return)
7528 (Analyze_Function_Return): issue error in formal mode on extended
7529 return or if return is not last statement in function
7530 (Check_Missing_Return): issue error in formal mode if function does
7531 not end with return or if procedure contains a return
7532 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7533 function to detect if there is an inner scope of its parameter S which
7536 2011-08-01 Thomas Quinot <quinot@adacore.com>
7538 * sem_ch6.ads: Minor reformatting.
7540 2011-08-01 Javier Miranda <miranda@adacore.com>
7542 * sem_util.adb (Abstract_Interface_List): Complete condition when
7543 processing private type declarations to avoid reading unavailable
7545 (Is_Synchronized_Tagged_Type): Complete condition when processing
7546 private extension declaration nodes to avoid reading unavailable
7549 2011-08-01 Thomas Quinot <quinot@adacore.com>
7551 * sem_ch3.adb: Minor reformatting.
7553 2011-08-01 Thomas Quinot <quinot@adacore.com>
7555 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7556 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7557 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7558 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7559 for VMS, instead parametrize the common implementation with
7560 System.Parameters declarations.
7562 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
7564 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7566 2011-08-01 Tristan Gingold <gingold@adacore.com>
7568 * seh_init.c: Fix SEH handler installation on win64.
7570 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7572 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7573 double analysis of an anonymous access to subprogram, because it can
7574 lead to improper sharing of profiles and a back-end crash.
7576 2011-08-01 Robert Dewar <dewar@adacore.com>
7578 * make.adb, sem_ch4.adb: Minor reformatting.
7579 * gcc-interface/Make-lang.in: Update dependencies.
7580 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7582 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7584 * gnat_rm.texi: Fix definition of Long_Integer.
7586 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7588 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7589 to prevent storage exhaustion.
7590 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7591 finalized is a function body, insert the cleanup code before the final
7592 return statement, to prevent spurious warnings.
7593 * s-pooglo.ads: add overriding indicator.
7595 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7597 * sem_ch4.adb (Operator_Check): improve error message when both a
7598 with_clause and a use_clause are needed to make operator usage legal.
7599 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7600 determine whether a compilation unit is visible within an other,
7601 either through a with_clause in the current unit, or a with_clause in
7602 its library unit or one one of its parents.
7604 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7606 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7607 over an arbitrary expression of an array or container type.
7608 * lib-xref.adb: clarify comment.
7610 2011-08-01 Bob Duff <duff@adacore.com>
7612 * einfo.ads: Minor reformatting.
7613 * debug.adb: Minor comment improvement.
7615 2011-08-01 Javier Miranda <miranda@adacore.com>
7617 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7618 consider hidden subprograms as valid candidates.
7620 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7622 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7624 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7626 * gnat_ugn.texi: Fix typo.
7628 2011-08-01 Robert Dewar <dewar@adacore.com>
7630 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7631 lib-xref.adb: Minor reformatting
7633 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7635 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7636 when to generate a call to Move_Final_List.
7637 (Has_Controlled_Parts): Remove this function.
7639 2011-08-01 Geert Bosch <bosch@adacore.com>
7641 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7644 2011-08-01 Thomas Quinot <quinot@adacore.com>
7646 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7647 explicit raise of a predefined exception as Comes_From_Source if the
7648 original N_Raise_Statement comes from source.
7650 2011-08-01 Robert Dewar <dewar@adacore.com>
7652 * sinfo.ads: Add comment.
7653 * sem_ch6.adb: Minor reformatting.
7655 2011-08-01 Robert Dewar <dewar@adacore.com>
7657 * freeze.adb (Freeze_Entity): Refine check for bad component size
7658 clause to avoid rejecting confirming clause when atomic/aliased present.
7660 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7662 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7663 better determine whether an entity reference is a write.
7664 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7666 * lib-xref.adb (Output_References): Do no suppress a read reference at
7667 the same location as an immediately preceeding modify-reference, to
7668 handle properly in-out actuals.
7670 2011-08-01 Tristan Gingold <gingold@adacore.com>
7672 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7674 2011-08-01 Quentin Ochem <ochem@adacore.com>
7676 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7677 heap to compute the result.
7679 2011-08-01 Robert Dewar <dewar@adacore.com>
7681 * atree.ads: Minor reformatting.
7683 2011-08-01 Emmanuel Briot <briot@adacore.com>
7685 * g-expect.adb (Get_Command_Output): Fix memory leak.
7687 2011-08-01 Geert Bosch <bosch@adacore.com>
7689 * cstand.adb (P_Float_Type): New procedure to print the definition of
7690 predefined fpt types.
7691 (P_Mixed_Name): New procedure to print a name using mixed case
7692 (Print_Standard): Use P_Float_Type for printing floating point types
7693 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7694 precision IEEE float.
7696 2011-08-01 Thomas Quinot <quinot@adacore.com>
7698 * sem_ch3.adb: Minor reformatting.
7700 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7702 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7703 the completion of a generic function, insert the new body rather than
7704 rewriting the original.
7706 2011-08-01 Yannick Moy <moy@adacore.com>
7708 * sinfo.ads, errout.ads: Typos in comments.
7710 2011-08-01 Robert Dewar <dewar@adacore.com>
7712 * par-endh.adb: Minor reformatting.
7714 2011-08-01 Robert Dewar <dewar@adacore.com>
7716 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7717 (Pre_Post_Aspects): New subtype.
7718 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7719 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7720 * par-ch7.adb (P_Package): Remove Decl parameter
7721 (P_Package): Handle new syntax for aspects (before IS)
7722 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7724 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7725 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7726 (P_Package): Remove Decl parameter
7727 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7729 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7731 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7732 * sinfo.ads: Document new syntax for aspects in packages etc.
7733 * sprint.adb: Handle new syntax of aspects before IS in package
7735 2011-08-01 Thomas Quinot <quinot@adacore.com>
7737 * atree.ads: Minor reformatting.
7738 * sem_prag.adb: Minor reformatting.
7740 2011-08-01 Robert Dewar <dewar@adacore.com>
7742 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7743 case expr alternative.
7745 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7747 * sem_ch12.adb: Fix typo.
7749 2011-08-01 Geert Bosch <bosch@adacore.com>
7751 * sem_prag.adb (Check_No_Link_Name): New procedure.
7752 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7753 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7754 instead of Standard_Long_Long_Float_Size global. Preparation for
7755 eventual removal of per type constants.
7756 * exp_util.ads (Get_Stream_Size): New function returning the stream
7757 size value of subtype E.
7758 * exp_util.adb (Get_Stream_Size): Implement new function.
7759 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7761 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7763 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7765 2011-08-01 Geert Bosch <bosch@adacore.com>
7767 * cstand.adb: Fix comments.
7768 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7771 2011-08-01 Robert Dewar <dewar@adacore.com>
7773 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7775 2011-08-01 Geert Bosch <bosch@adacore.com>
7777 * atree.ads: Fix comment.
7779 2011-08-01 Robert Dewar <dewar@adacore.com>
7781 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7782 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7783 * par.adb: Add with for Namet.Sp.
7784 * par-tchk.adb: Minor reformatting.
7786 2011-08-01 Vincent Celier <celier@adacore.com>
7788 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7789 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7790 of the init procedure of a SAL.
7791 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7794 2011-08-01 Thomas Quinot <quinot@adacore.com>
7796 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7799 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7801 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7803 2011-08-01 Thomas Quinot <quinot@adacore.com>
7805 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7806 conformant with its spec (return True only for types that have
7807 an overriding Initialize primitive operation that prevents them from
7808 having preelaborable initialization).
7809 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7810 initialization for controlled types in Ada 2005 or later mode.
7812 2011-08-01 Robert Dewar <dewar@adacore.com>
7814 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7816 (Same_Aspect): New function.
7817 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7818 Type_Invariant, Precondition, Postcondition.
7819 * snames.ads-tmpl: Add Name_Type_Invariant.
7821 2011-08-01 Robert Dewar <dewar@adacore.com>
7823 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7825 (Freeze_All_Ent): Fix error in handling inherited aspects.
7826 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7827 already analyzed, but don't skip entire processing of a declaration,
7828 that's wrong in some cases of declarations being rewritten.
7829 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7830 Don't delay for integer, string literals
7831 Treat predicates in usual manner for delay, remove special case code,
7833 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7834 (Build_Predicate_Function): Update saved expression in aspect
7835 (Build_Invariant_Procedure): Update saved expression in aspect
7836 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7837 of replacement of discriminant references if the reference is simple.
7839 2011-08-01 Robert Dewar <dewar@adacore.com>
7841 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7842 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7843 Static_Predicate and Dynamic_Predicate.
7844 (Build_Predicate_Function): Add processing for Static_Predicate
7845 and Dynamic_Predicate.
7846 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7847 (From_Static_Predicate): New flag
7848 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7850 2011-08-01 Robert Dewar <dewar@adacore.com>
7852 * usage.adb: Documentation cleanup for Ada version modes in usage.
7853 * expander.adb: Minor reformatting.
7855 2011-08-01 Robert Dewar <dewar@adacore.com>
7857 * atree.ads: Minor comment fix.
7858 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7859 a-witeio.ads, sem_prag.adb: Minor reformatting.
7861 2011-08-01 Doug Rupp <rupp@adacore.com>
7863 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7864 pointers. Use descrip.h header file for convenience. Add some
7867 2011-08-01 Robert Dewar <dewar@adacore.com>
7869 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7870 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7871 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7873 (Check_Aspect_At_End_Of_Declarations): New procedure
7874 (Analye_Aspect_Specification): Minor changes for above procedures
7875 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7876 specification node as well.
7878 2011-08-01 Pascal Obry <obry@adacore.com>
7880 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7881 Windows files. Use GetFilesAttributes() in this case to check for file
7882 existence instead of returning with an error code.
7884 2011-08-01 Vincent Celier <celier@adacore.com>
7886 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7887 High is above Source length.
7889 2011-08-01 Robert Dewar <dewar@adacore.com>
7891 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7893 2011-08-01 Robert Dewar <dewar@adacore.com>
7895 * aspects.ads (Boolean_Aspects): New subtype.
7896 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7897 for derived types in cases where the parent type and derived type have
7899 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7900 with aspects when parent type also has aspects.
7901 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7902 boolean expression at this point).
7903 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7904 accordance with final decision on the Ada 2012 feature.
7905 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7907 2011-08-01 Matthew Heaney <heaney@adacore.com>
7909 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7911 2011-08-01 Pascal Obry <obry@adacore.com>
7913 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7914 Fix Replace_Slice when High is above current string size.
7915 (Replace_Slice): Fix DL computation when High is above current
7918 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7920 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7922 2011-08-01 Matthew Heaney <heaney@adacore.com>
7924 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7927 2011-08-01 Pascal Obry <obry@adacore.com>
7929 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7932 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7934 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7935 access to protected subprograms in generic bodies.
7936 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7937 protected type, indicate that the convention of the subprogram is
7938 Convention_Protected, because it may be used in subsequent declarations
7939 within the protected declaration.
7941 2011-08-01 Vincent Celier <celier@adacore.com>
7943 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7944 and "final" procedures when the name of the library is "ada", to avoid
7945 duplicate symbols "adainit" and "adafinal" in executables.
7947 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7949 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7950 quantified expression that appears within a postcondition and uses the
7951 Ada2012 'Result attribute.
7953 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7955 * init.c (__gnat_error_handler): Cast reason to int.
7956 (__gnat_install_handler): Explain sa_sigaction use.
7958 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7960 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7961 subprogram has copy-in copy-out parameters, try to promote the mode of
7962 the return type if it is passed in registers.
7964 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7966 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7967 left operand as addressable.
7969 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7971 * gcc-interface/gigi.h (build_function_stub): Remove.
7972 (build_return_expr): Likewise.
7973 (convert_vms_descriptor): Declare.
7974 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7975 (build_function_stub): Move to...
7976 * gcc-interface/utils2.c (build_return_expr): Move to...
7977 * gcc-interface/trans.c (build_function_stub): ...here.
7978 (build_return_expr): ...here.
7979 (Subprogram_Body_to_gnu): Add local variable for language_function.
7980 Disconnect the parameter attributes cache, if any, once done with it.
7981 Call end_subprog_body only after setting the end_locus.
7982 Build the stub associated with the function, if any, at the very end.
7983 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7984 variables and streamline control flow.
7986 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7989 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7992 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7995 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7996 Assign to act.sa_sigaction.
7997 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7998 current->return_address to char * before arithmetic.
8000 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8002 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8003 Correct argument types.
8004 Extract code from reason.
8005 (__gnat_install_handler): Assign to act.sa_sigaction.
8007 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
8009 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8010 (GNAT1_OBJS): ...here.
8012 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
8015 * g-socthi-mingw.adb (Fill): Fix formatting.
8017 * gcc-interface/gigi.h: Move around comment.
8019 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8022 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8024 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
8027 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8029 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
8031 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8032 range comparison if Pmode is SImode.
8034 2011-07-12 Laurent GUERBY <laurent@guerby.net>
8035 Eric Botcazou <ebotcazou@adacore.com>
8037 * adadecode.c: Wrap up in extern "C" block.
8038 * adadecode.h: Likewise.
8039 * adaint.c: Likewise. Remove 'const' keyword.
8040 * adaint.h: Likewise.
8042 * atree.h: Likewise.
8044 * cstreams.c: Likewise.
8048 * final.c: Likewise.
8050 * initialize.c: Likewise.
8052 * namet.h: Likewise.
8053 * nlists.h: Likewise.
8054 * raise.c: Likewise.
8055 * raise.h: Likewise.
8056 * repinfo.h: Likewise.
8057 * seh_init.c: Likewise.
8058 * targext.c: Likewise.
8059 * tracebak.c: Likewise.
8060 * uintp.h: Likewise.
8061 * urealp.h: Likewise.
8062 * xeinfo.adb: Wrap up generated C code in extern "C" block.
8063 * xsinfo.adb: Likewise.
8064 * xsnamest.adb: Likewise.
8065 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8066 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8067 * gcc-interface/misc.c: Likewise.
8068 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8069 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
8070 ada/targext.o here...
8071 (GNAT_ADA_OBJS): ...and not here.
8072 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8073 (GNATBIND_OBJS): Reorder.
8075 2011-07-07 Richard Henderson <rth@redhat.com>
8077 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8078 dwarf2out_frame_init.
8080 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
8082 * gcc-interface/misc.c (gnat_init): Tweak previous change.
8084 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8087 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8089 2011-07-06 Richard Guenther <rguenther@suse.de>
8091 * gcc-interface/misc.c (gnat_init): Merge calls to
8092 build_common_tree_nodes and build_common_tree_nodes_2.
8093 Re-initialize boolean_false_node.
8095 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
8096 Olivier Hainque <hainque@adacore.com>
8097 Nicolas Setton <setton@adacore.com>
8099 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8100 the type according to the ARTIFICIAL_P parameter.
8101 (create_type_decl): Likewise.
8102 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8104 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
8106 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8107 (gnatbind): Likewise.
8109 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8111 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8113 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8115 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8116 local variable throughout. Remove useless call to Base_Type.
8117 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8118 Take it also into account for the volatileness of the field. Set the
8119 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
8121 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8123 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8124 on a dereference built for a by-ref object if it has an address clause.
8126 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8128 * einfo.ads (Address_Taken): Document use for the second argument of
8129 Asm_Input and Asm_Output attributes.
8130 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8131 argument is an entity name, then set Address_Taken on it.
8132 <Attribute_Asm_Output>: Likewise.
8133 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8134 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8135 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8136 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8138 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
8141 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8143 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8145 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8146 (ada/utils.o): Update dependencies.
8147 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8148 ../../../libcpp/libcpp.a.
8149 * gcc-interface/utils.c: Include common/common-target.h.
8150 (process_attributes): Use targetm_common.have_named_sections.
8152 2011-06-07 Richard Guenther <rguenther@suse.de>
8154 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8157 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8159 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8160 TREE_THIS_NOTRAP flag.
8162 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8164 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8167 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8169 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8170 constants whose full view has discriminants specially.
8172 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8174 * gcc-interface/utils.c: Include diagnostic.h.
8175 (gnat_write_global_declarations): Output debug information for all
8176 global type declarations before finalizing the compilation unit.
8177 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8179 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8181 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8183 2011-05-25 Kai Tietz <ktietz@redhat.com>
8185 * adaint.c (__gnat_to_canonical_file_list_next): Use array
8186 initialization instead of const/none-const pointer assignment.
8188 2011-05-24 Joseph Myers <joseph@codesourcery.com>
8190 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8191 $(EXTRA_GNAT1_OBJS).
8192 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8193 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8194 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8195 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8196 libcommon-target.a instead of prefix.o.
8198 2011-05-21 Joseph Myers <joseph@codesourcery.com>
8201 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8203 2011-05-20 Joseph Myers <joseph@codesourcery.com>
8205 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8206 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8207 instead of version.o.
8209 2011-05-18 Kai Tietz <ktietz@redhat.com>
8211 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8212 boolean_false_node instead of integer_zero_node.
8213 (convert_with_check): Likewise.
8214 * gcc-interface/decl.c (choices_to_gnu): Likewise.
8216 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
8218 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8219 type of the parameter is an unconstrained array, convert the actual to
8220 the type of the formal in the In Out and Out cases as well.
8222 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8224 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8225 call build_function_type_array or build_varargs_function_type_array
8227 (create_subprog_type): Don't call build_function_type; call
8228 build_function_type_vec instead.
8230 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8232 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8233 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8234 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8236 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
8238 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8240 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8241 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8243 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8245 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8247 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8249 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8250 instead of accessing TYPE_ARG_TYPES directly.
8251 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8253 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8256 * gcc-interface/gigi.h (get_variant_part): Declare.
8257 * gcc-interface/decl.c (get_variant_part): Make global.
8258 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8259 types have the same constant size, are record types and T1 has a
8260 variant part while T2 doesn't.
8262 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8264 * gcc-interface/utils.c (begin_subprog_body): Do not call
8266 (end_subprog_body): Likewise.
8268 2011-05-04 Richard Guenther <rguenther@suse.de>
8270 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8272 (pos_to_constructor): Likewise.
8274 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8275 Eric Botcazou <ebotcazou@adacore.com>
8277 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8278 of build_function_type. Adjust calls to...
8279 (build_raise_check): ...this. Do not take a void_tree parameter.
8280 Call build_function_type_list instead of build_function_type.
8281 Fix head comment and swap couple of conditional blocks.
8283 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8285 * gnatvsn.ads (Library_Version): Bump to 4.7.
8286 (Current_Year): Bump to 2011.
8288 2011-04-29 Michael Matz <matz@suse.de>
8290 * gcc-interface/misc.c (gnat_handle_option): Set
8291 warn_maybe_uninitialized.
8293 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8295 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8296 the Watson/McCabe paper.
8298 2011-04-23 Jim Meyering <meyering@redhat.com>
8300 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8302 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8304 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8307 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8309 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8311 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8312 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8313 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8314 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8315 <all>: Do not set flags on the reused DECL node coming from an alias.
8316 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8317 don't need debug info here...
8318 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8319 (gigi): Adjust calls to create_subprog_decl.
8320 (build_raise_check): Likewise.
8321 (establish_gnat_vms_condition_handler): Likewise.
8322 (Compilation_Unit_to_gnu): Likewise.
8323 (gnat_to_gnu): Likewise.
8325 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8327 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8328 (NO_REORDER_ADAFLAGS): New variable.
8329 (EXTRA_GNATTOOLS): Always define.
8330 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8331 Clean up and adjust list of files compiled with special options.
8332 * gcc-interface/Make-lang.in: Likewise.
8333 (ada/decl.o): Cosmetical change.
8334 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8336 2011-04-20 Jim Meyering <meyering@redhat.com>
8338 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8340 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8342 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8343 $(CFLAGS) on the link line.
8345 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8347 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8348 padded type built for the return type if it is unconstrained.
8350 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8352 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8354 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8356 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8357 before calling TREE_CHAIN.
8358 * gcc-interface/misc.c (gnat_init_ts): New function.
8359 (LANG_HOOKS_INIT_TS): Define.
8361 2011-04-12 Martin Jambor <mjambor@suse.cz>
8363 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8364 instead of cgraph_node.
8366 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8368 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8369 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8372 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8374 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8375 of aggregate types that contain a placeholder.
8377 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8379 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8381 (handle_type_generic_attribute): Likewise.
8383 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8386 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8388 2011-04-04 Kai Tietz <ktietz@redhat.com>
8391 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8394 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8396 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8397 type case, do not strip a padding type around the array type.
8399 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8401 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8404 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8406 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8407 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8408 code for -feliminate-unused-debug-types.
8409 (gnat_post_options): Likewise.
8411 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8413 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8414 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8417 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8419 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8420 DECL_ARTIFICIAL flag on enumeration types.
8422 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8424 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8425 fat pointer types artificial unconditionally.
8426 <E_Array_Subtype>: Attach the base array type as a parallel type if it
8429 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8431 * gcc-interface/gigi.h (get_dummy_type): Declare.
8432 (build_dummy_unc_pointer_types): Likewise.
8433 (finish_fat_pointer_type): Likewise.
8434 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8435 fat pointer type has been built, complete it in place.
8436 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8437 and thin pointers. Remove useless variable.
8438 (finish_fat_pointer_type): Make global and move to...
8439 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8440 (get_dummy_type): New function.
8441 (build_dummy_unc_pointer_types): Likewise.
8442 (gnat_pushdecl): Propage the name to the anonymous variants only.
8443 (update_pointer_to): Only adjust the pointer types in the unconstrained
8446 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8448 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8449 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8450 if this is a Taft amendment type and the full declaration is available.
8451 * gcc-interface/trans.c (process_type): Likewise.
8452 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8453 (process_freeze_entity): Likewise.
8454 * gcc-interface/utils.c (dummy_global): New static variable.
8455 (gnat_write_global_declarations): If there are types declared as used
8456 at the global level, insert them in the global hash table.
8458 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8460 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8461 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8462 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8464 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
8465 flag of the type accordingly.
8466 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8468 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8470 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8471 finalizing types when updating the pointers to the designated type.
8472 <all>: Finalize the deferred types even if we didn't defer processing
8473 of incomplete types in this invocation.
8475 2011-04-01 Olivier Hainque <hainque@adacore.com>
8476 Nicolas Setton <setton@adacore.com>
8477 Eric Botcazou <ebotcazou@adacore.com>
8479 * gcc-interface/misc.c (gnat_descriptive_type): New function.
8480 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8482 2011-03-28 Kai Tietz <ktietz@redhat.com>
8484 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8486 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8487 * system-mingw.ads (System): Change ZCX_By_Default default to True.
8489 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8491 2011-03-28 Tristan Gingold <gingold@adacore.com>
8494 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8495 Use ada output of gnatbind.
8496 (ada/b_gnatb.adb): Ditto.
8497 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8498 (ada.mostlyclean, ada.stage1)
8499 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8500 (ada.stagefeedback): Adjust.
8501 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8502 Use ada output of gnatbind.
8503 (b_gnatm.adb): Ditto.
8504 (b_gnatl.o, b_gnatm.o): New rules.
8506 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8508 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8509 for the padded type built to support a specified size or alignment.
8511 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8513 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8514 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8515 unconditionally to the end of the unit when the designated type is
8517 <all>: Rename local variable. Attempt to un-defer types only and do it
8518 for limited_with'ed types as well.
8519 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
8520 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8521 consistently and remove redundant call to finalize_from_with_types.
8523 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
8525 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8526 subprograms without a previous spec declared in the same unit.
8527 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8528 subprograms at the end of the unit instead of at the beginning.
8529 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8530 isn't public for the special handling of non-inline functions nested
8531 inside inline external functions.
8533 2011-03-25 Jeff Law <law@redhat.com>
8535 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8537 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8539 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8540 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8541 to compute Set_Size_Depends_On_Discriminant.
8542 (Layout_Type): Call it on array types in back-end layout mode.
8543 * sem_util.adb (Requires_Transient_Scope): Return true for array
8544 types only if the size depends on the value of discriminants.
8545 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8546 type if the RHS is a call to a function that returns an unconstrained
8547 type with default discriminant.
8549 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
8551 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8552 non-conversion to the nominal result type at the end.
8554 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8556 * gcc-interface/trans.c (create_temporary): New function taken from...
8557 (create_init_temporary): ...here. Call it.
8558 (call_to_gnu): Create the temporary for the return value early, if any.
8559 Create it for a function with copy-in/copy-out parameters if there is
8560 no target; in other cases of copy-in/copy-out, use another temporary.
8561 Push the new binding level lazily. Add and rename local variables.
8563 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8565 * gcc-interface/decl.c (validate_size): Improve comments and tweak
8567 (set_rm_size): Likewise.
8569 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
8571 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8572 for the padded type built in order to support a specified alignment.
8573 Fix incorrect formatting.
8575 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8578 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8580 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8582 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8583 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8584 to the end of the list. Adjust recursive call. Rename local variable.
8585 If REORDER is true, reorder components of the record type.
8586 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8587 components_to_record and adjust the parameter list.
8589 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8591 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8592 disabled, use the variable for bounds of loop iteration scheme.
8594 2011-03-21 Kai Tietz <ktietz@redhat.com>
8597 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8599 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8601 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8602 out whether the expression is read-only. Short-circuit placeholder
8603 case and rename a couple of local variables.
8605 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8607 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8608 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8609 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8610 (convert): Deal with conversions from a smaller form type specially.
8612 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8614 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8615 its argument, except for the special -I- switch.
8617 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8619 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8622 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8624 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8626 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8628 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8630 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8631 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8632 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8633 Do not generate the check directly, instead instantiate the template
8634 check present in the descriptor.
8635 (make_descriptor_field): Move around.
8636 (build_vms_descriptor32): Build a template check in the POINTER field.
8637 (build_vms_descriptor): Remove useless suffixes.
8638 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8640 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8643 * targext.c: Include target files if IN_RTS is defined.
8645 2011-01-26 Richard Guenther <rguenther@suse.de>
8648 * targext.c: Include config.h.
8649 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8652 2011-01-04 Pascal Obry <obry@adacore.com>
8653 Eric Botcazou <ebotcazou@adacore.com>
8655 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8657 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8659 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8660 end-of-case on the end label and its associated gotos, if any.
8662 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8664 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8665 expressions of the parameter cache within the statement group of
8668 2011-01-04 Olivier Hainque <hainque@adacore.com>
8669 Eric Botcazou <ebotcazou@adacore.com>
8671 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8672 (set_end_locus_from_node): New function.
8673 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8674 make and the function end_locus.
8675 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8676 for the elaboration subprogram.
8677 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8678 set the end_locus of the expression as well.
8680 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8683 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8684 variables that are referenced in exception handlers volatile.
8688 Copyright (C) 2011 Free Software Foundation, Inc.
8690 Copying and distribution of this file, with or without modification,
8691 are permitted in any medium without royalty provided the copyright
8692 notice and this notice are preserved.