1 2011-09-01 Robert Dewar <dewar@adacore.com>
3 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
5 2011-09-01 Bob Duff <duff@adacore.com>
7 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
8 body" the same as "in inlined body", because visibility shouldn't
11 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
13 * inline.adb (Add_Inlined_Body): Refine previous change.
15 2011-09-01 Gary Dismukes <dismukes@adacore.com>
17 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
18 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
19 Test for case where call
20 initializes an object of a return statement before testing for
21 a constrained call, to ensure that all such cases get handled
22 by simply passing on the caller's parameters. Also, in that
23 case call Needs_BIP_Alloc_Form to determine whether to pass on
24 the BIP_Alloc_Form parameter of the enclosing function rather
25 than testing Is_Constrained. Add similar tests for the return
26 of a BIP call to later processing to ensure consistent handling.
27 (Needs_BIP_Alloc_Form): New utility function.
28 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
29 a BIP_Alloc_Form formal with call to new utility function
32 2011-09-01 Pascal Obry <obry@adacore.com>
34 * prj-part.adb: Minor reformatting.
36 2011-09-01 Vincent Celier <celier@adacore.com>
38 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
39 half character in the unit name.
41 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
43 * exp_ch4.adb: Minor code and comment reformatting.
45 2011-09-01 Thomas Quinot <quinot@adacore.com>
47 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
48 for Is_Limited_Type and Is_Tagged_Type in condition checking
49 for by-reference type.
50 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
51 subprograms may have a completion because of a previous
52 Inline_Always clause, but the enclosing package must be marked
53 inlined for the subprogram body to become visible to the backend.
55 2011-09-01 Thomas Quinot <quinot@adacore.com>
57 * sem_aux.adb, exp_ch4.adb: Minor reformatting
59 2011-09-01 Pascal Obry <obry@adacore.com>
61 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
63 2011-09-01 Ed Schonberg <schonberg@adacore.com>
65 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
66 the formals of a subprogram stub that acts as a spec.
68 2011-09-01 Ed Schonberg <schonberg@adacore.com>
70 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
71 type, declare a renaming for it, not an object declaration.
73 2011-09-01 Yannick Moy <moy@adacore.com>
75 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
76 Ignore_Errors to ignore failures to read ALI files when True.
78 2011-09-01 Javier Miranda <miranda@adacore.com>
80 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
81 constructor calls associated with non-tagged record types.
83 2011-09-01 Robert Dewar <dewar@adacore.com>
85 * g-socthi-vms.adb: Minor reformatting.
87 2011-09-01 Nicolas Roche <roche@adacore.com>
89 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
90 in order to avoid impact of imcompatible changes.
91 * cstreams.c: Likewise
95 2011-09-01 Yannick Moy <moy@adacore.com>
97 * lib-writ.adb (Write_With_Lines): Always output complete information
98 on "with" line in Alfa mode, as this is required by formal verification
101 2011-09-01 Tristan Gingold <gingold@adacore.com>
103 * g-socthi-vms.adb: Add comments.
105 2011-09-01 Pascal Obry <obry@adacore.com>
107 * prj.ads: Minor reformatting.
109 2011-09-01 Vincent Celier <celier@adacore.com>
111 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
112 exceptions in the config pragmas file.
114 2011-09-01 Tristan Gingold <gingold@adacore.com>
116 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
118 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
120 * exp_ch7.adb (Find_Insertion_List): New routine.
121 (Process_Transient_Objects): Add code to handle the abnormal
122 finalization of a controlled transient associated with a subprogram
123 call. Since transients are cleaned up right after the associated
124 context, an exception raised during a subprogram call may bypass the
127 2011-09-01 Robert Dewar <dewar@adacore.com>
129 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
132 2011-09-01 Robert Dewar <dewar@adacore.com>
134 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
136 2011-09-01 Robert Dewar <dewar@adacore.com>
138 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
140 2011-09-01 Thomas Quinot <quinot@adacore.com>
142 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
143 GNATRTL_NONTASKING_OBJS.
145 2011-09-01 Robert Dewar <dewar@adacore.com>
147 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
148 possibility of this flag being set for formals in Ada 2012 mode.
149 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
151 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
153 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
155 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
158 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
160 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
161 insertion node in a tree of nested Expression_With_Actions nodes.
162 (Process_Transient_Object): In the case where a complex if statement
163 has been converted into nested Expression_With_Actions nodes, the
164 "hook" object and the associated access type must be inserted before
165 the top most Expression_With_Actions.
167 2011-09-01 Robert Dewar <dewar@adacore.com>
169 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
170 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
172 2011-09-01 Ed Schonberg <schonberg@adacore.com>
174 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
176 2011-09-01 Jose Ruiz <ruiz@adacore.com>
178 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
180 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
181 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
182 in a similar way as we do for the Priority or Dispatching_Domain aspect.
183 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
184 Dispatching_Domains_Frozen): Move this local data to package
185 System.Tasking because with the CPU aspect we need to have access
186 to this data when creating the task in System.Tasking.Stages.Create_Task
187 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
188 Move these variables from the body of
189 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
190 we need to have access to this data when creating the task in
191 System.Tasking.Stages.Create_Task.
192 * s-taskin.adb (Initialize): Signal the allocation of the environment
193 task to a CPU, if any, so that we know whether the CPU can be
194 transferred to a different dispatching domain.
195 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
196 is being allocated belongs to the dispatching domain where the task
197 lives. Signal the allocation of the task to a CPU, if any, so that we
198 know whether the CPU can be transferred to a different dispatching
201 2011-09-01 Ed Schonberg <schonberg@adacore.com>
203 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
204 attributes Same_Storage and Overlaps_Storage.
206 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
208 * exp_strm.adb: Remove with and use clause for Opt.
209 (Build_Array_Input_Function): Remove the version-dependent generation
210 of the return statement. The Ada 2005 tree is now the default.
212 2011-09-01 Yannick Moy <moy@adacore.com>
214 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
215 it is never empty when compiling in Alfa mode.
217 2011-09-01 Robert Dewar <dewar@adacore.com>
219 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
220 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
221 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
222 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
224 2011-09-01 Matthew Heaney <heaney@adacore.com>
226 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
227 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
228 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
229 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
230 unbounded queue container.
231 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
232 bounded queue container.
233 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
234 unbounded priority queue container.
235 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
236 bounded priority queue container.
238 2011-08-31 Pascal Obry <obry@adacore.com>
240 * a-direct.adb: Do not try to create an UNC path on Windows.
241 (Create_Path): Skip leading computer name in UNC path if any.
243 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
245 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
246 version-dependent generation of the return statement. The Ada 2005 tree
249 2011-08-31 Thomas Quinot <quinot@adacore.com>
251 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
252 types Stream_Element_Offset and Storage_Offset have a different native
253 type depending on whether the platform is 32 or 64 bits. When
254 exchanging them, always convert to 64 bits.
256 2011-08-31 Yannick Moy <moy@adacore.com>
258 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
259 --force-alfa to gnat2why.
261 2011-08-31 Ed Schonberg <schonberg@adacore.com>
263 * sem_ch12.adb (Save_References): If the node has aspects, save
264 references within the corresponding expressions in a separate step,
265 because the aspects are not directly in the tree for the declaration
266 to which they belong.
268 2011-08-31 Arnaud Charlet <charlet@adacore.com>
270 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
271 in CodePeer mode, since representation clauses are partially ignored.
272 * gcc-interface/Make-lang.in: Update dependencies.
274 2011-08-31 Jose Ruiz <ruiz@adacore.com>
276 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
277 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
278 to any dispatching domain.
280 2011-08-31 Thomas Quinot <quinot@adacore.com>
282 * exp_ch4.adb: Minor reformatting.
284 2011-08-31 Bob Duff <duff@adacore.com>
286 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
287 on nodes for which it is not defined.
288 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
291 2011-08-31 Bob Duff <duff@adacore.com>
293 * sem_ch3.adb (Process_Full_View): Disable legality check if
294 In_Instance, to avoid spurious errors.
295 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
296 if In_Instance, to avoid spurious errors.
298 2011-08-31 Pascal Obry <obry@adacore.com>
300 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
301 directory speparators.
302 (Compose): Use Dir_Seps to handle both forms.
303 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
305 (Extension): Use Dir_Seps to handle both forms.
307 2011-08-31 Pascal Obry <obry@adacore.com>
309 * prj-conf.adb: Minor reformatting.
311 2011-08-31 Jose Ruiz <ruiz@adacore.com>
313 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
314 dispatching domain aspect.
315 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
317 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
318 Dispatching_Domain aspect in a similar way as we do for the Priority
320 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
321 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
323 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
324 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
325 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
326 Dispatching_Domain and add it to the task definition.
327 (Sig_Flags): Add Pragma_Dispatching_Domain.
328 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
329 support to find the types Dispatching_Domain and
330 Dispatching_Domain_Access.
331 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
332 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
333 query the availability of a pragma Dispatching_Domain.
334 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
335 the expander to pass the Dispatching_Domain when creating a task.
336 (Name_Dispatching_Domain): Add this new name for a pragma.
337 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
338 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
339 task has been allocated at creation time.
340 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
341 Ravenscar is always null.
342 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
343 the task has been allocated at creation time.
344 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
345 a specific dispatching domain.
346 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
347 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
348 and CPU are specified for the task, and the CPU value is not contained
349 within the range of processors for the domain.
351 2011-08-31 Vincent Celier <celier@adacore.com>
353 * make.adb (Original_Gcc) : New constant String_Access.
354 (Gnatmake): For VM targets, do not use VM version of the compiler if
355 --GCC= has been specified.
357 2011-08-31 Thomas Quinot <quinot@adacore.com>
359 * sem_ch5.adb: Minor reformatting.
361 2011-08-31 Ed Schonberg <schonberg@adacore.com>
363 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
366 2011-08-31 Bob Duff <duff@adacore.com>
368 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
369 the access type is private; we don't care about privacy in expansion.
371 2011-08-31 Ed Schonberg <schonberg@adacore.com>
373 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
374 subcomponents tnat may be limited, because they originate in view
375 conflicts. If the original aggregate is legal and the actuals are
376 legal, the aggregate itself is legal.
378 2011-08-31 Matthew Heaney <heaney@adacore.com>
380 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
383 2011-08-31 Ed Schonberg <schonberg@adacore.com>
385 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
388 2011-08-31 Jose Ruiz <ruiz@adacore.com>
390 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
391 Interrupt_Priority aspects, force the analysis of the aspect expression
392 (when building the equivalent pragma). Otherwise, its analysis is done
393 too late, after the task or protected object has been created.
394 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
395 Analyze_Single_Task_Declaration): Remove the code to move the aspects
396 to the object declaration because they are needed in the type
399 2011-08-31 Robert Dewar <dewar@adacore.com>
401 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
402 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
405 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
407 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
408 if the corresponding type is malformed due to restriction violations.
410 2011-08-31 Robert Dewar <dewar@adacore.com>
412 * s-ransee.ads, s-ransee.adb: Minor reformatting.
414 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
416 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
417 would cause the generation of Set_Finalize_Address if the target is a
418 VM and the designated type is not derived from [Limited_]Controlled.
420 2011-08-31 Arnaud Charlet <charlet@adacore.com>
422 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
424 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
425 case of a compilation error.
427 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
429 * init.c (__gnat_error_handler): Standardize the stack overflow or
430 erroneous memory access message.
431 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
432 or erroneous memory access message.
434 2011-08-31 Robert Dewar <dewar@adacore.com>
436 * sem_ch4.adb: Minor reformatting.
437 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
439 2011-08-31 Thomas Quinot <quinot@adacore.com>
441 * scos.ads: Minor documentation clarification.
442 * put_scos.adb: Do not generate SCO unit header line for a unit that
445 2011-08-31 Robert Dewar <dewar@adacore.com>
447 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
449 2011-08-31 Tristan Gingold <gingold@adacore.com>
451 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
452 hold variables between these following subprograms.
453 (Build_Exception_Handler, Build_Object_Declarations,
454 Build_Raise_Statement): Use the above type as parameter.
455 Make the above adjustments.
456 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
458 2011-08-31 Pascal Obry <obry@adacore.com>
460 * projects.texi: Minor reformatting.
462 2011-08-31 Tristan Gingold <gingold@adacore.com>
464 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
465 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
467 2011-08-31 Ed Schonberg <schonberg@adacore.com>
469 * exp_ch5.adb: Minor code cleanup.
470 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
471 prevent cascaded errors.
472 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
473 variable of an iterator specification in current scope.
474 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
475 postconditions on the stack, as they contain no return statements.
477 2011-08-31 Yannick Moy <moy@adacore.com>
479 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
480 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
481 call Qualify_Entity_Names.
482 (Expand_Alfa): call Qualify_Entity_Names in more cases
483 * lib-xref-alfa.adb: Take into account system package.
484 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
485 CodePeer mode in which we are interested in finding bugs even if
486 compiler cannot compile source.
487 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
490 2011-08-31 Gary Dismukes <dismukes@adacore.com>
492 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
493 denoted by the subtype mark to ensure getting the concurrent type in
494 the case where the subtype mark denotes a private subtype of a
495 concurrent type (needed when using -gnatc).
496 (Process_Subtype): For the processing specific to type kinds, case on
497 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
498 subtype denotes a private subtype whose base type is nonprivate (needed
499 for subtypes of private fulfilled by task types when compiling with
502 2011-08-31 Gary Dismukes <dismukes@adacore.com>
504 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
505 late primitives that override interface operations when the full
506 expander is not active, to avoid blowups in Register_Primitive when
507 types don't have associated secondary dispatch tables.
509 2011-08-31 Yannick Moy <moy@adacore.com>
511 * alfa_test.adb: Code clean up.
513 2011-08-31 Marc Sango <sango@adacore.com>
515 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
516 by Comes_From_Source (Original_Node (N)) in order to treat also the
517 nodes which have been rewritten.
518 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
519 explicit dereference and slice violation in spark mode on the nodes
520 coming only from the source code.
522 2011-08-31 Robert Dewar <dewar@adacore.com>
524 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
525 lib-xref-alfa.adb: Minor reformatting.
527 2011-08-31 Matthew Heaney <heaney@adacore.com>
529 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
531 2011-08-31 Javier Miranda <miranda@adacore.com>
533 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
534 only for class-wide subprograms conflicting with entities of concurrent
537 2011-08-31 Matthew Heaney <heaney@adacore.com>
539 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
542 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
544 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
545 general description of the routine.
547 2011-08-31 Ed Schonberg <schonberg@adacore.com>
549 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
552 2011-08-31 Gary Dismukes <dismukes@adacore.com>
554 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
555 check is needed for a left-hand side that is a dereference, and the
556 base type is private without discriminants (whereas the full type does
557 have discriminants), an extra retrieval of the underlying type may be
558 needed in the case where the subtype is a record subtype whose base
559 type is private. Update comments.
561 2011-08-31 Javier Miranda <miranda@adacore.com>
563 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
564 found check if there is a class-wide subprogram covering the primitive.
566 2011-08-31 Yannick Moy <moy@adacore.com>
568 * sem_res.adb: Further cases where full expansion test is needed,
569 rather than expansion test.
571 2011-08-31 Pascal Obry <obry@adacore.com>
573 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
575 2011-08-31 Ed Schonberg <schonberg@adacore.com>
577 * exp_ch5.adb: Handle iterators over derived container types.
579 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
581 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
582 (Has_Anonymous_Master): New routine.
583 (Set_Has_Anonymous_Master): New routine.
584 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
585 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
586 (Current_Anonymous_Master): New routine.
587 (Current_Unit_First_Declaration): Removed.
588 (Current_Unit_Scope): Removed.
589 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
590 their objects on a per-unit heterogeneous finalization master.
592 2011-08-31 Matthew Heaney <heaney@adacore.com>
594 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
597 2011-08-31 Jose Ruiz <ruiz@adacore.com>
599 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
602 2011-08-31 Gary Dismukes <dismukes@adacore.com>
604 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
605 where the actual is an unexpanded call to 'Input.
607 2011-08-31 Yannick Moy <moy@adacore.com>
609 * sem_ch4.adb: Code clean up.
611 2011-08-31 Yannick Moy <moy@adacore.com>
613 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
615 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
617 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
618 and TSS primitive Finalize_Address if finalization is suppressed.
619 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
620 primitive Finalize_Address if finalization is suppressed.
622 2011-08-31 Jose Ruiz <ruiz@adacore.com>
624 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
625 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
626 sure that the underlying task has already been created before trying
627 to change its affinity.
628 (Set_CPU): Use the term processor instead of CPU, as we do in
631 2011-08-31 Vincent Celier <celier@adacore.com>
633 * prj-attr.adb: New Compiler attribute Source_File_Switches.
634 * prj-nmsc.adb (Process_Compiler): Process attribute
635 Source_File_Switches.
636 * prj.ads (Language_Config): New name list component
637 Name_Source_File_Switches.
638 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
640 2011-08-31 Ed Schonberg <schonberg@adacore.com>
642 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
643 discriminated component of an actual, expand at once to prevent
644 ouf-of-order references with generated subtypes.
646 2011-08-31 Yannick Moy <moy@adacore.com>
648 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
649 reference to operator in Alfa xrefs.
651 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
653 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
654 where the parent instance was frozen before the current instance due to
655 the presence of a source body. Update calls to Insert_After_Last_Decl.
656 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
657 Update the comment which illustrates the purpose of the routine.
658 Package instances are now frozen by source bodies which appear after
659 the instance. This ensures that entities coming from within the
660 instance are available for use in the said bodies.
661 (Install_Body): Add code to handle the case where the parent instance
662 was frozen before the current instance due to the presence of a source
663 body. Update calls to Insert_After_Last_Decl.
665 2011-08-31 Jose Ruiz <ruiz@adacore.com>
667 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
669 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
671 2011-08-31 Yannick Moy <moy@adacore.com>
673 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
675 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
676 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
677 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
678 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
679 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
680 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
681 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
682 ALFA in Alfa (we dropped acronym).
683 * einfo.adb (Primitive_Operations): Correctly return list of primitive
684 operations in a case where it returned previously No_Elist.
686 2011-08-31 Robert Dewar <dewar@adacore.com>
688 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
689 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
690 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
691 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
692 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
693 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
696 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
698 * sem_ch12 (Check_Private_View): Revert previous change.
699 * sem_res.adb (Conversion_Check): Do not emit the error message if the
700 conversion is in a generic instance.
702 2011-08-31 Matthew Heaney <heaney@adacore.com>
704 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
705 * a-chtgbo.adb (Free): Allow 0 as index value.
707 2011-08-31 Matthew Heaney <heaney@adacore.com>
709 * a-cborma.adb (Insert): Add comment to explain why no element
712 2011-08-31 Gary Dismukes <dismukes@adacore.com>
714 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
715 spec discriminant is already a concurrent type, in which case just use
716 it, otherwise fetch the Corresponding_Concurrent_Type as before.
718 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
720 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
721 system-linux-mips.ads, system-linux-mipsel.ads,
722 system-linux-mips64el.ads, system-linux-ppc64.ads,
723 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
725 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
727 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
728 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
729 (build_unary_op): Likewise.
731 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
733 * raise-gcc.c: Do not include coretypes.h and tm.h.
734 (setup_to_install): Remove test for compiler macro.
735 * targext.c: Document use for the library.
736 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
738 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
740 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
741 the expression to the nominal type if the latter is a record type with
742 a variant part and the type of the former is a record type without one.
744 2011-08-30 Yannick Moy <moy@adacore.com>
746 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
747 expansion in Alfa mode.
748 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
749 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
751 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
752 * sem_res.adb: Ditto.
753 * gcc-interface/Make-lang.in: Update dependencies.
755 2011-08-30 Thomas Quinot <quinot@adacore.com>
757 * g-socket.ads: Minor documentation adjustment.
759 2011-08-30 Robert Dewar <dewar@adacore.com>
761 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
763 2011-08-30 Yannick Moy <moy@adacore.com>
765 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
766 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
767 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
768 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
769 Revert change which introduced files for "light"
770 expansion, to be replaced by a single file for Alfa expansion.
772 2011-08-30 Robert Dewar <dewar@adacore.com>
774 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
775 Minor code reorg/reformatting.
777 2011-08-30 Yannick Moy <moy@adacore.com>
779 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
780 common shorthand for (Expander_Active and not ALFA_Mode) that can be
781 used for testing full expansion, that is active expansion not in the
782 reduced mode for Alfa
783 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
784 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
785 of the verbose (Expander_Active and not ALFA_Mode)
787 2011-08-30 Tristan Gingold <gingold@adacore.com>
789 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
790 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
791 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
792 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
794 2011-08-30 Gary Dismukes <dismukes@adacore.com>
796 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
797 access conversions to check that the conversion is a rewritten node,
798 rather than just having Comes_From_Source set to False, which wasn't
801 2011-08-30 Robert Dewar <dewar@adacore.com>
803 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
804 g-socket.ads: Minor reformatting.
806 2011-08-30 Thomas Quinot <quinot@adacore.com>
808 * sem_util.adb: Minor reformatting.
810 2011-08-30 Tristan Gingold <gingold@adacore.com>
812 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
813 to be compliant with the ABI.
815 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
817 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
818 of a designated type when the related access type is an actual in an
819 instance. This ensures that the full view of designated type is
820 available when inside the body of the instance.
822 2011-08-30 Ed Schonberg <schonberg@adacore.com>
824 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
825 in a position to be modified, a slice is treated like an indexed
828 2011-08-30 Thomas Quinot <quinot@adacore.com>
830 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
831 field tv_sec in struct timeval.
833 2011-08-30 Yannick Moy <moy@adacore.com>
835 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
836 blocks of code doing full expansion, previously only guarded by
837 Expander_Active, by anding the test that ALFA_Mode is not set
839 2011-08-30 Ed Schonberg <schonberg@adacore.com>
841 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
842 add the function to the list of private dependents, for subsequent
843 legality check on Taft amendment types.
844 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
845 Private_Dependents, as for other incomplete types.
846 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
847 Taft-amendment type is used as the return type of a function.
849 2011-08-30 Javier Miranda <miranda@adacore.com>
851 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
852 which emits an error by a call to a new routine which report the error.
853 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
854 entity does not cover an existing interface.
855 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
857 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
858 protected procedures or entries whose mode is not conformant.
859 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
860 an error by a call to a new routine which report the error.
862 2011-08-30 Robert Dewar <dewar@adacore.com>
864 * gnat_rm.texi: Minor change.
865 * exp_attr_light.adb: Minor reformatting.
867 2011-08-30 Ed Schonberg <schonberg@adacore.com>
869 * sem_ch3.adb: Patch inheritance of aspects in
870 Complete_Private_Subtype, to avoid infinite loop.
872 2011-08-30 Javier Miranda <miranda@adacore.com>
874 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
875 been reported and a subprogram covering an interface primitive is not
876 found then skip generating the internal entity. Done to avoid crashing
878 (Check_Abstract_Overriding): Change text of error of wrong formal of
879 protected subprogram or entry. Done for consistency to emit exactly the
880 same error reported by Check_Synchronized_Overriding. In addition, the
881 error is restricted to protected types (bug found working on AI05-0090)
883 2011-08-30 Yannick Moy <moy@adacore.com>
885 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
886 expansion in Alfa mode.
887 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
888 * exp_light.adb, exp_light.ads: New package defining light expansion.
889 * expander.adb (Expand): Call light expansion in Alfa mode
890 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
892 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
894 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
895 * gnat1drv.adb (Adjust_Global_Switches): Comment
897 2011-08-30 Yannick Moy <moy@adacore.com>
899 * lib-xref-alfa.adb: Minor refactoring.
901 2011-08-30 Yannick Moy <moy@adacore.com>
903 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
905 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
906 expansion in Alfa mode.
907 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
910 2011-08-30 Robert Dewar <dewar@adacore.com>
912 * debug_a.adb: Update comment.
914 2011-08-30 Robert Dewar <dewar@adacore.com>
916 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
917 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
918 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
919 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
921 2011-08-30 Robert Dewar <dewar@adacore.com>
923 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
926 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
928 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
929 Build_Finalization_Master by supplying an insertion node and enclosing
930 scope. In its old version, the call did not generate a finalization
932 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
933 recognize anonymous access-to-controlled components. Rewrite the
934 machinery which creates finalization masters to service anonymous
935 access-to-controlled components of a record type. In its current state,
936 only one heterogeneous master is necessary to handle multiple anonymous
938 (Freeze_Type): Comment reformatting.
939 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
941 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
942 associates TSS primitive Finalize_Address with either the master itself
943 or with the internal hash table depending on the mode of operation of
946 2011-08-30 Javier Miranda <miranda@adacore.com>
948 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
949 interface type then do not generate code to compare this component.
950 Required since they have no components and their equality operator is
953 2011-08-30 Steve Baird <baird@adacore.com>
955 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
956 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
957 returns the (static) accessibility level of the object. Otherwise, the
958 same as Type_Access_Level.
959 (Dynamic_Accessibility_Level): New function; given an expression which
960 could occur as the rhs of an assignment to a saooaaat (i.e., an
961 expression of an access-to-object type), return the new value for the
962 saooaaat's associated Extra_Accessibility object.
963 (Effective_Extra_Accessibility): New function; same as
964 Einfo.Extra_Accessibility except that object renames are looked through.
966 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
967 (Dynamic_Accessibility_Level): New function; see sem_util.ads
969 (Effective_Extra_Accessibility): New function; see sem_util.ads
971 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
972 (Extra_Accessibility): Update comments.
973 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
974 except RM_Size field (which is only for types) is unaffected.
976 (Extra_Accessibility): Expand domain to allow objects, not just formals.
977 (Set_Extra_Accessibility): Expand domain to allow objects, not just
979 (Init_Size): Add assertion that we are not trashing the
980 Extra_Accessibility attribute of an object.
981 (Init_Size_Align): Add assertion that we are not trashing the
982 Extra_Accessibility attribute of an object.
983 (Init_Object_Size_Align): New procedure; see einfo.ads description.
984 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
985 differently for the type of a (non-library-level) saooaaat depending
986 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
987 is queried in this set of changes - everything else (in particular,
988 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
989 driven off of the setting of the Is_Local_Anonymous_Access attribute.
990 The special treatment of library-level saooaaats is an optimization,
991 not required for correctnesss. This is based on the observation that the
992 Ada2012 rules (static and dynamic) for saooaaats turn out to be
993 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
995 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
996 false for the type of a saooaaat, declare and initialize its
997 accessibility level object and set the Extra_Accessibility attribute
998 of the saooaaat to refer to this object.
999 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1000 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1001 calls to Effective_Extra_Accessibility in order to support
1002 renames of saooaaats.
1003 (Expand_N_Type_Conversion): Add new local function,
1004 Has_Extra_Accessibility, and call it when determining whether an
1005 accessibility check is needed.
1006 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1007 evaluate to True (without raising an exception).
1009 (Expand_N_Assignment_Statement): When assigning to an Ada2012
1010 saooaaat, update its associated Extra_Accessibility object (if
1011 it has one). This includes an accessibility check.
1012 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1013 a saooaaat, update its Extra_Accessibility object too (if it
1015 (Expand_Call): Replace a couple of calls to Type_Access_Level
1016 with calls to Dynamic_Access_Level to handle cases where
1017 passing a literal (any literal) is incorrect.
1018 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1019 checks associated with "Saooaat := Some_Object'Access;"; this must
1020 be rejected if Some_Object is declared in a more nested scope
1022 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1023 assignment to a saooaaat even if Is_Local_Anonymous_Access
1024 returns False for its type (indicating a 2012-style saooaaat).
1026 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1027 (which is only appropriate for objects, not types) with a call
1028 of Init_Object_Size_Align in order to avoid trashing the
1029 Extra_Accessibility attribute of a rename (the two attributes
1032 (Valid_Conversion) Replace six calls to Type_Access_Level with
1033 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1034 Ada2012 non-library-level saooaaat, the former returns library level
1035 while the latter returns the (static) accessibility level of the
1036 saooaaat. A type conversion to the anonymous type of a saooaaat
1037 can only occur as part of an assignment to the saooaaat, so we
1038 know that such a conversion must be in a lhs context, so Deepest
1039 yields the result that we need. If such a conversion could occur,
1040 say, as the operand of an equality operator, then this might not
1041 be right. Also add a test so that static accessibilty checks are
1042 performed for converting to a saooaaat's type even if
1043 Is_Local_Anonymous_Access yields False for the type.
1045 2011-08-30 Javier Miranda <miranda@adacore.com>
1047 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1048 controls generation of a warning associated with late declaration of
1049 dispatching functions. Required to avoid generating spurious
1052 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1054 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1055 return object has an anonymous access type and the function's type is
1056 a named access type.
1057 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1058 conversions on implicit conversions, since such conversions can occur
1059 for anonymous access cases due to expansion. Issue error for attempt
1060 to rename an anonymous expression as an object of a named access type.
1061 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1062 to indicate whether this function should report errors on invalid
1064 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1065 the expression is of an anonymous access type and the expected type is
1066 a named general access type, rewrite the expression as a type
1067 conversion, unless this is an expression of a membership test.
1068 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1069 calling of Error_Msg_N on new formal Report_Errs.
1070 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1071 calling of Error_Msg_NE on new formal Report_Errs.
1072 (Valid_Conversion): Move declaration of this function to the package
1073 spec, to allow calls from membership test processing. For Ada 2012,
1074 enforce legality restrictions on implicit conversions of anonymous
1075 access values to general access types, disallowing such conversions in
1076 cases where the expression has a dynamic accessibility level (access
1077 parameters, stand-alone anonymous access objects, or a component of a
1078 dereference of one of the first two cases).
1079 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1080 in the context of a named general access expected type.
1081 * exp_ch4.adb Add with and use of Exp_Ch2.
1082 (Expand_N_In): Add processing for membership tests applied to
1083 expressions of an anonymous access type. First, Valid_Conversion is
1084 called to check whether the test is statically False, and then the
1085 conversion is expanded to test that the expression's accessibility
1086 level is no deeper than that of the tested type. In the case of
1087 anonymous access-to-tagged types, a tagged membership test is applied
1089 (Tagged_Membership): Extend to handle access type cases, applying the
1090 test to the designated types.
1091 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1092 accessibility level, and the actual is a 'Access applied to a current
1093 instance, pass the accessibility level of the type of the current
1094 instance rather than applying Object_Access_Level to the prefix. Add a
1095 ??? comment, since this level isn't quite right either (will eventually
1096 need to pass an implicit level parameter to init procs).
1098 2011-08-30 Bob Duff <duff@adacore.com>
1100 * s-taskin.ads: Minor comment fix.
1102 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1104 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1105 component and the selector is a dispatching operation, check if it is
1106 a prefixed call before rewriting as a parameterless function call.
1108 2011-08-29 Jakub Jelinek <jakub@redhat.com>
1110 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1111 tsystem.h into $(RTSDIR) instead of rts.
1113 2011-08-29 Robert Dewar <dewar@adacore.com>
1115 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1117 * gcc-interface/Make-lang.in: Update dependencies.
1119 2011-08-29 Yannick Moy <moy@adacore.com>
1121 * alfa.ads (Name_Of_Heap_Variable): New constant name.
1122 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1123 table to hold dereferences.
1124 (Add_ALFA_Xrefs): Take into account dereferences as special
1125 reads/writes to the variable "HEAP".
1126 (Enclosing_Subprogram_Or_Package): Move subprogram here.
1127 (Generate_Dereference): New procedure to store a read/write dereferencew
1129 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1130 the special "HEAP" var.
1131 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1133 * sem_util.adb (Note_Possible_Modification): Store write dereference
1136 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1138 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1139 ensures that the level of the subpool access type is not deeper than
1140 that of the pool object.
1141 * sem_util.adb (Object_Access_Level): Expand to handle defining
1143 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1144 subpool handle name of a rewritten allocator.
1146 2011-08-29 Robert Dewar <dewar@adacore.com>
1148 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1150 2011-08-29 Thomas Quinot <quinot@adacore.com>
1152 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1153 values, we generate multiple triples of parameters in the TypeCode.
1154 Bump Choice_Index for each such triple so that a subsequent default
1155 choice is associated with the correct index in the typecode.
1157 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1159 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1161 (First, Last): Handle properly an iterator over a null container.
1163 2011-08-29 Bob Duff <duff@adacore.com>
1165 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
1166 processing if we run across a node with no Scope. This can happen if
1167 we're with-ing an library-level instance, and that instance got errors
1168 that caused "instantiation abandoned".
1169 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
1170 an exception instead of using Assert, so it won't go into an infinite
1171 loop, even when assertions are turned off.
1173 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1175 * a-coorse.adb: Proper handling of empty ordered sets.
1177 2011-08-29 Johannes Kanig <kanig@adacore.com>
1179 * debug.adb: Add comments.
1181 2011-08-29 Thomas Quinot <quinot@adacore.com>
1183 * a-except.adb, a-except-2005.adb: Minor comment rewording and
1186 2011-08-29 Yannick Moy <moy@adacore.com>
1188 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
1189 declaration for Itypes in Alfa mode.
1191 2011-08-29 Robert Dewar <dewar@adacore.com>
1193 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
1194 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1195 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
1198 2011-08-29 Tristan Gingold <gingold@adacore.com>
1200 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
1202 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
1203 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
1206 2011-08-29 Robert Dewar <dewar@adacore.com>
1208 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
1210 2011-08-29 Javier Miranda <miranda@adacore.com>
1212 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
1213 renamings of formal subprograms when the actual for a formal type is
1216 2011-08-29 Matthew Heaney <heaney@adacore.com>
1218 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
1221 2011-08-29 Matthew Heaney <heaney@adacore.com>
1223 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
1224 components of record type.
1225 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
1228 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1230 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
1231 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
1234 2011-08-29 Robert Dewar <dewar@adacore.com>
1236 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
1239 2011-08-29 Matthew Heaney <heaney@adacore.com>
1241 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
1242 components of record type.
1244 2011-08-29 Bob Duff <duff@adacore.com>
1246 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
1247 by the termination handler.
1249 2011-08-29 Yannick Moy <moy@adacore.com>
1251 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
1252 created in Alfa mode, instead of inserting artificial declarations of
1253 non-Itypes in the tree.
1254 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
1255 know if an Itype has a corresponding declaration, as defined in
1258 2011-08-29 Yannick Moy <moy@adacore.com>
1260 * gnat1drv.adb: Minor rewrite.
1262 2011-08-29 Bob Duff <duff@adacore.com>
1264 * s-tasuti.adb (Make_Passive): Work around race condition in
1265 Make_Independent, which can cause Wait_Count to be zero. So instead of
1266 asserting that Wait_Count > 0, and then decrementing it, decrement it
1267 only if Wait_Count > 0.
1268 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
1269 should be nonnegative, so declare them Natural instead of Integer.
1271 2011-08-29 Robert Dewar <dewar@adacore.com>
1273 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
1274 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
1275 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
1276 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
1277 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
1279 2011-08-29 Tristan Gingold <gingold@adacore.com>
1281 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
1283 2011-08-29 Vadim Godunko <godunko@adacore.com>
1285 * s-parint.ads: Minor comment clarification.
1287 2011-08-29 Vincent Celier <celier@adacore.com>
1289 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
1290 may be used as identifiers.
1292 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1294 * a-coinho.ads: Minor reformating.
1296 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1298 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
1299 container of a derived type.
1301 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1303 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1304 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
1306 2011-08-29 Pascal Obry <obry@adacore.com>
1308 * exp_disp.adb: Minor comment fix.
1309 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
1310 to avoid warnings when compiling with -Wall.
1311 (Make_Disp_Conditional_Select_Body): Likewise.
1312 (Make_Disp_Timed_Select_Body): Likewise.
1314 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1316 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
1317 an entity name, generate reference for it.
1319 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1321 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
1323 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
1324 the class-wide type.
1325 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
1327 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1329 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
1330 subtype for an object whose type is an unconstrained union.
1332 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1334 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
1335 is allowed in a component definition, by AI95-406.
1337 2011-08-29 Matthew Heaney <heaney@adacore.com>
1339 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
1341 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1343 * a-except-2005.adb: Alphabetize all routines.
1344 (Triggered_By_Abort): New routine.
1345 * a-except-2005.ads (Triggered_By_Abort): New routine.
1346 * a-except.adb Alphabetize all routines.
1347 (Triggered_By_Abort): New routine.
1348 * a-except.ads (Triggered_By_Abort): New routine.
1349 * exp_ch7.adb: Update all comments involving the detection of aborts in
1351 (Build_Object_Declarations): Do not generate code to detect the
1352 presence of an abort at the start of finalization code, use a runtime
1354 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
1356 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
1357 allocate a task on a subpool.
1358 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
1359 The flag disables all actions related to the maintenance of
1360 Finalize_Address_Table when subpools are not in use.
1361 (Allocate_Any_Controlled): Signal the machinery that subpools are in
1363 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
1364 performs costly task locking when subpools are not in use.
1366 2011-08-29 Yannick Moy <moy@adacore.com>
1368 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
1369 types and dispatching calls in Alfa mode.
1370 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
1371 correspondance between body and spec scopes, to reuse utility functions
1372 (Traverse_Declarations_Or_Statements): Protect access to body for stub
1373 by testing the presence of the library unit for the body
1374 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
1375 mode the expansion of accept statements is skipped
1376 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
1377 the unique entity corresponding to the one returned by
1378 Unique_Defining_Entity applied to the enclosing declaration of the
1381 2011-08-29 Bob Duff <duff@adacore.com>
1383 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
1384 gdb when x is not a node (it can be a node list, name_id, etc). pp is
1385 an alias for pn. ppp is an alias for pt.
1387 2011-08-29 Javier Miranda <miranda@adacore.com>
1389 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
1390 aggregate to take a consistent decision on the need to convert into
1391 assignments aggregates that initialize constant objects.
1393 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1395 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
1396 Build_Allocate_Deallocate_Proc in order to handle allocation of
1397 non-controlled objects on subpools.
1398 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
1399 to be end-user visible.
1400 * s-finmas.adb: Add with and use clause for System.HTable.
1401 Add an instantiation of Simple_HTable which provides a mapping between
1402 the address of a controlled object and the corresponding
1403 Finalize_Address used to clean up the object. The table is used when a
1404 master is operating in heterogeneous mode.
1405 (Attach): Explain why the input node is not verified on being already
1407 (Delete_Finalize_Address): New routine.
1408 (Detach): Add pragma Assert which ensures that a node is already
1410 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
1411 since nodes are no longer removed on traversal. Explain why node
1412 detachment is undesirable in this case.
1413 (Get_Finalize_Address): New routine.
1414 (Hash): New routine.
1415 (Is_Empty_List): Removed.
1416 (pm): Renamed to Print_Master. Add output for discriminant
1418 Comment reformatting.
1419 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1420 * s-finmas.ads: Various comments additions / improvements.
1421 Type Finalization_Master has a discriminant which determines the mode of
1423 (Delete_Finalize_Address): New routine.
1424 (Get_Finalize_Address): New routine.
1425 (pm): Renamed to Print_Master.
1426 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1427 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
1428 use clause for System.IO.
1429 (Allocate_Any_Controlled): Add machinery to set TSS primitive
1430 Finalize_Address depending on the mode of allocation and the mode of
1432 (Deallocate_Any_Controlled): Remove the relation pair object -
1433 Finalize_Address regardless of the master mode. Add comment explaining
1435 (Detach): Ensure that fields Prev and Next are null after detachment.
1436 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1437 scheme to check whether the list of subpools is empty. There is no
1438 longer need to store the next subpool or advance the current pointer.
1439 (Is_Empty_List): New routine.
1440 (Print_Pool): New routine.
1441 (Print_Subpool): New routine.
1442 * s-stposu.ads: Various comments additions / improvements.
1443 Field Master of type Root_Subpool is now a heterogeneous collection.
1444 (Print_Pool): New routine.
1445 (Print_Subpool): New routine.
1447 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1449 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1450 forms, using aspects of container types.
1451 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1452 Has_Implicit_Dereference flags, that may be set on the partial view.
1453 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1454 container type with an indexing aspect.
1455 (Analyze_Quantified_Expression): Analyze construct with expansion
1456 disabled, because it will be rewritten as a loop during expansion.
1457 (Try_Container_Indexing): The prefix itself may be a container type
1458 with an indexing aspect, as with a vector of vectors.
1459 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1460 the original doamin of iteration, for name capture.
1461 (Analyze_Iterator_Specification): If the domain is an expression that
1462 needs finalization, create a separate declaration for it.
1463 For an iterator with "of" retrieve default iterator info from aspect of
1464 container type. For "in" iterator, retrieve type of Iterate function.
1465 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1466 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1467 analysis, to prevent spurious errors about late attributes.
1468 * sprint.adb: Handle quantified expression with either loop or iterator
1470 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1473 2011-08-29 Vincent Celier <celier@adacore.com>
1475 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1476 Binder or Linker of the main project file.
1478 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1480 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1483 2011-08-29 Yannick Moy <moy@adacore.com>
1485 * exp_ch9.adb: Partial revert of previous change for Alfa mode
1487 2011-08-29 Yannick Moy <moy@adacore.com>
1489 * exp_ch11.adb: Minor expansion of comment.
1491 2011-08-29 Yannick Moy <moy@adacore.com>
1493 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1495 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1497 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1498 interpretation, set the type before resolving the operands, because
1499 legality checks on an exponention operand need to know the type of the
1502 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1504 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1505 cleanups on a master if the instance is within a generic unit.
1506 Complement to the corresponding fix to inline.adb for K520-030.
1508 2011-08-29 Tristan Gingold <gingold@adacore.com>
1510 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1512 * exp_intr.adb: Minor comment fix.
1514 2011-08-29 Bob Duff <duff@adacore.com>
1516 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1517 Delay_Required was used as an uninitialized variable.
1519 2011-08-29 Robert Dewar <dewar@adacore.com>
1521 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1522 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1523 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1525 2011-08-29 Thomas Quinot <quinot@adacore.com>
1527 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1528 Remove unused variables.
1530 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1532 * sem_res.adb: Remove Build_Explicit_Dereference.
1533 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1534 from sem_res.adb, used in analysis of additional constructs.
1535 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1536 expansion of iterators.
1537 (Is_Object_Reference): Recognize variables rewritten as explicit
1538 dereferences in Ada2012.
1539 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1540 Reversible_Iterator names, for expansion of Ada2012 iterators.
1541 * aspects.ads, aspects.adb (Find_Aspect): Utility.
1542 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1543 linked list container.
1544 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1545 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1547 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1549 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1552 2011-08-29 Vincent Celier <celier@adacore.com>
1554 * make.adb (Gnatmake): Get the maximum number of simultaneous
1555 compilation processes after the Builder switches has been scanned, as
1556 there may include -jnn.
1558 2011-08-29 Matthew Heaney <heaney@adacore.com>
1560 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1562 2011-08-29 Tristan Gingold <gingold@adacore.com>
1564 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1565 GNAT_DRIVER_COMMAND_LINE to 255.
1567 2011-08-29 Pascal Obry <obry@adacore.com>
1569 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1570 reformatting and style fix (class attribute casing).
1572 2011-08-29 Yannick Moy <moy@adacore.com>
1574 * exp_ch11.adb: Yet another case where expansion should be common
1575 between CodePeer and Alfa.
1577 2011-08-29 Yannick Moy <moy@adacore.com>
1579 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1581 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1583 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1584 incomplete type and its completion match.
1586 2011-08-29 Yannick Moy <moy@adacore.com>
1588 * exp_ch13.adb: Adjust previous change.
1590 2011-08-29 Robert Dewar <dewar@adacore.com>
1592 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1593 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1596 2011-08-29 Emmanuel Briot <briot@adacore.com>
1598 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1599 initialize aggregated projects.
1601 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1603 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1604 depth of candidates to resolve a potentially spurious ambiguity between
1605 two visible subprograms.
1607 2011-08-29 Yannick Moy <moy@adacore.com>
1609 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1611 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1612 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1615 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1617 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1620 2011-08-29 Thomas Quinot <quinot@adacore.com>
1622 * sem_res.adb: Minor reformatting.
1624 2011-08-29 Johannes Kanig <kanig@adacore.com>
1626 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1628 * gnat1drv.adb (Adjust_Global_Switches): Set
1629 Use_Expressions_With_Actions to False in ALFA mode.
1630 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1633 2011-08-29 Yannick Moy <moy@adacore.com>
1635 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1636 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1637 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1638 tagged types and dispatching calls in Alfa mode.
1640 2011-08-29 Javier Miranda <miranda@adacore.com>
1642 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1643 we do not report an error on an Empty node.
1645 2011-08-29 Geert Bosch <bosch@adacore.com>
1647 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1648 a-nlrear.o and a-nurear.o.
1650 2011-08-29 Robert Dewar <dewar@adacore.com>
1652 * freeze.adb: Minor code reorganization.
1654 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1655 sem_ch6.adb: Minor reformatting
1657 2011-08-29 Tristan Gingold <gingold@adacore.com>
1659 * s-except.ads, s-except.adb: Provide dummy body.
1661 2011-08-29 Yannick Moy <moy@adacore.com>
1663 * sem_warn.adb (Within_Postcondition): Take into account the case of
1664 an Ensures component in a Test_Case.
1666 2011-08-29 Tristan Gingold <gingold@adacore.com>
1668 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1669 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1670 System_Exceptions_Debug
1671 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1672 * a-except.adb: With and use System.Exceptions_Debug instead of
1674 * a-except-2005.adb: Likewise.
1675 * s-assert.adb: Likewise.
1676 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1677 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
1678 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1679 s-excdeb. Update dependencies.
1680 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1681 as these no longer need external libraries.
1683 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1685 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1686 exponentiation operator on universal values in a context that requires
1689 2011-08-29 Tristan Gingold <gingold@adacore.com>
1691 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
1692 before calling notify_handled_exception.
1693 * a-exextr.adb: Fix comment.
1695 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1697 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
1698 Finalize_Address of the access type's finalization master.
1699 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
1700 access type's finalization master. Add a guard to prevent
1701 Associated_Storage_Pool from being set on .NET/JVM.
1702 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
1703 attribute Finalize_Address of the access type's finalization master.
1704 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
1705 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
1706 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
1708 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
1709 use clause for System.IO
1710 (Detach): Relax the assertion, to be reinstated later.
1711 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
1712 Relax the assertion on Finalize_Address, to be reinstated later.
1713 (Is_Empty_List): New routine.
1714 (pm): New debug routine.
1715 (Set_Finalize_Address): New routine.
1716 * s-finmas.ads (pm): New debug routine.
1717 (Set_Finalize_Address): New routine.
1718 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
1720 2011-08-29 Tristan Gingold <gingold@adacore.com>
1722 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
1723 Remove convention C.
1725 2011-08-29 Tristan Gingold <gingold@adacore.com>
1727 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
1728 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
1729 (Finalize_TCB): Remove its finalization.
1730 (Initialize): Remove assignment of GET_Exc_Stack_Addr
1731 * s-soflin.adb (NT_Exc_Stack): Remove
1732 (Get_Exc_Stack_Addr_NT): Likewise.
1733 (Get_Exc_Stack_Addr_Soft): Likewise.
1734 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
1735 (Get_Exc_Stack_Addr): Likewise.
1736 (Get_Exc_Stack_Addr_Soft): Likewise
1737 * s-taspri-vms.ads (Exc_Stack_T): Remove.
1738 (Exc_Stack_Ptr_T): Likewise.
1739 (Private_Data): Remove Exc_Stack_Ptr component.
1741 2011-08-29 Tristan Gingold <gingold@adacore.com>
1743 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
1745 2011-08-29 Tristan Gingold <gingold@adacore.com>
1747 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
1749 2011-08-29 Geert Bosch <bosch@adacore.com>
1751 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
1752 L2_Norm, Swap_Column): New generic subprograms
1753 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
1754 L2_Norm, Swap_Column): Implement new subprograms in order to
1755 eliminate dependency on BLAS and LAPACK libraries in
1756 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
1757 version. Forward_Eliminate/Back_Substitute can be used to put a
1758 matrix in row echelon or reduced row echelon form using partial
1760 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1761 Swap_Column): Instantiate from System.Generic_Array_Operations.
1762 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1763 (Sqrt): Local function for simple computation of square root without
1764 adding dependencies on Generic_Elementary_Functions.
1765 (Swap): New subprogram to exchange floating point numbers.
1766 (Inverse): Reimplement using Jordan-Gauss elimination.
1767 (Jacobi): New procedure implementing Jacobi's method for computation
1768 of eigensystems, based on Rutishauser's implementation.
1769 (L2_Norm): Implement directly using the inner product.
1770 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1771 decreasing eigenvalue as required by the Ada RM.
1772 (Swap_Column): New helper procedure for Sort_Eigensystem.
1773 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1774 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1777 2011-08-29 Thomas Quinot <quinot@adacore.com>
1779 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1782 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1784 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1785 than the current node.
1786 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1787 Finalization_Master. The list headers have two fields instead of three.
1788 This should fix alignment issue but subpool allocations are now
1789 unusable. Alphabetize subprograms.
1790 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1791 the size of the header when converting the beginning of the object to
1792 a FM_Node. Set the master's Finalize_Address attribute if not already
1794 (Deallocate_Any_Controlled): Use the offset rather than the size of the
1795 header when converting the beginning of the object to a FM_Node.
1797 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1799 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1800 reraise when compiling for CodePeer.
1802 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1804 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1805 now needed by a-convec.adb. Fix warning.
1807 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1809 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1810 processing of TSS routine Finalize_Address when compiling in
1813 2011-08-29 Thomas Quinot <quinot@adacore.com>
1815 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1816 sem_warn.adb: Minor reformatting.
1818 2011-08-29 Emmanuel Briot <briot@adacore.com>
1820 * prj-conf.adb (Get_Config_Switches): Also collect the list of
1821 languages from aggregated projects.
1823 2011-08-29 Yannick Moy <moy@adacore.com>
1825 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1826 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1827 Traverse_Package_Declaration, Traverse_Subprogram_Body,
1828 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1829 for stubs are traversed too when parameter is set
1830 (Traverse_All_Compilation_Units): Traverse without going inside stubs
1831 (Traverse_Declarations_Or_Statements): Do the special traversing for
1832 stubs when required.
1833 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1834 return subprogram or package body from stub.
1835 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1836 stubs without prior subprogram decl.
1838 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1840 * gnat_ugn.texi: Fix typo.
1842 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1844 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1845 which accounts for size vs alignment issues and calculates the size of
1847 (Deallocate_Any_Controlled): Ditto.
1848 (Nearest_Multiple_Rounded_Up): New routine.
1850 2011-08-29 Tristan Gingold <gingold@adacore.com>
1852 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1853 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1854 (Set_Exception_Msg): Ditto.
1855 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
1857 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1858 Use Save_Occurrence instead of Save_Occurrence_No_Private.
1859 (Raise_With_Msg): Remove Cleanup_Flag.
1860 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1861 Clean_Flag and Private_Data components.
1863 2011-08-29 Yannick Moy <moy@adacore.com>
1865 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1867 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1868 of an explicitly declared type, so that the base types of the original
1869 type and this generated type are the same, and a "type" (not a subtype
1871 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1872 small" in Alfa mode, like in CodePeer mode.
1873 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1874 clauses in Alfa mode.
1876 2011-08-29 Javier Miranda <miranda@adacore.com>
1878 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1879 function to the package spec.
1880 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1881 internally generated bodies of null procedures locate the internally
1882 generated spec enforcing mode conformance.
1883 (Is_Interface_Conformant): Ensure that the controlling formal of the
1886 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1888 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1889 reject the pragma if it appears to apply to a formal subprogram.
1891 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1893 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1894 inner expression, to prevent double evaluation.
1896 2011-08-29 Tristan Gingold <gingold@adacore.com>
1898 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1900 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1901 * a-except-2005.adb (Propagate_Exception): Adjust spec.
1902 (Raise_Current_Excep): Adjust call.
1903 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1905 2011-08-29 Thomas Quinot <quinot@adacore.com>
1907 * exp_disp.adb: Minor reformatting.
1909 2011-08-29 Tristan Gingold <gingold@adacore.com>
1911 * a-exexpr.adb (Setup_Exception): Removed.
1912 * a-exexpr-gcc.adb (Setup_Exception): Removed.
1913 * a-except.adb (Exception_Propagation): Removed.
1914 * a-except-2005.adb (Setup_Exception): Removed.
1915 (Reraise): Remove call to Setup_Exception.
1916 (Reraise_Occurrence): Ditto.
1917 (Reraise_Occurrence_Always): Ditto.
1918 (Reraise_Occurrence_No_Defer): Ditto.
1919 (Transfer_Occurrence): Ditto.
1920 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1921 (Set_Exception_Msg): Ditto.
1923 2011-08-29 Robert Dewar <dewar@adacore.com>
1925 * a-convec.adb, exp_disp.adb: Minor reformatting.
1927 2011-08-29 Tristan Gingold <gingold@adacore.com>
1929 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1931 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1933 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1934 Exception_Handlers to No_List instead of Empty_List in the case where
1935 there are no handlers.
1937 2011-08-29 Tristan Gingold <gingold@adacore.com>
1939 * gcc-interface/gigi.h (enum standard_datatypes): Add
1940 ADT_reraise_zcx_decl
1941 (reraise_zcx_decl): New macro.
1942 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1943 (gigi): Set reraise_zcx_decl.
1944 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
1945 (gnat_to_gnu): Handle N_Raise_Statement.
1947 2011-08-29 Robert Dewar <dewar@adacore.com>
1949 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
1950 a-undesu.adb: Minor reformatting.
1952 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1954 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
1955 table, accept an unfrozen untagged component if it is an actual for a
1956 formal incomplete type.
1957 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
1958 provide new iterator forms over vectors.
1959 Introduce type Iterator in package body to implement operations of
1960 Reversible_Iterator interface.
1961 * a-iteint.ads: Make package pure so it is usable with new container
1962 packages, that are categorized Remote_Types.
1964 2011-08-29 Robert Dewar <dewar@adacore.com>
1966 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
1968 2011-08-29 Bob Duff <duff@adacore.com>
1970 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
1971 of <>, because this is the routine that checks for dimensionality
1972 errors (for example, for a two-dimensional array, (others => <>) should
1973 be (others => (others => <>)).
1975 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1977 * impunit.adb: Add new run-time units.
1978 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
1979 s-stposu.ads, s-stposu.adb: Code clean up.
1980 Handle protected class-wide or task class-wide types
1981 Handle C/C++/CIL/Java types.
1982 * s-spsufi.adb, s-spsufi.ads: New files.
1984 2011-08-29 Yannick Moy <moy@adacore.com>
1986 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
1987 library-level subprogram.
1988 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
1990 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
1992 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
1994 * gnat_rm.texi: Update doc for Test_Case pragma.
1996 2011-08-29 Tristan Gingold <gingold@adacore.com>
1998 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2000 (GCC_Exception_Access): New type.
2001 (Unwind_DeleteException): New imported procedure
2002 (Foreign_Exception): Import it.
2003 (GNAT_GCC_Exception): Simply have the occurrence inside.
2004 (To_GCC_Exception): New function.
2005 (To_GNAT_GCC_Exception): New function.
2006 (GNAT_GCC_Exception_Cleanup): New procedure..
2007 (Propagate_GCC_Exception): New procedure.
2008 (Reraise_GCC_Exception): New procedure.
2009 (Setup_Current_Excep): New procedure.
2010 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2011 (Unwind_RaiseException): Ditto.
2012 (Unwind_ForcedUnwind): Ditto.
2014 (Begin_Handler): Change type of parameter.
2015 (End_Handler): Ditto. Now delete the exception if still present.
2016 (Setup_Key): Removed.
2017 (Is_Setup_And_Not_Propagated): Removed.
2018 (Set_Setup_And_Not_Propagated): Ditto.
2019 (Clear_Setup_And_Not_Propagated): Ditto.
2020 (Save_Occurrence_And_Private): Ditto.
2021 (EID_For): Add 'not null' constraint on parameter.
2022 (Setup_Exception): Does nothing.
2023 (Propagate_Exception): Simplified.
2024 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2025 re-raise is not expanded anymore.
2026 * s-except.ads (Foreign_Exception): New exception - placeholder for
2028 * raise-gcc.c (__gnat_setup_current_excep): Declare
2029 (CXX_EXCEPTION_CLASS): Define (not yet used)
2030 (GNAT_EXCEPTION_CLASS): Define.
2031 (is_handled_by): Handle foreign exceptions.
2032 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2034 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2036 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2038 2011-08-29 Thomas Quinot <quinot@adacore.com>
2040 * a-synbar-posix.adb: Minor reformatting.
2042 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2044 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2045 a-exetim-default.ads (Interrupt_Clocks_Supported,
2046 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2047 definitions to be compliant with AI-0171. The target systems do not
2048 support separate account for the execution time of interrupt handlers.
2050 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2052 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2053 in the barrier to put first the easiest to evaluate (and the one which
2054 will be True more often). More efficient.
2056 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2058 * s-atocou-x86.adb: Fix constraint in machine code insertion.
2060 2011-08-29 Bob Duff <duff@adacore.com>
2062 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2063 attributes that are now aspects, as specified by AI05-0229-1.
2064 * sem_ch13.adb (Analyze_Aspect_Specifications,
2065 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2066 pragmas or attribute references, as appropriate.
2068 2011-08-29 Robert Dewar <dewar@adacore.com>
2070 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2071 a-synbar-posix.ads: Minor reformatting.
2073 2011-08-29 Yannick Moy <moy@adacore.com>
2075 * snames.ads-tmpl: Add name Force.
2077 2011-08-29 Pascal Obry <obry@adacore.com>
2079 * prj-nmsc.adb: Minor reformatting.
2081 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2083 * a-exetim.ads (Interrupt_Clocks_Supported,
2084 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2085 definitions to be compliant with AI-0171.
2087 2011-08-29 Robert Dewar <dewar@adacore.com>
2089 * a-ngelfu.adb: Add comments.
2091 2011-08-29 Geert Bosch <bosch@adacore.com>
2093 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2094 the closest machine number to Pi / 2.0.
2096 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2098 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2099 package Ada.Synchronous_Barriers.
2100 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2101 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2102 default implementation using protected objects and another one
2103 a-synbar-posix using POSIX barriers as the underlying support.
2104 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2105 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2106 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2107 Clean up dependencies.
2108 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2110 2011-08-29 Robert Dewar <dewar@adacore.com>
2112 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2113 exp_dist.adb: Minor code reorganization.
2116 2011-08-29 Thomas Quinot <quinot@adacore.com>
2118 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2119 primitive operation must support external streaming if it is not a
2120 controlling access result.
2122 2011-08-29 Thomas Quinot <quinot@adacore.com>
2124 * sinfo.ads, sem_ch7.adb: Minor reformatting.
2126 2011-08-29 Bob Duff <duff@adacore.com>
2128 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2129 restriction on allocators, as required by AI05-0013-1.
2130 * restrict.ads: Minor comment fix.
2132 2011-08-29 Tristan Gingold <gingold@adacore.com>
2134 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2135 (To_Jmpbuf_Address): Ditto
2136 (builtin_longjmp): Ditto
2138 2011-08-29 Thomas Quinot <quinot@adacore.com>
2140 * sem_res.adb: Minor reformatting.
2142 2011-08-29 Vincent Celier <celier@adacore.com>
2144 * make.adb (Gnatmake): Move special processing for VM targets after the
2145 call to Get_Target_Parameters.
2147 2011-08-29 Thomas Quinot <quinot@adacore.com>
2149 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2151 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2153 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2154 where an anonymous access discriminant of a limited designated type
2155 appears in a non-immutably limited discriminated type and issue an
2156 error message. Add local variable Desig_T and replace all occurrences
2159 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2161 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2162 implementation is compliant to RM D.15(15/2) after the modification
2163 imposed by AI05-0094-1 (binding interpretation).
2165 2011-08-29 Robert Dewar <dewar@adacore.com>
2167 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
2168 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
2170 2011-08-29 Thomas Quinot <quinot@adacore.com>
2172 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
2173 the scope name, do not report a missing label as a style violation (it
2174 will be diagnosed as an illegality).
2175 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
2176 variant records: Get_Enum_Lit_From_Pos already returns a usage
2177 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
2178 on Expr in Integer_Literal case so that it can be used by
2181 2011-08-29 Tristan Gingold <gingold@adacore.com>
2183 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
2185 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
2186 (Build_Abort_Block_Handler): New function to build an Abort_Signal
2188 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
2189 Build_Abort_Block_Handler to build the exception handler. Do not
2190 undefer aborts for the Abort_Signal exception handler if back-end
2191 exception mechanism.
2192 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
2193 back_end exceptions for all others and abort_signal.
2194 * s-except.ads (ZCX_By_Default): New constant.
2195 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
2196 (Raise_Exception_Always): Ditto.
2197 (Raise_From_Signal_Handler): Ditto.
2198 (Raise_With_Location_And_Msg): Ditto.
2199 (Raise_With_Msg): Ditto.
2201 (Reraise_Occurence): Ditto.
2202 (Reraise_Occurrence_Always): Ditto.
2203 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
2204 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
2206 2011-08-29 Thomas Quinot <quinot@adacore.com>
2208 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
2210 2011-08-29 Robert Dewar <dewar@adacore.com>
2212 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
2213 Minor code reorganization.
2215 2011-08-29 Bob Duff <duff@adacore.com>
2217 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
2218 2012, not just Ada 2005.
2220 2011-08-29 Vincent Celier <celier@adacore.com>
2222 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
2223 with a project file or with gprbuid, if -gnatep= is specified, the
2224 builder may need to be invoked with -x.
2226 2011-08-29 Tristan Gingold <gingold@adacore.com>
2228 * a-exexpr-gcc.adb: Minor comment fix.
2230 2011-08-29 Robert Dewar <dewar@adacore.com>
2232 * sem_ch8.adb: Minor reformatting.
2234 2011-08-29 Bob Duff <duff@adacore.com>
2236 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
2237 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
2238 treating "some" as unreserved in earlier Ada versions. This is now
2239 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
2240 rather than Name_Some, since Tok_Some is now recognized as reserved.
2241 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
2243 * scans.ads: Minor comment fixes.
2244 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
2245 for other language versions.
2246 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
2247 treating "some" as unreserved in earlier Ada versions. This is now
2248 handled in Snames.Is_Keyword_Name.
2249 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
2251 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
2252 unreserved in earlier Ada versions. This is now handled in
2253 Snames.Is_Keyword_Name.
2254 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
2255 words as for other language versions.
2256 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
2257 Ada 2012, not just Ada 2005.
2259 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2261 * sem_ch13.adb: Additional semantic checks for aspects involved in
2264 2011-08-29 Matthew Heaney <heaney@adacore.com>
2266 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
2267 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
2268 Container parameter.
2269 (Ancestor_Find): ditto.
2271 2011-08-29 Thomas Quinot <quinot@adacore.com>
2273 * par-endh.adb: Minor reformatting.
2275 2011-08-29 Tristan Gingold <gingold@adacore.com>
2277 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
2278 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
2279 (Adjust_N_CLeanups_For): Remove.
2280 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
2282 (Propgate_Exception): Adjust.
2283 * raise-gcc.c: Add a few static/const.
2284 (Adjust_N_Cleanups_For): Remove declaration.
2285 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
2287 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2289 * sem_ch8.adb: Use type of function return when rewriting as object
2292 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2294 * sem_type.adb: Minor reformatting.
2296 2011-08-29 Robert Dewar <dewar@adacore.com>
2298 * makeutl.adb: Minor reformatting.
2300 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2302 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
2303 function call of a limited type, the expansion of the renaming is
2304 complicated by the presence of various temporaries and subtypes that
2305 capture constraints of the renamed object.
2306 Rewrite node as an object declaration, whose expansion is simpler.
2307 Given that the object is limited there is no copy involved and no
2310 2011-08-29 Robert Dewar <dewar@adacore.com>
2312 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
2313 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
2315 2011-08-29 Tristan Gingold <gingold@adacore.com>
2317 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
2318 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
2319 system-linux-hppa.ads, system-linux-s390.ads,
2320 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
2321 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
2322 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
2323 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
2324 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
2325 system-solaris-sparc.ads, system-lynxos-x86.ads,
2326 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
2327 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
2328 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
2329 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
2330 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
2331 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
2332 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
2333 * opt.ads: Adjust comment.
2334 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
2335 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
2336 * system.ads: Move GCC_ZCX_Support to obsolete entries.
2338 2011-08-29 Emmanuel Briot <briot@adacore.com>
2340 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
2341 file name is specified on the gnatmake or gprbuild command line, and
2342 before we search for that file in the project.
2344 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2346 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
2347 used to determine whether a possible interpretation for an overloadable
2348 entity is declared within the current instantiation and should be
2349 included in the candidate set.
2351 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2353 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
2355 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2357 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
2358 access subtype is access_to_subprogram, when applying checks for
2361 2011-08-29 Matthew Heaney <heaney@adacore.com>
2363 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
2364 for sibling when common parent.
2366 2011-08-29 Thomas Quinot <quinot@adacore.com>
2368 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
2371 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2373 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
2374 for the return type when in ASIS mode.
2376 2011-08-29 Vincent Celier <celier@adacore.com>
2378 * make.adb (Gnatmake): Get the default search dirs, then the target
2379 parameters after getting the Builder switches, as the Builder switches
2380 may include --RTS= and that could change the default search dirs.
2382 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2384 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
2385 Make_Final_Call. Move the processing for class-wide types before the
2386 processing for derivations from [Limited_]Controlled.
2387 (Make_Final_Call): Move the processing for class-wide types before the
2388 processing for derivations from [Limited_]Controlled.
2389 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
2390 Add code to account for alignments larger than the list header. Add a
2391 comment illustrating the structure of the allocated object + padding +
2393 (Deallocate_Any_Controlled): Add code to account for alignments larger
2394 than the list header.
2396 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2398 * sinfo.ads, sinfo.adb: New node kind
2399 N_Formal_Incomplete_Type_Definition, related flags.
2400 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
2401 Parse formal incomplete types.
2402 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
2404 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
2405 Formal incomplete types do not need completion.
2406 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
2407 Validate_Incomplete_Type_Instance): New procedures to handle formal
2409 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
2410 that corresponds to a formal incomplete type.
2411 * sprint.adb: Handle formal incomplete type declarations.
2412 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
2415 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2417 * a-fihema.ads, a-fihema.adb: Unit removed.
2418 * a-undesu.ads, a-undesu.adb: New unit implementing
2419 Ada.Unchecked_Deallocate_Subpool.
2420 * einfo.adb: Remove Associated_Collection from the node usage.
2421 Add Finalization_Master to the node usage.
2422 (Associated_Collection): Removed.
2423 (Finalization_Master): New routine.
2424 (Set_Associated_Collection): Removed.
2425 (Set_Finalization_Master): New routine.
2426 (Write_Field23_Name): Remove Associated_Collection from the output. Add
2427 Finalization_Master to the output.
2428 * einfo.ads: Remove attribute Associated_Collection and its uses in
2430 Add new attribute Finalization_Master along with its uses in entitites.
2431 (Associated_Collection): Removed along with its pragma import.
2432 (Finalization_Master): New routine along with a pragma import.
2433 (Set_Associated_Collection): Removed along with its pragma import.
2434 (Set_Finalization_Master): New routine along with a pragma import.
2435 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2436 Build_Finalization_Collection with Build_Finalization_Master.
2437 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2438 before the bodies of the predefined routines. Add comment explaining
2439 this. Replace call to Build_Finalization_Collection with
2440 Build_Finalization_Master.
2441 (Freeze_Type): Replace call to Build_Finalization_Collection with
2442 Build_Finalization_Master.
2443 (Make_Finalize_Address_Body): Comment reformatting.
2444 (Make_Predefined_Primitive_Specs): Code reformatting.
2445 (Stream_Operation_OK): Update comment mentioning finalization
2446 collections. Replace RE_Finalization_Collection with
2447 RE_Finalization_Master.
2448 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2449 Associated_Collection with Finalization_Master. Replace call to
2450 Build_Finalization_Collection with Build_Finalization_Master.
2451 (Expand_Allocator_Expression): Replace call to Associated_Collection
2452 with Finalization_Master. Replace call to Set_Associated_Collection with
2453 Set_Finalization_Master. Remove the generation of
2454 Set_Finalize_Address_Ptr.
2455 (Expand_N_Allocator): Replace call to Associated_Collection with
2456 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2457 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2458 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2459 comment on usage. Replace call to Needs_BIP_Collection with
2460 Needs_BIP_Finalization_Master Remplace BIP_Collection with
2461 BIP_Finalization_Master. Update all comments which mention finalization
2462 collections. Replace Associated_Collection with
2463 Finalization_Master. Replace Build_Finalization_Collection with
2464 Build_Finalization_Master.
2465 (BIP_Formal_Suffix): Update BIP_Collection's case.
2466 (Build_Heap_Allocator): Update the related comment. Rename local
2467 variable Collect to Fin_Mas_Id and update its occurrences. Update
2468 comments which mention finalization collections. Replace
2469 Set_Associated_Collection with Set_Finalization_Master.
2470 (Expand_Call): Update the code which detects a special piece of library
2472 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2473 Add_Collection_Actual_To_Build_In_Place_Call with
2474 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2475 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2476 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2477 Add_Collection_Actual_To_Build_In_Place_Call with
2478 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2479 (Make_Build_In_Place_Call_In_Assignment): Replace call to
2480 Add_Collection_Actual_To_Build_In_Place_Call with
2481 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2482 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2483 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2484 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2485 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2486 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2487 Replace call to Set_Associated_Collection with Set_Finalization_Master.
2488 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2489 Replace the call to Associated_Collection with Finalization_Master.
2490 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2491 Update the way finalization master names are generated. Update the
2492 retrieval of the correct access type which will carry the pool and
2494 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2495 (Make_Finalize_Address_Body): Abstract types do not need
2496 Finalize_Address. Code reformatting.
2497 (Make_Finalize_Address_Stmts): Update comment on usage.
2498 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2499 (Process_Declarations): Update comments.
2500 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2501 Build_Finalization_Master. Update associated comment.
2502 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2503 * exp_ch13.adb: Update comments which mention finalization collections.
2504 (Expand_N_Free_Statement): Replace the call to Associated_Collection
2505 with Finalization_Master.
2506 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2507 create calls to routines Allocate_Any_Controlled and
2508 Deallocate_Any_Controlled.
2509 (Find_Finalize_Address): New routine.
2510 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2512 (Requires_Cleanup_Actions): Update the comment on freeze node
2514 * exp_util.ads: Remove comment on generated code for
2515 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2516 is better to simply look in the body.
2517 * freeze.adb (Freeze_All): Update the comment of finalization
2518 collections. Replace the call to Associated_Collection with
2519 Finalization_Master. Replace the call to Build_Finalization_Collection
2520 with Build_Finalization_Master.
2521 * impunit.adb: Add a-undesu and s-stposu to the list of units.
2522 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2524 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2525 Ada.Finalization. Add processing for children of System.Storage_Pools.
2526 * rtsfind.ads: Remove the naming of second level children of
2528 Remove Ada_Finalization_Heap_Management from the list of units.
2529 Remove subtype Ada_Finalization_Child.
2530 Remove the following subprogram entities:
2534 RE_Finalization_Collection
2535 RE_Finalization_Collection_Ptr
2536 RE_Set_Finalize_Address_Ptr
2538 Add the naming of second level children of System.Storage_Pools.
2539 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2541 Add subtype System_Storage_Pools_Child.
2542 Add the following subprogram entities to System.Finalization_Masters:
2544 RE_Finalization_Master
2545 RE_Finalization_Master_Ptr
2547 Add the following subprogram entities to System.Storage_Pools.Subpools:
2549 RE_Allocate_Any_Controlled
2550 RE_Deallocate_Any_Controlled
2551 RE_Root_Storage_Pool_With_Subpools
2555 Move the following subprogram entities from
2556 Ada.Finalization.Heap_Management to System.Finalization_Masters:
2558 RE_Add_Offset_To_Address
2563 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2564 Set_Associated_Collection with Set_Finalization_Master.
2565 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2566 BIP_Finalization_Master is created.
2567 * s-finmas.adb: New unit System.Finalization_Masters.
2568 * s-finmas.ads: New unit System.Finalization_Masters.
2569 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2570 * s-stposu.ads, s-stposu.adb: New unit implementing
2571 System.Storage_Pools.Subpools.
2573 2011-08-29 Bob Duff <duff@adacore.com>
2575 * tbuild.adb: Add assertion.
2577 2011-08-29 Thomas Quinot <quinot@adacore.com>
2579 * s-pooglo.adb: Minor reformatting.
2581 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2583 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2584 an indexed component of a packed array whose element type is a record
2585 with a representation clause different from that of the right-hand
2586 side, generate a temporary to minimuze the number of bit-field
2587 operations generated.
2589 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2591 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2592 declarations, and thus are likely insertion points for actions.
2594 2011-08-29 Bob Duff <duff@adacore.com>
2596 * einfo.ads: Minor comment fix.
2598 2011-08-29 Robert Dewar <dewar@adacore.com>
2600 * frontend.adb, gnat1drv.adb: Minor reformatting.
2602 2011-08-29 Tristan Gingold <gingold@adacore.com>
2604 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2605 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
2606 space in front of the header.
2608 2011-08-29 Johannes Kanig <kanig@adacore.com>
2610 * frontend.adb (Frontend): Exit after creating Standard package when
2611 -gnatd.H is present.
2612 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2615 2011-08-29 Robert Dewar <dewar@adacore.com>
2617 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2618 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2619 snames.ads-tmpl: Minor reformatting.
2621 2011-08-29 Philippe Gil <gil@adacore.com>
2623 * prj.adb (Reset_Units_In_Table): New procedure.
2624 Reset units to avoid access to freed memory.
2626 2011-08-29 Thomas Quinot <quinot@adacore.com>
2628 * get_scos.adb: When reading a P statement SCO without a pragma name
2629 (from an older ALI file), ensure that the Pragma_Name component is set
2630 to Unknown_Pragma (not left uninitialized).
2632 2011-08-29 Vincent Celier <celier@adacore.com>
2634 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2635 modified to compute correctly the object path of a SAL project that is
2636 extending another library project.
2637 (Write_Path_File): New procedure.
2638 * makeutl.ads (Directories): New table moved from Buildgpr
2639 (Get_Directories): New procedure moved from Buildgpr
2640 (Write_Path_File): New procedure
2641 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2642 paths before binding SALs, instead of Set_Ada_Paths.
2643 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2645 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2646 (Current_Source_Path_File_Of): New function
2647 (Set_Current_Object_Path_File_Of): New procedure
2648 (Current_Source_Object_File_Of): New function
2649 (Set_Current_Object_Path_File_Of): New procedure
2650 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2651 (Current_Source_Path_File_Of): New function
2652 (Set_Current_Object_Path_File_Of): New procedure
2653 (Current_Source_Object_File_Of): New function
2654 (Set_Current_Object_Path_File_Of): New procedure
2656 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2658 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2659 packed entity, use a bit-field assignment only if there is no change of
2662 2011-08-29 Thomas Quinot <quinot@adacore.com>
2664 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2665 Is_RTU instead of using Chars comparisons.
2667 2011-08-29 Thomas Quinot <quinot@adacore.com>
2669 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2670 temporary object if the actual is constrained, and the discriminants
2671 read from the stream don't match.
2673 2011-08-29 Tristan Gingold <gingold@adacore.com>
2675 * sem_attr.adb, exp_attr.adb: Add handling of
2676 Attribute_System_Allocator_Alignment
2677 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2678 Attribute_System_Allocator_Alignment.
2679 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2680 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2681 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2682 get_target_system_allocator_alignment.
2684 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2686 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2689 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2691 * exp_ch3.adb (In_Runtime): Fix typo.
2693 2011-08-29 Bob Duff <duff@adacore.com>
2695 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
2697 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2699 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
2700 and a separate tag assignment is generated, ensure that the tag
2701 assignment is analyzed.
2703 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2705 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
2706 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
2707 of statement lists that may contain local declarations.
2708 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
2709 duplicate the triggering statements needed for the expansion of this
2710 construct, when the trigger is a dispatching call to a synchronized
2713 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2715 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
2716 * bindgen.adb: Add comments.
2717 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
2720 2011-08-29 Robert Dewar <dewar@adacore.com>
2722 * exp_attr.adb: Minor reformatting.
2723 Minor code reorganization and commenting.
2724 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
2727 2011-08-29 Thomas Quinot <quinot@adacore.com>
2729 * get_scos.adb: Ignore chaining indicators not currently supported
2732 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2734 * system.ads: Minor editing.
2736 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2738 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
2740 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
2741 Attribute_Elab_Subp_Body.
2742 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
2743 * sem_util.adb: Update comments.
2745 2011-08-29 Thomas Quinot <quinot@adacore.com>
2747 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
2748 pragma name for each SCO statement corresponding to a pragma.
2750 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2752 * opt.ads: Minor editing.
2754 2011-08-29 Yannick Moy <moy@adacore.com>
2756 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
2757 that only made sense for CodePeer mode.
2759 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2761 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2762 which is no longer used.
2763 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2764 handling of the 64-bit division check.
2765 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2767 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2770 2011-08-29 Thomas Quinot <quinot@adacore.com>
2772 * get_scos.adb: Minor reformatting.
2774 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2776 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2777 statement list is wrapped in a block, the block is explicitly analyzed
2778 in order to properly redecorate the entities and create a servicing
2781 2011-08-29 Tristan Gingold <gingold@adacore.com>
2783 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2784 (Set_Zero_Cost_Handling): Remove.
2786 2011-08-29 Thomas Quinot <quinot@adacore.com>
2788 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2790 2011-08-29 Geert Bosch <bosch@adacore.com>
2792 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2793 instruction, as the latter may produce -0.0, which is not a valid VAX
2795 (Neg_G): Likewise for VAX F float.
2797 2011-08-29 Robert Dewar <dewar@adacore.com>
2799 * exp_util.adb: Minor reformatting.
2801 2011-08-29 Yannick Moy <moy@adacore.com>
2803 * sem_ch3.adb: Minor comment update.
2805 2011-08-29 Thomas Quinot <quinot@adacore.com>
2807 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2810 2011-08-29 Thomas Quinot <quinot@adacore.com>
2812 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2813 current statement sequence on a generic instantiation or a subprogram
2816 2011-08-29 Robert Dewar <dewar@adacore.com>
2818 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2821 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2823 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2824 Correct the check which involves the freeze node of a controlled or
2825 access-to-controlled type.
2827 2011-08-29 Geert Bosch <bosch@adacore.com>
2829 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2831 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2834 2011-08-29 Yannick Moy <moy@adacore.com>
2836 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2837 for every index type and component type that is not a subtype_mark.
2838 (Process_Subtype): Set Etype of subtype.
2840 2011-08-29 Robert Dewar <dewar@adacore.com>
2842 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2843 reorganization. Minor reformatting.
2845 2011-08-29 Steve Baird <baird@adacore.com>
2847 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2848 for CodePeer and ALFA modes.
2850 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2852 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2853 that comes from an enclosing scope if it is not the renaming of an
2854 actual, to handle properly a spurious ambiguity in an instance.
2856 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2858 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2859 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
2860 use it instead of the Esize of the first parameter.
2861 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2863 <Size>: Likewise. Call it for composite types on the RM size.
2865 2011-08-29 Yannick Moy <moy@adacore.com>
2867 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2868 * sem_util.adb (Unique_Name): Correct behaviour for names of
2871 2011-08-29 Yannick Moy <moy@adacore.com>
2873 * sem_prag.adb (Check_Precondition_Postcondition): In formal
2874 verification mode, analyze pragma expression for correctness, for
2875 pre/post on library-level subprogram, as it is not expanded later.
2877 2011-08-29 Yannick Moy <moy@adacore.com>
2879 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2880 in formal verification.
2882 2011-08-29 Thomas Quinot <quinot@adacore.com>
2884 * sem_util.adb: Minor reformatting.
2885 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2887 * par_sco.ads, par_sco.adb: Update comments.
2889 2011-08-29 Yannick Moy <moy@adacore.com>
2891 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2892 associated getter/setter.
2893 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2895 2011-08-29 Vincent Celier <celier@adacore.com>
2897 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2898 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2899 with declarations for Language_Kind and Dependency_Kind for Ada.
2900 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2901 (Process_Compiler): Take into account the new attributes Dependency_Kind
2903 (Check_Configuration): Check if language kind is unit based, not if the
2904 language name is Ada.
2905 (Process_Exceptions_Unit_Based): Ditto
2906 (Add_Language): Remove default additions of language and dependency kind
2907 * prj.ads: Minor comment change
2908 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2910 2011-08-29 Johannes Kanig <kanig@adacore.com>
2912 * debug.adb: Update comments.
2914 2011-08-24 Joseph Myers <joseph@codesourcery.com>
2916 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2917 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2918 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2919 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2920 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2922 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2924 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2925 (GNATLIBCFLAGS_FOR_C): Replace
2926 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2927 (gnatlib-shared-default, gnatlib-shared-dual-win32)
2928 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2929 (gnatlib-sjlj, gnatlib-zcx): Likewise.
2931 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
2933 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2935 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2937 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2939 2011-08-05 Nicolas Roche <roche@adacore.com>
2941 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2942 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2944 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
2946 2011-08-05 Matthew Heaney <heaney@adacore.com>
2948 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
2949 subprogram bodies declared out-of-order.
2951 2011-08-05 Yannick Moy <moy@adacore.com>
2953 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
2954 entities directly in package Standard, otherwise skip the standard
2957 2011-08-05 Robert Dewar <dewar@adacore.com>
2959 * a-cbmutr.adb: Minor reformatting
2960 (Allocate_Node): refactor node allocation algorithm
2962 2011-08-05 Robert Dewar <dewar@adacore.com>
2964 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
2965 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
2967 (Analyze_Pragma, case Check_Policy): Ditto.
2968 * sem_prag.ads (Check_Disabled): New function
2969 * snames.ads-tmpl: Add Name_Disable.
2971 2011-08-05 Robert Dewar <dewar@adacore.com>
2973 * gnat_rm.texi: Document implementation-defined policy DISABLE for
2974 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
2976 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2978 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
2979 that appears in a generic formal part and applies to a formal
2982 2011-08-05 Robert Dewar <dewar@adacore.com>
2984 * a-cbmutr.ads: Minor reformatting.
2986 2011-08-05 Matthew Heaney <heaney@adacore.com>
2988 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
2989 to check count, check sign of value instead.
2990 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
2991 (Copy_Subtree): allocate copy of source element
2992 (Equal_Subtree): compare elements, not access objects
2994 2011-08-05 Vincent Celier <celier@adacore.com>
2996 * gnat_ugn.texi: Fix VMS alternative.
2998 2011-08-05 Thomas Quinot <quinot@adacore.com>
3000 * sem_ch11.adb: Add comment.
3002 2011-08-05 Robert Dewar <dewar@adacore.com>
3004 * exp_util.adb: Minor comment fix.
3006 2011-08-05 Robert Dewar <dewar@adacore.com>
3008 * scng.adb (Error_Unterminated_String): Improve flag position when
3011 2011-08-05 Matthew Heaney <heaney@adacore.com>
3013 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3015 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3016 multiway tree containers.
3018 2011-08-05 Robert Dewar <dewar@adacore.com>
3020 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3021 * stylesw.adb: Implement -gnatyC to control comment spacing
3022 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3024 * usage.adb: Add line for -gnatyC.
3026 2011-08-05 Robert Dewar <dewar@adacore.com>
3028 * gnat_ugn.texi: Document -gnatyC.
3029 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3030 synonym for COMMENTS2).
3032 2011-08-05 Robert Dewar <dewar@adacore.com>
3034 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3035 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3036 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3037 a-comutr.ads, lib-xref.adb: Minor reformatting.
3039 2011-08-05 Robert Dewar <dewar@adacore.com>
3041 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3042 warning if there is an exception handler present.
3044 2011-08-05 Pascal Obry <obry@adacore.com>
3046 * a-iteint.ads: Fix copyright year.
3048 2011-08-05 Thomas Quinot <quinot@adacore.com>
3050 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3051 statement SCO for a USE clause or a representation clause.
3053 2011-08-05 Yannick Moy <moy@adacore.com>
3055 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3056 between body and spec for stub.
3057 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3058 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3059 pragma precondition or postcondition, for which the enclosing
3060 subprogram or package in the AST is not the desired one, return empty.
3062 2011-08-05 Thomas Quinot <quinot@adacore.com>
3064 * g-expect.adb: Minor reformatting.
3066 2011-08-05 Bob Duff <duff@adacore.com>
3068 * a-fihema.adb: Comment out OS_Lib.
3070 2011-08-05 Matthew Heaney <heaney@adacore.com>
3072 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3073 (unbounded multiway tree containers) and a-iteint.ads.
3074 * a-comutr.ads, a-comutr.adb:
3075 This is the new Ada 2012 unit for unbounded multiway tree containers
3076 * a-cimutr.ads, a-cimutr.adb
3077 This is the new Ada 2012 unit for indefinite multiway tree containers
3078 * a-iteint.ads: New file.
3080 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3082 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
3084 2011-08-05 Bob Duff <duff@adacore.com>
3086 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3088 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3090 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3092 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3093 general indexing aspects of Ada2012. Called when analyzing indexed
3094 components when other interpretations fail.
3095 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3096 in an expression context where overloading is meaningful. This excludes
3097 the occurrence in an aspect specification (efficiency only).
3098 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3099 related to iterators can be set by an attribute specification, but
3101 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3102 Constant_Indexing and Variable_Indexing.
3103 (Check_Indexing_Functions): New procedure to perform legality checks.
3104 Additional semantic checks at end of declarations.
3106 2011-08-05 Sergey Rybin <rybin@adacore.com>
3108 * tree_io.ads: Update ASIS_Version_Number because of the change of the
3109 order of calling Tree_Write/Tree_Read routines made for aspects.
3111 2011-08-05 Bob Duff <duff@adacore.com>
3113 * a-fihema.adb (Finalize): Fix race condition.
3115 2011-08-05 Yannick Moy <moy@adacore.com>
3117 * sem_ch12.adb (Analyze_Package_Instantiation,
3118 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3121 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3123 * sem_type.adb (Specific_Type): in an instance, the type-specific
3124 operand of an equality check that involves null may have a private
3125 type. Use full view to determine legality of construct.
3127 2011-08-05 Vincent Celier <celier@adacore.com>
3129 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3130 delete or close the file when the call to gnatmake was successful.
3132 2011-08-05 Yannick Moy <moy@adacore.com>
3134 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3135 Global_Discard_Names.
3137 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3139 * sinfo.ads: comments on use of entity field for aspect specifications.
3141 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3143 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3144 node is not itself an entity but a selected component, it is a
3145 rewritten parameterless call to an en enclosing synchronized operation,
3146 and this expansion will be performed again in the instance, so there is
3147 no global information to preserve.
3149 2011-08-05 Javier Miranda <miranda@adacore.com>
3151 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3152 for renamings of predefined primitives.
3153 (In_Predef_Prims_DT): New subprogram.
3155 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3157 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3158 possible interpretation of name is a reference type, add an
3159 interpretation that is the designated type of the reference
3160 discriminant of that type.
3161 * sem_res.adb (resolve): If the interpretation imposed by context is an
3162 implicit dereference, rewrite the node as the deference of the
3163 reference discriminant.
3164 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
3165 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
3166 parent type or base type.
3167 * sem_ch4.adb (Process_Indexed_Component,
3168 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
3169 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
3170 Check for implicit dereference.
3171 (List_Operand_Interps): Indicate when an implicit dereference is
3173 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
3175 2011-08-05 Thomas Quinot <quinot@adacore.com>
3177 * scos.ads: Update documentation of SCO table. Pragma statements can now
3178 be marked as disabled (using 'p' instead of 'P' as the statement kind).
3179 * par_sco.ads, par_sco.adb: Implement the above change.
3180 (Process_Decisions_Defer): Generate a P decision for the first parameter
3181 of a dyadic pragma Debug.
3182 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
3184 * put_scos.adb: Code simplification based on above change.
3186 2011-08-05 Robert Dewar <dewar@adacore.com>
3188 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
3189 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
3190 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
3191 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
3193 2011-08-05 Bob Duff <duff@adacore.com>
3195 * a-stunau.ads, g-spipat.adb: Update comments.
3197 2011-08-05 Bob Duff <duff@adacore.com>
3199 * a-fihema.ads: Minor comment fix.
3200 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
3202 (Attach, Detach): Remove some unnecessary code.
3203 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
3205 2011-08-05 Bob Duff <duff@adacore.com>
3207 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
3208 allocation for Objects component. This simplifies the code somewhat. It
3209 is also a little more efficient in the not-so-unusual case where there
3210 are no controlled objects allocated.
3211 Make Finalization_Started flag atomic.
3212 (Finalize): Avoid unnecessary detachment of items from the list.
3213 (pcol): Minor cleanup.
3215 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3217 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
3218 package whose name is the same as that of the generic unit, or its
3221 2011-08-05 Bob Duff <duff@adacore.com>
3223 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
3224 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
3225 Minor comment fixes.
3227 2011-08-05 Arnaud Charlet <charlet@adacore.com>
3229 * make.adb (Linking_Phase): No longer need to set source search path
3230 before calling gnatlink in CodePeer mode.
3231 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
3232 gcc in CodePeer mode, since the binder generated file no longer has a
3234 * switch.ads, switch.adb (Is_Language_Switch): Removed.
3235 * switch-c.adb: Update comment.
3237 2011-08-05 Thomas Quinot <quinot@adacore.com>
3239 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
3241 2011-08-05 Nicolas Roche <roche@adacore.com>
3243 * gnat_ugn.texi: Fix minor syntax error issue.
3245 2011-08-05 Vincent Celier <celier@adacore.com>
3247 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3248 delete or close the file when the call to gnatmake returns a non
3249 successful return code.
3251 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3253 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
3254 check, indicate that the copy of the original node does not come from
3255 source, to prevent an infinite recursion of the expansion.
3257 2011-08-05 Johannes Kanig <kanig@adacore.com>
3259 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
3260 VC generation for subprogram bodies.
3262 2011-08-05 Yannick Moy <moy@adacore.com>
3265 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
3266 the base type with the smallest allowed base type.
3268 2011-08-05 Sergey Rybin <rybin@adacore.com>
3270 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
3273 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3275 * sem_ch12.ads: minor comment updates.
3277 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3279 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
3280 instantiation and a formal package the compiler generates a package
3281 renaming declaration so that the generic name within the declaration
3282 is interpreted as a renaming of the instance. At the end of a formal
3283 package declaration, this renaming must become invisible.
3285 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3287 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
3288 comparison and rely on concrete entities instead.
3290 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3292 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
3293 and discriminants, to indicate that the type has an access discriminant
3294 that supports implicit dereference.
3295 * snames.ads-tmpl: Add names of aspects and attributes related to
3296 Ada2012 iterators: constant_indexing, default_iterator,
3297 iterator_element, implicit_dereference, variable_indexing.
3298 * aspects.ads, aspects.adb: entries for iterator-related aspects.
3299 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
3300 iterator-related aspects.
3301 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
3303 2011-08-05 Sergey Rybin <rybin@adacore.com>
3305 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
3306 metrics in gnatmetric to cover new kinds of coupling mentrics.
3308 2011-08-05 Steve Baird <baird@adacore.com>
3310 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
3311 of calling the user-defined main subprogram.
3312 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
3313 is set) Call_Main_Subprogram ahead of, as opposed to
3315 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
3316 generation of a "with" of the user-defined main subprogram.
3317 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
3318 (which is now called from Gen_Main instead).
3320 2011-08-05 Emmanuel Briot <briot@adacore.com>
3322 * projects.texi: Added reference to the Makefile package.
3324 2011-08-05 Thomas Quinot <quinot@adacore.com>
3326 * exp_ch7.adb: Minor comment rewording.
3328 2011-08-05 Ed Falis <falis@adacore.com>
3330 * env.c: Fix comment.
3332 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3334 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
3335 character comparison and rely on concrete entities instead.
3337 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3339 * sem_ch3.adb: (Check_Private_Overriding): better error message,
3340 suggested by AI95-0068.
3342 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3344 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
3345 the two potential initialization calls. This accounts for any
3346 access-before-elaboration checks which may precede the initialization
3348 (Next_Suitable_Statement): New routine. Returns the next real statement
3349 after the input node while skipping generated checks.
3350 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
3351 with comment on usage.
3352 Do not generate Elaborate_All when the trigger is a finalization call
3353 coming from a type init proc.
3354 (Check_Elab_Call): Propagate the initialization procedure context to
3355 subsequent calls to Check_A_Call.
3356 (Check_Internal_Call_Continue): Propagate the initialization procedure
3357 context to subsequent calls to Check_Elab_Call.
3358 (Is_Finalization_Procedure): New routine. Returns True if the input
3359 entity denotes a [Deep_]Finalize routine.
3360 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
3361 along with comment on usage.
3363 2011-08-05 Vadim Godunko <godunko@adacore.com>
3365 * s-atocou.ads: Add list of supported platforms.
3367 2011-08-05 Yannick Moy <moy@adacore.com>
3369 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
3371 * opt.ads (Disable_ALI_File): new Boolean flag
3372 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
3374 2011-08-05 Ed Falis <falis@adacore.com>
3376 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
3377 environ is properly defined.
3379 2011-08-05 Vincent Celier <celier@adacore.com>
3381 * make.adb (Compilation_Phase): Exit immediately when all objects have
3382 been found up to date, to avoid multiple exit messages.
3383 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
3384 same project for languages with no compiler.
3385 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
3387 2011-08-05 Robert Dewar <dewar@adacore.com>
3389 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
3390 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
3391 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
3392 s-atocou-builtin.adb: Minor reformatting.
3394 2011-08-05 Yannick Moy <moy@adacore.com>
3396 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
3397 if the node to wrap is a pragma check, this node and enclosed
3398 expression are not expanded, so do not apply any transformations here.
3399 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
3400 introducing transient scopes.
3402 2011-08-05 Jose Ruiz <ruiz@adacore.com>
3404 * adaint.c (__gnat_set_writable, __gnat_set_readable,
3405 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
3406 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
3407 routine is available, so we use the default implementation of these
3409 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
3410 support for copying attributes on VxWorks 6.
3412 2011-08-05 Yannick Moy <moy@adacore.com>
3414 * debug.adb: Remove use of -gnatd.D.
3415 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
3416 * opt.ads: Simplify variables for ALFA mode, to keep one only
3417 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
3420 2011-08-05 Vincent Celier <celier@adacore.com>
3422 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
3423 Builder'Default_Switches.
3425 2011-08-05 Vincent Celier <celier@adacore.com>
3427 * makeusg.adb: Add lines for --create-map-file switches.
3429 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3431 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
3432 profile is incomplete and the full view is available, replace it with
3434 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3435 incomplete, freezing the subprogram is delayed until the full view is
3437 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3438 fixed-point multiplication operator and the predefined operator is
3439 resolved in favor of the user-defined one.
3441 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3443 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3446 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3448 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3449 whether a type lacks user-defined Read or Write operations, or has a
3450 component that lacks them.
3451 * sem_attr.adb (Check_Stream_Attribute): if restriction
3452 No_Default_Stream_Attributes is active, verify that all subcomponent
3453 types of the target have user-defined stream operations, and report
3455 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3456 * exp_strm.adb: Build_Elementary_Input_Call,
3457 Build_Elementary_Write_Call): remove checks for restriction
3458 No_Default_Stream_Attributes, now checked in semantics.
3460 2011-08-04 Vincent Celier <celier@adacore.com>
3462 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3463 switches on the command line, look for all valid --RTS switches in the
3464 Builder switches and for each language use the first runtime name found
3465 to invoke gprconfig.
3466 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3467 command line and there is no auto-configuration.
3468 (Runtime_Name_Set_For): New function.
3470 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3472 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3473 elaborate initialization expression for variable Abort when processing
3474 a package body or a declaration.
3475 (Create_Finalizer): Propagate the package context when creating the
3476 exception-related variables.
3477 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3478 For_Package along with usage comment.
3480 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3482 * gcc-interface/Makefile.in: Clean up targets.
3483 Enable new package for atomic counters and copy-on-write implementation
3484 of unbounded strings on x86 platforms.
3485 * gcc-interface/Make-lang.in: Update dependencies.
3487 2011-08-04 Robert Dewar <dewar@adacore.com>
3489 * exp_ch7.adb: Minor reformatting.
3491 2011-08-04 Robert Dewar <dewar@adacore.com>
3493 * exp_strm.adb: Minor reformatting.
3495 2011-08-04 Vadim Godunko <godunko@adacore.com>
3497 * s-atocou.adb: Replace by dummy version and use on targets where atomic
3498 operations are not supported.
3499 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3500 * s-atocou-x86.adb: New file.
3501 * Makefile.rtl: Add s-atocou.o file
3503 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3505 * make.adb (Compile): Move setting of CodePeer_Mode to ...
3506 (Compilation_Phase): ... here.
3507 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3509 2011-08-04 Thomas Quinot <quinot@adacore.com>
3511 * Make-generated.in: Fix minor typo in comment.
3513 2011-08-04 Thomas Quinot <quinot@adacore.com>
3515 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3518 2011-08-04 Robert Dewar <dewar@adacore.com>
3520 * a-coinho.adb: Minor reformatting.
3522 2011-08-04 Robert Dewar <dewar@adacore.com>
3524 * a-coinho.ads: Minor reformatting.
3526 2011-08-04 Vadim Godunko <godunko@adacore.com>
3528 * s-atocou.ads, s-atocou.adb: New files.
3529 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3530 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3531 direct use of GCC's atomic builtins and replace them by use of new
3532 atomic counter package.
3534 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3536 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3538 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3540 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3541 with a call to Get_External_Tag.
3542 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3543 subprogram usage. Remove the guard against package declarations and
3544 bodies since Build_Cleanup_Statements is no longer invoked in that
3546 (Build_Components): Initialize Tagged_Type_Stmts when the context
3547 contains at least one library-level tagged type.
3548 (Build_Finalizer): New local variables Has_Tagged_Types and
3549 Tagged_Type_Stmts along with associated comments on usage. Update the
3550 logic to include tagged type processing.
3551 (Create_Finalizer): Insert all library-level tagged type unregistration
3552 code before the jump block circuitry.
3553 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3554 (Expand_N_Package_Declaration): Remove the call to
3555 Build_Cleanup_Statements.
3556 (Process_Tagged_Type_Declaration): New routine. Generate a call to
3557 unregister the external tag of a tagged type.
3558 (Processing_Actions): Reimplemented to handle tagged types.
3559 (Process_Declarations): Detect the declaration of a library-level
3560 tagged type and carry out the appropriate actions.
3561 (Unregister_Tagged_Types): Removed. The machinery has been directly
3562 merged with Build_Finalizer.
3564 2011-08-04 Robert Dewar <dewar@adacore.com>
3566 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3567 gnatls.adb, exp_ch3.adb: Minor reformatting.
3569 2011-08-04 Marc Sango <sango@adacore.com>
3571 * sem_attr.adb (Analyze_Attribute): Replace the message
3572 "invisible attribute of}" of the spark restriction violation in
3573 attribute reference by the simple message "invisible attribute of type".
3574 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3575 two insertion characters: '&' and '}'.
3577 2011-08-04 Vadim Godunko <godunko@adacore.com>
3579 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3580 * a-coinho.ads, a-coinho.adb: New file.
3581 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3583 2011-08-04 Nicolas Roche <roche@adacore.com>
3585 * alfa_test.adb: Not all ali files are containing alfa information even
3586 if compiled with -gnatd.F. So suppress warning about missing ALFA
3589 2011-08-04 Yannick Moy <moy@adacore.com>
3591 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3593 * put_alfa.adb: Check that scope name is not empty.
3595 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3597 * exp_ch3.adb (Stream_Operation_Ok): new predicate
3598 Needs_Elementary_Stream_Operation, to determine whether user-defined
3599 Read and Write attributes are available for the elementary components
3600 of the given type. If only the predefined attributes are available,
3601 then when restriction No_Default_Stream_Attributes is active the
3602 predefined stream attributes for the composite type cannot be created.
3604 2011-08-04 Robert Dewar <dewar@adacore.com>
3606 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3607 Put routines in alpha order
3609 2011-08-04 Jose Ruiz <ruiz@adacore.com>
3611 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3612 * gcc-interface/Make-lang.in: Update dependencies.
3614 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3616 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3617 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3620 2011-08-04 Robert Dewar <dewar@adacore.com>
3622 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3623 lib-xref-alfa.adb: Minor reformatting.
3625 2011-08-04 Marc Sango <sango@adacore.com>
3627 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3628 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3629 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3632 2011-08-04 Tristan Gingold <gingold@adacore.com>
3634 * bindgen.adb (Gen_Adainit_C): Remove.
3635 (Gen_Adafinal_C): Ditto.
3636 (Gen_Elab_Externals_C): Ditto.
3637 (Gen_Elab_Calls_C): Ditto.
3638 (Gen_Elab_Order_C): Ditto.
3639 (Gen_Elab_Defs_C): Ditto.
3640 (Gen_Finalize_Library_C): Ditto.
3641 (Gen_Finalize_Library_Defs_C): Ditto.
3642 (Gen_Main_C): Ditto.
3643 (Gen_Output_File_C): Ditto.
3644 (Gen_Restrictions_C): Ditto.
3645 (Gen_Versions_C): Ditto.
3646 (Write_Info_Ada_C): Ditto.
3647 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3648 (Gen_Output_File): Do not force Ada_Bind_File anymore.
3649 Always call Gen_Output_File_Ada.
3650 * gnatlink.adb (Begin_Info): Now a constant.
3652 (Ada_Bind_File): Remove
3653 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
3654 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3655 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3656 * opt.ads (Ada_Bind_File): Remove.
3658 2011-08-04 Thomas Quinot <quinot@adacore.com>
3660 * projects.texi: Document target-specific directory in default project
3663 2011-08-04 Thomas Quinot <quinot@adacore.com>
3665 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3668 2011-08-04 Yannick Moy <moy@adacore.com>
3670 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3671 opt.ads, lib-xref.ads: Code clean up.
3673 2011-08-04 Yannick Moy <moy@adacore.com>
3675 * gnat_rm.texi: Update description of Test_Case
3676 * gnat_ugn.texi: Typo.
3678 2011-08-04 Ed Falis <falis@adacore.com>
3680 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3682 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3684 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3685 it is of type Root_Controlled. This action eliminates fields Prev and
3686 Next from type equality.
3688 2011-08-04 Yannick Moy <moy@adacore.com>
3690 * lib-xref-alfa.adb: Correct typo.
3692 2011-08-04 Matthew Heaney <heaney@adacore.com>
3694 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
3697 2011-08-04 Yannick Moy <moy@adacore.com>
3699 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
3700 (Analyze_Pragma): allow static string expression for name of Test_Case,
3701 instead of simply string literals.
3702 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
3705 2011-08-04 Vincent Celier <celier@adacore.com>
3707 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
3708 case suffixes to find truncated main sources.
3710 2011-08-04 Tristan Gingold <gingold@adacore.com>
3712 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
3713 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
3714 (Compute_Current_Task): Ditto.
3716 2011-08-04 Tristan Gingold <gingold@adacore.com>
3718 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
3720 2011-08-04 Yannick Moy <moy@adacore.com>
3722 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
3723 library-level constant.
3724 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
3725 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
3726 used as selector of parameter association, in ALFA mode.
3728 2011-08-04 Robert Dewar <dewar@adacore.com>
3730 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
3731 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
3734 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3736 * make.adb (Linking_Phase): Set source search path before calling
3737 gnatlink in CodePeer mode.
3739 2011-08-04 Javier Miranda <miranda@adacore.com>
3741 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
3742 Remove code which takes care of building TSDs.
3743 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
3744 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
3745 the accessibility check in VM targets.
3746 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
3747 (Building_Static_DT): Now returns false for VM targets.
3748 (Build_VM_TSDs): Removed.
3749 (Expand_Interface_Conversion): Generate missing runtime check for
3750 conversions to interface types whose target type is unknown at compile
3752 (Make_VM_TSD): Add missing code to disable the generation of calls to
3753 Check_TSD if the tagged type is not defined at library level, or not
3754 has a representation clause specifying its external tag, or -gnatdQ is
3756 * exp_disp.ads (Build_VM_TSDs): Removed.
3757 (Make_VM_TSDs): Spec relocated from exp_disp.adb
3758 * sem_disp.adb (Check_Dispatching_Operation): No code required to
3759 register primitives in the dispatch tables in VM targets.
3760 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3761 initialization of class-wide interface objects in VM targets.
3762 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3765 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3767 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3768 when dotnet-ld cannot be found.
3770 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3772 * bindgen.adb: Simplify significantly generation of binder body file in
3774 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3775 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3778 2011-08-04 Yannick Moy <moy@adacore.com>
3780 * sem_prag.adb, sem.ads: Code cleanup.
3782 2011-08-04 Tristan Gingold <gingold@adacore.com>
3784 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3785 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3786 results if possible.
3787 * s-stusta.adb (Print): Adjust after changes in s-stausa.
3788 * gnat_ugn.texi: Update dynamic stack usage section.
3790 2011-08-04 Steve Baird <baird@adacore.com>
3792 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3793 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3794 contains only a call to the user-defined main subprogram.
3795 (Gen_Main_Ada) - If CodePeer_Mode is set, then
3796 call the "wrapper" subprogram instead of directly
3797 calling the user-defined main subprogram.
3799 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3801 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3802 alternatives of a case statement for controlled objects. Rename local
3803 variable A to Dead_Alt.
3804 (Expand_N_If_Statement): Check the then and else statements of an if
3805 statement for controlled objects. Check the then statements of all
3806 elsif parts of an if statement for controlled objects.
3807 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3809 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3810 detects a loop associated with the expansion of an array object.
3811 Augment the processing of the loop statements to account for a possible
3812 wrap done by Process_Statements_For_Controlled_Objects.
3813 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3814 statements and abortable part of an asynchronous select for controlled
3816 (Expand_N_Conditional_Entry_Call): Check the else statements of a
3817 conditional entry call for controlled objects.
3818 (Expand_N_Selective_Accept): Check the alternatives of a selective
3819 accept for controlled objects.
3820 (Expand_N_Timed_Entry_Call): Check the entry call and delay
3821 alternatives of a timed entry call for controlled objects.
3822 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3823 exception handler for controlled objects.
3824 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3825 Add formal parameter Nested_Constructs along with its associated
3827 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3828 Requires_Cleanup_Actions.
3829 (Process_Statements_For_Controlled_Objects): New routine.
3830 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3831 routine. Inspect a node which contains a non-handled sequence of
3832 statements for controlled objects. If such an object is found, the
3833 statements are wrapped in a block.
3835 2011-08-04 Bob Duff <duff@adacore.com>
3837 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3838 need to compare with Class_Wide_Type (T2), in order to get at the
3839 original class-wide type node.
3840 * sem_type.ads (Covers): Improve the comment.
3841 * einfo.ads (Class_Wide_Type): Improve the comment.
3842 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3843 the type of the Deref.
3845 2011-08-04 Yannick Moy <moy@adacore.com>
3847 * gnat_rm.texi: Document that Test_Case pragma can only appear on
3848 separate declarations.
3849 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3850 check identifier of pragma argument.
3851 (Chain_TC): check that no other test case associated to the same entity
3852 share the same name.
3853 (Check_Test_Case): disallow test case inside subprogram body
3854 (Analyze_Pragma): correct call to check identifier and not argument
3855 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3856 function gets name from test case pragma.
3858 2011-08-04 Yannick Moy <moy@adacore.com>
3860 * gnat_rm.texi: Document new pragma and aspect.
3861 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3862 (No_Duplicates_Allowed): new constant array defining whether duplicates
3863 aspects of each kind can appear on the same declaration.
3864 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3865 field, which points to a node holding the previous Spec_PPC_List.
3866 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3867 through the indirection with Contract.
3868 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3869 * par-prag.adb (Prag): do nothing on Test_Case pragma
3870 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3872 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3873 component Ensures of Test_Case.
3874 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3875 (Analyze_Generic_Subprogram_Declaration,
3876 Analyze_Subprogram_Instantiation,
3877 Analyze_Abstract_Subprogram_Declaration,
3878 Analyze_Subprogram_Body_Helper,
3879 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3880 insert contract in subprogram node at point of definition
3882 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3883 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3884 corresponding pragma
3885 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3886 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3887 similar to the analysis of pre/post
3888 (Derive_Subprogram): insert contract in subprogram node at point of
3890 * sem_prag.adb, sem_prag.ads
3891 (Check_Arg_Is_String_Literal, Check_Identifier):
3892 new checking procedures to be called in treatment of pragmas
3893 (Check_Test_Case): new procedure to check that a Test_Case aspect or
3894 pragma is well-formed. This does not check currently that 'Result is
3895 used only in the Ensures component of a Test_Case.
3896 (Analyze_Pragma): add case for Test_Case
3897 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3898 components of a Test_Case.
3899 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3900 expressions in the 3rd (and 4th if present) arguments of a Test_Case
3901 pragma, treated as spec expressions.
3902 (Sig_Flags): add value -1 for Test_Case.
3903 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3904 Get_Requires_From_Test_Case_Pragma): getters for both expression
3905 components of a Test_Case.
3906 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3907 indirection between an entry or [generic] subprogram entity and its
3908 pre/post + test-cases.
3909 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3910 get/set for fields of an N_Contract node.
3911 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3912 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3913 names and pragma for Test_Case.
3914 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3916 2011-08-04 Vincent Celier <celier@adacore.com>
3918 * gnat_ugn.texi: Improve documentation of gnatmake switch
3919 --source-info-file=.
3921 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3923 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3924 type). Initialize Atyp to the appropriate type which is later checked
3925 for completion. Rewrite the assertion associated with private type
3928 2011-08-04 Ed Falis <falis@adacore.com>
3930 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3931 initialize the number of CPUs.
3933 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3935 * sem_type.adb (Disambiguate): New subsidiary routine
3936 In_Same_Declaration_List, to implement AI05-0020: a user-defined
3937 equality on an anonymous access type whose designated type is private
3938 does not lead to an ambiguity with the universal access equality
3939 operator in the body or child units of the defining package. The same
3940 is true for a multiplication operator on a private type completed with
3943 2011-08-04 Javier Miranda <miranda@adacore.com>
3945 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
3946 (Normalize_Scalars_Config): Removed.
3948 (Register_Opt_Config_Switches): Remove registering config values of
3949 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
3950 (Restore_Opt_Config_Switches): Remove code which restores the values of
3951 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3952 Init_Or_Norm_Scalars.
3953 (Save_Opt_Config_Switches): Remove code which saves values of
3954 Init_Or_Norm_Scalars and Normalize_Scalars.
3955 (Set_Opt_Config_Switches): Remove code which restores config values of
3956 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3957 Init_Or_Norm_Scalars.
3959 2011-08-04 Yannick Moy <moy@adacore.com>
3961 * frontend.adb (Frontend): remove previous patch to avoid full
3962 qualification in ALFA mode.
3963 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
3964 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
3965 unique name for an entity, which could be used to identify the entity
3966 across compilation units.
3968 2011-08-04 Thomas Quinot <quinot@adacore.com>
3971 (Initialize_Default_Project_Path): Add target specific directory
3972 ($prefix/$target/lib/gnat) in front of project path in all cases
3973 (making gnatmake's behaviour consistent with gprbuild).
3974 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
3975 Pass target name from Sdefault to project subsystem.
3976 * gnatls.adb: Show new target specific default project directory.
3978 2011-08-04 Johannes Kanig <kanig@adacore.com>
3980 * cstand.adb: Add Information to Identifier in Standard
3981 (Identifer_For): Set Entity to the corresponding entity
3983 2011-08-04 Sergey Rybin <rybin@adacore.com>
3985 * gnat_ugn.texi: Update doc on gnatcheck.
3987 2011-08-04 Yannick Moy <moy@adacore.com>
3989 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
3992 2011-08-04 Yannick Moy <moy@adacore.com>
3994 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
3995 performing expansion.
3996 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
3997 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
3998 it is not called in ALFA mode.
4000 2011-08-04 Emmanuel Briot <briot@adacore.com>
4002 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4003 after all, so removed.
4005 2011-08-04 Sergey Rybin <rybin@adacore.com>
4007 * vms_data.ads: Add missing VMS qualifiers.
4009 2011-08-04 Emmanuel Briot <briot@adacore.com>
4011 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4012 the list of files on the command line after processing it through
4015 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4017 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4018 processing for .NET/JVM. These targets can now benefit from
4019 Raise_From_Controlled_Operation and they share the same processing with
4021 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4022 These targets need transient scopes in order to properly finalize short
4023 lived controlled objects.
4024 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4025 NET/JVM. These targets can now benefit from
4026 Raise_From_Controlled_Operation and they share the same processing with
4029 2011-08-04 Geert Bosch <bosch@adacore.com>
4031 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4033 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4035 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4036 Expand_Record_Aggregate, to determine whether aggregate must be
4037 expanded into assignments. This is the case if the ancestor part is
4038 private, regarless of the setting of the flag Has_Private_Ancestor.
4040 2011-08-04 Ed Falis <falis@adacore.com>
4042 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4044 2011-08-04 Bob Duff <duff@adacore.com>
4046 * sinfo.ads: Fix comment.
4048 2011-08-04 Steve Baird <baird@adacore.com>
4050 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4051 choose a package name in much the same way as is
4052 done for JGNAT when VM_Target /= No_VM, except that
4053 a slightly more distinctive prefix string is used.
4055 2011-08-04 Emmanuel Briot <briot@adacore.com>
4057 * makeutl.adb (Complete_Mains): no longer accept unit names on the
4058 gnatmake command line.
4059 This behavior was never documented (and was supported only because of
4060 an early bug in the code). This case might lead to ambiguous cases
4061 (between unit names and truncated base names without suffixes).
4063 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4065 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4066 Remove the external tag of a tagged type from the internal hash table.
4067 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4068 expanded usage of the routine. Strenghten the check for Is_Master. Add
4069 processing for tagged types.
4070 (Build_Finalizer): Create all the necessary lists used in finalizer
4071 creation when the processed context is a package that may contain
4073 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4074 Requires_Cleanup_Actions.
4075 (Expand_N_Package_Body): Package bodies may need clean up code
4076 depending on whether they contain tagged types.
4077 (Expand_N_Package_Declaration): Package declarations may need clean up
4078 code depending on whether they contain tagged types.
4079 (Unregister_Tagged_Types): New routine. Search through a list of
4080 declarations or statements, looking for non-abstract Ada tagged types.
4081 For each such type, generate code to unregister the external tag.
4082 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4083 Requires_Cleanup_Actions.
4084 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4085 through a list of declarations or statements looking for non-abstract
4086 Ada tagged types or controlled objects.
4087 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4088 Requires_Cleanup_Actions.
4089 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4090 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4093 2011-08-04 Vincent Celier <celier@adacore.com>
4095 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4096 has Ada sources, not project Project, because if the root project
4097 Project has no sources of its own, all projects will be deemed without
4100 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4102 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4103 of the No_Param_Proc acc-to-subp type used for initialization of
4104 __gnat_finalize_library_objects so that it's declared at library level
4105 rather than nested inside of the adainit routine.
4107 2011-08-04 Javier Miranda <miranda@adacore.com>
4109 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4110 if the tagged type has a representation clause which specifies its
4113 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4115 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4116 Remove previous procedure with that name.
4117 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4119 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4120 subtype mark, the ancestor cannot have unknown discriminants.
4121 (Resolve_Record_Aggregate): if the type has invisible components
4122 because of a private ancestor, the aggregate is illegal.
4124 2011-08-04 Vincent Celier <celier@adacore.com>
4126 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4127 account switches -gnat2005, -gnat12 and -gnat2012.
4129 2011-08-04 Bob Duff <duff@adacore.com>
4131 * s-tasdeb.ads: Minor comment fix.
4133 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4135 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4137 * switch.ads, switch.adb (Is_Language_Switch): New function.
4139 2011-08-04 Vincent Celier <celier@adacore.com>
4141 * switch-c.adb: Minor comment addition.
4143 2011-08-04 Vincent Celier <celier@adacore.com>
4145 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4146 ending with '=' is followed by a space (missing file name).
4148 2011-08-04 Pascal Obry <obry@adacore.com>
4150 * g-regist.ads: Fix size of HKEY on x86_64-windows.
4152 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4154 * sem_ch12.adb (Analyze_Associations): New routine
4155 Check_Overloaded_Formal_Subprogram to reject a formal package when
4156 there is a named association or a box initialisation for an overloaded
4157 formal subprogram of the corresponding generic.
4159 2011-08-04 Yannick Moy <moy@adacore.com>
4161 * alfa.ads (ALFA_Xref_Record): add component for type of entity
4162 * get_alfa.adb, put_alfa.adb: Read and write new component of
4164 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
4166 2011-08-04 Pascal Obry <obry@adacore.com>
4168 * urealp.adb: Minor reformatting.
4170 2011-08-04 Tristan Gingold <gingold@adacore.com>
4172 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
4173 Handle the case when Cleanup_Protected_Object returns Empty.
4175 2011-08-04 Yannick Moy <moy@adacore.com>
4177 * frontend.adb (Frontend): only qualify names in non-ALFA mode
4179 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4181 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
4182 call, ignore functions.
4184 2011-08-04 Geert Bosch <bosch@adacore.com>
4186 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
4189 2011-08-04 Emmanuel Briot <briot@adacore.com>
4191 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
4192 as an index for Builder'Switches. This conforms to the documentation.
4193 * make.adb (Insert_Project_Sources): avoid duplicate code
4195 2011-08-04 Emmanuel Briot <briot@adacore.com>
4197 * makeutl.adb (Complete_Mains): if the user has passed a relative file
4198 name on the command line (for instance "../dummy"), never assume it can
4201 2011-08-04 Tristan Gingold <gingold@adacore.com>
4203 * bindgen.adb: Remove code the reference or create the
4204 Break_Start/__gnat_break_start procedure.
4205 * s-stalib.adb (Break_Start): Removed.
4207 2011-08-04 Emmanuel Briot <briot@adacore.com>
4209 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
4210 shared with gprbuild.
4212 2011-08-04 Yannick Moy <moy@adacore.com>
4214 * par-ch4.adb (P_Primary): preferentially issue an error message about
4215 a missing parenthesis arount a conditional or case expression in Ada
4216 2012 mode, if we detect that the alignment is not correct for a
4219 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4221 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
4222 tag-to-class-wide conversion as needing finalization actions.
4223 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
4224 a tag-to-class-wide conversion as needing finalization actions.
4225 (Is_Finalizable_Transient): The result of a tag-to-class-wide
4226 conversion does not need finalization actions.
4227 (Is_Tag_To_CW_Conversion): New routine.
4228 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
4229 whether an object is the result of a tag-to-class-wide conversion.
4231 2011-08-04 Yannick Moy <moy@adacore.com>
4233 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
4234 the left-hand-side and right-hand-side of a conjunct are inserted when
4235 translating a pre- or postcondition
4236 * sem_ch6.adb: Correct typo in comment
4238 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4240 * gnat_rm.texi: Ravenscar does not prohibit dependence on
4241 Unchecked_Conversion and Unchecked_Deallocation.
4243 2011-08-04 Thomas Quinot <quinot@adacore.com>
4245 * make.adb: Minor reformatting.
4247 2011-08-04 Emmanuel Briot <briot@adacore.com>
4249 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
4250 sources in the project and its imported projects, but not in the whole
4253 2011-08-04 Emmanuel Briot <briot@adacore.com>
4255 * make.adb: Remove debug trace.
4257 2011-08-04 Vincent Celier <celier@adacore.com>
4259 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
4260 path in canonical form, to be able to compare path names on platforms
4261 such as Windows or Darwin.
4263 2011-08-04 Thomas Quinot <quinot@adacore.com>
4265 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
4266 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
4267 * scos.ads: Update documentation accordingly.
4268 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
4271 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4273 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
4274 attribute only if prefix type is scalar.
4276 2011-08-04 Emmanuel Briot <briot@adacore.com>
4278 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
4279 in gnatmake for specifying mains on the command line that do not belong
4280 to the main project. These mains must currently all belong to the same
4282 (Ultimate_Extension_Of): removed, since duplicated
4283 Ultimate_Extending_Project.
4285 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4287 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
4289 (CodePeer_Mode_String): New.
4290 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
4292 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
4293 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
4294 mode, since no useful elaboration subprogram is needed by CodePeer.
4295 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
4296 In this mode, compile binder file with -gnatC and do stop after this
4299 2011-08-04 Vincent Celier <celier@adacore.com>
4301 * exp_ch7.adb: Minor comment fix.
4303 2011-08-04 Robert Dewar <dewar@adacore.com>
4305 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
4306 exp_ch4.adb, makeutl.adb: Minor reformatting.
4308 2011-08-04 Emmanuel Briot <briot@adacore.com>
4310 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4311 Create several new subprograms to move code out of Make. This makes the
4312 code more readable, removes code duplication, and is a preparation work
4313 for adding support for aggregate projects.
4315 2011-08-04 Tristan Gingold <gingold@adacore.com>
4317 * s-po32gl.ads, s-po32gl.adb: New files.
4318 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
4319 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
4320 (Build_Finalization_Collection): Use it.
4321 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
4322 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
4324 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
4325 * gcc-interface/Make-lang.in: Update dependencies.
4327 2011-08-04 Emmanuel Briot <briot@adacore.com>
4329 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
4332 2011-08-04 Emmanuel Briot <briot@adacore.com>
4334 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
4335 command line is not a file name, also check whether it could be a unit
4338 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4340 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4341 the header of the finalization routine.
4342 If the unit has no finalizer but is a body whose spec has one, then
4343 generate the decrement of the elaboration entity only.
4344 If the unit has a finalizer and is a spec, then do not generate the
4345 decrement of the elaboration entity.
4346 (Gen_Finalize_Library_C): Likewise.
4348 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4350 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
4351 (Bounds_Size_Expression): Removed.
4352 (Double_Alignment_Of): New subsidiary routine.
4353 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
4354 for a hole in the dope vector of unconstrained arrays due to different
4355 index and element alignments.
4357 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4359 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
4360 raise program_error because body has not been seen yet.
4362 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4364 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
4367 2011-08-04 Vincent Celier <celier@adacore.com>
4369 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
4371 2011-08-04 Yannick Moy <moy@adacore.com>
4373 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
4374 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
4376 2011-08-04 Thomas Quinot <quinot@adacore.com>
4378 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
4379 instantiation in RCI.
4381 2011-08-04 Emmanuel Briot <briot@adacore.com>
4383 * make.adb: Share more code with gprbuild
4385 2011-08-04 Emmanuel Briot <briot@adacore.com>
4387 * projects.texi: Added documentation for the IDE'Gnat project file
4390 2011-08-04 Nicolas Roche <roche@adacore.com>
4392 * gnat_rm.texi: Minor editing.
4394 2011-08-04 Javier Miranda <miranda@adacore.com>
4396 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
4397 and the library case for VM targets.
4398 (Gen_Adainit_Ada): Likewise.
4400 2011-08-04 Robert Dewar <dewar@adacore.com>
4402 * g-altive.ads: Minor comment updates.
4403 * prj-nmsc.adb: Minor reformatting.
4405 2011-08-04 Javier Miranda <miranda@adacore.com>
4408 (Normalize_Scalars_Config): Value of the configuration switch set by
4409 pragma Normalize_Scalars when it appears in the gnat.adc file.
4410 (Normalize_Scalars): New field for record Config_Switches_Type. Used
4411 to save and restore settings of this pragma.
4413 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
4414 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
4416 2011-08-04 Vincent Celier <celier@adacore.com>
4418 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
4420 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4422 * makeutl.adb: Minor reformatting.
4424 2011-08-04 Olivier Hainque <hainque@adacore.com>
4426 * g-altive.ads: Update comments to reflect that only the soft
4427 binding is available today.
4429 2011-08-04 Robert Dewar <dewar@adacore.com>
4431 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
4432 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4433 * gcc-interface/Make-lang.in: Update dependencies.
4435 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4437 * prj-env.adb: Remove local debug traces.
4439 2011-08-04 Yannick Moy <moy@adacore.com>
4441 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4442 was used instead of Hi_OK, which could cause a read of an uninitialized
4443 value later on. Detected while working on the new warning.
4444 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4446 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4447 in more cases, in order to detect more unreferenced values.
4448 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4449 object for expression, if any.
4451 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4453 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4454 the operand types instead of the Esize.
4456 2011-08-04 Steve Baird <baird@adacore.com>
4458 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4459 enable CodePeer_Mode.
4460 * bindusg.adb (Display): Add help message describing -P binder switch.
4461 * gnat_ugn.texi: Document -P binder switch.
4462 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4463 user-defined main program directly.
4464 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4465 user-defined main program in the context clause of the package body.
4467 2011-08-04 Yannick Moy <moy@adacore.com>
4469 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4470 duplicate of Defining_Entity
4471 (Get_Unique_Entity_For_Decl): rename function into
4472 Unique_Defining_Entity
4473 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4474 (Formal_Proof_On): remove synthesized flag
4475 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4476 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4477 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4478 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4479 Annotate (Formal_Proof)
4481 2011-08-04 Emmanuel Briot <briot@adacore.com>
4483 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4484 source files with non-standard naming schemes, in imported projects
4486 2011-08-04 Emmanuel Briot <briot@adacore.com>
4488 * makeutl.adb (Complete_Mains): when a multi-unit source file is
4489 specified on the gprbuild command line, we need to compile all units
4490 within that file, not just the first one we find
4491 Fix error message for mains that are not found.
4493 2011-08-04 Thomas Quinot <quinot@adacore.com>
4495 * sem_ch6.adb: Update comment.
4496 * sem_ch12.adb: Minor reformatting.
4498 2011-08-04 Bob Duff <duff@adacore.com>
4500 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4501 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4502 race condition whose symptom is to fail to lock Parent. That, in turn,
4503 causes Parent.Awake_Count to be accessed without locking Parent, which
4504 causes another race condition whose symptom is that Parent.Awake_Count
4505 can be off by 1 (either too high or too low). The solution is to lock
4506 Parent unconditionally, and then lock Acceptor, before reading
4507 Acceptor.Terminate_Alternative.
4509 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4511 * debug.adb: Update comment.
4513 2011-08-04 Robert Dewar <dewar@adacore.com>
4515 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4516 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4517 exp_ch6.adb: Minor reformatting.
4519 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4521 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4524 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4526 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4528 2011-08-04 Thomas Quinot <quinot@adacore.com>
4530 * sinfo.ads: Minor reformatting.
4532 2011-08-04 Emmanuel Briot <briot@adacore.com>
4534 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4535 even if there is no location.
4537 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4539 * sem_res.adb, sem_ch4.adb: move check for restriction
4540 No_Task_Hierarchy to resolve_allocator.
4542 2011-08-04 Thomas Quinot <quinot@adacore.com>
4544 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4545 This flag of N_Pragma nodes is not used, remove it as well as all of
4546 the associated circuitry.
4548 2011-08-04 Javier Miranda <miranda@adacore.com>
4550 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4551 runtime check on duplicated externa tags
4552 * debug.adb Document switch -gnatdQ.
4554 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4556 * a-fihema.ads: Minor typo fix.
4558 2011-08-04 Yannick Moy <moy@adacore.com>
4560 * sem_ch10.adb: Minor comment update.
4562 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4564 * einfo.adb: Update the node field usage to reflect the renaming of
4565 Return_Flag to Return_ Flag_Or_Transient_Decl.
4566 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4567 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4568 (Write_Field15_Name): Change Return_Flag to
4569 Return_Flag_Or_Transient_Decl.
4570 * einfo.ads: Rename node field Return_Flag to
4571 Return_Flag_Or_Transient_Decl. Update the associated comment and all
4572 occurrences in entities.
4573 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4574 associated Inline pragma.
4575 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4576 associated Inline pragma.
4577 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4579 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4580 Return_Flag and Set_Return_Flag.
4581 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4582 objects generated for controlled transients declared inside an
4583 Exception_With_Actions. Update the calls to Return_Flag.
4584 (Process_Object_Declaration): Add code to add a null guard for hook
4585 objects generated for controlled transients declared inside an
4586 Exception_With_Actions. Update related comment.
4587 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4588 objects generated for controlled transients declared inside an
4589 Exception_With_Actions. Update the calls to Return_Flag.
4590 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4592 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4594 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4595 positional aggregate.
4597 2011-08-04 Vincent Celier <celier@adacore.com>
4599 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4600 SLOC only for pragmas.
4602 2011-08-04 Emmanuel Briot <briot@adacore.com>
4604 * projects.texi: Minor typo fix.
4606 2011-08-04 Emmanuel Briot <briot@adacore.com>
4608 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4609 on case-sensitive file systems.
4611 2011-08-04 Thomas Quinot <quinot@adacore.com>
4613 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4614 nested in a disabled pragma.
4615 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4616 enclosing pragma, if any, for X decisions.
4618 2011-08-04 Thomas Quinot <quinot@adacore.com>
4620 * sem_prag.adb: Minor reformatting.
4622 2011-08-04 Vincent Celier <celier@adacore.com>
4624 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4625 allowed in no run time mode.
4627 2011-08-04 Vincent Celier <celier@adacore.com>
4629 * make.adb (Check): When -gnatc is used, check for the source file
4630 inside the ALI file with a canonical case file name.
4632 2011-08-04 Emmanuel Briot <briot@adacore.com>
4634 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4635 overriding the separator.
4637 2011-08-04 Robert Dewar <dewar@adacore.com>
4639 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4640 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4642 2011-08-04 Robert Dewar <dewar@adacore.com>
4644 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4646 2011-08-04 Yannick Moy <moy@adacore.com>
4648 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4649 'Result only appears in postcondition of function.
4651 2011-08-04 Thomas Quinot <quinot@adacore.com>
4653 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4654 external tag, include the value of the external tag in the exception
4657 2011-08-04 Yannick Moy <moy@adacore.com>
4659 * sem_attr.adb (Result): modify error message for misplaced 'Result
4661 2011-08-04 Sergey Rybin <rybin@adacore.com>
4663 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4664 clear that the second argument must be an identifier.
4666 2011-08-04 Thomas Quinot <quinot@adacore.com>
4668 * exp_ch9.adb (Build_Barrier_Function): When compiling with
4669 -fpreserve-control-flow, insert an IF statement on the barrier
4670 condition to ensure that a conditional branch instruction is generated.
4672 2011-08-04 Emmanuel Briot <briot@adacore.com>
4674 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4675 (Processing_Flags.Ignore_Missing_With): new flag.
4677 2011-08-04 Emmanuel Briot <briot@adacore.com>
4679 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4680 Source_List_File on case-insensitive systems where the file is actually
4681 on a case-sensitive file system (NFS,...).
4683 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4685 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4686 function return contains a controlled [extension] aggregate and the
4687 return statement is not part of a handled sequence of statements, wrap
4688 the return in a block. This ensures that all controlled temporaries
4689 generated during aggregate resolution will be picked up by the
4690 finalization machinery.
4692 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4694 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
4695 components, freeze type before resolution, to ensure that default
4696 initializations are present for all components.
4697 * sem_res.adb (Resolve_Actuals): the designated object of an
4698 accces-to-constant type is a legal actual in a call to an
4699 initialization procedure.
4701 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4703 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
4704 N_Unchecked_Type_Conversion to the possible containers of a renamed
4707 2011-08-04 Yannick Moy <moy@adacore.com>
4709 * par-ch13.adb (Aspect_Specifications_Present): recognize
4710 "with Identifier'Class =>" as an aspect, so that a meaningful warning
4711 is issued in Strict mode.
4712 * par.adb: Fix typos in comments.
4714 2011-08-04 Yannick Moy <moy@adacore.com>
4716 * sem_attr.adb (Result): modify error message to take into account Post
4717 aspect when compiling Ada 2012 (or newer) code.
4719 2011-08-04 Nicolas Roche <roche@adacore.com>
4721 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
4722 remove need for GCC exceptions.
4724 2011-08-04 Vincent Celier <celier@adacore.com>
4726 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
4727 project, not the source file name.
4728 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
4729 excluded, continue looking. This excluded source will only be returned
4730 if there is no other source with the same base name that is not locally
4733 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4735 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
4736 private and one of the operands is a real literal, use a qualified
4737 expression rather than a conversion which is not meaningful to the
4740 2011-08-04 Yannick Moy <moy@adacore.com>
4742 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
4743 corresponding aspect X'Class are allowed, proceed with analysis of the
4744 aspect instead of skipping it.
4746 2011-08-04 Tristan Gingold <gingold@adacore.com>
4748 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
4749 This will allow to have an Ada implementation for the subprogram.
4751 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4753 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
4754 completion and aspects are present, apply them to the entity for the
4755 type which is currently the partial view, but which is the one that
4757 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4758 applies to a partial view, indicate that the full view has predicates
4759 and delayed aspects.
4760 (Replace_Type_Reference): Handle properly predicates that apply to the
4761 full view of a private completion.
4763 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4765 * layout.adb (Layout_Type): For composite types, do not set Esize.
4766 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4768 (Size_Known): Look at the RM size of components instead of the Esize.
4769 (Freeze_Record_Type): Look at the RM size instead of the Esize to
4770 issue warning and activate Implicit_Packing.
4771 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
4772 if the Esize is not known.
4773 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4774 for elementary types only.
4775 (Analyze_Record_Representation_Clause): Look at the RM size instead
4776 of the Esize to issue errors.
4777 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4779 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
4781 Look at the RM size instead of the Esize for types if the latter is
4783 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4785 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4787 * sem_type.adb: proper handling of equality not involving anonymous
4790 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4792 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4793 Vis_Decls. When creating a library-level finalizer for a package spec,
4794 both the declaration and body of the finalizer are inserted either in
4795 the visible or private declarations of the package spec.
4797 2011-08-04 Javier Miranda <miranda@adacore.com>
4799 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4800 use of the full-view of a type when invoking Is_Ancestor.
4801 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4802 the full-view of private parents is requested, then use also the
4803 full-view of the parent of the first derivation.
4805 2011-08-04 Tristan Gingold <gingold@adacore.com>
4807 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4808 instead of the locally imported procedure.
4809 * s-taprop-mingw.adb (Enter_Task): Ditto.
4810 * s-valrea.adb (Scan_Real): Ditto.
4811 * s-imgrea.adb (Set_Image_Real): Ditto.
4812 * s-flocon.ads: Make the package pure.
4814 2011-08-04 Thomas Quinot <quinot@adacore.com>
4816 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4817 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4818 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4819 New subprogram, moved here from...
4820 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4821 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4822 rewriting of the last argument into a procedure call statement here...
4823 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4826 2011-08-04 Thomas Quinot <quinot@adacore.com>
4828 * par_sco.adb: Minor reformatting.
4830 2011-08-04 Robert Dewar <dewar@adacore.com>
4832 * erroutc.adb: Minor reformatting.
4834 2011-08-04 Thomas Quinot <quinot@adacore.com>
4836 * par_sco.adb: Comment update.
4838 2011-08-04 Tristan Gingold <gingold@adacore.com>
4840 * s-flocon.ads: New file.
4841 * g-flocon.ads: Now a renaming of s-flocon.
4842 * Makefile.rtl: Add s-flocon.o
4844 2011-08-04 Javier Miranda <miranda@adacore.com>
4846 * exp_strm.adb (Build_Array_Input_Function): if the array type is
4847 constrained, do not attempt to build a subtype of it.
4849 2011-08-04 Yannick Moy <moy@adacore.com>
4851 * errout.ads Change comments: remove 'R'M as an example where quotes
4852 are needed; add ALFA as another case where quotes are not needed
4853 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4854 case where quotes are not needed.
4855 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4856 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4857 Remove all occurrences of 'A'L'F'A
4859 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4861 * sem_ch13.adb: check legality of invariant pragma.
4863 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4865 * bindgen.adb: Add comments.
4867 2011-08-04 Yannick Moy <moy@adacore.com>
4869 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4871 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4872 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4874 2011-08-04 Robert Dewar <dewar@adacore.com>
4876 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4877 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4878 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4880 2011-08-04 Thomas Quinot <quinot@adacore.com>
4882 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4884 2011-08-04 Thomas Quinot <quinot@adacore.com>
4887 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4890 2011-08-04 Robert Dewar <dewar@adacore.com>
4892 * einfo.ads, exp_ch4.adb: Minor reformatting.
4894 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4896 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4898 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4900 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4901 type in all cases to compute list of primitive operations, because full
4902 view may be an itype that is not attached to the list of declarations.
4904 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4906 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4907 library has already been finalized.
4908 (Gen_Adafinal_C): Likewise.
4909 (Gen_Adainit_Ada): Generate an early return if the library has
4910 already been elaborated.
4911 (Gen_Adainit_C): Likewise.
4912 (Gen_Output_File_Ada): Generate an elaboration flag.
4913 (Gen_Output_File_C): Likewise.
4915 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4917 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4918 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4919 built in the first place.
4920 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4921 for CodePeer because Finalize_Address was not built to begin with.
4922 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4924 2011-08-04 Pascal Obry <obry@adacore.com>
4926 * adaint.c (__gnat_tmp_name): Use current process id to create temp
4927 filenames, this ensures unicity of filenames across processes.
4929 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4931 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4932 Raise_Controlled to Raise_From_Controlled_Operation. Update the
4933 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4934 Add False as the actual to From_Abort in the generated call to
4935 Raise_From_Controlled_Operation.
4937 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4939 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4940 so that the ali file name can be retrieved from outside of this package.
4941 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4942 doing nothing in the general case, but used to update the object file
4943 timestamp if directly generated by the backend.
4944 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
4945 to a later time than the ali file one.
4947 2011-08-04 Yannick Moy <moy@adacore.com>
4949 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4950 entities whose body contains an Annotate pragma which forces formal
4952 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4953 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
4954 Mark_Non_ALFA_Subprogram to pass in a message and node.
4955 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
4956 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
4957 surrounding subprogram.
4958 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
4959 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
4960 as not in ALFA is annotated with Formal_Proof being On, then an error
4961 is issued based on the additional parameters for message and node.
4962 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
4963 * gcc-interface/Make-lang.in: Update dependencies.
4965 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4967 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
4968 Finalize_Address when CodePeer is enabled.
4970 2011-08-04 Pascal Obry <obry@adacore.com>
4972 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
4973 the latter returns a pointer to a static buffer which is deallocated
4974 at the end of the routine.
4976 2011-08-04 Yannick Moy <moy@adacore.com>
4978 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
4979 after index creation; mark unconstrained base array type generated as
4980 being in/not in ALFA as well
4981 (Make_Index): mark subtype created as in/not in ALFA
4982 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
4983 over a loop as in/not in ALFA, depending on its type and form of loop
4986 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4988 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
4989 directly to False on .NET and JVM.
4991 2011-08-04 Yannick Moy <moy@adacore.com>
4993 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
4994 constraint that subtype must come from source code to be in ALFA, so
4995 that anonymous subtypes can be in ALFA too.
4997 2011-08-04 Yannick Moy <moy@adacore.com>
4999 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5000 reference for ALFA mode.
5001 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5002 procedure public so as to use it from formal verification back-end.
5004 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5006 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5007 invalid checks of the Parameter, making Remove_Switch not working
5010 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5012 * targparm.ads: Update header: no run-time exception is needed on this
5015 2011-08-04 Vincent Celier <celier@adacore.com>
5017 * a-fihema.adb: Use System.IO instead of GNAT.IO
5019 2011-08-04 Thomas Quinot <quinot@adacore.com>
5021 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5022 are forbidden in Compiler_Unit mode.
5024 2011-08-04 Robert Dewar <dewar@adacore.com>
5026 * sem_util.adb: Minor reformatting.
5028 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5030 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5031 library-level finalizers.
5032 (Gen_Finalize_Library_C): Update the import string for library-level
5034 (Gen_Finalize_Library_Defs_C): Update the definition name of a
5035 library-level finalizer.
5036 * exp_ch7.adb: Remove with and use clauses for Stringt.
5037 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5038 Spec_Decl. Add local variable Body_Id. The names of library-level
5039 finalizers are now manually fully qualified and are no longer external.
5040 A single name is now capable of servicing .NET, JVM and non-VM targets.
5041 Pragma Export is no longer required to provide visibility for the name.
5042 (Create_Finalizer_String): Removed.
5043 (New_Finalizer_Name): New routine which mimics New_..._Name.
5045 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5047 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5048 elaboration counter to Standard_Short_Integer.
5049 * sem_util.adb (Build_Elaboration_Entity): Likewise.
5050 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5051 (Gen_Elab_Externals_C): Likewise.
5053 2011-08-04 Ed Falis <falis@adacore.com>
5055 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5056 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5057 system-vxworks-mips.ads, system-vxworks-x86.ads
5058 (Always_Compatible_Rep): set to False for all VxWorks targets.
5060 2011-08-04 Robert Dewar <dewar@adacore.com>
5062 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5063 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5064 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5065 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5066 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5067 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5068 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5069 Minor reformatting and code reorganization.
5071 2011-08-04 Emmanuel Briot <briot@adacore.com>
5073 * projects.texi: Added doc for aggregate projects.
5075 2011-08-04 Emmanuel Briot <briot@adacore.com>
5077 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5078 Add support for overriding the Project_Path in aggregate projects.
5080 2011-08-04 Robert Dewar <dewar@adacore.com>
5082 * a-cofove.ads: Minor reformatting.
5084 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5086 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5087 on the generated code.
5088 (Build_Finalize_Statements): Update the comment on the generated code.
5089 (Build_Initialize_Statements): Update the comment on the generated code.
5090 (Build_Object_Declarations): Add local variable Result. The object
5091 declarations are now built in sequence.
5092 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5095 2011-08-04 Robert Dewar <dewar@adacore.com>
5097 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5099 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5101 * einfo.ads (Elaboration_Entity): Document new definition and use.
5102 (Elaboration_Entity_Required): Adjust to above change.
5103 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5104 * exp_ch12.adb: And with and use for Snames.
5105 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5106 * exp_util.adb (Set_Elaboration_Flag): Likewise.
5107 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5108 <Check_Unit_Name>: Deal with N_Expanded_Name.
5109 <Attribute_Elaborated>: Extend to all unit names.
5110 * sem_elab.adb: And with and use for Uintp.
5111 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5112 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5113 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5114 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5115 from Gen_Adainit_Ada.
5116 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5117 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
5118 case, do not call System.Standard_Library.Adafinal; instead call
5119 finalize_library if needed.
5120 (Gen_Adafinal_C): Likewise.
5121 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5122 non-main program case.
5123 (Gen_Adainit_C): Generate a couple of external declarations here.
5124 In the main program case, set SSL.Finalize_Library_Objects.
5125 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5126 (Gen_Elab_Calls_C): Likewise.
5127 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
5128 (Gen_Finalize_Library_C): Likewise. Generate a full function.
5129 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5131 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5132 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
5134 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5135 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
5136 of external declarations. Call Gen_Finalize_Library_C.
5138 2011-08-04 Emmanuel Briot <briot@adacore.com>
5140 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5141 Compute_Compilation_Phases): new subprogram.
5142 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5143 The number of mains as well as the various compilation phases that
5144 need to be run are now project tree specific, since various
5145 aggregated trees might have different requirements. In particular,
5146 they do not all require bind or link phases.
5148 2011-08-04 Emmanuel Briot <briot@adacore.com>
5150 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5151 (Project_Tree_Appdata): New type.
5152 It is now possible to associate application-specific data to a project
5153 tree. In particular, this is used in the gprbuild builder to avoid a
5154 number of global tables and htables, especially now that there can be
5155 several project trees loaded at once because of aggregate projects.
5156 (Debug_Name): new procedure.
5157 * projects.texi: Clarify syntax of "**" for Source_Dirs
5159 2011-08-03 Emmanuel Briot <briot@adacore.com>
5161 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5162 the "roots" for a main.
5163 (Fill_From_Project): add support for aggregate projects. Main units
5164 in aggregated projects are now automatically added in the list of
5165 files to build (although this fails later on in gprbuild, because
5166 these files are not using the root proejct tree, so this needs
5168 * gcc-interface/Make-lang.in: Update dependencies.
5170 2011-08-03 Yannick Moy <moy@adacore.com>
5172 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
5173 conditional expression in ALFA.
5174 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
5175 expressions as not in ALFA.
5177 2011-08-03 Robert Dewar <dewar@adacore.com>
5179 * a-cofove.adb: Minor reformatting.
5181 2011-08-03 Emmanuel Briot <briot@adacore.com>
5183 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
5184 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
5186 These packages are more logically placed in the Queue package, since
5187 they manipulate the queue. It is also likely that they can be adapted
5188 for gnatmake, thus sharing more code.
5189 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
5190 that we could move the above.
5192 2011-08-03 Emmanuel Briot <briot@adacore.com>
5194 * errutil.adb (Finalize): clean up the list of error messages on exit.
5195 Calling this subprogram multiple times will no longer show duplicate
5196 error messages on stderr.
5198 2011-08-03 Emmanuel Briot <briot@adacore.com>
5200 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
5201 Getopt_Switches when we have already define a command line
5204 2011-08-03 Yannick Moy <moy@adacore.com>
5206 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
5207 in ALFA. Instead, they are considered as assertions to prove.
5208 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
5209 nodes as not in ALFA. Instead, include conditional expressions in ALFA
5210 if they have no ELSE part, or if they occur in pre- and postconditions,
5211 where the Condition cannot have side-effects in ALFA
5212 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
5213 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
5214 Instead, include type conversion between scalar types in ALFA.
5215 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
5216 if-and-only-if its type is in ALFA.
5218 2011-08-03 Thomas Quinot <quinot@adacore.com>
5220 * scos.adb, get_scos.adb, put_scos.adb
5221 New code letter for decisions: G (entry guard)
5223 (Traverse_Subprogram_Body): Rename to...
5224 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
5225 (Traverse_Protected_Body): New subprogram
5226 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
5227 protected bodies and entry bodies.
5229 2011-08-03 Yannick Moy <moy@adacore.com>
5231 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
5232 entities with get/set subprograms, which is set on procedure entities
5233 generated by the compiler for a postcondition.
5234 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
5235 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
5236 entity for a declaration
5237 (Get_Unique_Entity_For_Decl): new function returning an entity which
5238 represents a declaration, so that matching spec and body have the same
5241 2011-08-03 Robert Dewar <dewar@adacore.com>
5243 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
5244 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
5246 2011-08-03 Yannick Moy <moy@adacore.com>
5248 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
5249 library-level because retriction No_Implicit_Dynamic_Code in the
5250 front-end prevents its definition as a local subprogram
5251 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
5252 for reuse in other contexts
5253 (Traverse_Declarations_Or_Statements,
5254 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5255 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
5256 procedures take a callback parameter to be called on all declarations
5258 (Traverse_All_Compilation_Units): new generic function to traverse a
5259 compilation unit and call a callback parameter on all declarations
5261 2011-08-03 Javier Miranda <miranda@adacore.com>
5263 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
5264 in Java since they are always enclosed in a namespace that
5265 differentiates them, and overloaded entities are supported by the VM.
5267 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5269 * checks.adb (Determine_Range): If a computed bound of an operation is
5270 outside the range of the base type of the expression, and overflow
5271 checks are enabled, the result is unknown and cannot be used for any
5272 subsequent constant folding.
5273 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
5274 unknown, so is the result of the comparison.
5276 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5278 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
5279 From_Abort. When finalization was triggered by an abort, propagate
5280 Standard'Abort_Signal rather than Program_Error.
5281 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
5283 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
5284 From_Abort. When finalization was triggered by an abort, propagate
5285 Standard'Abort_Signal rather than Program_Error.
5286 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
5288 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
5289 Abort_Id. Update the calls to Build_Object_Declarations and
5290 Build_Raise_Statement to include Abort_Id.
5291 (Build_Adjust_Statements): New local variable Abort_Id. Update the
5292 calls to Build_Object_Declarations and Build_Raise_Statement to include
5294 (Build_Finalize_Statements): New local variable Abort_Id. Update the
5295 calls to Build_Object_Declarations and Build_Raise_Statement to include
5297 (Build_Components): Create an entity for Abort_Id when exceptions are
5298 allowed on the target.
5299 (Build_Finalizer): New local variable Abort_Id.
5300 (Build_Initialize_Statements): New local variable Abort_Id. Update the
5301 calls to Build_Object_Declarations and Build_Raise_Statement to include
5303 (Build_Object_Declarations): Add new formal Abort_Id. Create the
5304 declaration of flag Abort_Id to preserve the original abort status
5305 before finalization code is executed.
5306 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
5307 runtime routine Raise_From_Controlled_Operation.
5308 (Create_Finalizer): Update the call to Build_Raise_Statement to include
5309 Abort_Id. Update the call to Build_Object_Declarations to include
5310 Abort_Id. Update the layout of the finalizer body.
5311 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
5312 (Process_Transient_Objects): New local variable Abort_Id. Remove the
5313 clunky code to create all flags and objects related to
5314 exception propagation and replace it with a call to
5315 Build_Object_Declarations. Update the call to Build_Raise_Statement to
5317 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
5318 Add new formal Abort_Id and associated comment on its use.
5319 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
5321 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
5322 Remove the clunky code to create all flags and objects related to
5323 exception propagation and replace it with a call to
5324 Build_Object_Declarations. Update the call to Build_Raise_Statement.
5326 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5328 * s-tassta.adb: Fix minor typos.
5330 2011-08-03 Robert Dewar <dewar@adacore.com>
5332 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
5333 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
5335 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5337 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
5338 to packages. This ensures that the finalizer body will not end up
5339 inside the freeze node.
5340 (Process_Declarations): Add code to detect whether a freeze node has a
5341 nested finalization collection.
5343 2011-08-03 Pascal Obry <obry@adacore.com>
5345 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
5346 (Current_Session): Return a not null access to Session_Type.
5347 (Default_Session): Likewise.
5349 2011-08-03 Robert Dewar <dewar@adacore.com>
5351 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
5352 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
5354 2011-08-03 Pascal Obry <obry@adacore.com>
5356 * g-awk.ads: Minor comment fix.
5358 2011-08-03 Sergey Rybin <rybin@adacore.com>
5360 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5361 the tree structure related to discriminant constraints.
5362 Original_Discriminant cannot be used any more for computing the
5363 defining name for the reference to a discriminant.
5365 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5367 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
5368 function is not visibly tagged, this is not a dispatching call and
5369 therfore is not Tag_Indeterminate, even if the function is marked as
5370 dispatching on result.
5372 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5374 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
5375 (Expand_N_Free_Statement): Add a guard to protect against run-times
5376 which do not support controlled types.
5377 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
5378 against run-times which do not support controlled types.
5379 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
5380 against run-times which do not support controlled types.
5381 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
5382 against run-times which do not support controlled types.
5383 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
5384 protect against run-times which do not support controlled types.
5386 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5388 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
5389 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
5391 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5393 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
5394 modified in the source, to prevent spurious warnings when compiling
5397 2011-08-03 Thomas Quinot <quinot@adacore.com>
5399 * a-except-2005.adb: Minor reformatting.
5401 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5403 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
5404 is a renaming declaration in the private part of a package, do not emit
5405 a warning that the with_clause could be moved because the renaming may
5406 be used in the body or in a child unit.
5408 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5410 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5411 Propagate the Comes_From_Source attribute from the original return
5412 object to the renaming.
5414 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5416 * exp_ch7.adb (Build_Raise_Statement): Do not call
5417 Raise_From_Controlled_Operation when this routine is not present in
5418 the run-time library.
5419 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
5420 libraries (Ravenscar), tasks are non-terminating, and protected objects
5421 and tasks can only appear at library level, so we do not want
5422 finalization of protected objects nor tasks.
5423 * exp_intr.adb: Minor clarification in comment.
5424 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
5425 Gen_Output_File_C): Remove references to finalization of library-level
5426 objects when using restricted run-time libraries.
5428 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5430 * sem_ch3.adb (Build_Discriminant_Constraints): Set
5431 Original_Discriminant only if the parent type is a generic formal.
5433 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5435 * exp_ch13.adb: Add with and use clause for Targparm;
5436 (Expand_N_Free_Statement): Prevent the generation of a custom
5437 Deallocate on .NET/JVM targets since this requires pools and address
5439 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5440 .NET/JVM targets, attach the newly allocated object to the access
5441 type's finalization collection. Do not generate a call to
5442 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5443 exist in the runtime.
5444 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5445 create a custom Allocate for object that do not require initialization.
5446 Attach a newly allocated object to the access type's finalization
5447 collection on .NET/JVM.
5448 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5449 assignment of controlled types on .NET/JVM. The two hidden pointers
5450 Prev and Next and stored and later restored after the assignment takes
5452 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5453 kludge for .NET/JVM to recognize a particular piece of code coming from
5454 Heap_Management and change the call to Finalize into Deep_Finalize.
5455 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5456 finalization collections on .NET/JVM only for types derived from
5457 Controlled. Separate the association of storage pools with a collection
5458 and only allow it on non-.NET/JVM targets.
5459 (Make_Attach_Call): New routine.
5460 (Make_Detach_Call): New routine.
5461 (Process_Object_Declarations): Suppress the generation of
5462 build-in-place return object clean up code on .NET/JVM since it uses
5464 * exp_ch7.ads (Make_Attach_Call): New routine.
5465 (Make_Detach_Call): New routine.
5466 * exp_intr.adb Add with and use clause for Targparm.
5467 (Expand_Unc_Deallocation): Detach a controlled object from a collection
5468 on .NET/JVM targets.
5469 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5470 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5471 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5472 names used in finalization.
5474 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5476 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5477 (Attach, Detach): Lock the current task when chaining an object onto a
5480 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5482 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5483 Rewritten to create the message strings when the exception is not
5484 raised by an abort during finalization.
5485 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5486 Raise_From_Controlled_Operation and update its associated comment.
5487 * a-fihema.ads, a-fihema.adb: New GNAT unit.
5488 Ada.Finalization.Heap_Management provides key functionality
5489 associated with controlled objects on the heap, their creation,
5490 finalization and reclamation. Type Finalization_Collection is
5491 effectively a wrapper which sits ontop of a storage pool and performs
5492 all necessary bookkeeping for all the objects it contains. Each
5493 access-to-controlled or access-to-class-wide type receives a collection
5494 as part of its expansion. The compiler generates buffer code and
5495 invokes Allocate / Deallocate to create and destroy allocated
5497 * a-finali.adb ("="): Removed.
5498 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5499 fields Prev and Next.
5500 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5501 A library unit with at least one controlled object on the library level
5502 has a special finalizer which is invoked by the binder. To signal this,
5503 ali files carry field PF.
5504 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5505 associated comment on field usage.
5506 * a-tags.adb (Get_RC_Offset): Removed.
5507 (Needs_Finalization): New routine.
5508 * a-tags.ads: Update the structure of the GNAT dispatch tables.
5509 Dispatch tables now carry field Needs_Finalization which provides
5510 runtime indication whether a type is controlled or has controlled
5511 components or both. Remove field RC_Offset.
5512 (Get_RC_Offset): Removed along with its associated pragma Export.
5513 Since tagged types with controlled components no longer carry hidden
5514 field _controller, the special mechanism to retrieve its location is no
5516 (Needs_Finalization): New routine.
5517 * atree.ads, atree.adb (Elist24): New routine.
5518 (Set_Elist24): New routine.
5519 * atree.h: Add a define clause for Elist24.
5520 * bindgen.adb New library-level variable Lib_Final_Built.
5521 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5522 presence of a VM target, the routine generates calls to the proper
5523 library finalization routine.
5524 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5525 targets. Set the correct library finalization routine depending on
5526 whether the library has controlled objects or this is a VM compilation.
5527 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5528 to library-level finalizers of compiled units in reverse order of
5529 elaboration. It also produces exception management code and reraises a
5530 potential exception after all units have been finalized.
5531 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5532 library-level finalizers of compiled units in reverse order of
5534 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5535 definitions of all library-level finalizers available to the compilation
5536 (Gen_Main_Ada): Directly call Adafinal which now contails all target
5538 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5539 System.Standard_Library.Adafinal directly. If the library needs
5540 finalization actions, create the sequence of finalization calls.
5541 (Gen_Output_File_Ada): Alphabetize local variables and constants.
5542 Generate a with clause for System.Soft_Links when compiling for a VM.
5543 Remove the code which imports System.Standard_Library.Adafinal as
5544 Do_Finalize. Generate the library finalization routine.
5545 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5546 If the library needs finalization actions, create all the definitions
5547 of library- level finalizers.
5548 (Has_Finalizer): New routine. Determines whether at least one compiled
5549 unit has a library-level finalizer.
5550 Add type Qualification_Mode.
5551 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5552 * einfo.adb: New usage of field 15 as Return_Flag.
5553 Remove Finalization_Chain_Entity from the usages of field 19.
5554 Remove Associated_Final_Chain from the usages of field 23.
5555 New usage of field 23 as Associated_Collection.
5556 New usage of field 24 as Finalizer.
5557 New usage of flag 252 as Is_Processed_Transient.
5558 (Associated_Final_Chain): Removed.
5559 (Associated_Collection): New routine.
5560 (Finalization_Chain_Entity): Removed.
5561 (Finalizer): New routine.
5562 (Is_Finalizer): New routine.
5563 (Is_Processed_Transient): New routine.
5564 (Return_Flag): New routine.
5565 (Set_Associated_Final_Chain): Removed.
5566 (Set_Associated_Collection): New routine.
5567 (Set_Finalization_Chain_Entity): Removed.
5568 (Set_Finalizer): New routine.
5569 (Set_Is_Processed_Transient): New routine.
5570 (Set_Return_Flag): New routine.
5571 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5573 (Write_Field8_Name): Alphabetize the output.
5574 (Write_Field11_Name): Alphabetize the output.
5575 (Write_Field12_Name): Alphabetize the output.
5576 (Write_Field13_Name): Alphabetize the output.
5577 (Write_Field14_Name): Alphabetize the output.
5578 (Write_Field15_Name): Alphabetize the output.
5579 (Write_Field16_Name): Alphabetize the output.
5580 (Write_Field17_Name): Alphabetize the output.
5581 (Write_Field18_Name): Alphabetize the output.
5582 (Write_Field19_Name): Alphabetize the output. Remove the output of
5583 Finalization_Chain_Entity.
5584 (Write_Field20_Name): Alphabetize the output.
5585 (Write_Field21_Name): Alphabetize the output.
5586 (Write_Field22_Name): Alphabetize the output.
5587 (Write_Field23_Name): Alphabetize the output. Remove the output of
5588 Associated_Final_Chain. Add output for Associated_Collection.
5589 (Write_Field24_Name): Alphabetize the output.
5590 (Write_Field25_Name): Add output for Finalizer.
5591 (Write_Field26_Name): Alphabetize the output.
5592 (Write_Field27_Name): Alphabetize the output.
5593 (Write_Field28_Name): Alphabetize the output.
5594 * einfo.ads: Add new field description for Associated_Collection and
5596 Remove Associated_Final_Chain and its uses in nodes.
5597 Remove Finalization_Chain_Entity and its uses in nodes.
5598 Add new field description for Finalizer and its uses in nodes.
5599 Add new synthesized attribute Is_Finalizer.
5600 Add new flag description for Is_Processed_Transient and its uses in
5602 Add new field description for Return_Flag and its uses in nodes.
5603 (Associated_Final_Chain): Removed along with its pragma Inline.
5604 (Associated_Collection): New routine and pragma Inline.
5605 (Finalization_Chain_Entity): Removed along with its pragma Inline.
5606 (Finalizer): New routine and pragma Inline.
5607 (Is_Finalizer): New routine and pragma Inline.
5608 (Is_Processed_Transient): New routine and pragma Inline.
5609 (Return_Flag): New routine and pragma Inline.
5610 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5611 (Set_Associated_Collection): New routine and pragma Inline.
5612 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5613 (Set_Finalizer): New routine and pragma Inline.
5614 (Set_Is_Processed_Transient): New routine and pragma Inline.
5615 (Set_Return_Flag): New routine and pragma Inline.
5616 * exp_aggr.adb: Alphabetize subprograms.
5617 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5618 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5619 associated comments. Remove local variables External_Final_List and
5621 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5622 Ancestor. Remove the retrieval of finalization lists. Update the call to
5624 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5625 lists. Update the call to Late_Expansion.
5626 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5627 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5628 (Gen_Assign): Remove the retrieval of the finalization list used to
5629 build the assignment. Update the calls to Make_Init_Call and
5631 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5632 Remove the mechanism to determine attachment levels and finalization
5633 list retrieval. Remove the processing for coextensions.
5634 (Init_Controller): Removed. Controllers no longer exist.
5635 (Late_Expansion): Remove formals Flist and Obj along with their
5636 associated comments. Update the calls to Build_Record_Aggr_Code and
5637 Build_Array_Aggr_Code.
5638 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5639 (Expand_N_Freeze_Entity): Add special processing for finalizers which
5640 appear in entry bodies, protected subprograms and task bodies.
5641 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5642 * exp_ch3.adb (Add_Final_Chain): Removed.
5643 (Build_Array_Init_Proc): Alphabetize local variables.
5644 (Build_Assignment): Alphabetize local variables. Update the call to
5646 (Build_Class_Wide_Master): Rename local variables to better reflect
5648 (Build_Discriminant_Assignments): Code reformatting.
5649 (Build_Init_Call_Thru): Code reformatting.
5650 (Build_Init_Procedure): Code reformatting. Generate a special version
5651 of Deep_Finalize which is capable of finalizing all initialized
5652 components and ignore the rest.
5653 (Build_Init_Statements): Rename local variables to better reflect their
5655 Reimplement the mechanism to include the creation and update of an index
5656 variable called a "counter". It is used as a bookmark for tracing
5657 initialized and non-initialized components.
5658 (Build_Initialization_Call): Remove local variable Controller_Typ.
5659 Alphabetize all local variables. Remove the initialization of the
5660 record controller and update the call to Make_Init_Call.
5661 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5662 New local variable Counter.
5663 (Constrain_Array): Alphabetize.
5664 (Expand_Freeze_Array_Type): Create a collection instead of a
5666 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5667 Finalize_Address which is used in conjunction with allocated controlled
5669 (Expand_N_Object_Declaration): Remove the creation of a finalization
5670 list for anonymous access types. Update the calls to Make_Init_Call and
5672 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5673 retrieval of finalization lists. Remove the expansion of the record
5674 controller. Create TSS primitive Finalize_Address used in conjunction
5675 with controlled objects on the heap. Create finalization collections
5676 for access-to-controlled record components.
5677 (Expand_Record_Controller): Removed.
5678 (Freeze_Type): Remove the freezing of record controllers. Freezing of
5679 class-wide types now requires additional processing. Create
5680 finalization collections for access-to-controlled types.
5681 (Increment_Counter): New routine.
5682 (Make_Counter): New routine.
5683 (Make_Eq_If): Remove the mention of Name_uController.
5684 (Make_Predefined_Primitive_Specs): There is no longer need to skip
5685 types coming from System.Finalization_Root.
5686 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5687 (Predefined_Primitive_Bodies): There is no longer need to skip types
5688 coming from System.Finalization_Root.
5689 (Stream_Operation_OK): Do not generate stream routines for
5690 type Ada.Finalization.Heap_Management.Finalization_Collection.
5691 * exp_ch3.ads: Alphabetize subprograms.
5692 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
5693 Add with and use clause for Lib.
5694 (Complete_Coextension_Finalization): Removed.
5695 (Complete_Controlled_Allocation): New routine. Create a finalization
5696 collection for anonymous access-to-controlled types. Create a custom
5697 Allocate which interfaces with the back end and the machinery in
5699 (Expand_Allocator_Expression): Add necessary calls to
5700 Complete_Controlled_Allocation. Remove the retrieval of finalization
5701 lists. Update the calls to Make_Adjust_Call. Generate a call to
5702 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5703 the associated collection.
5704 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
5705 Code clean up. Remove the retrieval of finalization lists and
5707 Update the call to Make_Init_Call. Generate a call to
5708 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5709 the associated collection.
5710 (Get_Allocator_Final_List): Removed. Finalization lists are not
5712 (Suitable_Element): Remove the mention of Name_uController.
5713 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
5714 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
5715 the left hand side, carry out the assignment and adjust the left hand
5717 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
5718 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
5719 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
5720 BIP_Collection and BIPcollection.
5721 (Build_Heap_Allocator): New routine used to allocate the return object
5722 of a build-in-place function onto a collection.
5723 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
5724 (Expand_Call): Do not replace direct calls to Deep routines with their
5726 (Expand_N_Extended_Return_Statement): Give all variables shorter names
5727 and update their occurrences. Add a special return flag to monitor the
5728 [ab]normal execution of the function. The flag is set right before the
5730 Rewrite the mechanism used to allocate a build-in-place return object
5731 on the heap or on a storage pool.
5732 (Is_Direct_Deep_Call): New routine.
5733 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
5734 build-in-place function call instead of a final list. Build a call to
5735 Set_Finalize_Address_Ptr to decorate the associated collection.
5736 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
5737 order to name the build-in-place function call's result for later
5738 finalization. Add a collection to a build-in-place function call
5739 instead of a final list.
5740 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
5741 build-in-place function call instead of a final list. Remove the code
5742 which moves one final list and transforms it into the actual in a
5743 nested build-in-place call.
5744 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
5745 build-in-place function call instead of a final list.
5746 (Move_Final_List): Removed.
5747 (Needs_BIP_Collection): New routine.
5748 (Needs_BIP_Final_List): Removed.
5749 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
5750 enumeration type BIP_Formal_Kind.
5751 Update the related comment.
5752 (Needs_BIP_Collection): New routine.
5753 (Needs_BIP_Final_List): Removed.
5754 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
5755 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
5756 majority of subprograms in this unit. Add Name_Finalize_Address to
5757 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5758 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5759 statements for an array type.
5760 (Build_Adjust_Statements): Create the adjust statements for a record
5762 (Build_Cleanup_Statements): New routine. A procedure which given any
5763 construct containing asynchronous calls, references to _master, or is a
5764 task body, a task allocation or a protected body produces the necessary
5765 runtime calls to clean up these constructs.
5766 (Build_Exception_Handler): New routine.
5767 (Build_Final_List): Removed.
5768 (Build_Finalization_Collection): New routine. A core procedure which
5769 creates a collection to service heap allocated controlled objects
5770 associated with an access-to-controlled type.
5771 (Build_Finalize_Statements): Create the finalization statements for a
5773 (Build_Finalizer): New routine. A core procedure which given any
5774 construct with declarations and/or statements detects all objects which
5775 need any type of clean up (controlled objects, protected objects) and
5776 generates all necessary code to clean up the said objects in the proper
5778 (Build_Finalizer_Call): New routine.
5779 (Build_Initialize_Statements): Create the initialization statements for
5780 an array type. The generated routine contains code to finalize partially
5782 (Build_Object_Declarations): New routine.
5783 (Build_Raise_Statement): New routine.
5784 (Clean_Simple_Protected_Objects): Removed.
5785 (Controller_Component): Removed.
5786 (Enclosing_Function): New routine.
5787 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5788 either declarations or statements or both.
5789 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5790 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5792 (Find_Final_List): Removed.
5793 (Global_Flist_Ref): Removed.
5794 (In_Finalization_Root): Removed.
5795 (Insert_Actions_In_Scope_Around): Determine the range of the transient
5796 scope in terms of tree nodes. Process all transient variables within
5798 (Make_Adjust_Call): Rewritten. There is no longer an attach call
5799 generated after the adjust.
5800 (Make_Attach_Call): Removed.
5801 (Make_Call): New routine.
5802 (Make_Clean): Removed.
5803 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5805 (Make_Deep_Proc): Rewritten to generate the new profile signature used
5807 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5809 (Make_Final_Call): Modified to simply create a call to either
5810 Deep_Finalize or Finalize.
5811 (Make_Finalize_Address_Body): New routine.
5812 (Make_Finalize_Address_Stmts): New routine. A function which produces
5813 TSS primitive Finalize_Address used in conjunction with heap allocated
5815 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5816 (Make_Init_Call): Rewritten. There is no longer an attach call
5817 generated after initialization.
5818 (Make_Local_Deep_Finalize): New routine.
5819 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5820 (Make_Transient_Block): Remove the finalization list retrieval and
5822 (Needs_Finalization): Moved to Exp_Util.
5823 (Parent_Field_Type): New routine.
5824 (Preprocess_Components): New routine.
5825 (Process_Transient_Objects): New routine.
5826 (Wrap_HSS_In_Block): New routine.
5827 (Wrap_Transient_Declaration): Remove finalization list management and
5828 controller insertion.
5829 (Wrap_Transient_Expression): Code reformatting.
5830 (Wrap_Transient_Statement): Code reformatting.
5831 * exp_ch7.ads (Build_Final_List): Removed.
5832 (Build_Finalization_Collection): New routine.
5833 (Build_Raise_Statement): New routine.
5834 (Controller_Component): Removed.
5835 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5836 (Find_Final_List): Removed.
5837 (In_Finalization_Root): Removed.
5838 (Is_Simple_Protected_Type): Update related comment.
5839 (Make_Adjust_Call): New parameter profile and associated comments.
5840 (Make_Attach_Call): Removed.
5841 (Make_Final_Call): New parameter profile and associated comments.
5842 (Make_Finalize_Address_Body): New routine.
5843 (Make_Init_Call): New parameter profile and associated comments.
5844 (Make_Local_Deep_Finalize): New routine.
5845 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5846 (Needs_Finalization): Moved to Exp_Util.
5847 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5848 (Expand_N_Protected_Body): Remove the handling of finalization lists.
5849 (Find_Protection_Type): Moved to Exp_Util.
5850 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5851 (Make_DT): Update sequence of dispatch table initialization. Remove the
5852 initialization of field RC_Offset. Add initialization of field Needs_
5854 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5855 Reimplement how an object is first finalized, then deallocated.
5856 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5858 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5859 Register TSS_Finalize_Address with type TSS_Names.
5860 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5861 procedure provides the interface between an allocation / deallocation
5862 and the support machinery in Ada.Finalization.Heap_Management.
5863 (Find_Init_Call): Code reformatting.
5864 (Find_Init_Call_In_List): Code reformatting.
5865 (Find_Protection_Type): Moved from Exp_Ch9.
5866 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5867 (Has_Controlled_Coextensions): Removed.
5868 (Has_Controlled_Objects): New routine.
5869 (In_Library_Level_Package_Body): New routine.
5870 (Insert_Action_After): New routine.
5871 (Is_Finalizable_Transient): New routine. This predicate determines
5872 whether an object declaration is one of the many variants of controlled
5874 (Is_Null_Access_BIP_Func_Call): New routine.
5875 (Is_Non_BIP_Func_Call): New routine.
5876 (Is_Related_To_Func_Return): New routine.
5877 (Needs_Finalization): Moved from Exp_Ch7.
5878 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5879 (Find_Protection_Type): Moved from Exp_Ch9.
5880 (Has_Controlled_Coextensions): Removed.
5881 (Has_Controlled_Objects): New routine.
5882 (In_Library_Level_Package_Body): New routine.
5883 (Insert_Action_After): New routine.
5884 (Is_Finalizable_Transient): New routine.
5885 (Is_Null_Access_BIP_Func_Call): New routine.
5886 (Is_Non_BIP_Func_Call): New routine.
5887 (Is_Related_To_Func_Return): New routine.
5888 (Needs_Finalization): Moved from Exp_ch7.
5889 * expander.adb (Expand): Add a case for N_Free_Statement.
5890 * freeze.adb (Freeze_All): Replace the generation of a finalization
5891 list with a collection for access-to-controlled types.
5892 (Freeze_Entity): Code reformatting.
5893 (Freeze_Record_Type): Remove the freezing of a record controller
5895 (Freeze_Subprogram): Code reformatting.
5896 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5898 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5899 has a library-level finalizer.
5900 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5901 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5902 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5903 files. Add a-fihema to the list of object files.
5905 Alphabetize the associations in type Is_Parameterless_Attribute.
5906 * rtsfind.ads: Ada.Finalization_List.Controller and
5907 System.Finalization_Implementation are no longer a GNAT unit.
5908 Update the range of type Ada_Finalization_Child. Remove the following
5909 recoverable entities:
5911 RE_Attach_To_Final_List
5915 RE_Finalizable_Ptr_Ptr
5916 RE_Global_Final_List
5917 RE_Limited_Record_Controller
5920 RE_Record_Controller
5921 RE_Simple_List_Controller
5923 Add the following recoverable entities:
5925 RE_Add_Offset_To_Address
5929 RE_Exception_Identity
5930 RE_Finalization_Collection
5931 RE_Finalization_Collection_Ptr
5932 RE_Needs_Finalization
5933 RE_Save_Library_Occurrence
5934 RE_Set_Finalize_Address_Ptr
5935 RE_Set_Storage_Pool_Ptr
5937 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5939 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5940 (First_Stored_Discriminant): Remove the mention of Name_uController.
5941 * sem_aux.ads: Comment reformatting.
5942 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5943 to redecorate an already existing class-wide type.
5944 (Decorate_Tagged_Type): New parameter profile and associated comment.
5945 Create a "shadow class-wide type" for a shadow entity.
5946 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
5947 of the final chain along with the associated comment.
5948 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
5949 Full_Desig and set it to the full view of the designated type.
5950 Initialize the finalization collection to empty.
5951 (Build_Derived_Record_Type): Alphabetize local variables. Code
5953 (Collect_Fixed_Components): Remove the mention of Name_uController.
5954 (Create_Constrained_Components): Remove the mention of Name_uController.
5955 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
5956 class-wide type of a shadow entity.
5957 (Process_Full_View): Update the machinery which marks type
5958 Limited_Controlled's entity as limited.
5959 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
5960 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
5961 list, instead make a collection build-in-place formal.
5962 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
5963 a designated type in order to establish a match between the renaming
5964 and the renamed entity.
5965 (Find_Selected_Component): Add guard to prevent spurious exceptions
5966 from being raised on .NET/JVM.
5967 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
5968 to the list of primitive that need special processing. Update arrays
5969 C_Names and D_Names.
5970 (Replace_Types): Handle class-wide types.
5971 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
5972 different parameter profile, look at the first formal.
5973 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
5974 use clauses for Exp_Util.
5975 * sem_res.adb: Remove with and use clauses for Elists.
5976 (Propagate_Coextensions): Removed.
5977 (Resolve_Allocator): Do not propagate the list of coextensions from one
5978 allocator to another.
5979 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
5980 Deaccessed_T to Desig_Typ.
5981 (Enter_Name): Remove the mention of Name_uController.
5982 (Gather_Components): Remove the mention of Name_uController.
5983 (Incomplete_Or_Private_View): New routine.
5984 (Is_Coextension_Root): Removed.
5985 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
5986 * sem_util.ads (Incomplete_Or_Private_View): New routine.
5987 (Is_Coextension_Root): Removed.
5988 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
5989 Controlled types are now derived from a null tagged record. Remove
5990 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
5991 * sinfo.adb (Coextensions): Removed.
5992 (Set_Coextensions): Removed.
5993 * sinfo.ads: Remove Coextensions from the explanation of node fields
5994 and its uses in nodes.
5995 Update the field usage of N_Allocator.
5996 (Coextensions): Removed along with its pragma Inline.
5997 (Set_Coextensions): Removed along with its pragma Inline.
5998 * snames.ads-tmpl: Remove names
6003 Name_uLocal_Final_List
6004 Name_Finalization_Root
6011 Name_Finalize_Address
6012 * s-pooglo.adb (Allocate): Add overriding indicator.
6013 (Deallocate): Add overriding indicator.
6014 (Storage_Size): Add overriding indicator.
6015 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6016 than Finalize_Global_List.
6017 (Null_Finalize_Global_List): Removed.
6018 (Save_Library_Occurrence): New routine.
6019 * s-soflin.ads: Remove variable Finalize_Global_List along with its
6020 initialization. Add variable Finalize_Library_Objects along with its
6021 pragma Export. Add variables Library_Exception and
6022 Library_Exception_Set along with their pragma Export.
6023 (Null_Finalize_Global_List): Removed.
6024 (Save_Library_Occurrence): New routine.
6025 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6026 rather than Finalize_Global_List.
6027 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6028 of the constructed node.
6030 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6032 * link.c: Include "auto-host.h" before system headers.
6034 2011-08-03 Vincent Celier <celier@adacore.com>
6036 * make.adb (Gnatmake): Add to table Library_Projs only library projects
6037 that are not extended. Do not check if a library project that is
6038 extended should be regenerated. Do not add to table Library_Paths the
6039 libraries that are in extended projects. Link only with libraries that
6040 are in libray projects that are not extended.
6041 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6042 for a library project that is extended.
6044 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6046 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6047 conforming subprogram renamings that appear to be completions if they
6048 are not fully conformant.
6049 Such renamings are homographs but not completions.
6050 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6051 names in a subprogram renaming that appears in an instance.
6053 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6055 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6056 not immutably limited, build actual subtype from expression to provide
6057 proper bounds to caller.
6059 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6061 * sem_ch8.adb: Minor comment correction.
6063 2011-08-03 Thomas Quinot <quinot@adacore.com>
6065 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6066 returning a limited array, use an extended return statement.
6068 2011-08-03 Vincent Celier <celier@adacore.com>
6070 * make.adb (Initialize): If --subdirs= is used, but no project file is
6071 specified, attempt to create the specify subdir if it does not already
6072 exist and use it as the object directory as if -D had been specified.
6074 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6076 * s-tpopsp-vms.adb: New file.
6077 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6078 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6080 2011-08-03 Emmanuel Briot <briot@adacore.com>
6082 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6085 2011-08-03 Yannick Moy <moy@adacore.com>
6087 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6088 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6089 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6090 detect that an array has static bounds.
6092 2011-08-03 Thomas Quinot <quinot@adacore.com>
6094 * exp_dist.adb: Minor reformatting.
6096 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6098 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6099 (ATCB_Key): Removed, not always used.
6101 2011-08-03 Emmanuel Briot <briot@adacore.com>
6103 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6104 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6105 most remaining global variables.
6107 2011-08-03 Robert Dewar <dewar@adacore.com>
6109 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6110 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6113 2011-08-03 Javier Miranda <miranda@adacore.com>
6115 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6116 that must be passed by copy in VM targets.
6118 2011-08-03 Emmanuel Briot <briot@adacore.com>
6120 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6121 duplicates a similar htable now in the project tree.
6123 2011-08-03 Claire Dross <dross@adacore.com>
6125 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6126 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6127 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6128 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6129 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6130 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6131 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6134 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6136 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6137 (ATCB_Key): Removed, not always used.
6138 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6140 * s-tpopsp-tls.adb: New file.
6141 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6142 x86/x64/ia64/powerpc/sparc Linux.
6144 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6146 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6147 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6149 2011-08-03 Thomas Quinot <quinot@adacore.com>
6151 * rtsfind.ads, exp_dist.adb, exp_dist.ads
6152 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6153 Fix type selection for mapping integer types to PolyORB types.
6155 2011-08-03 Bob Duff <duff@adacore.com>
6157 * sem_ch7.adb: Minor comment clarification.
6159 2011-08-03 Bob Duff <duff@adacore.com>
6161 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6162 an error analyzing a choice, skip further processing. Further
6163 processing could cause a crash or cascade errors.
6165 2011-08-03 Emmanuel Briot <briot@adacore.com>
6167 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
6168 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
6169 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6170 prj-env.ads (Shared_Project_Tree_Data): new type
6171 An aggregate project and its aggregated trees need to share the common
6172 data structures used for lists of strings, packages,... This makes the
6173 code simpler since otherwise we have to pass the root tree (also used
6174 for the configuration file data) in addition to the current project
6175 tree. This also avoids ambiguities as to which tree should be used.
6176 And finally this saves a bit of memory.
6177 (For_Every_Project_Imported): new parameter Tree.
6178 Since aggregated projects are using a different tree, we need to let
6179 the caller know which tree to use to manipulate the returned project.
6181 2011-08-03 Robert Dewar <dewar@adacore.com>
6183 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
6184 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
6185 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
6186 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
6188 2011-08-03 Javier Miranda <miranda@adacore.com>
6190 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
6191 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
6193 2011-08-03 Bob Duff <duff@adacore.com>
6195 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
6198 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
6200 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
6201 g-sehash.ads: Fix typo. Update header.
6203 2011-08-03 Thomas Quinot <quinot@adacore.com>
6205 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
6208 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6210 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
6211 prefixes of private types along with records, since the selector may be
6213 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
6214 private types along with records, since the selector may be a
6217 2011-08-03 Emmanuel Briot <briot@adacore.com>
6219 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
6221 2011-08-03 Javier Miranda <miranda@adacore.com>
6223 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
6224 Tagged_Type_Expansion.
6226 2011-08-03 Yannick Moy <moy@adacore.com>
6228 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
6229 violation when the argument of concatenation is the name of a
6232 2011-08-03 Emmanuel Briot <briot@adacore.com>
6234 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
6235 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
6236 (Process_Declarative_Items): new parameter Child_Env.
6238 2011-08-03 Yannick Moy <moy@adacore.com>
6240 * alfa.ads: Update format of ALFA section in ALI file in order to
6241 add a mapping from bodies to specs when both are present.
6242 (ALFA_Scope_Record): Add components for spec file/scope.
6243 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
6245 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
6246 collected, fill in the spec information when relevant.
6247 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
6250 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6252 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
6253 code unit to decide whether to add internally generated subprograms.
6255 2011-08-03 Javier Miranda <miranda@adacore.com>
6257 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
6258 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
6259 be handled by copy in VM targets.
6261 2011-08-03 Emmanuel Briot <briot@adacore.com>
6263 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
6264 code with Makeutl.Get_Switches.
6265 * prj-tree.adb: Update comment.
6267 2011-08-03 Thomas Quinot <quinot@adacore.com>
6269 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
6270 subprogram with a limited formal that does not support external
6273 2011-08-03 Yannick Moy <moy@adacore.com>
6275 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
6277 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
6278 not from current unit in two phases, because it is not possible to
6279 change the table while iterating over its content.
6280 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
6282 2011-08-03 Sergey Rybin <rybin@adacore.com>
6284 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
6285 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
6287 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6289 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
6290 and the component type is composite, this is ambiguous for predefined
6291 concatenation, but if the node is not overloaded and the entity is a use
6292 -defined function its profile can be used to resolve that aggregate.
6294 2011-08-03 Robert Dewar <dewar@adacore.com>
6296 * exp_ch4.adb: Minor code cleanup.
6298 2011-08-03 Thomas Quinot <quinot@adacore.com>
6300 * exp_dist.adb: Do not generate distribution stubs if serious errors
6301 have been diagnosed.
6303 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6305 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
6306 the first formal of a primitive operation, go to the base type to
6307 handle properly an access to a derived type with constrained
6309 * sem_type.adb (Disambiguate): an immediately visible operator hides a
6310 user-defined function that is only use-visible.
6312 2011-08-03 Robert Dewar <dewar@adacore.com>
6314 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
6315 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
6316 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
6317 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
6318 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
6319 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
6320 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
6321 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
6323 2011-08-03 Robert Dewar <dewar@adacore.com>
6325 * repinfo.adb (List_Mechanism): Add handling of
6326 Convention_Ada_Pass_By_XXX.
6327 * sem_mech.adb (Set_Mechanism): Ditto.
6328 * sem_prag.adb (Process_Convention): Add entries for
6329 Convention_Ada_Pass_By_XXX.
6330 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
6332 2011-08-03 Pascal Obry <obry@adacore.com>
6334 * makeutl.adb: Minor reformatting.
6336 2011-08-03 Vincent Celier <celier@adacore.com>
6339 (Get_File_Name) If the file cannot be found when there are no config
6340 pragmas file and May_Fail is True, return No_File instead of the file
6341 name, to be consistent.
6343 2011-08-03 Pascal Obry <obry@adacore.com>
6345 * adaint.c (__gnat_is_executable_file_attr): Avoid access
6348 2011-08-03 Javier Miranda <miranda@adacore.com>
6351 (Same_Representation): In VM targets the representation of arrays with
6352 aliased components differs from arrays with non-aliased components.
6354 2011-08-03 Emmanuel Briot <briot@adacore.com>
6356 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
6357 not systematically lower case attribute indexes that contain no "."
6358 Fix definition of several Naming attributes, which take
6359 a unit name as index and therefore should be case insensitive.
6360 Minor refactoring (reduce length of variable names).
6362 2011-08-03 Emmanuel Briot <briot@adacore.com>
6364 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
6366 2011-08-03 Emmanuel Briot <briot@adacore.com>
6368 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
6369 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
6370 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
6371 prj-tree.ads (Prj.Tree.Environment): new type.
6373 2011-08-03 Emmanuel Briot <briot@adacore.com>
6375 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
6376 prj-tree.adb, prj-tree.ads (Environment): new type.
6378 2011-08-03 Emmanuel Briot <briot@adacore.com>
6380 * prj-tree.ads: Remove unused variable.
6382 2011-08-03 Yannick Moy <moy@adacore.com>
6384 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
6385 issuing messages related to SPARK restriction violation.
6387 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6389 * sem_ch6.adb: guard against error nodes in return statements.
6391 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6393 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
6394 a warning can only appear on a configuration file, so emit warning
6395 without further checks.
6397 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6399 * s-interr.ads: add overriding keyword.
6401 2011-08-03 Geert Bosch <bosch@adacore.com>
6403 * exp_attr.adb: Fix minor typo.
6405 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6407 * par-ch4.adb: improve error recovery.
6409 2011-08-03 Emmanuel Briot <briot@adacore.com>
6411 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
6412 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
6415 2011-08-03 Emmanuel Briot <briot@adacore.com>
6417 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
6418 "external" as an attribute name in aggregate projects.
6420 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6422 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
6423 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
6424 from 0, so we need to adjust.
6426 2011-08-03 Emmanuel Briot <briot@adacore.com>
6428 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
6429 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
6431 2011-08-03 Yannick Moy <moy@adacore.com>
6433 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6434 restriction on overloaded entity if the entity is not an operator.
6436 2011-08-03 Yannick Moy <moy@adacore.com>
6438 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6439 restrict.ads: Rename remaining Check_Formal_Restriction* into
6440 Check_SPARK_Restriction*.
6442 2011-08-03 Emmanuel Briot <briot@adacore.com>
6444 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6445 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6447 (Project_Empty): removed
6448 (Empty_Project): new parameter Qualifier
6449 This is used to have fields specific to aggregate projects, cleaner
6450 New field to store the list of aggregated projects.
6451 (Check_Aggregate_Project): removed
6452 (Process_Aggregated_Projects, Free): new subprograms.
6454 2011-08-03 Olivier Hainque <hainque@adacore.com>
6456 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6458 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6460 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6461 explicit dereference of an unconstrained type, create a constrained
6462 subtype for it, as is done for function calls that return an
6465 2011-08-03 Thomas Quinot <quinot@adacore.com>
6467 * g-pehage.adb (Finalize): Avoid possible double-free.
6469 2011-08-03 Steve Baird <baird@adacore.com>
6471 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6472 Elab_Spec/Body attrs in CodePeer_Mode.
6474 2011-08-03 Javier Miranda <miranda@adacore.com>
6476 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6477 low bound is not known at compile time but they have no others choice.
6478 Done because in this case the bounds can be obtained directly from the
6481 2011-08-03 Ed Falis <falis@adacore.com>
6483 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6484 on VxWorks SMP. Remove unusable constant ANY_CPU.
6486 2011-08-03 Emmanuel Briot <briot@adacore.com>
6488 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6489 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6490 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6491 Prj.Env.Initialize_Empty): new subprograms
6492 (Get_Env, Find_Project): remove parameter Target_Name.
6494 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6496 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6497 as a condition for the delayed call to Derived_Subprograms done for the
6498 case of the rewriting of a derived type that constrains the
6499 discriminants of its parent type.
6500 Avoids redundant subprogram derivations for private subtype derivations.
6502 2011-08-03 Javier Miranda <miranda@adacore.com>
6504 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6505 Build_Record_Aggr_Code.
6506 (Build_Record_Aggr_Code): Add missing support to initialize hidden
6507 discriminants in extension aggregates.
6509 2011-08-03 Emmanuel Briot <briot@adacore.com>
6511 * prj-pp.adb (Print): also output project qualifiers, since in
6512 particular "aggregate" is mandatory in an aggregate project.
6514 2011-08-03 Emmanuel Briot <briot@adacore.com>
6516 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6517 (Debug_Output): new function.
6519 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6521 * gnat_ugn.texi: Document -Wstack-usage.
6522 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6524 2011-08-03 Thomas Quinot <quinot@adacore.com>
6526 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6527 have keyword LIMITED.
6529 2011-08-03 Yannick Moy <moy@adacore.com>
6531 * alfa.adb, alfa.ads, alfa_test.adb: New files.
6532 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6533 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6534 section (does not happen in compiler, only if code directly calls
6536 * get_alfa.adb, get_alfa.ads: New files.
6537 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6539 * lib-xref-alfa.adb: New file.
6540 * lib-xref.adb, lib-xref.ads
6541 (Xref_Entry): redefine information needed in cross-references for ALFA.
6542 Push ALFA treatments in separated local package.
6543 (Enclosing_Subpragram_Or_Package): treat specially subprogram
6544 identifiers. Return entity of package body instead of spec. Return
6545 Empty for a scope with no location.
6546 (Generate_Reference): adapt to new components for ALFA information.
6547 Remove the need for D references on definitions.
6548 (Is_Local_Reference): moved to ALFA local package
6549 (Output_References): extract subfunction as Extract_Source_Name
6550 (Output_Local_References): remove procedure, replaced by filtering of
6551 cross-references in package ALFA and printing in Put_ALFA.
6552 (Write_Entity_Name): remove procedure
6553 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6554 print exact name of entity as it appears in source file
6555 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6556 * put_alfa.adb, put_alfa.ads: New files.
6557 * xref_lib.adb (Search_Xref): protect read of cross-references against
6558 reading other sections of the ALI file, in gnatxref
6559 (Search): protect read of cross-references against reading other
6560 sections of the ALI file, in gnatfind.
6561 * gcc-interface/Make-lang.in: Update dependencies.
6563 2011-08-03 Thomas Quinot <quinot@adacore.com>
6565 * sem_ch3.adb: Minor reformatting.
6567 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6569 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6570 raising an exception.
6572 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6574 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6575 type, always use 1 as the lower bound or string, even if lower bound of
6576 context is not static, to handle properly null strings in a non-static
6579 2011-08-03 Bob Duff <duff@adacore.com>
6581 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6582 always legal on the right-hand side of an assignment statement; there
6583 is always an applicable index constraint in this case. Therefore, the
6584 check for Pkind = N_Assignment_Statement is now unconditional -- it
6585 doesn't depend on whether Is_Constrained (Typ).
6587 2011-08-03 Robert Dewar <dewar@adacore.com>
6589 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6591 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6593 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6594 for an itype created within a generic unit.
6596 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6598 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6599 suppresses all inlining.
6601 2011-08-03 Robert Dewar <dewar@adacore.com>
6603 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6604 exp_aggr.adb: Minor reformatting.
6606 2011-08-03 Thomas Quinot <quinot@adacore.com>
6608 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6609 tagged assignment when discriminant checks are suppressed. This is
6610 useless and extremely costly in terms of static stack usage.
6612 2011-08-03 Bob Duff <duff@adacore.com>
6614 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6615 of generics, because this leads to the wrong entity in the wrong scope,
6616 causing (e.g.) pragma Export_Procedure to get an error if the entity is
6618 (Process_Interface_Name): Follow Alias for instances of generics, to
6619 correct for the above change.
6621 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6623 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6624 is an integer literal it is always safe to replace the reference. In
6625 addition, if the reference appears in the generated code for an object
6626 declaration it is necessary to copy because otherwise the reference
6627 might be to the uninitilized value of the discriminant of the object
6630 2011-08-03 Pascal Obry <obry@adacore.com>
6632 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6633 ACL used, in this case we want to check for ending .exe, not .exe
6634 anywhere in the path.
6636 2011-08-03 Sergey Rybin <rybin@adacore.com>
6638 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6639 the tree structure (semantic decoration of references to record
6642 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6644 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6645 choices of a named array aggregate, bail out when any choices are
6646 marked as Errors_Posted.
6648 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6650 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6651 in which entity is frozen, to handle properly loop variables in
6654 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6656 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6657 subtype is not static, compute the upper bound using attributes, to
6658 handle properly index types that are not integer types.
6660 2011-08-03 Bob Duff <duff@adacore.com>
6662 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6663 Update copyright notice.
6665 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6667 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6668 Original_Discriminant if within an instance.
6669 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6671 2011-08-03 Thomas Quinot <quinot@adacore.com>
6673 * einfo.ads: Minor reformatting.
6675 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6677 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6678 composite type with an unfrozen subcomponent, in the profile of a
6679 primitive operation.
6681 2011-08-03 Robert Dewar <dewar@adacore.com>
6683 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6685 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6687 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6688 unconstrained type with discriminants is initialized with an aggregate,
6689 use the constrained subtype of the aggregate as the type of the object,
6690 because it is immutable, and this allows the back-end to generate no
6691 code for the object declaration.
6693 2011-08-03 Robert Dewar <dewar@adacore.com>
6695 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
6696 comparison operand is variable, and turns out to be zero or negative.
6698 2011-08-03 Javier Miranda <miranda@adacore.com>
6701 (Expand_Dispatching_Constructor_Call): Disable expansion of
6702 code required for native targets. Done to avoid generating
6703 references to unavailable runtime entities in VM targets.
6705 (Expand_N_Object_Declaration): Add missing support to handle
6706 the explicit initialization of class-wide interface objects.
6709 2011-08-03 Matthew Heaney <heaney@adacore.com>
6711 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
6713 2011-08-03 Matthew Heaney <heaney@adacore.com>
6715 * a-cbdlli.adb (Splice): move source items from first to last
6717 2011-08-03 Yannick Moy <moy@adacore.com>
6719 * sem_util.ads: comment added.
6721 2011-08-03 Javier Miranda <miranda@adacore.com>
6724 (Expand_Record_Aggregate): In VM targets disable the expansion into
6725 assignments of aggregates whose type is not known at compile time.
6727 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6729 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
6730 protected entries and task entries, to build the proper renaming
6731 declaration for entry formals, used in debugging.
6732 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
6733 parameters in the same way.
6735 2011-08-02 Robert Dewar <dewar@adacore.com>
6737 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
6738 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
6739 code reorganization.
6741 2011-08-02 Robert Dewar <dewar@adacore.com>
6743 * debug.adb: Debug flag d.P to suppress length comparison optimization
6744 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
6745 comparison of Length by comparing First/Last instead.
6747 2011-08-02 Matthew Heaney <heaney@adacore.com>
6749 * a-cobove.ads: Code clean up.
6751 2011-08-02 Vincent Celier <celier@adacore.com>
6753 * adaint.c (file_names_case_sensitive_cache): New static int.
6754 (__gnat_get_file_names_case_sensitive): Cache the return value in
6755 file_names_case_sensitive_cache at the first invocation, to avoid
6756 multiple calls to getenv.
6758 2011-08-02 Bob Duff <duff@adacore.com>
6760 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6762 2011-08-02 Yannick Moy <moy@adacore.com>
6764 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6765 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6766 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6767 indicate that we are in a precondition or postcondition. This is used in
6768 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6769 decide whether to flag the spec or body of the current subprogram as
6772 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
6774 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6776 * a-extiin.ads: New file.
6778 2011-08-02 Bob Duff <duff@adacore.com>
6780 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6781 now raises Name_Error instead of Use_Error in certain cases. The other
6782 parts of this AI were already implemented properly.
6784 2011-08-02 Vincent Celier <celier@adacore.com>
6786 * link.c: Only import "auto-host.h" when building the gnattools.
6788 2011-08-02 Yannick Moy <moy@adacore.com>
6790 * sem_util.adb: Inter-unit inlining does not work for a subprogram
6791 which calls a local subprogram, so extract subprogram
6792 from Mark_Non_ALFA_Subprogram_Body.
6794 2011-08-02 Javier Miranda <miranda@adacore.com>
6797 (Extract_Dispatching_Call): If the type of the dispatching object is an
6798 access type then return an explicit dereference in the Object out-mode
6801 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6803 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6804 compatibility checks for all indexes of an array subtype, not just the
6805 first. Reset Has_Dynamic_Range_Check on the subtype before each
6806 potential check to ensure that Insert_Range_Checks will not elide any
6807 of the dynamic checks.
6809 2011-08-02 Yannick Moy <moy@adacore.com>
6811 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6812 SPARK restriction at parsing time.
6813 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6814 directive only if the SPARK restriction is set for this unit.
6816 2011-08-02 Yannick Moy <moy@adacore.com>
6818 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6819 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6820 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6821 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6822 Mark_Non_ALFA_Subprogram_Body.
6823 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6826 2011-08-02 Yannick Moy <moy@adacore.com>
6828 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6831 2011-08-02 Robert Dewar <dewar@adacore.com>
6833 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6834 exp_ch3.adb: Minor reformatting.
6836 2011-08-02 Emmanuel Briot <briot@adacore.com>
6838 * adaint.c (__gnat_locate_exec_on_path): only returns executable
6839 files, not any regular file.
6840 (__gnat_locate_file_with_predicate): new subprogram.
6842 2011-08-02 Yannick Moy <moy@adacore.com>
6844 * sinfo.adb, sinfo.ads: Restrict the use of flags
6845 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6846 nodes, plus N_Subtype_Declaration for the 2nd one.
6848 2011-08-02 Sergey Rybin <rybin@adacore.com>
6850 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6851 - fix bugs in the description of Source_Trace;
6852 - get rid of UNIT_NAME;
6854 2011-08-02 Javier Miranda <miranda@adacore.com>
6857 (Build_Dispatching_Requeue): Adding support for VM targets
6858 since we cannot directly reference the Tag entity.
6859 * exp_sel.adb (Build_K): Adding support for VM targets.
6860 (Build_S_Assignment): Adding support for VM targets.
6862 (Default_Prim_Op_Position): In VM targets do not restrict availability
6863 of predefined interface primitives to compiling in Ada 2005 mode.
6864 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6865 restricted to compiling in Ada 2005 mode.
6866 (Make_VM_TSD): Generate code that declares and initializes the OSD
6867 record. Needed to support dispatching calls through synchronized
6870 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6871 primitives associated with synchronized interfaces.
6872 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6873 primitives associated with synchronized interfaces.
6875 2011-08-02 Yannick Moy <moy@adacore.com>
6877 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6878 statements hidden in SPARK if preceded by the HIDE directive
6879 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6880 exception handlers as hidden in SPARK if preceded by the HIDE directive
6881 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6882 if starting with the HIDE directive
6883 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6884 starting with the HIDE directive; mark the declarations in a private
6885 part as hidden in SPARK if the private part starts with the HIDE
6887 * restrict.adb, restrict.ads
6888 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6889 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6890 argument node belongs to a part which is hidden in SPARK
6891 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6892 parts in SPARK; protect the possibly costly call to
6893 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6894 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6895 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6896 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6898 (Scan): recognize special comment starting with '#' and followed by
6899 SPARK keyword "hide" as a HIDE directive.
6901 2011-08-02 Yannick Moy <moy@adacore.com>
6903 * types.ads, erroutc.ads: Minor reformatting.
6905 2011-08-02 Vincent Celier <celier@adacore.com>
6907 * link.c: Add response file support for cross platforms.
6909 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6911 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6912 in an association, set parent field of copy before partial analysis.
6913 * sem_res.adb (Resolve_Slice): create reference to itype only when
6914 expansion is enabled.
6916 2011-08-02 Yannick Moy <moy@adacore.com>
6918 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6919 for new flag denoting which subprogram bodies are in ALFA
6920 * restrict.adb, sem_ch7.adb: Update comment
6921 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6922 sem_ch9.adb, sem_res.adb: Add calls to
6923 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6924 * sem_ch6.adb (Analyze_Function_Return): add calls to
6925 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6926 middle of the body, and extended return.
6927 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6928 False when missing return.
6929 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6930 to True for subprograms whose spec is in ALFA. Remove later on the flag
6931 on the entity used for a subprogram body when there exists a separate
6933 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6934 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6935 False, otherwise do nothing.
6937 2011-08-02 Robert Dewar <dewar@adacore.com>
6939 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6941 2011-08-02 Yannick Moy <moy@adacore.com>
6943 * sem_ch4.ads: minor formatting.
6945 2011-08-02 Yannick Moy <moy@adacore.com>
6947 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6948 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6949 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6950 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6951 opt.ads: cleanup of SPARK mode
6953 2011-08-02 Yannick Moy <moy@adacore.com>
6955 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6957 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6958 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6960 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6961 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6962 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6963 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6965 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6967 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6968 functions whose return type is not in ALFA.
6969 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6971 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6972 parameter's type is not in ALFA.
6973 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6976 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6978 * sem_ch6 (Analyze_Expression_Function): treat the function as
6979 Inline_Always, and introduce a subprogram declaration for it when it is
6981 * inline.adb (Add_Inlined_Body): recognize bodies that come from
6982 expression functions, so that the back-end can determine whether they
6983 can in fact be inlined.
6984 * sem_util.adb (Is_Expression_Function): predicate to determine whether
6985 a function body comes from an expression function.
6987 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6989 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6990 null exclusions to test Can_Never_Be_Null on the anonymous access types
6991 of the formals rather than testing the formals themselves. Exclude this
6992 check in cases where the Old_Formal is marked as a controlling formal,
6993 to avoid issuing spurious errors for bodies completing dispatching
6994 operations (due to the flag not getting set on controlling access
6995 formals in body specs).
6996 (Find_Corresponding_Spec): When checking full and subtype conformance of
6997 subprogram bodies in instances, pass Designated and E in that order, for
6998 consistency with the expected order of the formals (New_Id followed by
7001 2011-08-02 Robert Dewar <dewar@adacore.com>
7003 * sem_ch8.adb: Minor reformatting.
7005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7007 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7008 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7009 primitive operations of class-wide actuals.
7011 2011-08-02 Javier Miranda <miranda@adacore.com>
7013 * exp_atag.ads, exp_atag.adb
7014 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7015 since its value is implicitly passed in argument Typ.
7016 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7017 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7018 Build_Common_Dispatching_Select_Statements.
7020 2011-08-02 Robert Dewar <dewar@adacore.com>
7022 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7023 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7026 2011-08-02 Robert Dewar <dewar@adacore.com>
7028 * sem_res.adb: Minor reformatting.
7029 * sem_prag.adb: Minor reformatting.
7031 2011-08-02 Javier Miranda <miranda@adacore.com>
7033 * exp_atag.adb, exp_atags.ads
7034 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7035 by the tagged type Entity. Required to use this routine in the VM
7036 targets since we do not have available the Tag entity in the VM
7039 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7040 Ada.Tags has not been previously loaded.
7042 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7043 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7045 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7046 view of enclosing scopes. Required to handle enclosing scopes that
7047 are synchronized types whose full view is a task type.
7049 (Build_VM_TSDs): Minor code improvement to avoid generating and
7050 analyzing lists with empty nodes.
7051 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7052 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7053 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7054 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7055 (Make_Select_Specific_Data_Table): Add support for VM targets.
7056 (Make_VM_TSD): Generate code to initialize the SSD structure of
7059 2011-08-02 Yannick Moy <moy@adacore.com>
7061 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7062 cross-references section in ALI.
7063 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7064 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7066 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7067 subprogram or package entity of a node
7068 (Is_Local_Reference_Type): new function returns True for references
7069 selected in local cross-references.
7070 (Lt): function extracted from Lt in Output_References
7071 (Write_Entity_Name): function extracted from Output_References
7072 (Generate_Definition): generate reference with type 'D' for definition
7073 of objects (object declaration and parameter specification), with
7074 appropriate locations and units, for use in local cross-references.
7075 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7076 references of type 'I' for initialization in object definition.
7077 (Output_References): move part of function Lt and procedure
7078 Write_Entity_Name outside of the body. Ignore references of types 'D'
7079 and 'I' introduced for local cross-references.
7080 (Output_Local_References): new procedure to output the local
7081 cross-references sections.
7082 (Lref_Entity_Status): new array defining whether an entity is a local
7083 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7084 with 'I' type when initialization expression is present.
7085 * get_scos.adb, get_scos.ads: Correct comments and typos
7087 2011-08-02 Javier Miranda <miranda@adacore.com>
7089 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7091 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7093 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7096 2011-08-02 Vincent Celier <celier@adacore.com>
7098 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7099 (No_Space_Img): New function
7100 (Find_Excluded_Sources): When reading from a file, record the file name
7101 and the line number for each excluded source.
7102 (Mark_Excluded_Sources): When reporting an error, if the excluded
7103 sources were read from a file, include file name and line number in
7106 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7108 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7110 2011-08-02 Robert Dewar <dewar@adacore.com>
7112 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7114 2011-08-02 Javier Miranda <miranda@adacore.com>
7116 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7117 generation of TSDs to the DOTNET compiler.
7118 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7119 generation of TSDs to the DOTNET compiler.
7121 2011-08-02 Javier Miranda <miranda@adacore.com>
7123 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7124 record of all the tagged types declared inside library level package
7125 declarations, library level package bodies or library level subprograms.
7126 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7127 associated with a given tagged type.
7128 (Build_VM_TSDs): New subprogram.
7129 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7130 compilation units that are subprograms.
7131 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7132 compilation units that are package bodies.
7133 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7134 units that are a package declaration or a package instantiation.
7135 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7136 reorganization to improve the error generated by the frontend when the
7137 function Ada.Tags.Secondary_Tag is not available.
7138 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7139 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7141 2011-08-02 Javier Miranda <miranda@adacore.com>
7143 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7145 2011-08-02 Robert Dewar <dewar@adacore.com>
7147 * s-imenne.ads: Minor reformatting.
7149 2011-08-02 Robert Dewar <dewar@adacore.com>
7151 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7152 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7153 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7155 2011-08-02 Robert Dewar <dewar@adacore.com>
7157 * einfo.ads (Materialize_Entity): Document this is only for renamings
7158 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7159 required debug information in the case where we transform the object
7160 declaration into a renaming declaration.
7161 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7163 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7166 2011-08-02 Robert Dewar <dewar@adacore.com>
7168 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7169 Suppress_Init_Procs.
7170 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7171 Suppress_Initialization/Initialization_Suppressed.
7172 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7173 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7174 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7175 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7177 2011-08-02 Robert Dewar <dewar@adacore.com>
7179 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7182 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7184 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7185 only have inheritable classwide pre/postconditions.
7187 2011-08-02 Javier Miranda <miranda@adacore.com>
7189 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7190 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7191 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7192 checks if the external tag of a type is the same as the external tag
7193 of some other declaration.
7195 2011-08-02 Thomas Quinot <quinot@adacore.com>
7197 * s-taskin.ads: Minor reformatting.
7199 2011-08-02 Emmanuel Briot <briot@adacore.com>
7201 * g-comlin.adb (Display_Help): swap the order in which it prints the
7202 short help and the general usage.
7204 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7206 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7207 the aspect declarations and attach them to the generic copy for
7208 subsequent analysis.
7209 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7210 declarations of the generic tree to the new subprogram declarations.
7211 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7212 conditions that apply to a subprogram instance.
7214 2011-08-02 Robert Dewar <dewar@adacore.com>
7216 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7218 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7220 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7221 private type with a tagged full view is not derived in the immediate
7222 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7224 2011-08-02 Robert Dewar <dewar@adacore.com>
7226 * exp_ch4.adb: Minor reformatting.
7228 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7230 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7231 Ada2012 iterator, the loop will be rewritten during expansion into a
7232 while loop with a cursor and an element declaration. Do not analyze the
7233 body in this case, because if the container is for indefinite types the
7234 actual subtype of the elements will only be determined when the cursor
7235 declaration is analyzed.
7237 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7239 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7240 size/alignment related attributes in CodePeer_Mode.
7242 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7244 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7245 Prepend_Element, since this can result in the operation getting the
7246 wrong slot in the full type's dispatch table if the full type has
7247 inherited operations. The incomplete type's operation will get added
7248 to the proper position in the full type's primitives
7249 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7250 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7251 dispatching operations, since there are cases where nonprimitive
7252 subprograms can get added to the list of incomplete dependents (such
7253 as subprograms in nested packages).
7254 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7255 private part when determining whether to add a primitive with a
7256 parameter of a tagged incomplete type to the Private_Dependents list.
7257 Such primitives can also occur in the visible part, and should not have
7258 been excluded from being private dependents.
7259 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7260 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7261 list of a Taft-amendment incomplete type is a primitive before issuing
7262 an error that the full type must appear in the same unit. There are
7263 cases where nonprimitives can be in the list (such as subprograms in
7265 * sem_disp.adb (Derives_From): Use correct condition for checking that
7266 a formal's type is derived from the type of the corresponding formal in
7267 the parent subprogram (the condition was completely wrong). Add
7268 checking that was missing for controlling result types being derived
7269 from the result type of the parent operation.
7271 2011-08-02 Yannick Moy <moy@adacore.com>
7273 * errout.adb (First_Node): minor renaming
7274 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7277 2011-08-02 Yannick Moy <moy@adacore.com>
7279 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7280 before accessing operands.
7281 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7282 decide whether an initialization expression respects SPARK rules, as
7283 the plain node is the expanded one. This allows for more valid warnings
7285 * gnat_rm.texi: Minor update.
7287 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7289 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7292 2011-08-02 Robert Dewar <dewar@adacore.com>
7294 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7296 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7298 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7299 loop statements and the element renaming declaration with a block when
7300 the element type is controlled.
7302 2011-08-02 Yannick Moy <moy@adacore.com>
7304 * sinfo.ads: Minor formatting.
7306 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7308 * sem_aggr.adb (Add_Association): if the association has a box and no
7309 expression, use the Sloc of the aggregate itself for the new
7311 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7314 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7316 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7317 When a container is provided via a function call, generate a renaming
7318 of the function result. This avoids the creation of a transient scope
7319 and the premature finalization of the container.
7320 * exp_ch7.adb (Is_Container_Cursor): Removed.
7321 (Wrap_Transient_Declaration): Remove the supression of the finalization
7322 of the list controller when the declaration denotes a container cursor,
7325 2011-08-02 Yannick Moy <moy@adacore.com>
7327 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7328 node is from source, instead of the original node being from source.
7330 (Resolve_Array_Aggregate): refine the check for a static expression, to
7331 recognize also static ranges
7332 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7333 Array_Type_Declaration): postpone the test for the type being a subtype
7334 mark after the type has been resolved, so that component-selection and
7335 expanded-name are discriminated.
7336 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7337 to distinguish the case of an iteration scheme, so that an error is
7338 issed on a non-static range in SPARK except in an iteration scheme.
7339 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7340 In_Iter_Schm = True.
7341 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7342 user-defined operators so that they are allowed in renaming
7344 (Find_Selected_Component): refine the check for prefixing of operators
7345 so that they are allowed in renaming. Move the checks for restrictions
7346 on selector name after analysis discriminated between
7347 component-selection and expanded-name.
7348 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7349 concatenation argument of string type if it is static.
7350 * sem_util.adb, sem_util.ads
7351 (Check_Later_Vs_Basic_Declarations): add a new function
7352 Is_Later_Declarative_Item to decice which declarations are allowed as
7353 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7354 mode, add that renamings are considered as later items.
7355 (Enclosing_Package): new function to return the enclosing package
7356 (Enter_Name): correct the rule for homonyms in SPARK
7357 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7358 from source (result of expansion) to avoid issuing wrong warnings.
7360 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7362 * errout.adb: On anything but an expression First_Node returns its
7365 2011-08-02 Pascal Obry <obry@adacore.com>
7367 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7369 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7371 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7372 Set the associated loop as the related expression of internally
7374 * exp_ch7.adb (Is_Container_Cursor): New routine.
7375 (Wrap_Transient_Declaration): Supress the finalization of the list
7376 controller when the declaration denotes a container cursor.
7378 2011-08-02 Yannick Moy <moy@adacore.com>
7380 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7382 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7383 expression is a simple expression. This check cannot be performed in
7384 the semantics, so just drop it.
7385 (P_Index_Or_Discriminant_Constraint): move check that the index or
7386 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7387 semantics. Other cases were previously checked in the semantics.
7388 * par-ch4.adb (P_Name): move checks that a selector name is not
7389 character literal or an operator symbol to Find_Selected_Component in
7391 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7392 declarations are not placed after later declarations in a separate
7393 procedure in Sem_Util (possibly not the best choice?), to be used both
7394 during parsing, for Ada 83 mode, and during semantic analysis, for
7396 * par-endh.adb (Check_End): move check that end label is not missing
7397 to Process_End_Label in the semantics
7398 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7399 the special case for SPARK restriction
7400 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7401 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7402 parameter Force to issue the error message even on internal node (used
7403 for generated end label). Call Check_Restriction to check when an error
7404 must be issued. In SPARK mode, issue an error message even if the
7405 restriction is not set.
7406 (Check_Restriction): new procedure with an additional out parameter to
7407 inform the caller that a message has been issued
7408 * sem_aggr.adb: Minor modification of message
7409 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7410 instead of issuing an error message directly
7411 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7412 declarations are not placed after later declarations, by calling
7413 Check_Later_Vs_Basic_Declarations
7414 (Analyze_Subtype_Declaration): move here the check that an index or
7415 discriminant constraint must be a subtype mark. Change the check that
7416 a subtype of String must start at one so that it works on subtype marks.
7417 * sem_ch4.adb (Analyze_Call): move here the check that a named
7418 association cannot follow a positional one in a call
7419 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7420 instead of issuing an error message directly
7421 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7422 selector name is not a character literal or an operator symbol. Move
7423 here the check that the prefix of an expanded name cannot be a
7424 subprogram or a loop statement.
7425 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7426 procedure called from parsing and semantics to check that basic
7427 declarations are not placed after later declarations
7428 (Process_End_Label): move here the check that end label is not missing
7430 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7432 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7433 representation clause in codepeer mode, since it confuses CodePeer and
7434 does not bring useful info.
7436 2011-08-02 Ed Falis <falis@adacore.com>
7438 * init.c: initialize fp hw on MILS.
7440 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7442 * errout.adb (First_Node): for bodies, return the node itself (small
7443 optimization). For other nodes, do not check source_unit if the node
7444 comes from Standard.
7446 2011-08-02 Robert Dewar <dewar@adacore.com>
7448 * exp_ch3.adb: Minor comment additions.
7449 * sem_ch13.adb: Minor reformatting.
7451 2011-08-02 Pascal Obry <obry@adacore.com>
7453 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7455 2011-08-02 Robert Dewar <dewar@adacore.com>
7457 * sem_attr.adb: Minor reformatting.
7459 2011-08-02 Robert Dewar <dewar@adacore.com>
7461 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7462 (Has_Default_Component_Value): Removed
7463 * einfo.ads Comment updates
7464 (Has_Default_Aspect): Replaces Has_Default_Value
7465 (Has_Default_Component_Value): Removed
7467 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7469 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7470 (Get_Simple_Init_Val): Handle Default_Value aspect
7471 (Needs_Simple_Initialization): Handle Default_Value aspect
7472 * exp_ch3.ads: Needs_Simple_Initialization
7473 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7474 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7476 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7477 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7478 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7480 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7482 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7483 package containing iteration primitives.
7484 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7486 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7488 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7489 "of", pre-analyze expression in case it is a function call with
7490 finalization actions that must be placed ahead of the loop.
7491 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7492 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7494 2011-08-02 Geert Bosch <bosch@adacore.com>
7496 * cstand.adb (Create_Float_Types): Only consider C's long double for
7497 Long_Long_Float, in addition to double.
7499 2011-08-02 Robert Dewar <dewar@adacore.com>
7501 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7502 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7503 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7506 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7508 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7511 2011-08-02 Javier Miranda <miranda@adacore.com>
7513 * einfo.ads, einfo.adb
7514 (Original_Access_Type): Move this attribute to Node26 since there was
7515 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7516 which causes conflicts and breaks the generation of the .NET compiler.
7517 (Interface_Name): Add missing documentation on JGNAT only uses of
7520 2011-08-02 Geert Bosch <bosch@adacore.com>
7522 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7523 (Find_Back_End_Float_Type): Likewise
7524 (Create_Back_End_Float_Types): Likewise
7525 (Create_Float_Types): Likewise
7526 (Register_Float_Type): Likewise
7527 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7528 Nlist and split out type selection in new local Find_Base_Type function.
7529 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7531 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7533 2011-08-02 Robert Dewar <dewar@adacore.com>
7535 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7537 * opt.ads: Minor comment change.
7538 * sem_ch12.adb: Minor code reorganization.
7540 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7542 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7543 subtype's list of rep items to the list on the full subtype in the case
7544 where the lists are the same.
7546 2011-08-02 Geert Bosch <bosch@adacore.com>
7548 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7549 using the one from System.Strings, which also deallocates all strings.
7551 2011-08-02 Geert Bosch <bosch@adacore.com>
7553 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7555 * gcc-interface/Make-lang.in: Update dependencies.
7557 2011-08-02 Olivier Hainque <hainque@adacore.com>
7559 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7562 2011-08-02 Javier Miranda <miranda@adacore.com>
7564 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7565 associated with anonymous access to subprograms.
7567 2011-08-02 Geert Bosch <bosch@adacore.com>
7570 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7571 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7572 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7573 (Add_Symbol_Definition): Move to switch-c.adb
7574 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7575 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7576 (Add_Symbol_Definition): Move to switch-c.adb.
7577 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7579 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7581 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7582 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7584 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7585 (Add_Symbol_Definition): Moved from Prepcomp.
7586 * switch-c.ads: Update copyright notice. Use String_List instead of
7587 Argument_List, removing dependency on System.OS_Lib.
7589 2011-08-02 Yannick Moy <moy@adacore.com>
7591 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7592 mode on initialization expression which does not respect SPARK
7594 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7595 if the tree referenced by its argument represents an initialization
7596 expression in SPARK, suitable for initializing an object in an object
7599 2011-08-02 Javier Miranda <miranda@adacore.com>
7601 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7602 internally generated access to subprogram with its associated protected
7604 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7606 2011-08-02 Geert Bosch <bosch@adacore.com>
7608 * cstand.adb (Register_Float_Type): Print information about type to
7609 register, if the Debug_Flag_Dot_B is set.
7610 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7611 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7612 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7613 with a requested precision of more than Max_Digits digits and no more
7614 than Max_Base_Digits digits, if a range specification is present and the
7615 Predefined_Float_Types list has a suitable type to derive from.
7616 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7617 case of type completion with pragma Import
7619 (Process_Import_Predefined_Type): Processing to complete a type
7620 with pragma Import. Currently supports floating point types only.
7621 (Set_Convention_From_Pragma): Do nothing without underlying type.
7622 (Process_Convention): Guard against absence of underlying type,
7623 which may happen when importing incomplete types.
7624 (Process_Import_Or_Interface): Handle case of importing predefined
7625 types. Tweak error message.
7627 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7629 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7630 functions to previous change. Reorganize code slightly.
7632 2011-08-02 Geert Bosch <bosch@adacore.com>
7634 * back_end.ads (Register_Type_Proc): New call back procedure type for
7635 allowing the back end to provide information about available types.
7636 (Register_Back_End_Types): New procedure to register back end types.
7637 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7639 * cstand.adb (Back_End_Float_Types): New list for floating point types
7640 supported by the back end.
7641 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7642 (Copy_Float_Type): New procedure to make new copies of predefined types.
7643 (Register_Float_Type): New call back procedure to populate the BEFT list
7644 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7645 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7646 (Create_Float_Types): New procedure to create entities for floating
7647 point types predefined in Standard, and put these and any remaining
7648 BEFTs on the Predefined_Float_Types list.
7649 * stand.ads (Predefined_Float_Types): New list for predefined floating
7650 point types that do not have declarations in package Standard.
7652 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7654 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7655 entity node for the unit containing the parameter.
7656 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7657 (Add_Inlined_Subprogram): Likewise.
7658 * gcc-interface/Make-lang.in: Update dependencies.
7660 2011-08-02 Thomas Quinot <quinot@adacore.com>
7662 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7665 2011-08-02 Geert Bosch <bosch@adacore.com>
7667 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7669 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7671 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7672 computed value of Base_Type.
7674 2011-08-02 Yannick Moy <moy@adacore.com>
7676 * restrict.adb (Check_Restriction): issue an error for any use of
7677 class-wide, even if the No_Dispatch restriction is not set.
7678 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7679 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7680 when completing a private extension, the type named in the private part
7681 is not the same as that named in the visible part.
7682 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7683 of an inherited primitive operations of a tagged type or type extension
7684 that returns the tagged type.
7685 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7686 function which returns True for an implicit operation inherited by the
7687 derived type declaration for the argument type.
7688 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7691 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7693 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7694 Process_Bounds, to perform analysis with expansion of a range or an
7695 expression that is the iteration scheme for a loop.
7696 (Analyze_Iterator_Specification): If domain of iteration is given by a
7697 function call with a controlled result, as is the case if call returns
7698 a predefined container, ensure that finalization actions are properly
7700 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7702 2011-08-02 Javier Miranda <miranda@adacore.com>
7704 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7705 * gcc-interface/Make-lang.in: Update dependencies.
7707 2011-08-02 Javier Miranda <miranda@adacore.com>
7709 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7710 determine if the analysis is performed using N or Original_Node (N).
7711 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7712 functionality of routine Is_Variable avoids code duplication.
7713 * checks.adb (Determine_Range): Handle temporaries generated by
7714 Remove_Side_Effects.
7716 2011-08-02 Javier Miranda <miranda@adacore.com>
7718 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7719 expansion of the condition. Required since the previous analysis was
7720 done with expansion disabled (see Resolve_Quantified_Expression) and
7721 hence checks were not inserted and record comparisons have not been
7724 2011-08-02 Ed Falis <falis@adacore.com>
7726 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7729 2011-08-02 Bob Duff <duff@adacore.com>
7731 * opt.ads: Minor comment fix.
7733 2011-08-02 Bob Duff <duff@adacore.com>
7735 * sem_ch12.adb (Analyze_Package_Instantiation,
7736 Analyze_Subprogram_Instantiation): Turn off style checking while
7737 analyzing an instance. Whatever style checks that apply to the generic
7738 unit should apply, so it makes no sense to apply them in an instance.
7739 This was causing trouble when compiling an instance of a runtime
7740 unit that violates the -gnatyO switch.
7741 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7742 one of the two case statements, causing spurious errors.
7744 2011-08-02 Robert Dewar <dewar@adacore.com>
7746 * uname.adb: Minor reformatting.
7747 * gnatcmd.adb: Minor reformatting.
7748 * exp_attr.adb: Minor reformatting.
7750 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7752 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7753 No_Dispatching_Calls, do not look for the Assign primitive, because
7754 predefined primitives are not created in this case.
7756 2011-08-02 Bob Duff <duff@adacore.com>
7758 * stylesw.ads: Minor comment fixes.
7760 2011-08-02 Robert Dewar <dewar@adacore.com>
7762 * freeze.adb (Add_To_Result): New procedure.
7764 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7766 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7767 time, if the specific run-time routines for handling streams of strings
7768 are not available, use the default mechanism.
7770 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7772 * s-regpat.ads: Fix typo.
7774 2011-08-02 Vincent Celier <celier@adacore.com>
7776 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7777 not null, call it to create the in memory config project file without
7778 parsing an existing default config project file.
7780 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7782 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7784 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7786 * sem_elim.adb: an abstract subprogram does not need an eliminate
7787 pragma for its descendant to be eliminable.
7789 2011-08-02 Ed Falis <falis@adacore.com>
7791 * init.c: revert to handling before previous checkin for VxWorks
7792 * s-intman-vxworks.adb: delete unnecessary declarations related to
7793 using Ada interrupt facilities for handling signals.
7794 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7795 * s-intman-vxworks.ads: Import __gnat_install_handler as
7796 Initialize_Interrupts.
7797 * s-taprop-vxworks.adb: Delete Signal_Mask.
7798 (Abort_Handler): change construction of mask to unblock exception
7801 2011-08-02 Jerome Guitton <guitton@adacore.com>
7803 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7804 Debug_Raise_Exception before propagation starts.
7806 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7808 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7809 to Restriction_Check_Required.
7810 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7811 * sem_res.adb (Resolve_Call): Likewise.
7812 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7814 2011-08-02 Bob Duff <duff@adacore.com>
7816 * stylesw.ads: Update comment.
7817 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7818 * errout.ads: Remove obsolete comment.
7820 2011-08-02 Javier Miranda <miranda@adacore.com>
7822 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7823 (Set_Is_Safe_To_Reevaluate): new procedure.
7824 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7825 assignment is allowed on safe-to-reevaluate variables.
7826 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7827 temporary created to remove side effects in expressions that use
7828 the secondary stack as safe-to-reevaluate.
7829 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7830 variables that are not true constants.
7832 2011-08-02 Robert Dewar <dewar@adacore.com>
7834 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7835 sem_res.adb, sem_ch6.adb: Minor reformatting.
7837 2011-08-02 Jerome Guitton <guitton@adacore.com>
7839 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7841 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7843 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7844 not set Overridden_Operation if subprogram is an initialization
7847 2011-08-02 Yannick Moy <moy@adacore.com>
7849 * par-ch6.adb: Correct obsolete name in comments
7850 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7851 which takes two message arguments (existing function takes one), with
7852 second message used for continuation.
7853 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7854 block statements that originate from a source block statement, not
7855 generated block statements
7856 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7857 symmetry with procedure case
7858 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7859 function to issue an error in formal mode if a package specification
7860 contains more than one tagged type or type extension.
7861 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7862 parameters matching formals of tagged types are objects (or ancestor
7863 type conversions of objects), not general expressions. Issue an error
7864 on view conversions that are not involving ancestor conversion of an
7866 (Resolve_Type_Conversion): in formal mode, issue an error on the
7867 operand of an ancestor type conversion which is not an object
7868 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7869 procedure so that it works also for actuals of function calls
7870 (Is_Actual_Tagged_Parameter): new function which determines if its
7871 argument is an actual parameter of a formal of tagged type in a
7873 (Is_SPARK_Object_Reference): new function which determines if the tree
7874 referenced by its argument represents an object in SPARK
7876 2011-08-02 Robert Dewar <dewar@adacore.com>
7878 * sem_ch3.adb: Minor reformatting
7879 Minor comment addition
7880 Minor error msg text change
7882 2011-08-02 Javier Miranda <miranda@adacore.com>
7884 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7885 function. Used to be more precise when we generate a variable plus one
7886 assignment to remove side effects in the evaluation of the Bound
7888 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7889 of the bound expression to force its re-analysis and thus expand the
7890 associated transient scope (if required). Code cleanup replacing the
7891 previous code that declared the constant entity by an invocation to
7892 routine Force_Evaluation which centralizes this work in the frontend.
7894 2011-08-02 Robert Dewar <dewar@adacore.com>
7896 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7897 (Base_Type): Now uses improved Is_Base_Type function
7898 * einfo.ads (Base_Type): Inline this function
7900 2011-08-02 Robert Dewar <dewar@adacore.com>
7902 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7903 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7905 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7907 * gcc-interface/Make-lang.in: Update dependencies.
7908 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7911 2011-08-02 Yannick Moy <moy@adacore.com>
7913 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7914 non-simple expression used in delta constraint
7915 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7916 index constraint which is not a subtype mark
7917 * par.adb: With and use Restrict
7918 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7919 mode on component type which is not a subtype mark and default
7920 expression on component
7921 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7922 of string which does not have a lower index bound equal to 1
7923 (Array_Type_Declaration): issue an error in formal mode on index or
7924 component type which is not a subtype mark, and on aliased keyword on
7926 (Derived_Type_Declaration): issue an error in formal mode on interface,
7927 limited or abstract type
7928 (Record_Type_Declaration): issue an error in formal mode on interface
7929 (Record_Type_Definition): issue an error in formal mode on tagged types
7930 and type extensions not declared in the specification of a library unit
7931 package; on null non-tagged record; on variant part
7933 2011-08-02 Vincent Celier <celier@adacore.com>
7935 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7936 not declared for qualified library project when Library_Name is not
7937 declared, but Library_Dir is.
7939 2011-08-02 Robert Dewar <dewar@adacore.com>
7941 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7942 pragmas (affects aspects [Component_]Default_Value
7943 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7944 component type for the resolution
7946 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7948 * einfo.adb (Base_Type): Tune implementation for speed.
7950 2011-08-02 Robert Dewar <dewar@adacore.com>
7952 * freeze.adb: Minor reformatting.
7954 2011-08-02 Thomas Quinot <quinot@adacore.com>
7956 * scos.ads: Update comments.
7958 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7960 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7961 base type, because the parent may be a subtype of a private type whose
7962 convention is established in a private part.
7964 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7966 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7967 statement in a block when the expansion of the return expression has
7968 created a finalization chain.
7969 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7970 with the parent node.
7971 Add N_Extended_Return_Statement to handle the case where a transient
7972 object declaration appears in the Return_Object_Declarations list of
7973 an extended return statement.
7975 2011-08-02 Matthew Gingell <gingell@adacore.com>
7977 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7978 unused parameter 'name'.
7980 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7982 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7983 inherited operation, check whether its alias, which is the source
7984 operastion that it renames, has been marked eliminated.
7986 2011-08-02 Javier Miranda <miranda@adacore.com>
7988 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7989 in-mode parameter whose type is an access type since it can be used to
7990 modify its designated object. Enforce code that handles as safe an
7991 access type that is not access-to-constant but it is the result of a
7992 previous removal of side-effects.
7993 (Remove_Side_Effects): Minor code reorganization of cases which require
7994 no action. Done to incorporate documentation on new cases uncovered
7995 working in this ticket: no action needed if this routine was invoked
7996 too early and the nodes are not yet decorated.
7997 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7998 to routine Remove_Side_Effects by calls to Force_Evaluation since they
7999 were issued with actuals that are implicitly provided by
8002 2011-08-02 Robert Dewar <dewar@adacore.com>
8004 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8006 2011-08-02 Yannick Moy <moy@adacore.com>
8008 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8009 to issue an error in formal mode on attribute not supported in this mode
8010 (Analyze_Attribute): issue errors on standard attributes not supported
8012 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8013 comment, and issue error in formal mode on modulus which is not a power
8015 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8017 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8019 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8020 operator on modular type (except 'not').
8022 2011-08-02 Robert Dewar <dewar@adacore.com>
8024 * gnat_rm.texi: Minor reformatting.
8026 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8028 * s-osinte-linux.ads: Minor comment update and reformatting.
8029 * i-cexten.ads: Make this unit pure, as for its parent.
8030 Will allow its usage in more contexts if needed.
8032 2011-08-02 Robert Dewar <dewar@adacore.com>
8034 * s-utf_32.ads: Minor comment fix.
8036 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8038 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8039 operation of a tagged synchronized type, handle the case where the
8040 controlling argument is overloaded.
8042 2011-08-02 Yannick Moy <moy@adacore.com>
8044 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8045 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8046 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8047 SPARK mode and formal verification mode on processing SPARK restriction
8048 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8049 requiring consistency checking.
8051 2011-08-02 Robert Dewar <dewar@adacore.com>
8053 * sem_res.adb: Minor reformatting.
8055 2011-08-02 Robert Dewar <dewar@adacore.com>
8057 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8058 a-cforse.ads: Remove unneeded with of Ada.Containers
8059 Remove commented out pragma Inline's
8060 Move specifications of new subprograms to the actual specs
8062 2011-08-02 Yannick Moy <moy@adacore.com>
8064 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8065 a-cforse.ads: Update comments.
8067 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8069 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8071 2011-08-02 Robert Dewar <dewar@adacore.com>
8073 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8074 a-cforse.ads, a-cofove.ads: Minor reformatting.
8076 2011-08-02 Claire Dross <dross@adacore.com>
8078 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8079 a-cofove.ads: Add comments.
8081 2011-08-02 Yannick Moy <moy@adacore.com>
8083 * gnat_rm.texi: Document formal containers.
8085 2011-08-02 Emmanuel Briot <briot@adacore.com>
8087 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8090 2011-08-02 Robert Dewar <dewar@adacore.com>
8092 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8095 2011-08-02 Robert Dewar <dewar@adacore.com>
8097 * aspects.adb: New aspects Default_Value and Default_Component_Value
8098 New format of Aspect_Names table checks for omitted entries
8099 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8100 handling of boolean aspects for derived types.
8101 New aspects Default_Value and Default_Component_Value
8102 New format of Aspect_Names table checks for omitted entries
8103 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8104 (Has_Default_Value): New flag
8105 (Has_Default_Component_Value): New flag
8106 (Has_Default_Value): New flag
8107 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8109 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8110 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8111 Default_Value and Default_Component_Value
8112 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8113 New aspects Default_Value and Default_Component_Value
8114 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8115 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8117 2011-08-02 Vincent Celier <celier@adacore.com>
8119 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8120 inherit library kind.
8122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8124 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8127 2011-08-02 Robert Dewar <dewar@adacore.com>
8129 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8131 2011-08-02 Yannick Moy <moy@adacore.com>
8133 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8135 2011-08-02 Robert Dewar <dewar@adacore.com>
8137 * impunit.adb: Add comment.
8139 2011-08-02 Yannick Moy <moy@adacore.com>
8141 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8142 qualification of aggregates in formal mode
8143 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8145 (Resolve_Aggregate): complete the test that an aggregate is adequately
8146 qualified in formal mode
8148 2011-08-02 Pascal Obry <obry@adacore.com>
8150 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8151 * mlib-prj.adb: Supress warning when compiling binder generated file.
8152 (Build_Library): Supress all warnings when compiling the binder
8155 2011-08-02 Yannick Moy <moy@adacore.com>
8157 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8159 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8160 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8161 Add with/use clauses to make Check_Formal_Restriction visible
8163 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8165 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8166 in-parameters when type of the generic formal is private in the generic
8167 spec and non-private in the body.
8169 2011-08-02 Claire Dross <dross@adacore.com>
8171 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8172 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8173 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8174 * impunit.adb, Makefile.rtl: Take new files into account.
8176 2011-08-02 Robert Dewar <dewar@adacore.com>
8178 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8179 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8181 2011-08-02 Yannick Moy <moy@adacore.com>
8183 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8185 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8186 matching static array bounds, taking into account the special case of
8188 * sem_ch3.adb: Typo in comment.
8190 2011-08-02 Yannick Moy <moy@adacore.com>
8192 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8193 which issues an error in formal mode if its argument node is originally
8195 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8196 has a discriminant specification so that it does not include the case
8198 (Derived_Type_Declaration): move here the test that a derived type has a
8199 discriminant specification
8200 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8201 first element of a component association before accessing its choices
8202 (presence of component association is not enough)
8203 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8204 declaration is a library item before accessing the next element in a
8205 list, as library items are not member of lists
8206 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8207 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8208 Check_Formal_Restriction whenever possible.
8210 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8212 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8213 reference when needed.
8215 2011-08-02 Bob Duff <duff@adacore.com>
8217 * gnat_ugn.texi: Fix typo.
8219 2011-08-02 Vincent Celier <celier@adacore.com>
8221 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8222 archive file name. Do not use the full path name of archives for Open
8225 2011-08-02 Robert Dewar <dewar@adacore.com>
8227 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8228 Analyze_Aspect_Specifications
8230 (Analyze_Aspect_Specifications): New handling for boolean aspects
8231 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8232 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8233 sequence for Analyze_Aspect_Specifications
8234 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8235 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8237 2011-08-02 Robert Dewar <dewar@adacore.com>
8239 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8240 aspects, since these no longer exist.
8242 2011-08-02 Robert Dewar <dewar@adacore.com>
8244 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8245 semicolon, do not try to see if there are aspects following it.
8246 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8249 2011-08-02 Robert Dewar <dewar@adacore.com>
8251 * sem_ch8.adb, aspects.ads: Minor reformatting.
8253 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8255 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8256 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8258 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8260 2011-08-02 Yannick Moy <moy@adacore.com>
8262 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8263 mode on subprogram declaration outside of package specification, unless
8264 it is followed by a pragma Import
8265 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8266 Access_Type_Declaration): issue error in formal mode on access type
8267 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8269 (Analyze_Object_Declaration): issue error in formal mode on object
8270 declaration which does not respect SPARK restrictions
8271 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8272 declaration which does not respect SPARK restrictions
8273 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8274 error in formal mode on digits or delta constraint
8275 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8276 decimal fixed point type
8277 (Derived_Type_Declaration): issue error in formal mode on derived type
8278 other than type extensions of tagged record types
8279 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8280 with check on access definition
8281 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8282 mode on protected definition.
8283 (Analyze_Task_Definition): issue error in formal mode on task definition
8285 2011-08-02 Robert Dewar <dewar@adacore.com>
8287 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8289 2011-08-02 Javier Miranda <miranda@adacore.com>
8291 * sem_ch6.adb (Can_Override_Operator): New function.
8292 (Verify_Overriding_Indicator): Add missing code to check overriding
8293 indicator in operators. Fixes regression.
8294 (Check_Overriding_Indicator): Minor reformating after replacing the
8295 code that evaluates if the subprogram can override an operator by
8296 invocations to the above new function.
8298 (Write_Field26_Name): Add missing code to ensure that, following
8299 the documentation in einfo.ads, this field is not shown as attribute
8300 "Static_Initialization" on non-dispatching functions.
8302 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8304 * sem_res.adb (Resolve_Call): A call to
8305 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8306 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8307 i.e., when the second parameter is of type Time_Span.
8309 2011-08-02 Vincent Celier <celier@adacore.com>
8311 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8312 with an archive instead of -L<library dir> -l<library name>.
8314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8316 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8317 mark the base types In_Use in addition to making the operations
8320 2011-08-02 Ed Falis <falis@adacore.com>
8322 * init.c: add and setup __gnat_signal_mask for the exception signals
8323 * s-inmaop-vxworks.adb: new file.
8324 * s-intman-vxworks.adb: remove unnecessary initializations and
8326 * s-intman-vxworks.ads: remove unnecessary variable
8327 * s-taprop-vxworks.adb: simplify signal initialization
8329 2011-08-02 Robert Dewar <dewar@adacore.com>
8331 * sem_ch8.adb: Minor code reorganization, comment updates.
8333 2011-08-02 Robert Dewar <dewar@adacore.com>
8335 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8336 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8338 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8339 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8341 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8343 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8344 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8345 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8346 use_type_clauses, to handle more efficiently use_type and use_all_type
8348 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8349 Ada2012 Use_All_Type clause.
8350 (Use_Class_Wide_Operations): new procedure.
8352 2011-08-02 Robert Dewar <dewar@adacore.com>
8354 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8355 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8356 expression to expression function.
8358 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8360 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8361 if types are compatible.
8363 2011-08-02 Yannick Moy <moy@adacore.com>
8365 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8366 returns True if its argument array types have same dimension and same
8367 static bounds at each index.
8368 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8369 OUT or IN OUT paramaters which are not view conversions in SPARK.
8370 (Resolve_Arithmetic_Op): issue an error in formal mode on
8371 multiplication or division with operands of fixed point types which are
8372 not qualified or explicitly converted.
8373 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8374 Boolean or array type (except String) operands.
8375 (Resolve_Equality_Op): issue an error in formal mode on equality
8376 operators for array types other than String with non-matching static
8378 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8379 for array types with non-matching static bounds. Factorize the code in
8380 Matching_Static_Array_Bounds.
8381 (Resolve_Qualified_Expression): issue an error in formal mode on
8382 qualified expressions for array types with non-matching static bounds.
8383 (Resolve_Type_Conversion): issue an error in formal mode on type
8384 conversion for array types with non-matching static bounds
8386 2011-08-02 Robert Dewar <dewar@adacore.com>
8388 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8390 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8392 * par-ch9.adb: save location of entry for proper error message.
8394 2011-08-02 Javier Miranda <miranda@adacore.com>
8396 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8397 (Use_Full_View) which permits this routine to climb through the
8398 ancestors using the full-view of private parents.
8399 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8400 Use_Full_View to true in calls to Is_Ancestor.
8401 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8402 true in call to Is_Ancestor.
8403 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8404 Use_Full_View to true in call to Is_Ancestor.
8405 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8406 call to Is_Ancestor.
8407 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8408 Use_Full_View to true in calls to Is_Ancestor.
8409 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8410 Make_Select_Specific_Data_Table, Register_Primitive,
8411 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8412 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8413 to true in call to Is_Ancestor.
8414 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8415 Use_Full_View to true in calls to Is_Ancestor.
8417 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8418 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8420 2011-08-02 Robert Dewar <dewar@adacore.com>
8422 * gnat_rm.texi: Minor reformatting.
8423 * sem_prag.adb: Minor reformatting.
8425 2011-08-02 Tristan Gingold <gingold@adacore.com>
8427 * vms_data.ads: Add VMS qualifier for -gnateP.
8429 2011-08-02 Robert Dewar <dewar@adacore.com>
8431 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8432 * par-ch7.adb (P_Package): Proper placement of aspects for package
8434 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8435 (End_Statements): Add Is_Sloc parameterr
8436 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8437 (Check_End): Ad Is_Sloc parameter
8438 (End_Statements): Add Is_Sloc parameterr
8440 2011-08-02 Vincent Celier <celier@adacore.com>
8442 * ug_words: Add VMS qualifier equivalent to -gnateP:
8443 /SYMBOL_PREPROCESSING.
8445 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8447 * gnat-style.texi: For hexadecimal numeric literals the typical
8448 grouping of digits is 4 to represent 2 bytes.
8449 A procedure spec which is split into several lines is indented two
8452 2011-08-02 Yannick Moy <moy@adacore.com>
8454 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8455 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8456 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8458 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8459 choice in array aggregate
8460 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8462 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8463 positional and named aggregate for record, or others in record
8464 aggregate, or multiple choice in record aggregate
8465 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8466 array operands to logical operations AND, OR and XOR do not have the
8467 same static lower and higher bounds
8468 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8470 2011-08-01 Robert Dewar <dewar@adacore.com>
8472 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8473 Replaces Last_Source_Node_In_Sequence.
8474 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8475 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8476 parens and blank in string (this was inconsistently implemented).
8478 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8479 blank in string (this was inconsistently implemented).
8481 (Set_Global_Switches): Set formal mode switches appropriately
8482 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8484 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8485 call Set_Error_Msg_Lang to set "spark" as language name.
8486 * par.adb: Remove unnecessary call to set formal language for errout
8487 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8488 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8490 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8491 calls to it, moved after resolution so that types are known
8492 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8493 result of concatenation is not of type String
8494 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8495 concatenation is not properly restricted
8496 * gnat_rm.texi: Add doc on pragma Spark_95.
8497 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8498 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8499 * gcc-interface/Make-lang.in: Update dependencies.
8501 2011-08-01 Javier Miranda <miranda@adacore.com>
8503 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8504 condition that detects if the overridden operation must replace an
8507 2011-08-01 Javier Miranda <miranda@adacore.com>
8509 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8510 code declarations inserted by Insert_Actions in each alternative of the
8511 N_Case_Expression node.
8513 2011-08-01 Robert Dewar <dewar@adacore.com>
8515 * sem_ch6.adb: Minor code reorganization.
8516 * sem_util.adb: Minor reformatting.
8518 2011-08-01 Pascal Obry <obry@adacore.com>
8520 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8521 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8523 2011-08-01 Yannick Moy <moy@adacore.com>
8525 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8526 literal or operator symbol which is prefixed
8527 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8528 mode on access attributes.
8529 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8530 that concatenation operands are properly restricted in formal mode
8531 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8532 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8533 result of the concatenation has a type different from String.
8534 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8535 Analyze_Quantified_Expression, Analyze_Slice,
8536 Analyze_Null): issue an error in formal mode on unsupported constructs
8538 (Analyze_Block_Statement): only issue error on source block statement
8539 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8540 function which returns the last node in a list of nodes for which
8541 Comes_From_Source returns True, if any
8542 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8543 Last_Source_Node_In_Sequence
8544 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8545 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8546 mode on unsupported constructs
8547 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8548 rest of the actions may be needed later on since the error is marked as
8550 * sinfo.ads: Typos in comments.
8552 2011-08-01 Pascal Obry <obry@adacore.com>
8554 * projects.texi: Minor editing.
8556 2011-08-01 Yannick Moy <moy@adacore.com>
8558 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8559 insertion character ~~
8560 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8561 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8562 with insertion character ~~
8563 (Set_Msg_Text): treat insertion character ~~
8564 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8565 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8566 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8567 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8568 errors related to the formal language restriction not serious
8569 (insertion character |).
8570 * par.adb (Par): set formal language for error messages if needed
8571 * sem_ch6.adb (Check_Missing_Return): take into account possible
8572 generated statements at the end of the function
8573 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8574 enumeration value to define a new pragma SPARK_95
8575 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8576 SPARK_Version): new type and variables to store the SPARK version
8578 (SPARK_Mode): return True when SPARK_Version is set
8579 * par-prag.adb: Correct indentation
8580 (Prag): take Pragma_SPARK_95 into account
8581 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8584 2011-08-01 Robert Dewar <dewar@adacore.com>
8586 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8587 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8588 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8590 2011-08-01 Pascal Obry <obry@adacore.com>
8592 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8593 Target_Name to Get_Path call.
8594 (Parse_Single_Project): Likewise.
8595 (Post_Parse_Context_Clause): Likewise.
8596 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8597 Call Initialise_Project_Path with the proper Target_Name.
8598 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8600 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8601 with the proper Target_Name.
8602 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8604 (Parse_Project_And_Apply_Config): Likewise.
8605 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8606 This is fine as this part of the code is supporting only native
8608 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8609 is fine as this part of the code is supporting only native compilation.
8611 2011-08-01 Yannick Moy <moy@adacore.com>
8613 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8614 of homonym, unless the homonym is one of the cases allowed in SPARK
8615 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8616 package declaration occurring after a body.
8618 2011-08-01 Robert Dewar <dewar@adacore.com>
8620 * checks.adb, exp_ch4.adb: Minor reformatting.
8622 2011-08-01 Javier Miranda <miranda@adacore.com>
8624 * einfo.ads (Access_Disp_Table): Fix documentation.
8625 (Dispatch_Table_Wrappers): Fix documentation.
8627 2011-08-01 Pascal Obry <obry@adacore.com>
8629 * prj-env.adb, prj-env.ads: Minor reformatting.
8631 2011-08-01 Yannick Moy <moy@adacore.com>
8633 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8634 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8635 procedures out of these packages.
8636 * errout.ads, errout.adb
8637 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8638 procedures in of this package
8639 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8640 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8641 on misplaced later vs initial declarations, like in Ada 83
8642 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8643 formal mode on attribute of private type whose full type declaration
8645 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8646 package declaration inside a package specification
8647 (Analyze_Full_Type_Declaration): issue error in formal mode on
8648 controlled type or discriminant type
8649 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8650 user-defined operator means that it should come from the source
8651 (New_Overloaded_Entity): issue error in formal mode on overloaded
8653 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8655 2011-08-01 Thomas Quinot <quinot@adacore.com>
8657 * atree.adb: Minor reformatting.
8658 * checks.adb: Minor reformatting.
8660 2011-08-01 Vincent Celier <celier@adacore.com>
8662 * s-parame-vms-ia64.ads: Fix typo in comment
8664 * s-parame-vms-restrict.ads: Removed, unused.
8666 2011-08-01 Javier Miranda <miranda@adacore.com>
8669 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8671 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8672 * sem_ch3.ads, sem_ch3.adb
8673 (Is_Constant_Bound): New extended version of the subprogram that was
8674 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8675 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8676 * sem_aux.ads (Constant_Value): Fix typo in comment.
8677 * checks.adb (Generate_Index_Checks): New implementation which, for
8678 array objects with constant bounds, generates the runtime check
8679 referencing the bounds of the array type. For other cases this routine
8680 provides its previous behavior obtaining such values from the array
8682 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8684 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8685 we cannot have semantic interpretations of the new node.
8687 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8689 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8692 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8694 * sem_ch8.adb: Minor code editing.
8695 * s-vxwext.adb: Remove trailing space.
8696 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8697 consistency with other files.
8699 2011-08-01 Thomas Quinot <quinot@adacore.com>
8701 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8703 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8705 * par-ch10.adb: reject parameterized expressions as compilation unit.
8706 * sem_ch4.adb: handle properly conditional expression with overloaded
8707 then_clause and no else_clause.
8709 2011-08-01 Tristan Gingold <gingold@adacore.com>
8711 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8712 like done by System.Aux_DEC.
8713 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8715 2011-08-01 Yannick Moy <moy@adacore.com>
8717 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8718 missing label at end of declaration (subprogram or package)
8719 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8720 of positional and named parameter association
8721 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8722 Error_Msg_SP which adds a prefix to the error message giving the name
8723 of the formal language analyzed
8724 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8725 access result type in subprogram, unconstrained array as result type,.
8726 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8728 * sem_ch8.adb: Code clean up.
8730 2011-08-01 Javier Miranda <miranda@adacore.com>
8732 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8733 * einfo.ads (Access_Disp_Table): Fix documentation.
8734 (Dispatch_Table_Wrappers): Fix documentation.
8735 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8736 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8737 to enforce the documentation of this attribute.
8738 (Set_Is_Interface): Cleanup the assertion.
8739 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8740 the Underlying_Type entity before reading attribute Access_Disp_Table.
8741 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8742 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8743 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8744 the Underlying_Type entity before reading attribute Access_Disp_Table.
8745 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8746 Locate the Underlying_Type entity before reading attribute
8749 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8751 * s-poosiz.ads: Additional overriding indicators.
8753 2011-08-01 Yannick Moy <moy@adacore.com>
8755 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8757 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8758 parameter specification does not include a subtype mark.
8759 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8760 formal mode on abstract subprogram.
8761 (Analyze_Subprogram_Specification): issue error in formal mode on
8762 user-defined operator.
8763 (Process_Formals): issue error in formal mode on access parameter and
8765 * sem_ch9.adb (Analyze_Abort_Statement,
8766 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8767 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8768 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8769 Analyze_Requeue, Analyze_Selective_Accept,
8770 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8771 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8772 issue error in formal mode on user-defined raise statement.
8774 2011-08-01 Thomas Quinot <quinot@adacore.com>
8776 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8777 declaration being hidden when overriding an implicit inherited
8779 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8780 (-gnats), do not complain about a source file that contains only a
8783 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8785 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8786 variable if already set.
8788 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8790 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8791 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8792 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8793 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8794 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8795 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8796 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8797 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8798 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8799 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8800 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8801 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8802 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8803 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8804 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8805 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8806 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8807 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8808 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8809 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8810 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8811 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8812 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8813 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8814 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8815 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8816 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8817 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8818 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8819 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8820 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8821 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8822 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8823 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8824 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8825 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8826 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8827 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8828 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8829 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8830 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8831 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8832 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8833 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8834 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8835 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8836 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8837 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8838 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8839 Use GNAT instead of GNARL.
8841 2011-08-01 Bob Duff <duff@adacore.com>
8843 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8844 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8845 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8848 2011-08-01 Yannick Moy <moy@adacore.com>
8850 * debug.adb (d.D) reverve flag for the SPARK mode
8851 (d.E) reverve flag for SPARK generation mode
8852 (d.F) reverve flag for Why generation mode
8853 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8854 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8855 functions which return True when the corresponding modes are set
8856 (Formal_Language): return "spark" or "alfa" when in formal verification
8858 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8859 Error_Msg to prefix the error message with a tag giving the formal
8861 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8862 message with a tag giving the formal language
8863 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8865 (Analyze_Case_Statement): issue error in formal mode on case statement
8866 with a single "others" case alternative
8867 (Analyze_Exit_Statement): issue errors in formal mode on exit
8868 statements which do not respect SPARK restrictions
8869 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8870 (Check_Unreachable_Code): always issue an error (not a warning) in
8871 formal mode on unreachable code (concerns both code after an infinite
8872 loop and after an unconditional jump, both not allowed in SPARK)
8873 * sem_ch6.adb (Analyze_Return_Statement): add call to
8874 Set_Return_Present for a procedure containing a return statement
8875 (already done for functions in Analyze_Function_Return)
8876 (Analyze_Function_Return): issue error in formal mode on extended
8877 return or if return is not last statement in function
8878 (Check_Missing_Return): issue error in formal mode if function does
8879 not end with return or if procedure contains a return
8880 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8881 function to detect if there is an inner scope of its parameter S which
8884 2011-08-01 Thomas Quinot <quinot@adacore.com>
8886 * sem_ch6.ads: Minor reformatting.
8888 2011-08-01 Javier Miranda <miranda@adacore.com>
8890 * sem_util.adb (Abstract_Interface_List): Complete condition when
8891 processing private type declarations to avoid reading unavailable
8893 (Is_Synchronized_Tagged_Type): Complete condition when processing
8894 private extension declaration nodes to avoid reading unavailable
8897 2011-08-01 Thomas Quinot <quinot@adacore.com>
8899 * sem_ch3.adb: Minor reformatting.
8901 2011-08-01 Thomas Quinot <quinot@adacore.com>
8903 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8904 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8905 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8906 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8907 for VMS, instead parametrize the common implementation with
8908 System.Parameters declarations.
8910 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8912 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8914 2011-08-01 Tristan Gingold <gingold@adacore.com>
8916 * seh_init.c: Fix SEH handler installation on win64.
8918 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8920 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8921 double analysis of an anonymous access to subprogram, because it can
8922 lead to improper sharing of profiles and a back-end crash.
8924 2011-08-01 Robert Dewar <dewar@adacore.com>
8926 * make.adb, sem_ch4.adb: Minor reformatting.
8927 * gcc-interface/Make-lang.in: Update dependencies.
8928 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8930 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8932 * gnat_rm.texi: Fix definition of Long_Integer.
8934 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8936 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8937 to prevent storage exhaustion.
8938 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8939 finalized is a function body, insert the cleanup code before the final
8940 return statement, to prevent spurious warnings.
8941 * s-pooglo.ads: add overriding indicator.
8943 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8945 * sem_ch4.adb (Operator_Check): improve error message when both a
8946 with_clause and a use_clause are needed to make operator usage legal.
8947 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8948 determine whether a compilation unit is visible within an other,
8949 either through a with_clause in the current unit, or a with_clause in
8950 its library unit or one one of its parents.
8952 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8954 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8955 over an arbitrary expression of an array or container type.
8956 * lib-xref.adb: clarify comment.
8958 2011-08-01 Bob Duff <duff@adacore.com>
8960 * einfo.ads: Minor reformatting.
8961 * debug.adb: Minor comment improvement.
8963 2011-08-01 Javier Miranda <miranda@adacore.com>
8965 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8966 consider hidden subprograms as valid candidates.
8968 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8970 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8972 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
8974 * gnat_ugn.texi: Fix typo.
8976 2011-08-01 Robert Dewar <dewar@adacore.com>
8978 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8979 lib-xref.adb: Minor reformatting
8981 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8983 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8984 when to generate a call to Move_Final_List.
8985 (Has_Controlled_Parts): Remove this function.
8987 2011-08-01 Geert Bosch <bosch@adacore.com>
8989 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8992 2011-08-01 Thomas Quinot <quinot@adacore.com>
8994 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8995 explicit raise of a predefined exception as Comes_From_Source if the
8996 original N_Raise_Statement comes from source.
8998 2011-08-01 Robert Dewar <dewar@adacore.com>
9000 * sinfo.ads: Add comment.
9001 * sem_ch6.adb: Minor reformatting.
9003 2011-08-01 Robert Dewar <dewar@adacore.com>
9005 * freeze.adb (Freeze_Entity): Refine check for bad component size
9006 clause to avoid rejecting confirming clause when atomic/aliased present.
9008 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9010 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9011 better determine whether an entity reference is a write.
9012 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9014 * lib-xref.adb (Output_References): Do no suppress a read reference at
9015 the same location as an immediately preceeding modify-reference, to
9016 handle properly in-out actuals.
9018 2011-08-01 Tristan Gingold <gingold@adacore.com>
9020 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9022 2011-08-01 Quentin Ochem <ochem@adacore.com>
9024 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9025 heap to compute the result.
9027 2011-08-01 Robert Dewar <dewar@adacore.com>
9029 * atree.ads: Minor reformatting.
9031 2011-08-01 Emmanuel Briot <briot@adacore.com>
9033 * g-expect.adb (Get_Command_Output): Fix memory leak.
9035 2011-08-01 Geert Bosch <bosch@adacore.com>
9037 * cstand.adb (P_Float_Type): New procedure to print the definition of
9038 predefined fpt types.
9039 (P_Mixed_Name): New procedure to print a name using mixed case
9040 (Print_Standard): Use P_Float_Type for printing floating point types
9041 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9042 precision IEEE float.
9044 2011-08-01 Thomas Quinot <quinot@adacore.com>
9046 * sem_ch3.adb: Minor reformatting.
9048 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9050 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9051 the completion of a generic function, insert the new body rather than
9052 rewriting the original.
9054 2011-08-01 Yannick Moy <moy@adacore.com>
9056 * sinfo.ads, errout.ads: Typos in comments.
9058 2011-08-01 Robert Dewar <dewar@adacore.com>
9060 * par-endh.adb: Minor reformatting.
9062 2011-08-01 Robert Dewar <dewar@adacore.com>
9064 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9065 (Pre_Post_Aspects): New subtype.
9066 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9067 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9068 * par-ch7.adb (P_Package): Remove Decl parameter
9069 (P_Package): Handle new syntax for aspects (before IS)
9070 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9072 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9073 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9074 (P_Package): Remove Decl parameter
9075 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9077 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9079 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9080 * sinfo.ads: Document new syntax for aspects in packages etc.
9081 * sprint.adb: Handle new syntax of aspects before IS in package
9083 2011-08-01 Thomas Quinot <quinot@adacore.com>
9085 * atree.ads: Minor reformatting.
9086 * sem_prag.adb: Minor reformatting.
9088 2011-08-01 Robert Dewar <dewar@adacore.com>
9090 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9091 case expr alternative.
9093 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9095 * sem_ch12.adb: Fix typo.
9097 2011-08-01 Geert Bosch <bosch@adacore.com>
9099 * sem_prag.adb (Check_No_Link_Name): New procedure.
9100 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9101 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9102 instead of Standard_Long_Long_Float_Size global. Preparation for
9103 eventual removal of per type constants.
9104 * exp_util.ads (Get_Stream_Size): New function returning the stream
9105 size value of subtype E.
9106 * exp_util.adb (Get_Stream_Size): Implement new function.
9107 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9109 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9111 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9113 2011-08-01 Geert Bosch <bosch@adacore.com>
9115 * cstand.adb: Fix comments.
9116 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9119 2011-08-01 Robert Dewar <dewar@adacore.com>
9121 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9123 2011-08-01 Geert Bosch <bosch@adacore.com>
9125 * atree.ads: Fix comment.
9127 2011-08-01 Robert Dewar <dewar@adacore.com>
9129 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9130 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9131 * par.adb: Add with for Namet.Sp.
9132 * par-tchk.adb: Minor reformatting.
9134 2011-08-01 Vincent Celier <celier@adacore.com>
9136 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9137 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9138 of the init procedure of a SAL.
9139 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9142 2011-08-01 Thomas Quinot <quinot@adacore.com>
9144 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9147 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9149 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9151 2011-08-01 Thomas Quinot <quinot@adacore.com>
9153 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9154 conformant with its spec (return True only for types that have
9155 an overriding Initialize primitive operation that prevents them from
9156 having preelaborable initialization).
9157 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9158 initialization for controlled types in Ada 2005 or later mode.
9160 2011-08-01 Robert Dewar <dewar@adacore.com>
9162 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9164 (Same_Aspect): New function.
9165 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9166 Type_Invariant, Precondition, Postcondition.
9167 * snames.ads-tmpl: Add Name_Type_Invariant.
9169 2011-08-01 Robert Dewar <dewar@adacore.com>
9171 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9173 (Freeze_All_Ent): Fix error in handling inherited aspects.
9174 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9175 already analyzed, but don't skip entire processing of a declaration,
9176 that's wrong in some cases of declarations being rewritten.
9177 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9178 Don't delay for integer, string literals
9179 Treat predicates in usual manner for delay, remove special case code,
9181 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9182 (Build_Predicate_Function): Update saved expression in aspect
9183 (Build_Invariant_Procedure): Update saved expression in aspect
9184 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9185 of replacement of discriminant references if the reference is simple.
9187 2011-08-01 Robert Dewar <dewar@adacore.com>
9189 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9190 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9191 Static_Predicate and Dynamic_Predicate.
9192 (Build_Predicate_Function): Add processing for Static_Predicate
9193 and Dynamic_Predicate.
9194 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9195 (From_Static_Predicate): New flag
9196 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9198 2011-08-01 Robert Dewar <dewar@adacore.com>
9200 * usage.adb: Documentation cleanup for Ada version modes in usage.
9201 * expander.adb: Minor reformatting.
9203 2011-08-01 Robert Dewar <dewar@adacore.com>
9205 * atree.ads: Minor comment fix.
9206 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9207 a-witeio.ads, sem_prag.adb: Minor reformatting.
9209 2011-08-01 Doug Rupp <rupp@adacore.com>
9211 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9212 pointers. Use descrip.h header file for convenience. Add some
9215 2011-08-01 Robert Dewar <dewar@adacore.com>
9217 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9218 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9219 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9221 (Check_Aspect_At_End_Of_Declarations): New procedure
9222 (Analye_Aspect_Specification): Minor changes for above procedures
9223 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9224 specification node as well.
9226 2011-08-01 Pascal Obry <obry@adacore.com>
9228 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9229 Windows files. Use GetFilesAttributes() in this case to check for file
9230 existence instead of returning with an error code.
9232 2011-08-01 Vincent Celier <celier@adacore.com>
9234 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9235 High is above Source length.
9237 2011-08-01 Robert Dewar <dewar@adacore.com>
9239 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9241 2011-08-01 Robert Dewar <dewar@adacore.com>
9243 * aspects.ads (Boolean_Aspects): New subtype.
9244 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9245 for derived types in cases where the parent type and derived type have
9247 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9248 with aspects when parent type also has aspects.
9249 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9250 boolean expression at this point).
9251 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9252 accordance with final decision on the Ada 2012 feature.
9253 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9255 2011-08-01 Matthew Heaney <heaney@adacore.com>
9257 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9259 2011-08-01 Pascal Obry <obry@adacore.com>
9261 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9262 Fix Replace_Slice when High is above current string size.
9263 (Replace_Slice): Fix DL computation when High is above current
9266 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9268 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9270 2011-08-01 Matthew Heaney <heaney@adacore.com>
9272 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9275 2011-08-01 Pascal Obry <obry@adacore.com>
9277 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9280 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9282 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9283 access to protected subprograms in generic bodies.
9284 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9285 protected type, indicate that the convention of the subprogram is
9286 Convention_Protected, because it may be used in subsequent declarations
9287 within the protected declaration.
9289 2011-08-01 Vincent Celier <celier@adacore.com>
9291 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9292 and "final" procedures when the name of the library is "ada", to avoid
9293 duplicate symbols "adainit" and "adafinal" in executables.
9295 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9297 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9298 quantified expression that appears within a postcondition and uses the
9299 Ada2012 'Result attribute.
9301 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9303 * init.c (__gnat_error_handler): Cast reason to int.
9304 (__gnat_install_handler): Explain sa_sigaction use.
9306 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9308 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9309 subprogram has copy-in copy-out parameters, try to promote the mode of
9310 the return type if it is passed in registers.
9312 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9314 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9315 left operand as addressable.
9317 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9319 * gcc-interface/gigi.h (build_function_stub): Remove.
9320 (build_return_expr): Likewise.
9321 (convert_vms_descriptor): Declare.
9322 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9323 (build_function_stub): Move to...
9324 * gcc-interface/utils2.c (build_return_expr): Move to...
9325 * gcc-interface/trans.c (build_function_stub): ...here.
9326 (build_return_expr): ...here.
9327 (Subprogram_Body_to_gnu): Add local variable for language_function.
9328 Disconnect the parameter attributes cache, if any, once done with it.
9329 Call end_subprog_body only after setting the end_locus.
9330 Build the stub associated with the function, if any, at the very end.
9331 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9332 variables and streamline control flow.
9334 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9337 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9340 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9343 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9344 Assign to act.sa_sigaction.
9345 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9346 current->return_address to char * before arithmetic.
9348 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9350 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9351 Correct argument types.
9352 Extract code from reason.
9353 (__gnat_install_handler): Assign to act.sa_sigaction.
9355 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9357 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9358 (GNAT1_OBJS): ...here.
9360 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9363 * g-socthi-mingw.adb (Fill): Fix formatting.
9365 * gcc-interface/gigi.h: Move around comment.
9367 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9370 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9372 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9375 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9377 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9379 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9380 range comparison if Pmode is SImode.
9382 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9383 Eric Botcazou <ebotcazou@adacore.com>
9385 * adadecode.c: Wrap up in extern "C" block.
9386 * adadecode.h: Likewise.
9387 * adaint.c: Likewise. Remove 'const' keyword.
9388 * adaint.h: Likewise.
9390 * atree.h: Likewise.
9392 * cstreams.c: Likewise.
9396 * final.c: Likewise.
9398 * initialize.c: Likewise.
9400 * namet.h: Likewise.
9401 * nlists.h: Likewise.
9402 * raise.c: Likewise.
9403 * raise.h: Likewise.
9404 * repinfo.h: Likewise.
9405 * seh_init.c: Likewise.
9406 * targext.c: Likewise.
9407 * tracebak.c: Likewise.
9408 * uintp.h: Likewise.
9409 * urealp.h: Likewise.
9410 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9411 * xsinfo.adb: Likewise.
9412 * xsnamest.adb: Likewise.
9413 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9414 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9415 * gcc-interface/misc.c: Likewise.
9416 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9417 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9418 ada/targext.o here...
9419 (GNAT_ADA_OBJS): ...and not here.
9420 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9421 (GNATBIND_OBJS): Reorder.
9423 2011-07-07 Richard Henderson <rth@redhat.com>
9425 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9426 dwarf2out_frame_init.
9428 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9430 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9432 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9435 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9437 2011-07-06 Richard Guenther <rguenther@suse.de>
9439 * gcc-interface/misc.c (gnat_init): Merge calls to
9440 build_common_tree_nodes and build_common_tree_nodes_2.
9441 Re-initialize boolean_false_node.
9443 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9444 Olivier Hainque <hainque@adacore.com>
9445 Nicolas Setton <setton@adacore.com>
9447 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9448 the type according to the ARTIFICIAL_P parameter.
9449 (create_type_decl): Likewise.
9450 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9452 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9454 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9455 (gnatbind): Likewise.
9457 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9459 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9461 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9463 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9464 local variable throughout. Remove useless call to Base_Type.
9465 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9466 Take it also into account for the volatileness of the field. Set the
9467 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9469 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9471 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9472 on a dereference built for a by-ref object if it has an address clause.
9474 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9476 * einfo.ads (Address_Taken): Document use for the second argument of
9477 Asm_Input and Asm_Output attributes.
9478 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9479 argument is an entity name, then set Address_Taken on it.
9480 <Attribute_Asm_Output>: Likewise.
9481 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9482 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9483 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9484 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9486 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9489 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9491 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9493 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9494 (ada/utils.o): Update dependencies.
9495 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9496 ../../../libcpp/libcpp.a.
9497 * gcc-interface/utils.c: Include common/common-target.h.
9498 (process_attributes): Use targetm_common.have_named_sections.
9500 2011-06-07 Richard Guenther <rguenther@suse.de>
9502 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9505 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9507 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9508 TREE_THIS_NOTRAP flag.
9510 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9512 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9515 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9517 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9518 constants whose full view has discriminants specially.
9520 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9522 * gcc-interface/utils.c: Include diagnostic.h.
9523 (gnat_write_global_declarations): Output debug information for all
9524 global type declarations before finalizing the compilation unit.
9525 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9527 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9529 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9531 2011-05-25 Kai Tietz <ktietz@redhat.com>
9533 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9534 initialization instead of const/none-const pointer assignment.
9536 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9538 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9539 $(EXTRA_GNAT1_OBJS).
9540 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9541 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9542 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9543 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9544 libcommon-target.a instead of prefix.o.
9546 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9549 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9551 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9553 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9554 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9555 instead of version.o.
9557 2011-05-18 Kai Tietz <ktietz@redhat.com>
9559 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9560 boolean_false_node instead of integer_zero_node.
9561 (convert_with_check): Likewise.
9562 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9564 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9566 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9567 type of the parameter is an unconstrained array, convert the actual to
9568 the type of the formal in the In Out and Out cases as well.
9570 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9572 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9573 call build_function_type_array or build_varargs_function_type_array
9575 (create_subprog_type): Don't call build_function_type; call
9576 build_function_type_vec instead.
9578 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9580 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9581 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9582 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9584 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9586 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9588 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9589 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9591 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9593 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9595 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9597 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9598 instead of accessing TYPE_ARG_TYPES directly.
9599 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9601 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9604 * gcc-interface/gigi.h (get_variant_part): Declare.
9605 * gcc-interface/decl.c (get_variant_part): Make global.
9606 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9607 types have the same constant size, are record types and T1 has a
9608 variant part while T2 doesn't.
9610 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9612 * gcc-interface/utils.c (begin_subprog_body): Do not call
9614 (end_subprog_body): Likewise.
9616 2011-05-04 Richard Guenther <rguenther@suse.de>
9618 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9620 (pos_to_constructor): Likewise.
9622 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9623 Eric Botcazou <ebotcazou@adacore.com>
9625 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9626 of build_function_type. Adjust calls to...
9627 (build_raise_check): ...this. Do not take a void_tree parameter.
9628 Call build_function_type_list instead of build_function_type.
9629 Fix head comment and swap couple of conditional blocks.
9631 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9633 * gnatvsn.ads (Library_Version): Bump to 4.7.
9634 (Current_Year): Bump to 2011.
9636 2011-04-29 Michael Matz <matz@suse.de>
9638 * gcc-interface/misc.c (gnat_handle_option): Set
9639 warn_maybe_uninitialized.
9641 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9643 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9644 the Watson/McCabe paper.
9646 2011-04-23 Jim Meyering <meyering@redhat.com>
9648 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9650 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9652 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9655 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9657 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9659 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9660 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9661 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9662 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9663 <all>: Do not set flags on the reused DECL node coming from an alias.
9664 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9665 don't need debug info here...
9666 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9667 (gigi): Adjust calls to create_subprog_decl.
9668 (build_raise_check): Likewise.
9669 (establish_gnat_vms_condition_handler): Likewise.
9670 (Compilation_Unit_to_gnu): Likewise.
9671 (gnat_to_gnu): Likewise.
9673 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9675 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9676 (NO_REORDER_ADAFLAGS): New variable.
9677 (EXTRA_GNATTOOLS): Always define.
9678 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9679 Clean up and adjust list of files compiled with special options.
9680 * gcc-interface/Make-lang.in: Likewise.
9681 (ada/decl.o): Cosmetical change.
9682 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9684 2011-04-20 Jim Meyering <meyering@redhat.com>
9686 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9688 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9690 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9691 $(CFLAGS) on the link line.
9693 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9695 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9696 padded type built for the return type if it is unconstrained.
9698 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9700 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9702 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9704 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9705 before calling TREE_CHAIN.
9706 * gcc-interface/misc.c (gnat_init_ts): New function.
9707 (LANG_HOOKS_INIT_TS): Define.
9709 2011-04-12 Martin Jambor <mjambor@suse.cz>
9711 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9712 instead of cgraph_node.
9714 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9716 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9717 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9720 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9722 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9723 of aggregate types that contain a placeholder.
9725 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9727 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9729 (handle_type_generic_attribute): Likewise.
9731 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9734 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9736 2011-04-04 Kai Tietz <ktietz@redhat.com>
9739 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9742 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9744 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9745 type case, do not strip a padding type around the array type.
9747 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9749 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9752 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9754 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9755 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9756 code for -feliminate-unused-debug-types.
9757 (gnat_post_options): Likewise.
9759 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9761 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9762 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9765 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9767 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9768 DECL_ARTIFICIAL flag on enumeration types.
9770 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9772 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9773 fat pointer types artificial unconditionally.
9774 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9777 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9779 * gcc-interface/gigi.h (get_dummy_type): Declare.
9780 (build_dummy_unc_pointer_types): Likewise.
9781 (finish_fat_pointer_type): Likewise.
9782 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9783 fat pointer type has been built, complete it in place.
9784 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9785 and thin pointers. Remove useless variable.
9786 (finish_fat_pointer_type): Make global and move to...
9787 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9788 (get_dummy_type): New function.
9789 (build_dummy_unc_pointer_types): Likewise.
9790 (gnat_pushdecl): Propage the name to the anonymous variants only.
9791 (update_pointer_to): Only adjust the pointer types in the unconstrained
9794 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9796 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9797 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9798 if this is a Taft amendment type and the full declaration is available.
9799 * gcc-interface/trans.c (process_type): Likewise.
9800 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9801 (process_freeze_entity): Likewise.
9802 * gcc-interface/utils.c (dummy_global): New static variable.
9803 (gnat_write_global_declarations): If there are types declared as used
9804 at the global level, insert them in the global hash table.
9806 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9808 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9809 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9810 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9812 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9813 flag of the type accordingly.
9814 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9816 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9818 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9819 finalizing types when updating the pointers to the designated type.
9820 <all>: Finalize the deferred types even if we didn't defer processing
9821 of incomplete types in this invocation.
9823 2011-04-01 Olivier Hainque <hainque@adacore.com>
9824 Nicolas Setton <setton@adacore.com>
9825 Eric Botcazou <ebotcazou@adacore.com>
9827 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9828 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9830 2011-03-28 Kai Tietz <ktietz@redhat.com>
9832 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9834 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9835 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9837 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9839 2011-03-28 Tristan Gingold <gingold@adacore.com>
9842 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9843 Use ada output of gnatbind.
9844 (ada/b_gnatb.adb): Ditto.
9845 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9846 (ada.mostlyclean, ada.stage1)
9847 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9848 (ada.stagefeedback): Adjust.
9849 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9850 Use ada output of gnatbind.
9851 (b_gnatm.adb): Ditto.
9852 (b_gnatl.o, b_gnatm.o): New rules.
9854 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9856 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9857 for the padded type built to support a specified size or alignment.
9859 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9861 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9862 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9863 unconditionally to the end of the unit when the designated type is
9865 <all>: Rename local variable. Attempt to un-defer types only and do it
9866 for limited_with'ed types as well.
9867 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9868 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9869 consistently and remove redundant call to finalize_from_with_types.
9871 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9873 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9874 subprograms without a previous spec declared in the same unit.
9875 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9876 subprograms at the end of the unit instead of at the beginning.
9877 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9878 isn't public for the special handling of non-inline functions nested
9879 inside inline external functions.
9881 2011-03-25 Jeff Law <law@redhat.com>
9883 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9885 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9887 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9888 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9889 to compute Set_Size_Depends_On_Discriminant.
9890 (Layout_Type): Call it on array types in back-end layout mode.
9891 * sem_util.adb (Requires_Transient_Scope): Return true for array
9892 types only if the size depends on the value of discriminants.
9893 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9894 type if the RHS is a call to a function that returns an unconstrained
9895 type with default discriminant.
9897 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9899 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9900 non-conversion to the nominal result type at the end.
9902 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9904 * gcc-interface/trans.c (create_temporary): New function taken from...
9905 (create_init_temporary): ...here. Call it.
9906 (call_to_gnu): Create the temporary for the return value early, if any.
9907 Create it for a function with copy-in/copy-out parameters if there is
9908 no target; in other cases of copy-in/copy-out, use another temporary.
9909 Push the new binding level lazily. Add and rename local variables.
9911 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9913 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9915 (set_rm_size): Likewise.
9917 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9919 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9920 for the padded type built in order to support a specified alignment.
9921 Fix incorrect formatting.
9923 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9926 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9928 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9930 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9931 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9932 to the end of the list. Adjust recursive call. Rename local variable.
9933 If REORDER is true, reorder components of the record type.
9934 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9935 components_to_record and adjust the parameter list.
9937 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9939 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9940 disabled, use the variable for bounds of loop iteration scheme.
9942 2011-03-21 Kai Tietz <ktietz@redhat.com>
9945 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9947 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9949 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9950 out whether the expression is read-only. Short-circuit placeholder
9951 case and rename a couple of local variables.
9953 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9955 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9956 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9957 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9958 (convert): Deal with conversions from a smaller form type specially.
9960 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
9962 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9963 its argument, except for the special -I- switch.
9965 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
9967 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9970 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
9972 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9974 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
9976 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9978 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9979 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
9980 instead of GNAT_FORMAL. Protect the expression against multiple uses.
9981 Do not generate the check directly, instead instantiate the template
9982 check present in the descriptor.
9983 (make_descriptor_field): Move around.
9984 (build_vms_descriptor32): Build a template check in the POINTER field.
9985 (build_vms_descriptor): Remove useless suffixes.
9986 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9988 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
9991 * targext.c: Include target files if IN_RTS is defined.
9993 2011-01-26 Richard Guenther <rguenther@suse.de>
9996 * targext.c: Include config.h.
9997 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10000 2011-01-04 Pascal Obry <obry@adacore.com>
10001 Eric Botcazou <ebotcazou@adacore.com>
10003 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10005 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10007 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10008 end-of-case on the end label and its associated gotos, if any.
10010 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10012 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10013 expressions of the parameter cache within the statement group of
10014 the CICO mechanism.
10016 2011-01-04 Olivier Hainque <hainque@adacore.com>
10017 Eric Botcazou <ebotcazou@adacore.com>
10019 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10020 (set_end_locus_from_node): New function.
10021 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10022 make and the function end_locus.
10023 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10024 for the elaboration subprogram.
10025 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10026 set the end_locus of the expression as well.
10028 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10031 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10032 variables that are referenced in exception handlers volatile.
10036 Copyright (C) 2011 Free Software Foundation, Inc.
10038 Copying and distribution of this file, with or without modification,
10039 are permitted in any medium without royalty provided the copyright
10040 notice and this notice are preserved.
10042 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10043 - fix bugs in the description of Source_Trace;
10044 - get rid of UNIT_NAME;
10046 2011-08-02 Javier Miranda <miranda@adacore.com>
10049 (Build_Dispatching_Requeue): Adding support for VM targets
10050 since we cannot directly reference the Tag entity.
10051 * exp_sel.adb (Build_K): Adding support for VM targets.
10052 (Build_S_Assignment): Adding support for VM targets.
10054 (Default_Prim_Op_Position): In VM targets do not restrict availability
10055 of predefined interface primitives to compiling in Ada 2005 mode.
10056 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10057 restricted to compiling in Ada 2005 mode.
10058 (Make_VM_TSD): Generate code that declares and initializes the OSD
10059 record. Needed to support dispatching calls through synchronized
10062 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10063 primitives associated with synchronized interfaces.
10064 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10065 primitives associated with synchronized interfaces.
10067 2011-08-02 Yannick Moy <moy@adacore.com>
10069 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10070 statements hidden in SPARK if preceded by the HIDE directive
10071 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10072 exception handlers as hidden in SPARK if preceded by the HIDE directive
10073 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10074 if starting with the HIDE directive
10075 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10076 starting with the HIDE directive; mark the declarations in a private
10077 part as hidden in SPARK if the private part starts with the HIDE
10079 * restrict.adb, restrict.ads
10080 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10081 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10082 argument node belongs to a part which is hidden in SPARK
10083 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10084 parts in SPARK; protect the possibly costly call to
10085 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10086 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10087 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10088 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10090 (Scan): recognize special comment starting with '#' and followed by
10091 SPARK keyword "hide" as a HIDE directive.
10093 2011-08-02 Yannick Moy <moy@adacore.com>
10095 * types.ads, erroutc.ads: Minor reformatting.
10097 2011-08-02 Vincent Celier <celier@adacore.com>
10099 * link.c: Add response file support for cross platforms.
10101 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10103 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10104 in an association, set parent field of copy before partial analysis.
10105 * sem_res.adb (Resolve_Slice): create reference to itype only when
10106 expansion is enabled.
10108 2011-08-02 Yannick Moy <moy@adacore.com>
10110 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10111 for new flag denoting which subprogram bodies are in ALFA
10112 * restrict.adb, sem_ch7.adb: Update comment
10113 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10114 sem_ch9.adb, sem_res.adb: Add calls to
10115 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10116 * sem_ch6.adb (Analyze_Function_Return): add calls to
10117 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10118 middle of the body, and extended return.
10119 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10120 False when missing return.
10121 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10122 to True for subprograms whose spec is in ALFA. Remove later on the flag
10123 on the entity used for a subprogram body when there exists a separate
10125 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10126 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10127 False, otherwise do nothing.
10129 2011-08-02 Robert Dewar <dewar@adacore.com>
10131 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10133 2011-08-02 Yannick Moy <moy@adacore.com>
10135 * sem_ch4.ads: minor formatting.
10137 2011-08-02 Yannick Moy <moy@adacore.com>
10139 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10140 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10141 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10142 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10143 opt.ads: cleanup of SPARK mode
10145 2011-08-02 Yannick Moy <moy@adacore.com>
10147 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10149 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10150 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10152 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10153 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10154 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10155 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10157 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10159 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10160 functions whose return type is not in ALFA.
10161 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10163 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10164 parameter's type is not in ALFA.
10165 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10168 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10170 * sem_ch6 (Analyze_Expression_Function): treat the function as
10171 Inline_Always, and introduce a subprogram declaration for it when it is
10173 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10174 expression functions, so that the back-end can determine whether they
10175 can in fact be inlined.
10176 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10177 a function body comes from an expression function.
10179 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10181 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10182 null exclusions to test Can_Never_Be_Null on the anonymous access types
10183 of the formals rather than testing the formals themselves. Exclude this
10184 check in cases where the Old_Formal is marked as a controlling formal,
10185 to avoid issuing spurious errors for bodies completing dispatching
10186 operations (due to the flag not getting set on controlling access
10187 formals in body specs).
10188 (Find_Corresponding_Spec): When checking full and subtype conformance of
10189 subprogram bodies in instances, pass Designated and E in that order, for
10190 consistency with the expected order of the formals (New_Id followed by
10193 2011-08-02 Robert Dewar <dewar@adacore.com>
10195 * sem_ch8.adb: Minor reformatting.
10197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10199 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10200 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10201 primitive operations of class-wide actuals.
10203 2011-08-02 Javier Miranda <miranda@adacore.com>
10205 * exp_atag.ads, exp_atag.adb
10206 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10207 since its value is implicitly passed in argument Typ.
10208 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10209 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10210 Build_Common_Dispatching_Select_Statements.
10212 2011-08-02 Robert Dewar <dewar@adacore.com>
10214 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10215 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10216 Minor reformatting.
10218 2011-08-02 Robert Dewar <dewar@adacore.com>
10220 * sem_res.adb: Minor reformatting.
10221 * sem_prag.adb: Minor reformatting.
10223 2011-08-02 Javier Miranda <miranda@adacore.com>
10225 * exp_atag.adb, exp_atags.ads
10226 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10227 by the tagged type Entity. Required to use this routine in the VM
10228 targets since we do not have available the Tag entity in the VM
10231 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10232 Ada.Tags has not been previously loaded.
10234 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10235 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10237 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10238 view of enclosing scopes. Required to handle enclosing scopes that
10239 are synchronized types whose full view is a task type.
10241 (Build_VM_TSDs): Minor code improvement to avoid generating and
10242 analyzing lists with empty nodes.
10243 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10244 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10245 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10246 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10247 (Make_Select_Specific_Data_Table): Add support for VM targets.
10248 (Make_VM_TSD): Generate code to initialize the SSD structure of
10251 2011-08-02 Yannick Moy <moy@adacore.com>
10253 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10254 cross-references section in ALI.
10255 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10256 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10258 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10259 subprogram or package entity of a node
10260 (Is_Local_Reference_Type): new function returns True for references
10261 selected in local cross-references.
10262 (Lt): function extracted from Lt in Output_References
10263 (Write_Entity_Name): function extracted from Output_References
10264 (Generate_Definition): generate reference with type 'D' for definition
10265 of objects (object declaration and parameter specification), with
10266 appropriate locations and units, for use in local cross-references.
10267 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10268 references of type 'I' for initialization in object definition.
10269 (Output_References): move part of function Lt and procedure
10270 Write_Entity_Name outside of the body. Ignore references of types 'D'
10271 and 'I' introduced for local cross-references.
10272 (Output_Local_References): new procedure to output the local
10273 cross-references sections.
10274 (Lref_Entity_Status): new array defining whether an entity is a local
10275 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10276 with 'I' type when initialization expression is present.
10277 * get_scos.adb, get_scos.ads: Correct comments and typos
10279 2011-08-02 Javier Miranda <miranda@adacore.com>
10281 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10283 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10285 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10288 2011-08-02 Vincent Celier <celier@adacore.com>
10290 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10291 (No_Space_Img): New function
10292 (Find_Excluded_Sources): When reading from a file, record the file name
10293 and the line number for each excluded source.
10294 (Mark_Excluded_Sources): When reporting an error, if the excluded
10295 sources were read from a file, include file name and line number in
10298 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10300 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10302 2011-08-02 Robert Dewar <dewar@adacore.com>
10304 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10306 2011-08-02 Javier Miranda <miranda@adacore.com>
10308 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10309 generation of TSDs to the DOTNET compiler.
10310 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10311 generation of TSDs to the DOTNET compiler.
10313 2011-08-02 Javier Miranda <miranda@adacore.com>
10315 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10316 record of all the tagged types declared inside library level package
10317 declarations, library level package bodies or library level subprograms.
10318 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10319 associated with a given tagged type.
10320 (Build_VM_TSDs): New subprogram.
10321 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10322 compilation units that are subprograms.
10323 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10324 compilation units that are package bodies.
10325 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10326 units that are a package declaration or a package instantiation.
10327 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10328 reorganization to improve the error generated by the frontend when the
10329 function Ada.Tags.Secondary_Tag is not available.
10330 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10331 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10333 2011-08-02 Javier Miranda <miranda@adacore.com>
10335 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10337 2011-08-02 Robert Dewar <dewar@adacore.com>
10339 * s-imenne.ads: Minor reformatting.
10341 2011-08-02 Robert Dewar <dewar@adacore.com>
10343 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10344 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10345 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10347 2011-08-02 Robert Dewar <dewar@adacore.com>
10349 * einfo.ads (Materialize_Entity): Document this is only for renamings
10350 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10351 required debug information in the case where we transform the object
10352 declaration into a renaming declaration.
10353 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10355 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10356 Materialize_Entity.
10358 2011-08-02 Robert Dewar <dewar@adacore.com>
10360 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10361 Suppress_Init_Procs.
10362 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10363 Suppress_Initialization/Initialization_Suppressed.
10364 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10365 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10366 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10367 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10369 2011-08-02 Robert Dewar <dewar@adacore.com>
10371 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10372 Minor reformatting.
10374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10376 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10377 only have inheritable classwide pre/postconditions.
10379 2011-08-02 Javier Miranda <miranda@adacore.com>
10381 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10382 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10383 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10384 checks if the external tag of a type is the same as the external tag
10385 of some other declaration.
10387 2011-08-02 Thomas Quinot <quinot@adacore.com>
10389 * s-taskin.ads: Minor reformatting.
10391 2011-08-02 Emmanuel Briot <briot@adacore.com>
10393 * g-comlin.adb (Display_Help): swap the order in which it prints the
10394 short help and the general usage.
10396 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10398 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10399 the aspect declarations and attach them to the generic copy for
10400 subsequent analysis.
10401 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10402 declarations of the generic tree to the new subprogram declarations.
10403 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10404 conditions that apply to a subprogram instance.
10406 2011-08-02 Robert Dewar <dewar@adacore.com>
10408 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10410 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10412 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10413 private type with a tagged full view is not derived in the immediate
10414 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10416 2011-08-02 Robert Dewar <dewar@adacore.com>
10418 * exp_ch4.adb: Minor reformatting.
10420 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10422 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10423 Ada2012 iterator, the loop will be rewritten during expansion into a
10424 while loop with a cursor and an element declaration. Do not analyze the
10425 body in this case, because if the container is for indefinite types the
10426 actual subtype of the elements will only be determined when the cursor
10427 declaration is analyzed.
10429 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10431 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10432 size/alignment related attributes in CodePeer_Mode.
10434 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10436 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10437 Prepend_Element, since this can result in the operation getting the
10438 wrong slot in the full type's dispatch table if the full type has
10439 inherited operations. The incomplete type's operation will get added
10440 to the proper position in the full type's primitives
10441 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10442 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10443 dispatching operations, since there are cases where nonprimitive
10444 subprograms can get added to the list of incomplete dependents (such
10445 as subprograms in nested packages).
10446 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10447 private part when determining whether to add a primitive with a
10448 parameter of a tagged incomplete type to the Private_Dependents list.
10449 Such primitives can also occur in the visible part, and should not have
10450 been excluded from being private dependents.
10451 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10452 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10453 list of a Taft-amendment incomplete type is a primitive before issuing
10454 an error that the full type must appear in the same unit. There are
10455 cases where nonprimitives can be in the list (such as subprograms in
10457 * sem_disp.adb (Derives_From): Use correct condition for checking that
10458 a formal's type is derived from the type of the corresponding formal in
10459 the parent subprogram (the condition was completely wrong). Add
10460 checking that was missing for controlling result types being derived
10461 from the result type of the parent operation.
10463 2011-08-02 Yannick Moy <moy@adacore.com>
10465 * errout.adb (First_Node): minor renaming
10466 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10469 2011-08-02 Yannick Moy <moy@adacore.com>
10471 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10472 before accessing operands.
10473 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10474 decide whether an initialization expression respects SPARK rules, as
10475 the plain node is the expanded one. This allows for more valid warnings
10477 * gnat_rm.texi: Minor update.
10479 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10481 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10484 2011-08-02 Robert Dewar <dewar@adacore.com>
10486 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10488 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10490 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10491 loop statements and the element renaming declaration with a block when
10492 the element type is controlled.
10494 2011-08-02 Yannick Moy <moy@adacore.com>
10496 * sinfo.ads: Minor formatting.
10498 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10500 * sem_aggr.adb (Add_Association): if the association has a box and no
10501 expression, use the Sloc of the aggregate itself for the new
10503 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10506 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10508 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10509 When a container is provided via a function call, generate a renaming
10510 of the function result. This avoids the creation of a transient scope
10511 and the premature finalization of the container.
10512 * exp_ch7.adb (Is_Container_Cursor): Removed.
10513 (Wrap_Transient_Declaration): Remove the supression of the finalization
10514 of the list controller when the declaration denotes a container cursor,
10517 2011-08-02 Yannick Moy <moy@adacore.com>
10519 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10520 node is from source, instead of the original node being from source.
10522 (Resolve_Array_Aggregate): refine the check for a static expression, to
10523 recognize also static ranges
10524 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10525 Array_Type_Declaration): postpone the test for the type being a subtype
10526 mark after the type has been resolved, so that component-selection and
10527 expanded-name are discriminated.
10528 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10529 to distinguish the case of an iteration scheme, so that an error is
10530 issed on a non-static range in SPARK except in an iteration scheme.
10531 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10532 In_Iter_Schm = True.
10533 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10534 user-defined operators so that they are allowed in renaming
10536 (Find_Selected_Component): refine the check for prefixing of operators
10537 so that they are allowed in renaming. Move the checks for restrictions
10538 on selector name after analysis discriminated between
10539 component-selection and expanded-name.
10540 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10541 concatenation argument of string type if it is static.
10542 * sem_util.adb, sem_util.ads
10543 (Check_Later_Vs_Basic_Declarations): add a new function
10544 Is_Later_Declarative_Item to decice which declarations are allowed as
10545 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10546 mode, add that renamings are considered as later items.
10547 (Enclosing_Package): new function to return the enclosing package
10548 (Enter_Name): correct the rule for homonyms in SPARK
10549 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10550 from source (result of expansion) to avoid issuing wrong warnings.
10552 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10554 * errout.adb: On anything but an expression First_Node returns its
10557 2011-08-02 Pascal Obry <obry@adacore.com>
10559 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10561 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10563 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10564 Set the associated loop as the related expression of internally
10566 * exp_ch7.adb (Is_Container_Cursor): New routine.
10567 (Wrap_Transient_Declaration): Supress the finalization of the list
10568 controller when the declaration denotes a container cursor.
10570 2011-08-02 Yannick Moy <moy@adacore.com>
10572 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10574 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10575 expression is a simple expression. This check cannot be performed in
10576 the semantics, so just drop it.
10577 (P_Index_Or_Discriminant_Constraint): move check that the index or
10578 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10579 semantics. Other cases were previously checked in the semantics.
10580 * par-ch4.adb (P_Name): move checks that a selector name is not
10581 character literal or an operator symbol to Find_Selected_Component in
10583 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10584 declarations are not placed after later declarations in a separate
10585 procedure in Sem_Util (possibly not the best choice?), to be used both
10586 during parsing, for Ada 83 mode, and during semantic analysis, for
10588 * par-endh.adb (Check_End): move check that end label is not missing
10589 to Process_End_Label in the semantics
10590 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10591 the special case for SPARK restriction
10592 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10593 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10594 parameter Force to issue the error message even on internal node (used
10595 for generated end label). Call Check_Restriction to check when an error
10596 must be issued. In SPARK mode, issue an error message even if the
10597 restriction is not set.
10598 (Check_Restriction): new procedure with an additional out parameter to
10599 inform the caller that a message has been issued
10600 * sem_aggr.adb: Minor modification of message
10601 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10602 instead of issuing an error message directly
10603 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10604 declarations are not placed after later declarations, by calling
10605 Check_Later_Vs_Basic_Declarations
10606 (Analyze_Subtype_Declaration): move here the check that an index or
10607 discriminant constraint must be a subtype mark. Change the check that
10608 a subtype of String must start at one so that it works on subtype marks.
10609 * sem_ch4.adb (Analyze_Call): move here the check that a named
10610 association cannot follow a positional one in a call
10611 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10612 instead of issuing an error message directly
10613 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10614 selector name is not a character literal or an operator symbol. Move
10615 here the check that the prefix of an expanded name cannot be a
10616 subprogram or a loop statement.
10617 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10618 procedure called from parsing and semantics to check that basic
10619 declarations are not placed after later declarations
10620 (Process_End_Label): move here the check that end label is not missing
10622 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10624 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10625 representation clause in codepeer mode, since it confuses CodePeer and
10626 does not bring useful info.
10628 2011-08-02 Ed Falis <falis@adacore.com>
10630 * init.c: initialize fp hw on MILS.
10632 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10634 * errout.adb (First_Node): for bodies, return the node itself (small
10635 optimization). For other nodes, do not check source_unit if the node
10636 comes from Standard.
10638 2011-08-02 Robert Dewar <dewar@adacore.com>
10640 * exp_ch3.adb: Minor comment additions.
10641 * sem_ch13.adb: Minor reformatting.
10643 2011-08-02 Pascal Obry <obry@adacore.com>
10645 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10647 2011-08-02 Robert Dewar <dewar@adacore.com>
10649 * sem_attr.adb: Minor reformatting.
10651 2011-08-02 Robert Dewar <dewar@adacore.com>
10653 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10654 (Has_Default_Component_Value): Removed
10655 * einfo.ads Comment updates
10656 (Has_Default_Aspect): Replaces Has_Default_Value
10657 (Has_Default_Component_Value): Removed
10659 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10661 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10662 (Get_Simple_Init_Val): Handle Default_Value aspect
10663 (Needs_Simple_Initialization): Handle Default_Value aspect
10664 * exp_ch3.ads: Needs_Simple_Initialization
10665 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10666 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10668 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10669 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10670 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10672 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10674 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10675 package containing iteration primitives.
10676 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10678 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10680 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10681 "of", pre-analyze expression in case it is a function call with
10682 finalization actions that must be placed ahead of the loop.
10683 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10684 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10686 2011-08-02 Geert Bosch <bosch@adacore.com>
10688 * cstand.adb (Create_Float_Types): Only consider C's long double for
10689 Long_Long_Float, in addition to double.
10691 2011-08-02 Robert Dewar <dewar@adacore.com>
10693 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10694 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10695 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10696 Minor reformatting.
10698 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10700 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10703 2011-08-02 Javier Miranda <miranda@adacore.com>
10705 * einfo.ads, einfo.adb
10706 (Original_Access_Type): Move this attribute to Node26 since there was
10707 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10708 which causes conflicts and breaks the generation of the .NET compiler.
10709 (Interface_Name): Add missing documentation on JGNAT only uses of
10712 2011-08-02 Geert Bosch <bosch@adacore.com>
10714 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10715 (Find_Back_End_Float_Type): Likewise
10716 (Create_Back_End_Float_Types): Likewise
10717 (Create_Float_Types): Likewise
10718 (Register_Float_Type): Likewise
10719 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10720 Nlist and split out type selection in new local Find_Base_Type function.
10721 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10723 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10725 2011-08-02 Robert Dewar <dewar@adacore.com>
10727 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10729 * opt.ads: Minor comment change.
10730 * sem_ch12.adb: Minor code reorganization.
10732 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10734 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10735 subtype's list of rep items to the list on the full subtype in the case
10736 where the lists are the same.
10738 2011-08-02 Geert Bosch <bosch@adacore.com>
10740 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10741 using the one from System.Strings, which also deallocates all strings.
10743 2011-08-02 Geert Bosch <bosch@adacore.com>
10745 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10747 * gcc-interface/Make-lang.in: Update dependencies.
10749 2011-08-02 Olivier Hainque <hainque@adacore.com>
10751 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10754 2011-08-02 Javier Miranda <miranda@adacore.com>
10756 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10757 associated with anonymous access to subprograms.
10759 2011-08-02 Geert Bosch <bosch@adacore.com>
10762 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10763 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10764 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10765 (Add_Symbol_Definition): Move to switch-c.adb
10766 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10767 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10768 (Add_Symbol_Definition): Move to switch-c.adb.
10769 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10771 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10772 Move to warnsw.adb.
10773 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10774 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10775 Move to warnsw.adb.
10776 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10777 (Add_Symbol_Definition): Moved from Prepcomp.
10778 * switch-c.ads: Update copyright notice. Use String_List instead of
10779 Argument_List, removing dependency on System.OS_Lib.
10781 2011-08-02 Yannick Moy <moy@adacore.com>
10783 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10784 mode on initialization expression which does not respect SPARK
10786 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10787 if the tree referenced by its argument represents an initialization
10788 expression in SPARK, suitable for initializing an object in an object
10791 2011-08-02 Javier Miranda <miranda@adacore.com>
10793 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10794 internally generated access to subprogram with its associated protected
10796 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10798 2011-08-02 Geert Bosch <bosch@adacore.com>
10800 * cstand.adb (Register_Float_Type): Print information about type to
10801 register, if the Debug_Flag_Dot_B is set.
10802 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10803 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10804 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10805 with a requested precision of more than Max_Digits digits and no more
10806 than Max_Base_Digits digits, if a range specification is present and the
10807 Predefined_Float_Types list has a suitable type to derive from.
10808 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10809 case of type completion with pragma Import
10811 (Process_Import_Predefined_Type): Processing to complete a type
10812 with pragma Import. Currently supports floating point types only.
10813 (Set_Convention_From_Pragma): Do nothing without underlying type.
10814 (Process_Convention): Guard against absence of underlying type,
10815 which may happen when importing incomplete types.
10816 (Process_Import_Or_Interface): Handle case of importing predefined
10817 types. Tweak error message.
10819 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10821 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10822 functions to previous change. Reorganize code slightly.
10824 2011-08-02 Geert Bosch <bosch@adacore.com>
10826 * back_end.ads (Register_Type_Proc): New call back procedure type for
10827 allowing the back end to provide information about available types.
10828 (Register_Back_End_Types): New procedure to register back end types.
10829 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10831 * cstand.adb (Back_End_Float_Types): New list for floating point types
10832 supported by the back end.
10833 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10834 (Copy_Float_Type): New procedure to make new copies of predefined types.
10835 (Register_Float_Type): New call back procedure to populate the BEFT list
10836 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10837 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10838 (Create_Float_Types): New procedure to create entities for floating
10839 point types predefined in Standard, and put these and any remaining
10840 BEFTs on the Predefined_Float_Types list.
10841 * stand.ads (Predefined_Float_Types): New list for predefined floating
10842 point types that do not have declarations in package Standard.
10844 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10846 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10847 entity node for the unit containing the parameter.
10848 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10849 (Add_Inlined_Subprogram): Likewise.
10850 * gcc-interface/Make-lang.in: Update dependencies.
10852 2011-08-02 Thomas Quinot <quinot@adacore.com>
10854 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10857 2011-08-02 Geert Bosch <bosch@adacore.com>
10859 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10861 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10863 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10864 computed value of Base_Type.
10866 2011-08-02 Yannick Moy <moy@adacore.com>
10868 * restrict.adb (Check_Restriction): issue an error for any use of
10869 class-wide, even if the No_Dispatch restriction is not set.
10870 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10871 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10872 when completing a private extension, the type named in the private part
10873 is not the same as that named in the visible part.
10874 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10875 of an inherited primitive operations of a tagged type or type extension
10876 that returns the tagged type.
10877 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10878 function which returns True for an implicit operation inherited by the
10879 derived type declaration for the argument type.
10880 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10883 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10885 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10886 Process_Bounds, to perform analysis with expansion of a range or an
10887 expression that is the iteration scheme for a loop.
10888 (Analyze_Iterator_Specification): If domain of iteration is given by a
10889 function call with a controlled result, as is the case if call returns
10890 a predefined container, ensure that finalization actions are properly
10892 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10894 2011-08-02 Javier Miranda <miranda@adacore.com>
10896 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10897 * gcc-interface/Make-lang.in: Update dependencies.
10899 2011-08-02 Javier Miranda <miranda@adacore.com>
10901 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10902 determine if the analysis is performed using N or Original_Node (N).
10903 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10904 functionality of routine Is_Variable avoids code duplication.
10905 * checks.adb (Determine_Range): Handle temporaries generated by
10906 Remove_Side_Effects.
10908 2011-08-02 Javier Miranda <miranda@adacore.com>
10910 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10911 expansion of the condition. Required since the previous analysis was
10912 done with expansion disabled (see Resolve_Quantified_Expression) and
10913 hence checks were not inserted and record comparisons have not been
10916 2011-08-02 Ed Falis <falis@adacore.com>
10918 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10921 2011-08-02 Bob Duff <duff@adacore.com>
10923 * opt.ads: Minor comment fix.
10925 2011-08-02 Bob Duff <duff@adacore.com>
10927 * sem_ch12.adb (Analyze_Package_Instantiation,
10928 Analyze_Subprogram_Instantiation): Turn off style checking while
10929 analyzing an instance. Whatever style checks that apply to the generic
10930 unit should apply, so it makes no sense to apply them in an instance.
10931 This was causing trouble when compiling an instance of a runtime
10932 unit that violates the -gnatyO switch.
10933 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10934 one of the two case statements, causing spurious errors.
10936 2011-08-02 Robert Dewar <dewar@adacore.com>
10938 * uname.adb: Minor reformatting.
10939 * gnatcmd.adb: Minor reformatting.
10940 * exp_attr.adb: Minor reformatting.
10942 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10944 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10945 No_Dispatching_Calls, do not look for the Assign primitive, because
10946 predefined primitives are not created in this case.
10948 2011-08-02 Bob Duff <duff@adacore.com>
10950 * stylesw.ads: Minor comment fixes.
10952 2011-08-02 Robert Dewar <dewar@adacore.com>
10954 * freeze.adb (Add_To_Result): New procedure.
10956 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10958 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10959 time, if the specific run-time routines for handling streams of strings
10960 are not available, use the default mechanism.
10962 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10964 * s-regpat.ads: Fix typo.
10966 2011-08-02 Vincent Celier <celier@adacore.com>
10968 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10969 not null, call it to create the in memory config project file without
10970 parsing an existing default config project file.
10972 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10974 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10976 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10978 * sem_elim.adb: an abstract subprogram does not need an eliminate
10979 pragma for its descendant to be eliminable.
10981 2011-08-02 Ed Falis <falis@adacore.com>
10983 * init.c: revert to handling before previous checkin for VxWorks
10984 * s-intman-vxworks.adb: delete unnecessary declarations related to
10985 using Ada interrupt facilities for handling signals.
10986 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10987 * s-intman-vxworks.ads: Import __gnat_install_handler as
10988 Initialize_Interrupts.
10989 * s-taprop-vxworks.adb: Delete Signal_Mask.
10990 (Abort_Handler): change construction of mask to unblock exception
10993 2011-08-02 Jerome Guitton <guitton@adacore.com>
10995 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10996 Debug_Raise_Exception before propagation starts.
10998 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11000 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11001 to Restriction_Check_Required.
11002 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11003 * sem_res.adb (Resolve_Call): Likewise.
11004 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11006 2011-08-02 Bob Duff <duff@adacore.com>
11008 * stylesw.ads: Update comment.
11009 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11010 * errout.ads: Remove obsolete comment.
11012 2011-08-02 Javier Miranda <miranda@adacore.com>
11014 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11015 (Set_Is_Safe_To_Reevaluate): new procedure.
11016 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11017 assignment is allowed on safe-to-reevaluate variables.
11018 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11019 temporary created to remove side effects in expressions that use
11020 the secondary stack as safe-to-reevaluate.
11021 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11022 variables that are not true constants.
11024 2011-08-02 Robert Dewar <dewar@adacore.com>
11026 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11027 sem_res.adb, sem_ch6.adb: Minor reformatting.
11029 2011-08-02 Jerome Guitton <guitton@adacore.com>
11031 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11033 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11035 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11036 not set Overridden_Operation if subprogram is an initialization
11039 2011-08-02 Yannick Moy <moy@adacore.com>
11041 * par-ch6.adb: Correct obsolete name in comments
11042 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11043 which takes two message arguments (existing function takes one), with
11044 second message used for continuation.
11045 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11046 block statements that originate from a source block statement, not
11047 generated block statements
11048 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11049 symmetry with procedure case
11050 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11051 function to issue an error in formal mode if a package specification
11052 contains more than one tagged type or type extension.
11053 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11054 parameters matching formals of tagged types are objects (or ancestor
11055 type conversions of objects), not general expressions. Issue an error
11056 on view conversions that are not involving ancestor conversion of an
11058 (Resolve_Type_Conversion): in formal mode, issue an error on the
11059 operand of an ancestor type conversion which is not an object
11060 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11061 procedure so that it works also for actuals of function calls
11062 (Is_Actual_Tagged_Parameter): new function which determines if its
11063 argument is an actual parameter of a formal of tagged type in a
11065 (Is_SPARK_Object_Reference): new function which determines if the tree
11066 referenced by its argument represents an object in SPARK
11068 2011-08-02 Robert Dewar <dewar@adacore.com>
11070 * sem_ch3.adb: Minor reformatting
11071 Minor comment addition
11072 Minor error msg text change
11074 2011-08-02 Javier Miranda <miranda@adacore.com>
11076 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11077 function. Used to be more precise when we generate a variable plus one
11078 assignment to remove side effects in the evaluation of the Bound
11080 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11081 of the bound expression to force its re-analysis and thus expand the
11082 associated transient scope (if required). Code cleanup replacing the
11083 previous code that declared the constant entity by an invocation to
11084 routine Force_Evaluation which centralizes this work in the frontend.
11086 2011-08-02 Robert Dewar <dewar@adacore.com>
11088 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11089 (Base_Type): Now uses improved Is_Base_Type function
11090 * einfo.ads (Base_Type): Inline this function
11092 2011-08-02 Robert Dewar <dewar@adacore.com>
11094 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11095 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11097 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11099 * gcc-interface/Make-lang.in: Update dependencies.
11100 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11103 2011-08-02 Yannick Moy <moy@adacore.com>
11105 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11106 non-simple expression used in delta constraint
11107 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11108 index constraint which is not a subtype mark
11109 * par.adb: With and use Restrict
11110 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11111 mode on component type which is not a subtype mark and default
11112 expression on component
11113 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11114 of string which does not have a lower index bound equal to 1
11115 (Array_Type_Declaration): issue an error in formal mode on index or
11116 component type which is not a subtype mark, and on aliased keyword on
11118 (Derived_Type_Declaration): issue an error in formal mode on interface,
11119 limited or abstract type
11120 (Record_Type_Declaration): issue an error in formal mode on interface
11121 (Record_Type_Definition): issue an error in formal mode on tagged types
11122 and type extensions not declared in the specification of a library unit
11123 package; on null non-tagged record; on variant part
11125 2011-08-02 Vincent Celier <celier@adacore.com>
11127 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11128 not declared for qualified library project when Library_Name is not
11129 declared, but Library_Dir is.
11131 2011-08-02 Robert Dewar <dewar@adacore.com>
11133 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11134 pragmas (affects aspects [Component_]Default_Value
11135 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11136 component type for the resolution
11138 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11140 * einfo.adb (Base_Type): Tune implementation for speed.
11142 2011-08-02 Robert Dewar <dewar@adacore.com>
11144 * freeze.adb: Minor reformatting.
11146 2011-08-02 Thomas Quinot <quinot@adacore.com>
11148 * scos.ads: Update comments.
11150 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11152 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11153 base type, because the parent may be a subtype of a private type whose
11154 convention is established in a private part.
11156 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11158 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11159 statement in a block when the expansion of the return expression has
11160 created a finalization chain.
11161 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11162 with the parent node.
11163 Add N_Extended_Return_Statement to handle the case where a transient
11164 object declaration appears in the Return_Object_Declarations list of
11165 an extended return statement.
11167 2011-08-02 Matthew Gingell <gingell@adacore.com>
11169 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11170 unused parameter 'name'.
11172 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11174 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11175 inherited operation, check whether its alias, which is the source
11176 operastion that it renames, has been marked eliminated.
11178 2011-08-02 Javier Miranda <miranda@adacore.com>
11180 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11181 in-mode parameter whose type is an access type since it can be used to
11182 modify its designated object. Enforce code that handles as safe an
11183 access type that is not access-to-constant but it is the result of a
11184 previous removal of side-effects.
11185 (Remove_Side_Effects): Minor code reorganization of cases which require
11186 no action. Done to incorporate documentation on new cases uncovered
11187 working in this ticket: no action needed if this routine was invoked
11188 too early and the nodes are not yet decorated.
11189 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11190 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11191 were issued with actuals that are implicitly provided by
11194 2011-08-02 Robert Dewar <dewar@adacore.com>
11196 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11198 2011-08-02 Yannick Moy <moy@adacore.com>
11200 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11201 to issue an error in formal mode on attribute not supported in this mode
11202 (Analyze_Attribute): issue errors on standard attributes not supported
11204 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11205 comment, and issue error in formal mode on modulus which is not a power
11207 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11209 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11211 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11212 operator on modular type (except 'not').
11214 2011-08-02 Robert Dewar <dewar@adacore.com>
11216 * gnat_rm.texi: Minor reformatting.
11218 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11220 * s-osinte-linux.ads: Minor comment update and reformatting.
11221 * i-cexten.ads: Make this unit pure, as for its parent.
11222 Will allow its usage in more contexts if needed.
11224 2011-08-02 Robert Dewar <dewar@adacore.com>
11226 * s-utf_32.ads: Minor comment fix.
11228 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11230 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11231 operation of a tagged synchronized type, handle the case where the
11232 controlling argument is overloaded.
11234 2011-08-02 Yannick Moy <moy@adacore.com>
11236 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11237 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11238 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11239 SPARK mode and formal verification mode on processing SPARK restriction
11240 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11241 requiring consistency checking.
11243 2011-08-02 Robert Dewar <dewar@adacore.com>
11245 * sem_res.adb: Minor reformatting.
11247 2011-08-02 Robert Dewar <dewar@adacore.com>
11249 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11250 a-cforse.ads: Remove unneeded with of Ada.Containers
11251 Remove commented out pragma Inline's
11252 Move specifications of new subprograms to the actual specs
11254 2011-08-02 Yannick Moy <moy@adacore.com>
11256 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11257 a-cforse.ads: Update comments.
11259 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11261 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11263 2011-08-02 Robert Dewar <dewar@adacore.com>
11265 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11266 a-cforse.ads, a-cofove.ads: Minor reformatting.
11268 2011-08-02 Claire Dross <dross@adacore.com>
11270 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11271 a-cofove.ads: Add comments.
11273 2011-08-02 Yannick Moy <moy@adacore.com>
11275 * gnat_rm.texi: Document formal containers.
11277 2011-08-02 Emmanuel Briot <briot@adacore.com>
11279 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11280 are empty sections.
11282 2011-08-02 Robert Dewar <dewar@adacore.com>
11284 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11287 2011-08-02 Robert Dewar <dewar@adacore.com>
11289 * aspects.adb: New aspects Default_Value and Default_Component_Value
11290 New format of Aspect_Names table checks for omitted entries
11291 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11292 handling of boolean aspects for derived types.
11293 New aspects Default_Value and Default_Component_Value
11294 New format of Aspect_Names table checks for omitted entries
11295 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11296 (Has_Default_Value): New flag
11297 (Has_Default_Component_Value): New flag
11298 (Has_Default_Value): New flag
11299 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11301 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11302 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11303 Default_Value and Default_Component_Value
11304 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11305 New aspects Default_Value and Default_Component_Value
11306 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11307 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11309 2011-08-02 Vincent Celier <celier@adacore.com>
11311 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11312 inherit library kind.
11314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11316 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11317 Minor reformatting.
11319 2011-08-02 Robert Dewar <dewar@adacore.com>
11321 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11323 2011-08-02 Yannick Moy <moy@adacore.com>
11325 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11327 2011-08-02 Robert Dewar <dewar@adacore.com>
11329 * impunit.adb: Add comment.
11331 2011-08-02 Yannick Moy <moy@adacore.com>
11333 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11334 qualification of aggregates in formal mode
11335 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11337 (Resolve_Aggregate): complete the test that an aggregate is adequately
11338 qualified in formal mode
11340 2011-08-02 Pascal Obry <obry@adacore.com>
11342 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11343 * mlib-prj.adb: Supress warning when compiling binder generated file.
11344 (Build_Library): Supress all warnings when compiling the binder
11347 2011-08-02 Yannick Moy <moy@adacore.com>
11349 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11351 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11352 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11353 Add with/use clauses to make Check_Formal_Restriction visible
11355 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11357 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11358 in-parameters when type of the generic formal is private in the generic
11359 spec and non-private in the body.
11361 2011-08-02 Claire Dross <dross@adacore.com>
11363 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11364 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11365 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11366 * impunit.adb, Makefile.rtl: Take new files into account.
11368 2011-08-02 Robert Dewar <dewar@adacore.com>
11370 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11371 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11373 2011-08-02 Yannick Moy <moy@adacore.com>
11375 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11377 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11378 matching static array bounds, taking into account the special case of
11380 * sem_ch3.adb: Typo in comment.
11382 2011-08-02 Yannick Moy <moy@adacore.com>
11384 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11385 which issues an error in formal mode if its argument node is originally
11387 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11388 has a discriminant specification so that it does not include the case
11390 (Derived_Type_Declaration): move here the test that a derived type has a
11391 discriminant specification
11392 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11393 first element of a component association before accessing its choices
11394 (presence of component association is not enough)
11395 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11396 declaration is a library item before accessing the next element in a
11397 list, as library items are not member of lists
11398 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11399 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11400 Check_Formal_Restriction whenever possible.
11402 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11404 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11405 reference when needed.
11407 2011-08-02 Bob Duff <duff@adacore.com>
11409 * gnat_ugn.texi: Fix typo.
11411 2011-08-02 Vincent Celier <celier@adacore.com>
11413 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11414 archive file name. Do not use the full path name of archives for Open
11417 2011-08-02 Robert Dewar <dewar@adacore.com>
11419 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11420 Analyze_Aspect_Specifications
11422 (Analyze_Aspect_Specifications): New handling for boolean aspects
11423 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11424 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11425 sequence for Analyze_Aspect_Specifications
11426 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11427 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11429 2011-08-02 Robert Dewar <dewar@adacore.com>
11431 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11432 aspects, since these no longer exist.
11434 2011-08-02 Robert Dewar <dewar@adacore.com>
11436 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11437 semicolon, do not try to see if there are aspects following it.
11438 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11441 2011-08-02 Robert Dewar <dewar@adacore.com>
11443 * sem_ch8.adb, aspects.ads: Minor reformatting.
11445 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11447 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11448 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11450 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11452 2011-08-02 Yannick Moy <moy@adacore.com>
11454 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11455 mode on subprogram declaration outside of package specification, unless
11456 it is followed by a pragma Import
11457 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11458 Access_Type_Declaration): issue error in formal mode on access type
11459 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11461 (Analyze_Object_Declaration): issue error in formal mode on object
11462 declaration which does not respect SPARK restrictions
11463 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11464 declaration which does not respect SPARK restrictions
11465 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11466 error in formal mode on digits or delta constraint
11467 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11468 decimal fixed point type
11469 (Derived_Type_Declaration): issue error in formal mode on derived type
11470 other than type extensions of tagged record types
11471 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11472 with check on access definition
11473 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11474 mode on protected definition.
11475 (Analyze_Task_Definition): issue error in formal mode on task definition
11477 2011-08-02 Robert Dewar <dewar@adacore.com>
11479 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11481 2011-08-02 Javier Miranda <miranda@adacore.com>
11483 * sem_ch6.adb (Can_Override_Operator): New function.
11484 (Verify_Overriding_Indicator): Add missing code to check overriding
11485 indicator in operators. Fixes regression.
11486 (Check_Overriding_Indicator): Minor reformating after replacing the
11487 code that evaluates if the subprogram can override an operator by
11488 invocations to the above new function.
11490 (Write_Field26_Name): Add missing code to ensure that, following
11491 the documentation in einfo.ads, this field is not shown as attribute
11492 "Static_Initialization" on non-dispatching functions.
11494 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11496 * sem_res.adb (Resolve_Call): A call to
11497 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11498 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11499 i.e., when the second parameter is of type Time_Span.
11501 2011-08-02 Vincent Celier <celier@adacore.com>
11503 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11504 with an archive instead of -L<library dir> -l<library name>.
11506 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11508 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11509 mark the base types In_Use in addition to making the operations
11512 2011-08-02 Ed Falis <falis@adacore.com>
11514 * init.c: add and setup __gnat_signal_mask for the exception signals
11515 * s-inmaop-vxworks.adb: new file.
11516 * s-intman-vxworks.adb: remove unnecessary initializations and
11518 * s-intman-vxworks.ads: remove unnecessary variable
11519 * s-taprop-vxworks.adb: simplify signal initialization
11521 2011-08-02 Robert Dewar <dewar@adacore.com>
11523 * sem_ch8.adb: Minor code reorganization, comment updates.
11525 2011-08-02 Robert Dewar <dewar@adacore.com>
11527 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11528 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11530 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11531 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11533 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11535 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11536 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11537 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11538 use_type_clauses, to handle more efficiently use_type and use_all_type
11540 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11541 Ada2012 Use_All_Type clause.
11542 (Use_Class_Wide_Operations): new procedure.
11544 2011-08-02 Robert Dewar <dewar@adacore.com>
11546 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11547 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11548 expression to expression function.
11550 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11552 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11553 if types are compatible.
11555 2011-08-02 Yannick Moy <moy@adacore.com>
11557 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11558 returns True if its argument array types have same dimension and same
11559 static bounds at each index.
11560 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11561 OUT or IN OUT paramaters which are not view conversions in SPARK.
11562 (Resolve_Arithmetic_Op): issue an error in formal mode on
11563 multiplication or division with operands of fixed point types which are
11564 not qualified or explicitly converted.
11565 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11566 Boolean or array type (except String) operands.
11567 (Resolve_Equality_Op): issue an error in formal mode on equality
11568 operators for array types other than String with non-matching static
11570 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11571 for array types with non-matching static bounds. Factorize the code in
11572 Matching_Static_Array_Bounds.
11573 (Resolve_Qualified_Expression): issue an error in formal mode on
11574 qualified expressions for array types with non-matching static bounds.
11575 (Resolve_Type_Conversion): issue an error in formal mode on type
11576 conversion for array types with non-matching static bounds
11578 2011-08-02 Robert Dewar <dewar@adacore.com>
11580 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11584 * par-ch9.adb: save location of entry for proper error message.
11586 2011-08-02 Javier Miranda <miranda@adacore.com>
11588 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11589 (Use_Full_View) which permits this routine to climb through the
11590 ancestors using the full-view of private parents.
11591 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11592 Use_Full_View to true in calls to Is_Ancestor.
11593 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11594 true in call to Is_Ancestor.
11595 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11596 Use_Full_View to true in call to Is_Ancestor.
11597 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11598 call to Is_Ancestor.
11599 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11600 Use_Full_View to true in calls to Is_Ancestor.
11601 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11602 Make_Select_Specific_Data_Table, Register_Primitive,
11603 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11604 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11605 to true in call to Is_Ancestor.
11606 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11607 Use_Full_View to true in calls to Is_Ancestor.
11609 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11610 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11612 2011-08-02 Robert Dewar <dewar@adacore.com>
11614 * gnat_rm.texi: Minor reformatting.
11615 * sem_prag.adb: Minor reformatting.
11617 2011-08-02 Tristan Gingold <gingold@adacore.com>
11619 * vms_data.ads: Add VMS qualifier for -gnateP.
11621 2011-08-02 Robert Dewar <dewar@adacore.com>
11623 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11624 * par-ch7.adb (P_Package): Proper placement of aspects for package
11625 decl/instantiation.
11626 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11627 (End_Statements): Add Is_Sloc parameterr
11628 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11629 (Check_End): Ad Is_Sloc parameter
11630 (End_Statements): Add Is_Sloc parameterr
11632 2011-08-02 Vincent Celier <celier@adacore.com>
11634 * ug_words: Add VMS qualifier equivalent to -gnateP:
11635 /SYMBOL_PREPROCESSING.
11637 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11639 * gnat-style.texi: For hexadecimal numeric literals the typical
11640 grouping of digits is 4 to represent 2 bytes.
11641 A procedure spec which is split into several lines is indented two
11644 2011-08-02 Yannick Moy <moy@adacore.com>
11646 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11647 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11648 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11650 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11651 choice in array aggregate
11652 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11654 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11655 positional and named aggregate for record, or others in record
11656 aggregate, or multiple choice in record aggregate
11657 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11658 array operands to logical operations AND, OR and XOR do not have the
11659 same static lower and higher bounds
11660 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11662 2011-08-01 Robert Dewar <dewar@adacore.com>
11664 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11665 Replaces Last_Source_Node_In_Sequence.
11666 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11667 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11668 parens and blank in string (this was inconsistently implemented).
11670 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11671 blank in string (this was inconsistently implemented).
11673 (Set_Global_Switches): Set formal mode switches appropriately
11674 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11676 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11677 call Set_Error_Msg_Lang to set "spark" as language name.
11678 * par.adb: Remove unnecessary call to set formal language for errout
11679 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11680 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11682 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11683 calls to it, moved after resolution so that types are known
11684 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11685 result of concatenation is not of type String
11686 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11687 concatenation is not properly restricted
11688 * gnat_rm.texi: Add doc on pragma Spark_95.
11689 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11690 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11691 * gcc-interface/Make-lang.in: Update dependencies.
11693 2011-08-01 Javier Miranda <miranda@adacore.com>
11695 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11696 condition that detects if the overridden operation must replace an
11699 2011-08-01 Javier Miranda <miranda@adacore.com>
11701 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11702 code declarations inserted by Insert_Actions in each alternative of the
11703 N_Case_Expression node.
11705 2011-08-01 Robert Dewar <dewar@adacore.com>
11707 * sem_ch6.adb: Minor code reorganization.
11708 * sem_util.adb: Minor reformatting.
11710 2011-08-01 Pascal Obry <obry@adacore.com>
11712 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11713 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11715 2011-08-01 Yannick Moy <moy@adacore.com>
11717 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11718 literal or operator symbol which is prefixed
11719 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11720 mode on access attributes.
11721 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11722 that concatenation operands are properly restricted in formal mode
11723 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11724 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11725 result of the concatenation has a type different from String.
11726 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11727 Analyze_Quantified_Expression, Analyze_Slice,
11728 Analyze_Null): issue an error in formal mode on unsupported constructs
11730 (Analyze_Block_Statement): only issue error on source block statement
11731 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11732 function which returns the last node in a list of nodes for which
11733 Comes_From_Source returns True, if any
11734 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11735 Last_Source_Node_In_Sequence
11736 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11737 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11738 mode on unsupported constructs
11739 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11740 rest of the actions may be needed later on since the error is marked as
11742 * sinfo.ads: Typos in comments.
11744 2011-08-01 Pascal Obry <obry@adacore.com>
11746 * projects.texi: Minor editing.
11748 2011-08-01 Yannick Moy <moy@adacore.com>
11750 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11751 insertion character ~~
11752 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11753 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11754 with insertion character ~~
11755 (Set_Msg_Text): treat insertion character ~~
11756 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11757 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11758 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11759 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11760 errors related to the formal language restriction not serious
11761 (insertion character |).
11762 * par.adb (Par): set formal language for error messages if needed
11763 * sem_ch6.adb (Check_Missing_Return): take into account possible
11764 generated statements at the end of the function
11765 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11766 enumeration value to define a new pragma SPARK_95
11767 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11768 SPARK_Version): new type and variables to store the SPARK version
11770 (SPARK_Mode): return True when SPARK_Version is set
11771 * par-prag.adb: Correct indentation
11772 (Prag): take Pragma_SPARK_95 into account
11773 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11776 2011-08-01 Robert Dewar <dewar@adacore.com>
11778 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11779 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11780 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11782 2011-08-01 Pascal Obry <obry@adacore.com>
11784 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11785 Target_Name to Get_Path call.
11786 (Parse_Single_Project): Likewise.
11787 (Post_Parse_Context_Clause): Likewise.
11788 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11789 Call Initialise_Project_Path with the proper Target_Name.
11790 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11792 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11793 with the proper Target_Name.
11794 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11795 Part.Parse routine.
11796 (Parse_Project_And_Apply_Config): Likewise.
11797 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11798 This is fine as this part of the code is supporting only native
11800 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11801 is fine as this part of the code is supporting only native compilation.
11803 2011-08-01 Yannick Moy <moy@adacore.com>
11805 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11806 of homonym, unless the homonym is one of the cases allowed in SPARK
11807 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11808 package declaration occurring after a body.
11810 2011-08-01 Robert Dewar <dewar@adacore.com>
11812 * checks.adb, exp_ch4.adb: Minor reformatting.
11814 2011-08-01 Javier Miranda <miranda@adacore.com>
11816 * einfo.ads (Access_Disp_Table): Fix documentation.
11817 (Dispatch_Table_Wrappers): Fix documentation.
11819 2011-08-01 Pascal Obry <obry@adacore.com>
11821 * prj-env.adb, prj-env.ads: Minor reformatting.
11823 2011-08-01 Yannick Moy <moy@adacore.com>
11825 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11826 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11827 procedures out of these packages.
11828 * errout.ads, errout.adb
11829 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11830 procedures in of this package
11831 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11832 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11833 on misplaced later vs initial declarations, like in Ada 83
11834 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11835 formal mode on attribute of private type whose full type declaration
11837 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11838 package declaration inside a package specification
11839 (Analyze_Full_Type_Declaration): issue error in formal mode on
11840 controlled type or discriminant type
11841 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11842 user-defined operator means that it should come from the source
11843 (New_Overloaded_Entity): issue error in formal mode on overloaded
11845 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11847 2011-08-01 Thomas Quinot <quinot@adacore.com>
11849 * atree.adb: Minor reformatting.
11850 * checks.adb: Minor reformatting.
11852 2011-08-01 Vincent Celier <celier@adacore.com>
11854 * s-parame-vms-ia64.ads: Fix typo in comment
11856 * s-parame-vms-restrict.ads: Removed, unused.
11858 2011-08-01 Javier Miranda <miranda@adacore.com>
11861 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11863 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11864 * sem_ch3.ads, sem_ch3.adb
11865 (Is_Constant_Bound): New extended version of the subprogram that was
11866 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11867 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11868 * sem_aux.ads (Constant_Value): Fix typo in comment.
11869 * checks.adb (Generate_Index_Checks): New implementation which, for
11870 array objects with constant bounds, generates the runtime check
11871 referencing the bounds of the array type. For other cases this routine
11872 provides its previous behavior obtaining such values from the array
11874 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11876 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11877 we cannot have semantic interpretations of the new node.
11879 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11881 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11884 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11886 * sem_ch8.adb: Minor code editing.
11887 * s-vxwext.adb: Remove trailing space.
11888 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11889 consistency with other files.
11891 2011-08-01 Thomas Quinot <quinot@adacore.com>
11893 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11895 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11897 * par-ch10.adb: reject parameterized expressions as compilation unit.
11898 * sem_ch4.adb: handle properly conditional expression with overloaded
11899 then_clause and no else_clause.
11901 2011-08-01 Tristan Gingold <gingold@adacore.com>
11903 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11904 like done by System.Aux_DEC.
11905 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11907 2011-08-01 Yannick Moy <moy@adacore.com>
11909 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11910 missing label at end of declaration (subprogram or package)
11911 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11912 of positional and named parameter association
11913 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11914 Error_Msg_SP which adds a prefix to the error message giving the name
11915 of the formal language analyzed
11916 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11917 access result type in subprogram, unconstrained array as result type,.
11918 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11920 * sem_ch8.adb: Code clean up.
11922 2011-08-01 Javier Miranda <miranda@adacore.com>
11924 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11925 * einfo.ads (Access_Disp_Table): Fix documentation.
11926 (Dispatch_Table_Wrappers): Fix documentation.
11927 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11928 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11929 to enforce the documentation of this attribute.
11930 (Set_Is_Interface): Cleanup the assertion.
11931 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11932 the Underlying_Type entity before reading attribute Access_Disp_Table.
11933 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11934 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11935 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11936 the Underlying_Type entity before reading attribute Access_Disp_Table.
11937 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11938 Locate the Underlying_Type entity before reading attribute
11941 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11943 * s-poosiz.ads: Additional overriding indicators.
11945 2011-08-01 Yannick Moy <moy@adacore.com>
11947 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11949 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11950 parameter specification does not include a subtype mark.
11951 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11952 formal mode on abstract subprogram.
11953 (Analyze_Subprogram_Specification): issue error in formal mode on
11954 user-defined operator.
11955 (Process_Formals): issue error in formal mode on access parameter and
11956 default expression.
11957 * sem_ch9.adb (Analyze_Abort_Statement,
11958 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11959 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11960 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11961 Analyze_Requeue, Analyze_Selective_Accept,
11962 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11963 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11964 issue error in formal mode on user-defined raise statement.
11966 2011-08-01 Thomas Quinot <quinot@adacore.com>
11968 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11969 declaration being hidden when overriding an implicit inherited
11971 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11972 (-gnats), do not complain about a source file that contains only a
11975 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11977 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11978 variable if already set.
11980 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11982 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11983 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11984 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11985 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11986 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11987 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11988 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11989 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11990 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11991 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11992 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11993 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11994 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11995 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11996 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11997 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11998 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11999 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12000 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12001 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12002 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12003 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12004 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12005 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12006 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12007 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12008 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12009 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12010 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12011 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12012 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12013 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12014 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12015 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12016 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12017 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12018 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12019 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12020 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12021 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12022 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12023 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12024 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12025 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12026 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12027 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12028 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12029 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12030 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12031 Use GNAT instead of GNARL.
12033 2011-08-01 Bob Duff <duff@adacore.com>
12035 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12036 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12037 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12040 2011-08-01 Yannick Moy <moy@adacore.com>
12042 * debug.adb (d.D) reverve flag for the SPARK mode
12043 (d.E) reverve flag for SPARK generation mode
12044 (d.F) reverve flag for Why generation mode
12045 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12046 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12047 functions which return True when the corresponding modes are set
12048 (Formal_Language): return "spark" or "alfa" when in formal verification
12050 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12051 Error_Msg to prefix the error message with a tag giving the formal
12053 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12054 message with a tag giving the formal language
12055 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12057 (Analyze_Case_Statement): issue error in formal mode on case statement
12058 with a single "others" case alternative
12059 (Analyze_Exit_Statement): issue errors in formal mode on exit
12060 statements which do not respect SPARK restrictions
12061 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12062 (Check_Unreachable_Code): always issue an error (not a warning) in
12063 formal mode on unreachable code (concerns both code after an infinite
12064 loop and after an unconditional jump, both not allowed in SPARK)
12065 * sem_ch6.adb (Analyze_Return_Statement): add call to
12066 Set_Return_Present for a procedure containing a return statement
12067 (already done for functions in Analyze_Function_Return)
12068 (Analyze_Function_Return): issue error in formal mode on extended
12069 return or if return is not last statement in function
12070 (Check_Missing_Return): issue error in formal mode if function does
12071 not end with return or if procedure contains a return
12072 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12073 function to detect if there is an inner scope of its parameter S which
12076 2011-08-01 Thomas Quinot <quinot@adacore.com>
12078 * sem_ch6.ads: Minor reformatting.
12080 2011-08-01 Javier Miranda <miranda@adacore.com>
12082 * sem_util.adb (Abstract_Interface_List): Complete condition when
12083 processing private type declarations to avoid reading unavailable
12085 (Is_Synchronized_Tagged_Type): Complete condition when processing
12086 private extension declaration nodes to avoid reading unavailable
12089 2011-08-01 Thomas Quinot <quinot@adacore.com>
12091 * sem_ch3.adb: Minor reformatting.
12093 2011-08-01 Thomas Quinot <quinot@adacore.com>
12095 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12096 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12097 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12098 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12099 for VMS, instead parametrize the common implementation with
12100 System.Parameters declarations.
12102 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12104 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12106 2011-08-01 Tristan Gingold <gingold@adacore.com>
12108 * seh_init.c: Fix SEH handler installation on win64.
12110 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12112 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12113 double analysis of an anonymous access to subprogram, because it can
12114 lead to improper sharing of profiles and a back-end crash.
12116 2011-08-01 Robert Dewar <dewar@adacore.com>
12118 * make.adb, sem_ch4.adb: Minor reformatting.
12119 * gcc-interface/Make-lang.in: Update dependencies.
12120 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12122 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12124 * gnat_rm.texi: Fix definition of Long_Integer.
12126 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12128 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12129 to prevent storage exhaustion.
12130 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12131 finalized is a function body, insert the cleanup code before the final
12132 return statement, to prevent spurious warnings.
12133 * s-pooglo.ads: add overriding indicator.
12135 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12137 * sem_ch4.adb (Operator_Check): improve error message when both a
12138 with_clause and a use_clause are needed to make operator usage legal.
12139 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12140 determine whether a compilation unit is visible within an other,
12141 either through a with_clause in the current unit, or a with_clause in
12142 its library unit or one one of its parents.
12144 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12146 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12147 over an arbitrary expression of an array or container type.
12148 * lib-xref.adb: clarify comment.
12150 2011-08-01 Bob Duff <duff@adacore.com>
12152 * einfo.ads: Minor reformatting.
12153 * debug.adb: Minor comment improvement.
12155 2011-08-01 Javier Miranda <miranda@adacore.com>
12157 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12158 consider hidden subprograms as valid candidates.
12160 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12162 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12164 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12166 * gnat_ugn.texi: Fix typo.
12168 2011-08-01 Robert Dewar <dewar@adacore.com>
12170 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12171 lib-xref.adb: Minor reformatting
12173 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12175 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12176 when to generate a call to Move_Final_List.
12177 (Has_Controlled_Parts): Remove this function.
12179 2011-08-01 Geert Bosch <bosch@adacore.com>
12181 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12182 "," in choice list.
12184 2011-08-01 Thomas Quinot <quinot@adacore.com>
12186 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12187 explicit raise of a predefined exception as Comes_From_Source if the
12188 original N_Raise_Statement comes from source.
12190 2011-08-01 Robert Dewar <dewar@adacore.com>
12192 * sinfo.ads: Add comment.
12193 * sem_ch6.adb: Minor reformatting.
12195 2011-08-01 Robert Dewar <dewar@adacore.com>
12197 * freeze.adb (Freeze_Entity): Refine check for bad component size
12198 clause to avoid rejecting confirming clause when atomic/aliased present.
12200 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12202 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12203 better determine whether an entity reference is a write.
12204 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12206 * lib-xref.adb (Output_References): Do no suppress a read reference at
12207 the same location as an immediately preceeding modify-reference, to
12208 handle properly in-out actuals.
12210 2011-08-01 Tristan Gingold <gingold@adacore.com>
12212 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12214 2011-08-01 Quentin Ochem <ochem@adacore.com>
12216 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12217 heap to compute the result.
12219 2011-08-01 Robert Dewar <dewar@adacore.com>
12221 * atree.ads: Minor reformatting.
12223 2011-08-01 Emmanuel Briot <briot@adacore.com>
12225 * g-expect.adb (Get_Command_Output): Fix memory leak.
12227 2011-08-01 Geert Bosch <bosch@adacore.com>
12229 * cstand.adb (P_Float_Type): New procedure to print the definition of
12230 predefined fpt types.
12231 (P_Mixed_Name): New procedure to print a name using mixed case
12232 (Print_Standard): Use P_Float_Type for printing floating point types
12233 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12234 precision IEEE float.
12236 2011-08-01 Thomas Quinot <quinot@adacore.com>
12238 * sem_ch3.adb: Minor reformatting.
12240 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12242 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12243 the completion of a generic function, insert the new body rather than
12244 rewriting the original.
12246 2011-08-01 Yannick Moy <moy@adacore.com>
12248 * sinfo.ads, errout.ads: Typos in comments.
12250 2011-08-01 Robert Dewar <dewar@adacore.com>
12252 * par-endh.adb: Minor reformatting.
12254 2011-08-01 Robert Dewar <dewar@adacore.com>
12256 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12257 (Pre_Post_Aspects): New subtype.
12258 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12259 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12260 * par-ch7.adb (P_Package): Remove Decl parameter
12261 (P_Package): Handle new syntax for aspects (before IS)
12262 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12264 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12265 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12266 (P_Package): Remove Decl parameter
12267 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12269 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12271 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12272 * sinfo.ads: Document new syntax for aspects in packages etc.
12273 * sprint.adb: Handle new syntax of aspects before IS in package
12275 2011-08-01 Thomas Quinot <quinot@adacore.com>
12277 * atree.ads: Minor reformatting.
12278 * sem_prag.adb: Minor reformatting.
12280 2011-08-01 Robert Dewar <dewar@adacore.com>
12282 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12283 case expr alternative.
12285 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12287 * sem_ch12.adb: Fix typo.
12289 2011-08-01 Geert Bosch <bosch@adacore.com>
12291 * sem_prag.adb (Check_No_Link_Name): New procedure.
12292 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12293 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12294 instead of Standard_Long_Long_Float_Size global. Preparation for
12295 eventual removal of per type constants.
12296 * exp_util.ads (Get_Stream_Size): New function returning the stream
12297 size value of subtype E.
12298 * exp_util.adb (Get_Stream_Size): Implement new function.
12299 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12301 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12303 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12305 2011-08-01 Geert Bosch <bosch@adacore.com>
12307 * cstand.adb: Fix comments.
12308 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12309 count of arguments.
12311 2011-08-01 Robert Dewar <dewar@adacore.com>
12313 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12315 2011-08-01 Geert Bosch <bosch@adacore.com>
12317 * atree.ads: Fix comment.
12319 2011-08-01 Robert Dewar <dewar@adacore.com>
12321 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12322 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12323 * par.adb: Add with for Namet.Sp.
12324 * par-tchk.adb: Minor reformatting.
12326 2011-08-01 Vincent Celier <celier@adacore.com>
12328 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12329 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12330 of the init procedure of a SAL.
12331 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12334 2011-08-01 Thomas Quinot <quinot@adacore.com>
12336 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12339 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12341 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12343 2011-08-01 Thomas Quinot <quinot@adacore.com>
12345 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12346 conformant with its spec (return True only for types that have
12347 an overriding Initialize primitive operation that prevents them from
12348 having preelaborable initialization).
12349 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12350 initialization for controlled types in Ada 2005 or later mode.
12352 2011-08-01 Robert Dewar <dewar@adacore.com>
12354 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12356 (Same_Aspect): New function.
12357 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12358 Type_Invariant, Precondition, Postcondition.
12359 * snames.ads-tmpl: Add Name_Type_Invariant.
12361 2011-08-01 Robert Dewar <dewar@adacore.com>
12363 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12365 (Freeze_All_Ent): Fix error in handling inherited aspects.
12366 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12367 already analyzed, but don't skip entire processing of a declaration,
12368 that's wrong in some cases of declarations being rewritten.
12369 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12370 Don't delay for integer, string literals
12371 Treat predicates in usual manner for delay, remove special case code,
12373 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12374 (Build_Predicate_Function): Update saved expression in aspect
12375 (Build_Invariant_Procedure): Update saved expression in aspect
12376 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12377 of replacement of discriminant references if the reference is simple.
12379 2011-08-01 Robert Dewar <dewar@adacore.com>
12381 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12382 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12383 Static_Predicate and Dynamic_Predicate.
12384 (Build_Predicate_Function): Add processing for Static_Predicate
12385 and Dynamic_Predicate.
12386 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12387 (From_Static_Predicate): New flag
12388 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12390 2011-08-01 Robert Dewar <dewar@adacore.com>
12392 * usage.adb: Documentation cleanup for Ada version modes in usage.
12393 * expander.adb: Minor reformatting.
12395 2011-08-01 Robert Dewar <dewar@adacore.com>
12397 * atree.ads: Minor comment fix.
12398 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12399 a-witeio.ads, sem_prag.adb: Minor reformatting.
12401 2011-08-01 Doug Rupp <rupp@adacore.com>
12403 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12404 pointers. Use descrip.h header file for convenience. Add some
12407 2011-08-01 Robert Dewar <dewar@adacore.com>
12409 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12410 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12411 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12413 (Check_Aspect_At_End_Of_Declarations): New procedure
12414 (Analye_Aspect_Specification): Minor changes for above procedures
12415 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12416 specification node as well.
12418 2011-08-01 Pascal Obry <obry@adacore.com>
12420 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12421 Windows files. Use GetFilesAttributes() in this case to check for file
12422 existence instead of returning with an error code.
12424 2011-08-01 Vincent Celier <celier@adacore.com>
12426 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12427 High is above Source length.
12429 2011-08-01 Robert Dewar <dewar@adacore.com>
12431 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12433 2011-08-01 Robert Dewar <dewar@adacore.com>
12435 * aspects.ads (Boolean_Aspects): New subtype.
12436 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12437 for derived types in cases where the parent type and derived type have
12439 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12440 with aspects when parent type also has aspects.
12441 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12442 boolean expression at this point).
12443 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12444 accordance with final decision on the Ada 2012 feature.
12445 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12447 2011-08-01 Matthew Heaney <heaney@adacore.com>
12449 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12451 2011-08-01 Pascal Obry <obry@adacore.com>
12453 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12454 Fix Replace_Slice when High is above current string size.
12455 (Replace_Slice): Fix DL computation when High is above current
12458 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12460 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12462 2011-08-01 Matthew Heaney <heaney@adacore.com>
12464 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12467 2011-08-01 Pascal Obry <obry@adacore.com>
12469 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12472 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12474 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12475 access to protected subprograms in generic bodies.
12476 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12477 protected type, indicate that the convention of the subprogram is
12478 Convention_Protected, because it may be used in subsequent declarations
12479 within the protected declaration.
12481 2011-08-01 Vincent Celier <celier@adacore.com>
12483 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12484 and "final" procedures when the name of the library is "ada", to avoid
12485 duplicate symbols "adainit" and "adafinal" in executables.
12487 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12489 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12490 quantified expression that appears within a postcondition and uses the
12491 Ada2012 'Result attribute.
12493 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12495 * init.c (__gnat_error_handler): Cast reason to int.
12496 (__gnat_install_handler): Explain sa_sigaction use.
12498 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12500 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12501 subprogram has copy-in copy-out parameters, try to promote the mode of
12502 the return type if it is passed in registers.
12504 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12506 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12507 left operand as addressable.
12509 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12511 * gcc-interface/gigi.h (build_function_stub): Remove.
12512 (build_return_expr): Likewise.
12513 (convert_vms_descriptor): Declare.
12514 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12515 (build_function_stub): Move to...
12516 * gcc-interface/utils2.c (build_return_expr): Move to...
12517 * gcc-interface/trans.c (build_function_stub): ...here.
12518 (build_return_expr): ...here.
12519 (Subprogram_Body_to_gnu): Add local variable for language_function.
12520 Disconnect the parameter attributes cache, if any, once done with it.
12521 Call end_subprog_body only after setting the end_locus.
12522 Build the stub associated with the function, if any, at the very end.
12523 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12524 variables and streamline control flow.
12526 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12529 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12530 g-trasym-dwarf.adb.
12532 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12535 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12536 Assign to act.sa_sigaction.
12537 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12538 current->return_address to char * before arithmetic.
12540 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12542 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12543 Correct argument types.
12544 Extract code from reason.
12545 (__gnat_install_handler): Assign to act.sa_sigaction.
12547 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12549 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12550 (GNAT1_OBJS): ...here.
12552 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12555 * g-socthi-mingw.adb (Fill): Fix formatting.
12557 * gcc-interface/gigi.h: Move around comment.
12559 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12562 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12564 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12567 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12569 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12571 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12572 range comparison if Pmode is SImode.
12574 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12575 Eric Botcazou <ebotcazou@adacore.com>
12577 * adadecode.c: Wrap up in extern "C" block.
12578 * adadecode.h: Likewise.
12579 * adaint.c: Likewise. Remove 'const' keyword.
12580 * adaint.h: Likewise.
12581 * argv.c: Likewise.
12582 * atree.h: Likewise.
12584 * cstreams.c: Likewise.
12586 * exit.c: Likewise.
12588 * final.c: Likewise.
12589 * init.c: Likewise.
12590 * initialize.c: Likewise.
12591 * link.c: Likewise.
12592 * namet.h: Likewise.
12593 * nlists.h: Likewise.
12594 * raise.c: Likewise.
12595 * raise.h: Likewise.
12596 * repinfo.h: Likewise.
12597 * seh_init.c: Likewise.
12598 * targext.c: Likewise.
12599 * tracebak.c: Likewise.
12600 * uintp.h: Likewise.
12601 * urealp.h: Likewise.
12602 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12603 * xsinfo.adb: Likewise.
12604 * xsnamest.adb: Likewise.
12605 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12606 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12607 * gcc-interface/misc.c: Likewise.
12608 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12609 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12610 ada/targext.o here...
12611 (GNAT_ADA_OBJS): ...and not here.
12612 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12613 (GNATBIND_OBJS): Reorder.
12615 2011-07-07 Richard Henderson <rth@redhat.com>
12617 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12618 dwarf2out_frame_init.
12620 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12622 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12624 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12627 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12629 2011-07-06 Richard Guenther <rguenther@suse.de>
12631 * gcc-interface/misc.c (gnat_init): Merge calls to
12632 build_common_tree_nodes and build_common_tree_nodes_2.
12633 Re-initialize boolean_false_node.
12635 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12636 Olivier Hainque <hainque@adacore.com>
12637 Nicolas Setton <setton@adacore.com>
12639 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12640 the type according to the ARTIFICIAL_P parameter.
12641 (create_type_decl): Likewise.
12642 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12644 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12646 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12647 (gnatbind): Likewise.
12649 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12651 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12653 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12655 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12656 local variable throughout. Remove useless call to Base_Type.
12657 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12658 Take it also into account for the volatileness of the field. Set the
12659 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12661 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12663 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12664 on a dereference built for a by-ref object if it has an address clause.
12666 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12668 * einfo.ads (Address_Taken): Document use for the second argument of
12669 Asm_Input and Asm_Output attributes.
12670 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12671 argument is an entity name, then set Address_Taken on it.
12672 <Attribute_Asm_Output>: Likewise.
12673 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12674 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12675 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12676 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12678 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12680 PR middle-end/46500
12681 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12683 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12685 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12686 (ada/utils.o): Update dependencies.
12687 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12688 ../../../libcpp/libcpp.a.
12689 * gcc-interface/utils.c: Include common/common-target.h.
12690 (process_attributes): Use targetm_common.have_named_sections.
12692 2011-06-07 Richard Guenther <rguenther@suse.de>
12694 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12697 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12699 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12700 TREE_THIS_NOTRAP flag.
12702 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12704 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12707 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12709 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12710 constants whose full view has discriminants specially.
12712 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12714 * gcc-interface/utils.c: Include diagnostic.h.
12715 (gnat_write_global_declarations): Output debug information for all
12716 global type declarations before finalizing the compilation unit.
12717 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12719 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12721 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12723 2011-05-25 Kai Tietz <ktietz@redhat.com>
12725 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12726 initialization instead of const/none-const pointer assignment.
12728 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12730 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12731 $(EXTRA_GNAT1_OBJS).
12732 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12733 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12734 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12735 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12736 libcommon-target.a instead of prefix.o.
12738 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12741 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12743 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12745 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12746 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12747 instead of version.o.
12749 2011-05-18 Kai Tietz <ktietz@redhat.com>
12751 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12752 boolean_false_node instead of integer_zero_node.
12753 (convert_with_check): Likewise.
12754 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12756 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12758 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12759 type of the parameter is an unconstrained array, convert the actual to
12760 the type of the formal in the In Out and Out cases as well.
12762 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12764 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12765 call build_function_type_array or build_varargs_function_type_array
12767 (create_subprog_type): Don't call build_function_type; call
12768 build_function_type_vec instead.
12770 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12772 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12773 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12774 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12776 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12778 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12780 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12781 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12783 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12785 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12787 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12789 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12790 instead of accessing TYPE_ARG_TYPES directly.
12791 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12793 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12796 * gcc-interface/gigi.h (get_variant_part): Declare.
12797 * gcc-interface/decl.c (get_variant_part): Make global.
12798 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12799 types have the same constant size, are record types and T1 has a
12800 variant part while T2 doesn't.
12802 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12804 * gcc-interface/utils.c (begin_subprog_body): Do not call
12806 (end_subprog_body): Likewise.
12808 2011-05-04 Richard Guenther <rguenther@suse.de>
12810 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12812 (pos_to_constructor): Likewise.
12814 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12815 Eric Botcazou <ebotcazou@adacore.com>
12817 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12818 of build_function_type. Adjust calls to...
12819 (build_raise_check): ...this. Do not take a void_tree parameter.
12820 Call build_function_type_list instead of build_function_type.
12821 Fix head comment and swap couple of conditional blocks.
12823 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12825 * gnatvsn.ads (Library_Version): Bump to 4.7.
12826 (Current_Year): Bump to 2011.
12828 2011-04-29 Michael Matz <matz@suse.de>
12830 * gcc-interface/misc.c (gnat_handle_option): Set
12831 warn_maybe_uninitialized.
12833 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12835 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12836 the Watson/McCabe paper.
12838 2011-04-23 Jim Meyering <meyering@redhat.com>
12840 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12842 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12844 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12847 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12849 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12851 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12852 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12853 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12854 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12855 <all>: Do not set flags on the reused DECL node coming from an alias.
12856 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12857 don't need debug info here...
12858 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12859 (gigi): Adjust calls to create_subprog_decl.
12860 (build_raise_check): Likewise.
12861 (establish_gnat_vms_condition_handler): Likewise.
12862 (Compilation_Unit_to_gnu): Likewise.
12863 (gnat_to_gnu): Likewise.
12865 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12867 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12868 (NO_REORDER_ADAFLAGS): New variable.
12869 (EXTRA_GNATTOOLS): Always define.
12870 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12871 Clean up and adjust list of files compiled with special options.
12872 * gcc-interface/Make-lang.in: Likewise.
12873 (ada/decl.o): Cosmetical change.
12874 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12876 2011-04-20 Jim Meyering <meyering@redhat.com>
12878 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12880 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12882 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12883 $(CFLAGS) on the link line.
12885 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12887 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12888 padded type built for the return type if it is unconstrained.
12890 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12892 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12894 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12896 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12897 before calling TREE_CHAIN.
12898 * gcc-interface/misc.c (gnat_init_ts): New function.
12899 (LANG_HOOKS_INIT_TS): Define.
12901 2011-04-12 Martin Jambor <mjambor@suse.cz>
12903 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12904 instead of cgraph_node.
12906 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12908 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12909 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12912 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12914 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12915 of aggregate types that contain a placeholder.
12917 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12919 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12921 (handle_type_generic_attribute): Likewise.
12923 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12926 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12928 2011-04-04 Kai Tietz <ktietz@redhat.com>
12931 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12934 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12936 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12937 type case, do not strip a padding type around the array type.
12939 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12941 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12944 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12946 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12947 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12948 code for -feliminate-unused-debug-types.
12949 (gnat_post_options): Likewise.
12951 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12953 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12954 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12957 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12959 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12960 DECL_ARTIFICIAL flag on enumeration types.
12962 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12964 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12965 fat pointer types artificial unconditionally.
12966 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12969 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12971 * gcc-interface/gigi.h (get_dummy_type): Declare.
12972 (build_dummy_unc_pointer_types): Likewise.
12973 (finish_fat_pointer_type): Likewise.
12974 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12975 fat pointer type has been built, complete it in place.
12976 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12977 and thin pointers. Remove useless variable.
12978 (finish_fat_pointer_type): Make global and move to...
12979 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12980 (get_dummy_type): New function.
12981 (build_dummy_unc_pointer_types): Likewise.
12982 (gnat_pushdecl): Propage the name to the anonymous variants only.
12983 (update_pointer_to): Only adjust the pointer types in the unconstrained
12986 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12988 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12989 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12990 if this is a Taft amendment type and the full declaration is available.
12991 * gcc-interface/trans.c (process_type): Likewise.
12992 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12993 (process_freeze_entity): Likewise.
12994 * gcc-interface/utils.c (dummy_global): New static variable.
12995 (gnat_write_global_declarations): If there are types declared as used
12996 at the global level, insert them in the global hash table.
12998 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13000 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13001 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13002 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13004 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13005 flag of the type accordingly.
13006 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13008 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13010 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13011 finalizing types when updating the pointers to the designated type.
13012 <all>: Finalize the deferred types even if we didn't defer processing
13013 of incomplete types in this invocation.
13015 2011-04-01 Olivier Hainque <hainque@adacore.com>
13016 Nicolas Setton <setton@adacore.com>
13017 Eric Botcazou <ebotcazou@adacore.com>
13019 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13020 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13022 2011-03-28 Kai Tietz <ktietz@redhat.com>
13024 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13026 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13027 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13029 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13031 2011-03-28 Tristan Gingold <gingold@adacore.com>
13034 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13035 Use ada output of gnatbind.
13036 (ada/b_gnatb.adb): Ditto.
13037 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13038 (ada.mostlyclean, ada.stage1)
13039 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13040 (ada.stagefeedback): Adjust.
13041 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13042 Use ada output of gnatbind.
13043 (b_gnatm.adb): Ditto.
13044 (b_gnatl.o, b_gnatm.o): New rules.
13046 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13048 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13049 for the padded type built to support a specified size or alignment.
13051 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13053 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13054 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13055 unconditionally to the end of the unit when the designated type is
13057 <all>: Rename local variable. Attempt to un-defer types only and do it
13058 for limited_with'ed types as well.
13059 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13060 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13061 consistently and remove redundant call to finalize_from_with_types.
13063 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13065 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13066 subprograms without a previous spec declared in the same unit.
13067 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13068 subprograms at the end of the unit instead of at the beginning.
13069 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13070 isn't public for the special handling of non-inline functions nested
13071 inside inline external functions.
13073 2011-03-25 Jeff Law <law@redhat.com>
13075 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13077 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13079 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13080 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13081 to compute Set_Size_Depends_On_Discriminant.
13082 (Layout_Type): Call it on array types in back-end layout mode.
13083 * sem_util.adb (Requires_Transient_Scope): Return true for array
13084 types only if the size depends on the value of discriminants.
13085 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13086 type if the RHS is a call to a function that returns an unconstrained
13087 type with default discriminant.
13089 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13091 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13092 non-conversion to the nominal result type at the end.
13094 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13096 * gcc-interface/trans.c (create_temporary): New function taken from...
13097 (create_init_temporary): ...here. Call it.
13098 (call_to_gnu): Create the temporary for the return value early, if any.
13099 Create it for a function with copy-in/copy-out parameters if there is
13100 no target; in other cases of copy-in/copy-out, use another temporary.
13101 Push the new binding level lazily. Add and rename local variables.
13103 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13105 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13107 (set_rm_size): Likewise.
13109 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13111 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13112 for the padded type built in order to support a specified alignment.
13113 Fix incorrect formatting.
13115 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13118 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13120 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13122 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13123 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13124 to the end of the list. Adjust recursive call. Rename local variable.
13125 If REORDER is true, reorder components of the record type.
13126 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13127 components_to_record and adjust the parameter list.
13129 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13131 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13132 disabled, use the variable for bounds of loop iteration scheme.
13134 2011-03-21 Kai Tietz <ktietz@redhat.com>
13137 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13139 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13141 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13142 out whether the expression is read-only. Short-circuit placeholder
13143 case and rename a couple of local variables.
13145 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13147 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13148 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13149 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13150 (convert): Deal with conversions from a smaller form type specially.
13152 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13154 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13155 its argument, except for the special -I- switch.
13157 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13159 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13162 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13164 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13166 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13168 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13170 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13171 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13172 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13173 Do not generate the check directly, instead instantiate the template
13174 check present in the descriptor.
13175 (make_descriptor_field): Move around.
13176 (build_vms_descriptor32): Build a template check in the POINTER field.
13177 (build_vms_descriptor): Remove useless suffixes.
13178 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13180 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13183 * targext.c: Include target files if IN_RTS is defined.
13185 2011-01-26 Richard Guenther <rguenther@suse.de>
13188 * targext.c: Include config.h.
13189 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13192 2011-01-04 Pascal Obry <obry@adacore.com>
13193 Eric Botcazou <ebotcazou@adacore.com>
13195 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13197 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13199 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13200 end-of-case on the end label and its associated gotos, if any.
13202 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13204 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13205 expressions of the parameter cache within the statement group of
13206 the CICO mechanism.
13208 2011-01-04 Olivier Hainque <hainque@adacore.com>
13209 Eric Botcazou <ebotcazou@adacore.com>
13211 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13212 (set_end_locus_from_node): New function.
13213 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13214 make and the function end_locus.
13215 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13216 for the elaboration subprogram.
13217 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13218 set the end_locus of the expression as well.
13220 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13223 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13224 variables that are referenced in exception handlers volatile.
13228 Copyright (C) 2011 Free Software Foundation, Inc.
13230 Copying and distribution of this file, with or without modification,
13231 are permitted in any medium without royalty provided the copyright
13232 notice and this notice are preserved.