1 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
5 directly the bit array.
6 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
7 the linux macros with the same name.
8 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
9 wrappers around the CPU_ZERO and CPU_SET linux macros.
11 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
13 * exp_ch7.adb (Find_Insertion_List): Removed.
14 (Process_Transient_Objects): Insert the declarations of the hook
15 access type and the hook object before the associated transient object.
17 2011-09-01 Jose Ruiz <ruiz@adacore.com>
19 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
20 package System.Aux_Dec when using restricted run-time libraries which
21 do not have this package.
23 2011-09-01 Tristan Gingold <gingold@adacore.com>
25 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
27 2011-09-01 Bob Duff <duff@adacore.com>
29 * sem_attr.adb (Analyze_Access_Attribute): Do not call
30 Kill_Current_Values for P'Unrestricted_Access, where P is library level
32 2011-09-01 Thomas Quinot <quinot@adacore.com>
34 * exp_ch5.adb: Minor reformatting
35 * gnat_ugn.texi: Fix minor typos.
36 * gcc-interface/Make-lang.in: Update dependencies.
38 2011-09-01 Robert Dewar <dewar@adacore.com>
40 * inline.adb, sem_aggr.adb: Minor reformatting.
42 2011-09-01 Ed Schonberg <schonberg@adacore.com>
44 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
46 2011-09-01 Robert Dewar <dewar@adacore.com>
48 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
50 2011-09-01 Bob Duff <duff@adacore.com>
52 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
53 body" the same as "in inlined body", because visibility shouldn't
56 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
58 * inline.adb (Add_Inlined_Body): Refine previous change.
60 2011-09-01 Gary Dismukes <dismukes@adacore.com>
62 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
63 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
64 Test for case where call
65 initializes an object of a return statement before testing for
66 a constrained call, to ensure that all such cases get handled
67 by simply passing on the caller's parameters. Also, in that
68 case call Needs_BIP_Alloc_Form to determine whether to pass on
69 the BIP_Alloc_Form parameter of the enclosing function rather
70 than testing Is_Constrained. Add similar tests for the return
71 of a BIP call to later processing to ensure consistent handling.
72 (Needs_BIP_Alloc_Form): New utility function.
73 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
74 a BIP_Alloc_Form formal with call to new utility function
77 2011-09-01 Pascal Obry <obry@adacore.com>
79 * prj-part.adb: Minor reformatting.
81 2011-09-01 Vincent Celier <celier@adacore.com>
83 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
84 half character in the unit name.
86 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
88 * exp_ch4.adb: Minor code and comment reformatting.
90 2011-09-01 Thomas Quinot <quinot@adacore.com>
92 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
93 for Is_Limited_Type and Is_Tagged_Type in condition checking
94 for by-reference type.
95 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
96 subprograms may have a completion because of a previous
97 Inline_Always clause, but the enclosing package must be marked
98 inlined for the subprogram body to become visible to the backend.
100 2011-09-01 Thomas Quinot <quinot@adacore.com>
102 * sem_aux.adb, exp_ch4.adb: Minor reformatting
104 2011-09-01 Pascal Obry <obry@adacore.com>
106 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
108 2011-09-01 Ed Schonberg <schonberg@adacore.com>
110 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
111 the formals of a subprogram stub that acts as a spec.
113 2011-09-01 Ed Schonberg <schonberg@adacore.com>
115 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
116 type, declare a renaming for it, not an object declaration.
118 2011-09-01 Yannick Moy <moy@adacore.com>
120 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
121 Ignore_Errors to ignore failures to read ALI files when True.
123 2011-09-01 Javier Miranda <miranda@adacore.com>
125 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
126 constructor calls associated with non-tagged record types.
128 2011-09-01 Robert Dewar <dewar@adacore.com>
130 * g-socthi-vms.adb: Minor reformatting.
132 2011-09-01 Nicolas Roche <roche@adacore.com>
134 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
135 in order to avoid impact of imcompatible changes.
136 * cstreams.c: Likewise
140 2011-09-01 Yannick Moy <moy@adacore.com>
142 * lib-writ.adb (Write_With_Lines): Always output complete information
143 on "with" line in Alfa mode, as this is required by formal verification
146 2011-09-01 Tristan Gingold <gingold@adacore.com>
148 * g-socthi-vms.adb: Add comments.
150 2011-09-01 Pascal Obry <obry@adacore.com>
152 * prj.ads: Minor reformatting.
154 2011-09-01 Vincent Celier <celier@adacore.com>
156 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
157 exceptions in the config pragmas file.
159 2011-09-01 Tristan Gingold <gingold@adacore.com>
161 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
163 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
165 * exp_ch7.adb (Find_Insertion_List): New routine.
166 (Process_Transient_Objects): Add code to handle the abnormal
167 finalization of a controlled transient associated with a subprogram
168 call. Since transients are cleaned up right after the associated
169 context, an exception raised during a subprogram call may bypass the
172 2011-09-01 Robert Dewar <dewar@adacore.com>
174 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
177 2011-09-01 Robert Dewar <dewar@adacore.com>
179 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
181 2011-09-01 Robert Dewar <dewar@adacore.com>
183 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
185 2011-09-01 Thomas Quinot <quinot@adacore.com>
187 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
188 GNATRTL_NONTASKING_OBJS.
190 2011-09-01 Robert Dewar <dewar@adacore.com>
192 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
193 possibility of this flag being set for formals in Ada 2012 mode.
194 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
196 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
198 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
200 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
203 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
205 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
206 insertion node in a tree of nested Expression_With_Actions nodes.
207 (Process_Transient_Object): In the case where a complex if statement
208 has been converted into nested Expression_With_Actions nodes, the
209 "hook" object and the associated access type must be inserted before
210 the top most Expression_With_Actions.
212 2011-09-01 Robert Dewar <dewar@adacore.com>
214 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
215 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
217 2011-09-01 Ed Schonberg <schonberg@adacore.com>
219 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
221 2011-09-01 Jose Ruiz <ruiz@adacore.com>
223 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
225 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
226 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
227 in a similar way as we do for the Priority or Dispatching_Domain aspect.
228 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
229 Dispatching_Domains_Frozen): Move this local data to package
230 System.Tasking because with the CPU aspect we need to have access
231 to this data when creating the task in System.Tasking.Stages.Create_Task
232 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
233 Move these variables from the body of
234 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
235 we need to have access to this data when creating the task in
236 System.Tasking.Stages.Create_Task.
237 * s-taskin.adb (Initialize): Signal the allocation of the environment
238 task to a CPU, if any, so that we know whether the CPU can be
239 transferred to a different dispatching domain.
240 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
241 is being allocated belongs to the dispatching domain where the task
242 lives. Signal the allocation of the task to a CPU, if any, so that we
243 know whether the CPU can be transferred to a different dispatching
246 2011-09-01 Ed Schonberg <schonberg@adacore.com>
248 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
249 attributes Same_Storage and Overlaps_Storage.
251 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
253 * exp_strm.adb: Remove with and use clause for Opt.
254 (Build_Array_Input_Function): Remove the version-dependent generation
255 of the return statement. The Ada 2005 tree is now the default.
257 2011-09-01 Yannick Moy <moy@adacore.com>
259 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
260 it is never empty when compiling in Alfa mode.
262 2011-09-01 Robert Dewar <dewar@adacore.com>
264 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
265 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
266 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
267 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
269 2011-09-01 Matthew Heaney <heaney@adacore.com>
271 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
272 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
273 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
274 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
275 unbounded queue container.
276 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
277 bounded queue container.
278 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
279 unbounded priority queue container.
280 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
281 bounded priority queue container.
283 2011-08-31 Pascal Obry <obry@adacore.com>
285 * a-direct.adb: Do not try to create an UNC path on Windows.
286 (Create_Path): Skip leading computer name in UNC path if any.
288 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
290 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
291 version-dependent generation of the return statement. The Ada 2005 tree
294 2011-08-31 Thomas Quinot <quinot@adacore.com>
296 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
297 types Stream_Element_Offset and Storage_Offset have a different native
298 type depending on whether the platform is 32 or 64 bits. When
299 exchanging them, always convert to 64 bits.
301 2011-08-31 Yannick Moy <moy@adacore.com>
303 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
304 --force-alfa to gnat2why.
306 2011-08-31 Ed Schonberg <schonberg@adacore.com>
308 * sem_ch12.adb (Save_References): If the node has aspects, save
309 references within the corresponding expressions in a separate step,
310 because the aspects are not directly in the tree for the declaration
311 to which they belong.
313 2011-08-31 Arnaud Charlet <charlet@adacore.com>
315 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
316 in CodePeer mode, since representation clauses are partially ignored.
317 * gcc-interface/Make-lang.in: Update dependencies.
319 2011-08-31 Jose Ruiz <ruiz@adacore.com>
321 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
322 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
323 to any dispatching domain.
325 2011-08-31 Thomas Quinot <quinot@adacore.com>
327 * exp_ch4.adb: Minor reformatting.
329 2011-08-31 Bob Duff <duff@adacore.com>
331 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
332 on nodes for which it is not defined.
333 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
336 2011-08-31 Bob Duff <duff@adacore.com>
338 * sem_ch3.adb (Process_Full_View): Disable legality check if
339 In_Instance, to avoid spurious errors.
340 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
341 if In_Instance, to avoid spurious errors.
343 2011-08-31 Pascal Obry <obry@adacore.com>
345 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
346 directory speparators.
347 (Compose): Use Dir_Seps to handle both forms.
348 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
350 (Extension): Use Dir_Seps to handle both forms.
352 2011-08-31 Pascal Obry <obry@adacore.com>
354 * prj-conf.adb: Minor reformatting.
356 2011-08-31 Jose Ruiz <ruiz@adacore.com>
358 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
359 dispatching domain aspect.
360 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
362 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
363 Dispatching_Domain aspect in a similar way as we do for the Priority
365 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
366 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
368 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
369 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
370 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
371 Dispatching_Domain and add it to the task definition.
372 (Sig_Flags): Add Pragma_Dispatching_Domain.
373 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
374 support to find the types Dispatching_Domain and
375 Dispatching_Domain_Access.
376 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
377 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
378 query the availability of a pragma Dispatching_Domain.
379 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
380 the expander to pass the Dispatching_Domain when creating a task.
381 (Name_Dispatching_Domain): Add this new name for a pragma.
382 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
383 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
384 task has been allocated at creation time.
385 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
386 Ravenscar is always null.
387 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
388 the task has been allocated at creation time.
389 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
390 a specific dispatching domain.
391 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
392 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
393 and CPU are specified for the task, and the CPU value is not contained
394 within the range of processors for the domain.
396 2011-08-31 Vincent Celier <celier@adacore.com>
398 * make.adb (Original_Gcc) : New constant String_Access.
399 (Gnatmake): For VM targets, do not use VM version of the compiler if
400 --GCC= has been specified.
402 2011-08-31 Thomas Quinot <quinot@adacore.com>
404 * sem_ch5.adb: Minor reformatting.
406 2011-08-31 Ed Schonberg <schonberg@adacore.com>
408 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
411 2011-08-31 Bob Duff <duff@adacore.com>
413 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
414 the access type is private; we don't care about privacy in expansion.
416 2011-08-31 Ed Schonberg <schonberg@adacore.com>
418 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
419 subcomponents tnat may be limited, because they originate in view
420 conflicts. If the original aggregate is legal and the actuals are
421 legal, the aggregate itself is legal.
423 2011-08-31 Matthew Heaney <heaney@adacore.com>
425 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
428 2011-08-31 Ed Schonberg <schonberg@adacore.com>
430 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
433 2011-08-31 Jose Ruiz <ruiz@adacore.com>
435 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
436 Interrupt_Priority aspects, force the analysis of the aspect expression
437 (when building the equivalent pragma). Otherwise, its analysis is done
438 too late, after the task or protected object has been created.
439 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
440 Analyze_Single_Task_Declaration): Remove the code to move the aspects
441 to the object declaration because they are needed in the type
444 2011-08-31 Robert Dewar <dewar@adacore.com>
446 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
447 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
450 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
452 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
453 if the corresponding type is malformed due to restriction violations.
455 2011-08-31 Robert Dewar <dewar@adacore.com>
457 * s-ransee.ads, s-ransee.adb: Minor reformatting.
459 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
461 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
462 would cause the generation of Set_Finalize_Address if the target is a
463 VM and the designated type is not derived from [Limited_]Controlled.
465 2011-08-31 Arnaud Charlet <charlet@adacore.com>
467 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
469 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
470 case of a compilation error.
472 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
474 * init.c (__gnat_error_handler): Standardize the stack overflow or
475 erroneous memory access message.
476 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
477 or erroneous memory access message.
479 2011-08-31 Robert Dewar <dewar@adacore.com>
481 * sem_ch4.adb: Minor reformatting.
482 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
484 2011-08-31 Thomas Quinot <quinot@adacore.com>
486 * scos.ads: Minor documentation clarification.
487 * put_scos.adb: Do not generate SCO unit header line for a unit that
490 2011-08-31 Robert Dewar <dewar@adacore.com>
492 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
494 2011-08-31 Tristan Gingold <gingold@adacore.com>
496 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
497 hold variables between these following subprograms.
498 (Build_Exception_Handler, Build_Object_Declarations,
499 Build_Raise_Statement): Use the above type as parameter.
500 Make the above adjustments.
501 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
503 2011-08-31 Pascal Obry <obry@adacore.com>
505 * projects.texi: Minor reformatting.
507 2011-08-31 Tristan Gingold <gingold@adacore.com>
509 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
510 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
512 2011-08-31 Ed Schonberg <schonberg@adacore.com>
514 * exp_ch5.adb: Minor code cleanup.
515 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
516 prevent cascaded errors.
517 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
518 variable of an iterator specification in current scope.
519 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
520 postconditions on the stack, as they contain no return statements.
522 2011-08-31 Yannick Moy <moy@adacore.com>
524 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
525 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
526 call Qualify_Entity_Names.
527 (Expand_Alfa): call Qualify_Entity_Names in more cases
528 * lib-xref-alfa.adb: Take into account system package.
529 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
530 CodePeer mode in which we are interested in finding bugs even if
531 compiler cannot compile source.
532 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
535 2011-08-31 Gary Dismukes <dismukes@adacore.com>
537 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
538 denoted by the subtype mark to ensure getting the concurrent type in
539 the case where the subtype mark denotes a private subtype of a
540 concurrent type (needed when using -gnatc).
541 (Process_Subtype): For the processing specific to type kinds, case on
542 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
543 subtype denotes a private subtype whose base type is nonprivate (needed
544 for subtypes of private fulfilled by task types when compiling with
547 2011-08-31 Gary Dismukes <dismukes@adacore.com>
549 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
550 late primitives that override interface operations when the full
551 expander is not active, to avoid blowups in Register_Primitive when
552 types don't have associated secondary dispatch tables.
554 2011-08-31 Yannick Moy <moy@adacore.com>
556 * alfa_test.adb: Code clean up.
558 2011-08-31 Marc Sango <sango@adacore.com>
560 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
561 by Comes_From_Source (Original_Node (N)) in order to treat also the
562 nodes which have been rewritten.
563 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
564 explicit dereference and slice violation in spark mode on the nodes
565 coming only from the source code.
567 2011-08-31 Robert Dewar <dewar@adacore.com>
569 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
570 lib-xref-alfa.adb: Minor reformatting.
572 2011-08-31 Matthew Heaney <heaney@adacore.com>
574 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
576 2011-08-31 Javier Miranda <miranda@adacore.com>
578 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
579 only for class-wide subprograms conflicting with entities of concurrent
582 2011-08-31 Matthew Heaney <heaney@adacore.com>
584 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
587 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
589 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
590 general description of the routine.
592 2011-08-31 Ed Schonberg <schonberg@adacore.com>
594 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
597 2011-08-31 Gary Dismukes <dismukes@adacore.com>
599 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
600 check is needed for a left-hand side that is a dereference, and the
601 base type is private without discriminants (whereas the full type does
602 have discriminants), an extra retrieval of the underlying type may be
603 needed in the case where the subtype is a record subtype whose base
604 type is private. Update comments.
606 2011-08-31 Javier Miranda <miranda@adacore.com>
608 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
609 found check if there is a class-wide subprogram covering the primitive.
611 2011-08-31 Yannick Moy <moy@adacore.com>
613 * sem_res.adb: Further cases where full expansion test is needed,
614 rather than expansion test.
616 2011-08-31 Pascal Obry <obry@adacore.com>
618 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
620 2011-08-31 Ed Schonberg <schonberg@adacore.com>
622 * exp_ch5.adb: Handle iterators over derived container types.
624 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
626 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
627 (Has_Anonymous_Master): New routine.
628 (Set_Has_Anonymous_Master): New routine.
629 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
630 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
631 (Current_Anonymous_Master): New routine.
632 (Current_Unit_First_Declaration): Removed.
633 (Current_Unit_Scope): Removed.
634 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
635 their objects on a per-unit heterogeneous finalization master.
637 2011-08-31 Matthew Heaney <heaney@adacore.com>
639 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
642 2011-08-31 Jose Ruiz <ruiz@adacore.com>
644 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
647 2011-08-31 Gary Dismukes <dismukes@adacore.com>
649 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
650 where the actual is an unexpanded call to 'Input.
652 2011-08-31 Yannick Moy <moy@adacore.com>
654 * sem_ch4.adb: Code clean up.
656 2011-08-31 Yannick Moy <moy@adacore.com>
658 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
660 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
662 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
663 and TSS primitive Finalize_Address if finalization is suppressed.
664 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
665 primitive Finalize_Address if finalization is suppressed.
667 2011-08-31 Jose Ruiz <ruiz@adacore.com>
669 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
670 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
671 sure that the underlying task has already been created before trying
672 to change its affinity.
673 (Set_CPU): Use the term processor instead of CPU, as we do in
676 2011-08-31 Vincent Celier <celier@adacore.com>
678 * prj-attr.adb: New Compiler attribute Source_File_Switches.
679 * prj-nmsc.adb (Process_Compiler): Process attribute
680 Source_File_Switches.
681 * prj.ads (Language_Config): New name list component
682 Name_Source_File_Switches.
683 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
685 2011-08-31 Ed Schonberg <schonberg@adacore.com>
687 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
688 discriminated component of an actual, expand at once to prevent
689 ouf-of-order references with generated subtypes.
691 2011-08-31 Yannick Moy <moy@adacore.com>
693 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
694 reference to operator in Alfa xrefs.
696 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
698 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
699 where the parent instance was frozen before the current instance due to
700 the presence of a source body. Update calls to Insert_After_Last_Decl.
701 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
702 Update the comment which illustrates the purpose of the routine.
703 Package instances are now frozen by source bodies which appear after
704 the instance. This ensures that entities coming from within the
705 instance are available for use in the said bodies.
706 (Install_Body): Add code to handle the case where the parent instance
707 was frozen before the current instance due to the presence of a source
708 body. Update calls to Insert_After_Last_Decl.
710 2011-08-31 Jose Ruiz <ruiz@adacore.com>
712 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
714 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
716 2011-08-31 Yannick Moy <moy@adacore.com>
718 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
720 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
721 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
722 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
723 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
724 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
725 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
726 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
727 ALFA in Alfa (we dropped acronym).
728 * einfo.adb (Primitive_Operations): Correctly return list of primitive
729 operations in a case where it returned previously No_Elist.
731 2011-08-31 Robert Dewar <dewar@adacore.com>
733 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
734 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
735 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
736 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
737 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
738 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
741 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
743 * sem_ch12 (Check_Private_View): Revert previous change.
744 * sem_res.adb (Conversion_Check): Do not emit the error message if the
745 conversion is in a generic instance.
747 2011-08-31 Matthew Heaney <heaney@adacore.com>
749 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
750 * a-chtgbo.adb (Free): Allow 0 as index value.
752 2011-08-31 Matthew Heaney <heaney@adacore.com>
754 * a-cborma.adb (Insert): Add comment to explain why no element
757 2011-08-31 Gary Dismukes <dismukes@adacore.com>
759 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
760 spec discriminant is already a concurrent type, in which case just use
761 it, otherwise fetch the Corresponding_Concurrent_Type as before.
763 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
765 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
766 system-linux-mips.ads, system-linux-mipsel.ads,
767 system-linux-mips64el.ads, system-linux-ppc64.ads,
768 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
770 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
772 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
773 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
774 (build_unary_op): Likewise.
776 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
778 * raise-gcc.c: Do not include coretypes.h and tm.h.
779 (setup_to_install): Remove test for compiler macro.
780 * targext.c: Document use for the library.
781 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
783 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
785 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
786 the expression to the nominal type if the latter is a record type with
787 a variant part and the type of the former is a record type without one.
789 2011-08-30 Yannick Moy <moy@adacore.com>
791 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
792 expansion in Alfa mode.
793 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
794 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
796 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
797 * sem_res.adb: Ditto.
798 * gcc-interface/Make-lang.in: Update dependencies.
800 2011-08-30 Thomas Quinot <quinot@adacore.com>
802 * g-socket.ads: Minor documentation adjustment.
804 2011-08-30 Robert Dewar <dewar@adacore.com>
806 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
808 2011-08-30 Yannick Moy <moy@adacore.com>
810 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
811 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
812 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
813 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
814 Revert change which introduced files for "light"
815 expansion, to be replaced by a single file for Alfa expansion.
817 2011-08-30 Robert Dewar <dewar@adacore.com>
819 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
820 Minor code reorg/reformatting.
822 2011-08-30 Yannick Moy <moy@adacore.com>
824 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
825 common shorthand for (Expander_Active and not ALFA_Mode) that can be
826 used for testing full expansion, that is active expansion not in the
827 reduced mode for Alfa
828 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
829 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
830 of the verbose (Expander_Active and not ALFA_Mode)
832 2011-08-30 Tristan Gingold <gingold@adacore.com>
834 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
835 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
836 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
837 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
839 2011-08-30 Gary Dismukes <dismukes@adacore.com>
841 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
842 access conversions to check that the conversion is a rewritten node,
843 rather than just having Comes_From_Source set to False, which wasn't
846 2011-08-30 Robert Dewar <dewar@adacore.com>
848 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
849 g-socket.ads: Minor reformatting.
851 2011-08-30 Thomas Quinot <quinot@adacore.com>
853 * sem_util.adb: Minor reformatting.
855 2011-08-30 Tristan Gingold <gingold@adacore.com>
857 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
858 to be compliant with the ABI.
860 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
862 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
863 of a designated type when the related access type is an actual in an
864 instance. This ensures that the full view of designated type is
865 available when inside the body of the instance.
867 2011-08-30 Ed Schonberg <schonberg@adacore.com>
869 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
870 in a position to be modified, a slice is treated like an indexed
873 2011-08-30 Thomas Quinot <quinot@adacore.com>
875 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
876 field tv_sec in struct timeval.
878 2011-08-30 Yannick Moy <moy@adacore.com>
880 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
881 blocks of code doing full expansion, previously only guarded by
882 Expander_Active, by anding the test that ALFA_Mode is not set
884 2011-08-30 Ed Schonberg <schonberg@adacore.com>
886 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
887 add the function to the list of private dependents, for subsequent
888 legality check on Taft amendment types.
889 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
890 Private_Dependents, as for other incomplete types.
891 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
892 Taft-amendment type is used as the return type of a function.
894 2011-08-30 Javier Miranda <miranda@adacore.com>
896 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
897 which emits an error by a call to a new routine which report the error.
898 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
899 entity does not cover an existing interface.
900 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
902 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
903 protected procedures or entries whose mode is not conformant.
904 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
905 an error by a call to a new routine which report the error.
907 2011-08-30 Robert Dewar <dewar@adacore.com>
909 * gnat_rm.texi: Minor change.
910 * exp_attr_light.adb: Minor reformatting.
912 2011-08-30 Ed Schonberg <schonberg@adacore.com>
914 * sem_ch3.adb: Patch inheritance of aspects in
915 Complete_Private_Subtype, to avoid infinite loop.
917 2011-08-30 Javier Miranda <miranda@adacore.com>
919 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
920 been reported and a subprogram covering an interface primitive is not
921 found then skip generating the internal entity. Done to avoid crashing
923 (Check_Abstract_Overriding): Change text of error of wrong formal of
924 protected subprogram or entry. Done for consistency to emit exactly the
925 same error reported by Check_Synchronized_Overriding. In addition, the
926 error is restricted to protected types (bug found working on AI05-0090)
928 2011-08-30 Yannick Moy <moy@adacore.com>
930 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
931 expansion in Alfa mode.
932 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
933 * exp_light.adb, exp_light.ads: New package defining light expansion.
934 * expander.adb (Expand): Call light expansion in Alfa mode
935 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
937 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
939 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
940 * gnat1drv.adb (Adjust_Global_Switches): Comment
942 2011-08-30 Yannick Moy <moy@adacore.com>
944 * lib-xref-alfa.adb: Minor refactoring.
946 2011-08-30 Yannick Moy <moy@adacore.com>
948 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
950 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
951 expansion in Alfa mode.
952 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
955 2011-08-30 Robert Dewar <dewar@adacore.com>
957 * debug_a.adb: Update comment.
959 2011-08-30 Robert Dewar <dewar@adacore.com>
961 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
962 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
963 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
964 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
966 2011-08-30 Robert Dewar <dewar@adacore.com>
968 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
971 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
973 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
974 Build_Finalization_Master by supplying an insertion node and enclosing
975 scope. In its old version, the call did not generate a finalization
977 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
978 recognize anonymous access-to-controlled components. Rewrite the
979 machinery which creates finalization masters to service anonymous
980 access-to-controlled components of a record type. In its current state,
981 only one heterogeneous master is necessary to handle multiple anonymous
983 (Freeze_Type): Comment reformatting.
984 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
986 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
987 associates TSS primitive Finalize_Address with either the master itself
988 or with the internal hash table depending on the mode of operation of
991 2011-08-30 Javier Miranda <miranda@adacore.com>
993 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
994 interface type then do not generate code to compare this component.
995 Required since they have no components and their equality operator is
998 2011-08-30 Steve Baird <baird@adacore.com>
1000 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
1001 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
1002 returns the (static) accessibility level of the object. Otherwise, the
1003 same as Type_Access_Level.
1004 (Dynamic_Accessibility_Level): New function; given an expression which
1005 could occur as the rhs of an assignment to a saooaaat (i.e., an
1006 expression of an access-to-object type), return the new value for the
1007 saooaaat's associated Extra_Accessibility object.
1008 (Effective_Extra_Accessibility): New function; same as
1009 Einfo.Extra_Accessibility except that object renames are looked through.
1011 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
1012 (Dynamic_Accessibility_Level): New function; see sem_util.ads
1014 (Effective_Extra_Accessibility): New function; see sem_util.ads
1016 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
1017 (Extra_Accessibility): Update comments.
1018 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
1019 except RM_Size field (which is only for types) is unaffected.
1021 (Extra_Accessibility): Expand domain to allow objects, not just formals.
1022 (Set_Extra_Accessibility): Expand domain to allow objects, not just
1024 (Init_Size): Add assertion that we are not trashing the
1025 Extra_Accessibility attribute of an object.
1026 (Init_Size_Align): Add assertion that we are not trashing the
1027 Extra_Accessibility attribute of an object.
1028 (Init_Object_Size_Align): New procedure; see einfo.ads description.
1029 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
1030 differently for the type of a (non-library-level) saooaaat depending
1031 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
1032 is queried in this set of changes - everything else (in particular,
1033 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
1034 driven off of the setting of the Is_Local_Anonymous_Access attribute.
1035 The special treatment of library-level saooaaats is an optimization,
1036 not required for correctnesss. This is based on the observation that the
1037 Ada2012 rules (static and dynamic) for saooaaats turn out to be
1038 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
1040 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
1041 false for the type of a saooaaat, declare and initialize its
1042 accessibility level object and set the Extra_Accessibility attribute
1043 of the saooaaat to refer to this object.
1044 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1045 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1046 calls to Effective_Extra_Accessibility in order to support
1047 renames of saooaaats.
1048 (Expand_N_Type_Conversion): Add new local function,
1049 Has_Extra_Accessibility, and call it when determining whether an
1050 accessibility check is needed.
1051 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1052 evaluate to True (without raising an exception).
1054 (Expand_N_Assignment_Statement): When assigning to an Ada2012
1055 saooaaat, update its associated Extra_Accessibility object (if
1056 it has one). This includes an accessibility check.
1057 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1058 a saooaaat, update its Extra_Accessibility object too (if it
1060 (Expand_Call): Replace a couple of calls to Type_Access_Level
1061 with calls to Dynamic_Access_Level to handle cases where
1062 passing a literal (any literal) is incorrect.
1063 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1064 checks associated with "Saooaat := Some_Object'Access;"; this must
1065 be rejected if Some_Object is declared in a more nested scope
1067 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1068 assignment to a saooaaat even if Is_Local_Anonymous_Access
1069 returns False for its type (indicating a 2012-style saooaaat).
1071 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1072 (which is only appropriate for objects, not types) with a call
1073 of Init_Object_Size_Align in order to avoid trashing the
1074 Extra_Accessibility attribute of a rename (the two attributes
1077 (Valid_Conversion) Replace six calls to Type_Access_Level with
1078 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1079 Ada2012 non-library-level saooaaat, the former returns library level
1080 while the latter returns the (static) accessibility level of the
1081 saooaaat. A type conversion to the anonymous type of a saooaaat
1082 can only occur as part of an assignment to the saooaaat, so we
1083 know that such a conversion must be in a lhs context, so Deepest
1084 yields the result that we need. If such a conversion could occur,
1085 say, as the operand of an equality operator, then this might not
1086 be right. Also add a test so that static accessibilty checks are
1087 performed for converting to a saooaaat's type even if
1088 Is_Local_Anonymous_Access yields False for the type.
1090 2011-08-30 Javier Miranda <miranda@adacore.com>
1092 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1093 controls generation of a warning associated with late declaration of
1094 dispatching functions. Required to avoid generating spurious
1097 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1099 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1100 return object has an anonymous access type and the function's type is
1101 a named access type.
1102 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1103 conversions on implicit conversions, since such conversions can occur
1104 for anonymous access cases due to expansion. Issue error for attempt
1105 to rename an anonymous expression as an object of a named access type.
1106 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1107 to indicate whether this function should report errors on invalid
1109 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1110 the expression is of an anonymous access type and the expected type is
1111 a named general access type, rewrite the expression as a type
1112 conversion, unless this is an expression of a membership test.
1113 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1114 calling of Error_Msg_N on new formal Report_Errs.
1115 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1116 calling of Error_Msg_NE on new formal Report_Errs.
1117 (Valid_Conversion): Move declaration of this function to the package
1118 spec, to allow calls from membership test processing. For Ada 2012,
1119 enforce legality restrictions on implicit conversions of anonymous
1120 access values to general access types, disallowing such conversions in
1121 cases where the expression has a dynamic accessibility level (access
1122 parameters, stand-alone anonymous access objects, or a component of a
1123 dereference of one of the first two cases).
1124 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1125 in the context of a named general access expected type.
1126 * exp_ch4.adb Add with and use of Exp_Ch2.
1127 (Expand_N_In): Add processing for membership tests applied to
1128 expressions of an anonymous access type. First, Valid_Conversion is
1129 called to check whether the test is statically False, and then the
1130 conversion is expanded to test that the expression's accessibility
1131 level is no deeper than that of the tested type. In the case of
1132 anonymous access-to-tagged types, a tagged membership test is applied
1134 (Tagged_Membership): Extend to handle access type cases, applying the
1135 test to the designated types.
1136 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1137 accessibility level, and the actual is a 'Access applied to a current
1138 instance, pass the accessibility level of the type of the current
1139 instance rather than applying Object_Access_Level to the prefix. Add a
1140 ??? comment, since this level isn't quite right either (will eventually
1141 need to pass an implicit level parameter to init procs).
1143 2011-08-30 Bob Duff <duff@adacore.com>
1145 * s-taskin.ads: Minor comment fix.
1147 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1149 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1150 component and the selector is a dispatching operation, check if it is
1151 a prefixed call before rewriting as a parameterless function call.
1153 2011-08-29 Jakub Jelinek <jakub@redhat.com>
1155 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1156 tsystem.h into $(RTSDIR) instead of rts.
1158 2011-08-29 Robert Dewar <dewar@adacore.com>
1160 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1162 * gcc-interface/Make-lang.in: Update dependencies.
1164 2011-08-29 Yannick Moy <moy@adacore.com>
1166 * alfa.ads (Name_Of_Heap_Variable): New constant name.
1167 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1168 table to hold dereferences.
1169 (Add_ALFA_Xrefs): Take into account dereferences as special
1170 reads/writes to the variable "HEAP".
1171 (Enclosing_Subprogram_Or_Package): Move subprogram here.
1172 (Generate_Dereference): New procedure to store a read/write dereferencew
1174 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1175 the special "HEAP" var.
1176 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1178 * sem_util.adb (Note_Possible_Modification): Store write dereference
1181 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1183 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1184 ensures that the level of the subpool access type is not deeper than
1185 that of the pool object.
1186 * sem_util.adb (Object_Access_Level): Expand to handle defining
1188 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1189 subpool handle name of a rewritten allocator.
1191 2011-08-29 Robert Dewar <dewar@adacore.com>
1193 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1195 2011-08-29 Thomas Quinot <quinot@adacore.com>
1197 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1198 values, we generate multiple triples of parameters in the TypeCode.
1199 Bump Choice_Index for each such triple so that a subsequent default
1200 choice is associated with the correct index in the typecode.
1202 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1204 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1206 (First, Last): Handle properly an iterator over a null container.
1208 2011-08-29 Bob Duff <duff@adacore.com>
1210 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
1211 processing if we run across a node with no Scope. This can happen if
1212 we're with-ing an library-level instance, and that instance got errors
1213 that caused "instantiation abandoned".
1214 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
1215 an exception instead of using Assert, so it won't go into an infinite
1216 loop, even when assertions are turned off.
1218 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1220 * a-coorse.adb: Proper handling of empty ordered sets.
1222 2011-08-29 Johannes Kanig <kanig@adacore.com>
1224 * debug.adb: Add comments.
1226 2011-08-29 Thomas Quinot <quinot@adacore.com>
1228 * a-except.adb, a-except-2005.adb: Minor comment rewording and
1231 2011-08-29 Yannick Moy <moy@adacore.com>
1233 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
1234 declaration for Itypes in Alfa mode.
1236 2011-08-29 Robert Dewar <dewar@adacore.com>
1238 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
1239 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1240 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
1243 2011-08-29 Tristan Gingold <gingold@adacore.com>
1245 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
1247 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
1248 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
1251 2011-08-29 Robert Dewar <dewar@adacore.com>
1253 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
1255 2011-08-29 Javier Miranda <miranda@adacore.com>
1257 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
1258 renamings of formal subprograms when the actual for a formal type is
1261 2011-08-29 Matthew Heaney <heaney@adacore.com>
1263 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
1266 2011-08-29 Matthew Heaney <heaney@adacore.com>
1268 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
1269 components of record type.
1270 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
1273 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1275 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
1276 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
1279 2011-08-29 Robert Dewar <dewar@adacore.com>
1281 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
1284 2011-08-29 Matthew Heaney <heaney@adacore.com>
1286 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
1287 components of record type.
1289 2011-08-29 Bob Duff <duff@adacore.com>
1291 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
1292 by the termination handler.
1294 2011-08-29 Yannick Moy <moy@adacore.com>
1296 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
1297 created in Alfa mode, instead of inserting artificial declarations of
1298 non-Itypes in the tree.
1299 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
1300 know if an Itype has a corresponding declaration, as defined in
1303 2011-08-29 Yannick Moy <moy@adacore.com>
1305 * gnat1drv.adb: Minor rewrite.
1307 2011-08-29 Bob Duff <duff@adacore.com>
1309 * s-tasuti.adb (Make_Passive): Work around race condition in
1310 Make_Independent, which can cause Wait_Count to be zero. So instead of
1311 asserting that Wait_Count > 0, and then decrementing it, decrement it
1312 only if Wait_Count > 0.
1313 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
1314 should be nonnegative, so declare them Natural instead of Integer.
1316 2011-08-29 Robert Dewar <dewar@adacore.com>
1318 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
1319 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
1320 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
1321 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
1322 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
1324 2011-08-29 Tristan Gingold <gingold@adacore.com>
1326 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
1328 2011-08-29 Vadim Godunko <godunko@adacore.com>
1330 * s-parint.ads: Minor comment clarification.
1332 2011-08-29 Vincent Celier <celier@adacore.com>
1334 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
1335 may be used as identifiers.
1337 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1339 * a-coinho.ads: Minor reformating.
1341 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1343 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
1344 container of a derived type.
1346 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1348 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1349 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
1351 2011-08-29 Pascal Obry <obry@adacore.com>
1353 * exp_disp.adb: Minor comment fix.
1354 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
1355 to avoid warnings when compiling with -Wall.
1356 (Make_Disp_Conditional_Select_Body): Likewise.
1357 (Make_Disp_Timed_Select_Body): Likewise.
1359 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1361 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
1362 an entity name, generate reference for it.
1364 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1366 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
1368 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
1369 the class-wide type.
1370 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
1372 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1374 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
1375 subtype for an object whose type is an unconstrained union.
1377 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1379 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
1380 is allowed in a component definition, by AI95-406.
1382 2011-08-29 Matthew Heaney <heaney@adacore.com>
1384 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
1386 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1388 * a-except-2005.adb: Alphabetize all routines.
1389 (Triggered_By_Abort): New routine.
1390 * a-except-2005.ads (Triggered_By_Abort): New routine.
1391 * a-except.adb Alphabetize all routines.
1392 (Triggered_By_Abort): New routine.
1393 * a-except.ads (Triggered_By_Abort): New routine.
1394 * exp_ch7.adb: Update all comments involving the detection of aborts in
1396 (Build_Object_Declarations): Do not generate code to detect the
1397 presence of an abort at the start of finalization code, use a runtime
1399 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
1401 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
1402 allocate a task on a subpool.
1403 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
1404 The flag disables all actions related to the maintenance of
1405 Finalize_Address_Table when subpools are not in use.
1406 (Allocate_Any_Controlled): Signal the machinery that subpools are in
1408 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
1409 performs costly task locking when subpools are not in use.
1411 2011-08-29 Yannick Moy <moy@adacore.com>
1413 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
1414 types and dispatching calls in Alfa mode.
1415 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
1416 correspondance between body and spec scopes, to reuse utility functions
1417 (Traverse_Declarations_Or_Statements): Protect access to body for stub
1418 by testing the presence of the library unit for the body
1419 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
1420 mode the expansion of accept statements is skipped
1421 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
1422 the unique entity corresponding to the one returned by
1423 Unique_Defining_Entity applied to the enclosing declaration of the
1426 2011-08-29 Bob Duff <duff@adacore.com>
1428 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
1429 gdb when x is not a node (it can be a node list, name_id, etc). pp is
1430 an alias for pn. ppp is an alias for pt.
1432 2011-08-29 Javier Miranda <miranda@adacore.com>
1434 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
1435 aggregate to take a consistent decision on the need to convert into
1436 assignments aggregates that initialize constant objects.
1438 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1440 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
1441 Build_Allocate_Deallocate_Proc in order to handle allocation of
1442 non-controlled objects on subpools.
1443 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
1444 to be end-user visible.
1445 * s-finmas.adb: Add with and use clause for System.HTable.
1446 Add an instantiation of Simple_HTable which provides a mapping between
1447 the address of a controlled object and the corresponding
1448 Finalize_Address used to clean up the object. The table is used when a
1449 master is operating in heterogeneous mode.
1450 (Attach): Explain why the input node is not verified on being already
1452 (Delete_Finalize_Address): New routine.
1453 (Detach): Add pragma Assert which ensures that a node is already
1455 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
1456 since nodes are no longer removed on traversal. Explain why node
1457 detachment is undesirable in this case.
1458 (Get_Finalize_Address): New routine.
1459 (Hash): New routine.
1460 (Is_Empty_List): Removed.
1461 (pm): Renamed to Print_Master. Add output for discriminant
1463 Comment reformatting.
1464 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1465 * s-finmas.ads: Various comments additions / improvements.
1466 Type Finalization_Master has a discriminant which determines the mode of
1468 (Delete_Finalize_Address): New routine.
1469 (Get_Finalize_Address): New routine.
1470 (pm): Renamed to Print_Master.
1471 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1472 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
1473 use clause for System.IO.
1474 (Allocate_Any_Controlled): Add machinery to set TSS primitive
1475 Finalize_Address depending on the mode of allocation and the mode of
1477 (Deallocate_Any_Controlled): Remove the relation pair object -
1478 Finalize_Address regardless of the master mode. Add comment explaining
1480 (Detach): Ensure that fields Prev and Next are null after detachment.
1481 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1482 scheme to check whether the list of subpools is empty. There is no
1483 longer need to store the next subpool or advance the current pointer.
1484 (Is_Empty_List): New routine.
1485 (Print_Pool): New routine.
1486 (Print_Subpool): New routine.
1487 * s-stposu.ads: Various comments additions / improvements.
1488 Field Master of type Root_Subpool is now a heterogeneous collection.
1489 (Print_Pool): New routine.
1490 (Print_Subpool): New routine.
1492 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1494 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1495 forms, using aspects of container types.
1496 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1497 Has_Implicit_Dereference flags, that may be set on the partial view.
1498 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1499 container type with an indexing aspect.
1500 (Analyze_Quantified_Expression): Analyze construct with expansion
1501 disabled, because it will be rewritten as a loop during expansion.
1502 (Try_Container_Indexing): The prefix itself may be a container type
1503 with an indexing aspect, as with a vector of vectors.
1504 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1505 the original doamin of iteration, for name capture.
1506 (Analyze_Iterator_Specification): If the domain is an expression that
1507 needs finalization, create a separate declaration for it.
1508 For an iterator with "of" retrieve default iterator info from aspect of
1509 container type. For "in" iterator, retrieve type of Iterate function.
1510 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1511 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1512 analysis, to prevent spurious errors about late attributes.
1513 * sprint.adb: Handle quantified expression with either loop or iterator
1515 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1518 2011-08-29 Vincent Celier <celier@adacore.com>
1520 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1521 Binder or Linker of the main project file.
1523 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1525 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1528 2011-08-29 Yannick Moy <moy@adacore.com>
1530 * exp_ch9.adb: Partial revert of previous change for Alfa mode
1532 2011-08-29 Yannick Moy <moy@adacore.com>
1534 * exp_ch11.adb: Minor expansion of comment.
1536 2011-08-29 Yannick Moy <moy@adacore.com>
1538 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1540 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1542 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1543 interpretation, set the type before resolving the operands, because
1544 legality checks on an exponention operand need to know the type of the
1547 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1549 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1550 cleanups on a master if the instance is within a generic unit.
1551 Complement to the corresponding fix to inline.adb for K520-030.
1553 2011-08-29 Tristan Gingold <gingold@adacore.com>
1555 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1557 * exp_intr.adb: Minor comment fix.
1559 2011-08-29 Bob Duff <duff@adacore.com>
1561 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1562 Delay_Required was used as an uninitialized variable.
1564 2011-08-29 Robert Dewar <dewar@adacore.com>
1566 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1567 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1568 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1570 2011-08-29 Thomas Quinot <quinot@adacore.com>
1572 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1573 Remove unused variables.
1575 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1577 * sem_res.adb: Remove Build_Explicit_Dereference.
1578 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1579 from sem_res.adb, used in analysis of additional constructs.
1580 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1581 expansion of iterators.
1582 (Is_Object_Reference): Recognize variables rewritten as explicit
1583 dereferences in Ada2012.
1584 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1585 Reversible_Iterator names, for expansion of Ada2012 iterators.
1586 * aspects.ads, aspects.adb (Find_Aspect): Utility.
1587 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1588 linked list container.
1589 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1590 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1592 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1594 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1597 2011-08-29 Vincent Celier <celier@adacore.com>
1599 * make.adb (Gnatmake): Get the maximum number of simultaneous
1600 compilation processes after the Builder switches has been scanned, as
1601 there may include -jnn.
1603 2011-08-29 Matthew Heaney <heaney@adacore.com>
1605 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1607 2011-08-29 Tristan Gingold <gingold@adacore.com>
1609 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1610 GNAT_DRIVER_COMMAND_LINE to 255.
1612 2011-08-29 Pascal Obry <obry@adacore.com>
1614 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1615 reformatting and style fix (class attribute casing).
1617 2011-08-29 Yannick Moy <moy@adacore.com>
1619 * exp_ch11.adb: Yet another case where expansion should be common
1620 between CodePeer and Alfa.
1622 2011-08-29 Yannick Moy <moy@adacore.com>
1624 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1626 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1628 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1629 incomplete type and its completion match.
1631 2011-08-29 Yannick Moy <moy@adacore.com>
1633 * exp_ch13.adb: Adjust previous change.
1635 2011-08-29 Robert Dewar <dewar@adacore.com>
1637 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1638 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1641 2011-08-29 Emmanuel Briot <briot@adacore.com>
1643 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1644 initialize aggregated projects.
1646 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1648 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1649 depth of candidates to resolve a potentially spurious ambiguity between
1650 two visible subprograms.
1652 2011-08-29 Yannick Moy <moy@adacore.com>
1654 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1656 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1657 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1660 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1662 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1665 2011-08-29 Thomas Quinot <quinot@adacore.com>
1667 * sem_res.adb: Minor reformatting.
1669 2011-08-29 Johannes Kanig <kanig@adacore.com>
1671 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1673 * gnat1drv.adb (Adjust_Global_Switches): Set
1674 Use_Expressions_With_Actions to False in ALFA mode.
1675 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1678 2011-08-29 Yannick Moy <moy@adacore.com>
1680 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1681 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1682 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1683 tagged types and dispatching calls in Alfa mode.
1685 2011-08-29 Javier Miranda <miranda@adacore.com>
1687 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1688 we do not report an error on an Empty node.
1690 2011-08-29 Geert Bosch <bosch@adacore.com>
1692 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1693 a-nlrear.o and a-nurear.o.
1695 2011-08-29 Robert Dewar <dewar@adacore.com>
1697 * freeze.adb: Minor code reorganization.
1699 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1700 sem_ch6.adb: Minor reformatting
1702 2011-08-29 Tristan Gingold <gingold@adacore.com>
1704 * s-except.ads, s-except.adb: Provide dummy body.
1706 2011-08-29 Yannick Moy <moy@adacore.com>
1708 * sem_warn.adb (Within_Postcondition): Take into account the case of
1709 an Ensures component in a Test_Case.
1711 2011-08-29 Tristan Gingold <gingold@adacore.com>
1713 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1714 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1715 System_Exceptions_Debug
1716 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1717 * a-except.adb: With and use System.Exceptions_Debug instead of
1719 * a-except-2005.adb: Likewise.
1720 * s-assert.adb: Likewise.
1721 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1722 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
1723 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1724 s-excdeb. Update dependencies.
1725 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1726 as these no longer need external libraries.
1728 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1730 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1731 exponentiation operator on universal values in a context that requires
1734 2011-08-29 Tristan Gingold <gingold@adacore.com>
1736 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
1737 before calling notify_handled_exception.
1738 * a-exextr.adb: Fix comment.
1740 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1742 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
1743 Finalize_Address of the access type's finalization master.
1744 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
1745 access type's finalization master. Add a guard to prevent
1746 Associated_Storage_Pool from being set on .NET/JVM.
1747 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
1748 attribute Finalize_Address of the access type's finalization master.
1749 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
1750 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
1751 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
1753 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
1754 use clause for System.IO
1755 (Detach): Relax the assertion, to be reinstated later.
1756 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
1757 Relax the assertion on Finalize_Address, to be reinstated later.
1758 (Is_Empty_List): New routine.
1759 (pm): New debug routine.
1760 (Set_Finalize_Address): New routine.
1761 * s-finmas.ads (pm): New debug routine.
1762 (Set_Finalize_Address): New routine.
1763 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
1765 2011-08-29 Tristan Gingold <gingold@adacore.com>
1767 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
1768 Remove convention C.
1770 2011-08-29 Tristan Gingold <gingold@adacore.com>
1772 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
1773 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
1774 (Finalize_TCB): Remove its finalization.
1775 (Initialize): Remove assignment of GET_Exc_Stack_Addr
1776 * s-soflin.adb (NT_Exc_Stack): Remove
1777 (Get_Exc_Stack_Addr_NT): Likewise.
1778 (Get_Exc_Stack_Addr_Soft): Likewise.
1779 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
1780 (Get_Exc_Stack_Addr): Likewise.
1781 (Get_Exc_Stack_Addr_Soft): Likewise
1782 * s-taspri-vms.ads (Exc_Stack_T): Remove.
1783 (Exc_Stack_Ptr_T): Likewise.
1784 (Private_Data): Remove Exc_Stack_Ptr component.
1786 2011-08-29 Tristan Gingold <gingold@adacore.com>
1788 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
1790 2011-08-29 Tristan Gingold <gingold@adacore.com>
1792 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
1794 2011-08-29 Geert Bosch <bosch@adacore.com>
1796 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
1797 L2_Norm, Swap_Column): New generic subprograms
1798 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
1799 L2_Norm, Swap_Column): Implement new subprograms in order to
1800 eliminate dependency on BLAS and LAPACK libraries in
1801 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
1802 version. Forward_Eliminate/Back_Substitute can be used to put a
1803 matrix in row echelon or reduced row echelon form using partial
1805 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1806 Swap_Column): Instantiate from System.Generic_Array_Operations.
1807 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1808 (Sqrt): Local function for simple computation of square root without
1809 adding dependencies on Generic_Elementary_Functions.
1810 (Swap): New subprogram to exchange floating point numbers.
1811 (Inverse): Reimplement using Jordan-Gauss elimination.
1812 (Jacobi): New procedure implementing Jacobi's method for computation
1813 of eigensystems, based on Rutishauser's implementation.
1814 (L2_Norm): Implement directly using the inner product.
1815 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1816 decreasing eigenvalue as required by the Ada RM.
1817 (Swap_Column): New helper procedure for Sort_Eigensystem.
1818 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1819 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1822 2011-08-29 Thomas Quinot <quinot@adacore.com>
1824 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1827 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1829 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1830 than the current node.
1831 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1832 Finalization_Master. The list headers have two fields instead of three.
1833 This should fix alignment issue but subpool allocations are now
1834 unusable. Alphabetize subprograms.
1835 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1836 the size of the header when converting the beginning of the object to
1837 a FM_Node. Set the master's Finalize_Address attribute if not already
1839 (Deallocate_Any_Controlled): Use the offset rather than the size of the
1840 header when converting the beginning of the object to a FM_Node.
1842 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1844 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1845 reraise when compiling for CodePeer.
1847 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1849 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1850 now needed by a-convec.adb. Fix warning.
1852 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1854 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1855 processing of TSS routine Finalize_Address when compiling in
1858 2011-08-29 Thomas Quinot <quinot@adacore.com>
1860 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1861 sem_warn.adb: Minor reformatting.
1863 2011-08-29 Emmanuel Briot <briot@adacore.com>
1865 * prj-conf.adb (Get_Config_Switches): Also collect the list of
1866 languages from aggregated projects.
1868 2011-08-29 Yannick Moy <moy@adacore.com>
1870 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1871 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1872 Traverse_Package_Declaration, Traverse_Subprogram_Body,
1873 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1874 for stubs are traversed too when parameter is set
1875 (Traverse_All_Compilation_Units): Traverse without going inside stubs
1876 (Traverse_Declarations_Or_Statements): Do the special traversing for
1877 stubs when required.
1878 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1879 return subprogram or package body from stub.
1880 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1881 stubs without prior subprogram decl.
1883 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1885 * gnat_ugn.texi: Fix typo.
1887 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1889 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1890 which accounts for size vs alignment issues and calculates the size of
1892 (Deallocate_Any_Controlled): Ditto.
1893 (Nearest_Multiple_Rounded_Up): New routine.
1895 2011-08-29 Tristan Gingold <gingold@adacore.com>
1897 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1898 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1899 (Set_Exception_Msg): Ditto.
1900 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
1902 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1903 Use Save_Occurrence instead of Save_Occurrence_No_Private.
1904 (Raise_With_Msg): Remove Cleanup_Flag.
1905 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1906 Clean_Flag and Private_Data components.
1908 2011-08-29 Yannick Moy <moy@adacore.com>
1910 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1912 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1913 of an explicitly declared type, so that the base types of the original
1914 type and this generated type are the same, and a "type" (not a subtype
1916 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1917 small" in Alfa mode, like in CodePeer mode.
1918 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1919 clauses in Alfa mode.
1921 2011-08-29 Javier Miranda <miranda@adacore.com>
1923 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1924 function to the package spec.
1925 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1926 internally generated bodies of null procedures locate the internally
1927 generated spec enforcing mode conformance.
1928 (Is_Interface_Conformant): Ensure that the controlling formal of the
1931 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1933 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1934 reject the pragma if it appears to apply to a formal subprogram.
1936 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1938 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1939 inner expression, to prevent double evaluation.
1941 2011-08-29 Tristan Gingold <gingold@adacore.com>
1943 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1945 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1946 * a-except-2005.adb (Propagate_Exception): Adjust spec.
1947 (Raise_Current_Excep): Adjust call.
1948 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1950 2011-08-29 Thomas Quinot <quinot@adacore.com>
1952 * exp_disp.adb: Minor reformatting.
1954 2011-08-29 Tristan Gingold <gingold@adacore.com>
1956 * a-exexpr.adb (Setup_Exception): Removed.
1957 * a-exexpr-gcc.adb (Setup_Exception): Removed.
1958 * a-except.adb (Exception_Propagation): Removed.
1959 * a-except-2005.adb (Setup_Exception): Removed.
1960 (Reraise): Remove call to Setup_Exception.
1961 (Reraise_Occurrence): Ditto.
1962 (Reraise_Occurrence_Always): Ditto.
1963 (Reraise_Occurrence_No_Defer): Ditto.
1964 (Transfer_Occurrence): Ditto.
1965 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1966 (Set_Exception_Msg): Ditto.
1968 2011-08-29 Robert Dewar <dewar@adacore.com>
1970 * a-convec.adb, exp_disp.adb: Minor reformatting.
1972 2011-08-29 Tristan Gingold <gingold@adacore.com>
1974 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1976 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1978 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1979 Exception_Handlers to No_List instead of Empty_List in the case where
1980 there are no handlers.
1982 2011-08-29 Tristan Gingold <gingold@adacore.com>
1984 * gcc-interface/gigi.h (enum standard_datatypes): Add
1985 ADT_reraise_zcx_decl
1986 (reraise_zcx_decl): New macro.
1987 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1988 (gigi): Set reraise_zcx_decl.
1989 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
1990 (gnat_to_gnu): Handle N_Raise_Statement.
1992 2011-08-29 Robert Dewar <dewar@adacore.com>
1994 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
1995 a-undesu.adb: Minor reformatting.
1997 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1999 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
2000 table, accept an unfrozen untagged component if it is an actual for a
2001 formal incomplete type.
2002 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
2003 provide new iterator forms over vectors.
2004 Introduce type Iterator in package body to implement operations of
2005 Reversible_Iterator interface.
2006 * a-iteint.ads: Make package pure so it is usable with new container
2007 packages, that are categorized Remote_Types.
2009 2011-08-29 Robert Dewar <dewar@adacore.com>
2011 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
2013 2011-08-29 Bob Duff <duff@adacore.com>
2015 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
2016 of <>, because this is the routine that checks for dimensionality
2017 errors (for example, for a two-dimensional array, (others => <>) should
2018 be (others => (others => <>)).
2020 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2022 * impunit.adb: Add new run-time units.
2023 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
2024 s-stposu.ads, s-stposu.adb: Code clean up.
2025 Handle protected class-wide or task class-wide types
2026 Handle C/C++/CIL/Java types.
2027 * s-spsufi.adb, s-spsufi.ads: New files.
2029 2011-08-29 Yannick Moy <moy@adacore.com>
2031 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
2032 library-level subprogram.
2033 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
2035 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
2037 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
2039 * gnat_rm.texi: Update doc for Test_Case pragma.
2041 2011-08-29 Tristan Gingold <gingold@adacore.com>
2043 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2045 (GCC_Exception_Access): New type.
2046 (Unwind_DeleteException): New imported procedure
2047 (Foreign_Exception): Import it.
2048 (GNAT_GCC_Exception): Simply have the occurrence inside.
2049 (To_GCC_Exception): New function.
2050 (To_GNAT_GCC_Exception): New function.
2051 (GNAT_GCC_Exception_Cleanup): New procedure..
2052 (Propagate_GCC_Exception): New procedure.
2053 (Reraise_GCC_Exception): New procedure.
2054 (Setup_Current_Excep): New procedure.
2055 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2056 (Unwind_RaiseException): Ditto.
2057 (Unwind_ForcedUnwind): Ditto.
2059 (Begin_Handler): Change type of parameter.
2060 (End_Handler): Ditto. Now delete the exception if still present.
2061 (Setup_Key): Removed.
2062 (Is_Setup_And_Not_Propagated): Removed.
2063 (Set_Setup_And_Not_Propagated): Ditto.
2064 (Clear_Setup_And_Not_Propagated): Ditto.
2065 (Save_Occurrence_And_Private): Ditto.
2066 (EID_For): Add 'not null' constraint on parameter.
2067 (Setup_Exception): Does nothing.
2068 (Propagate_Exception): Simplified.
2069 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2070 re-raise is not expanded anymore.
2071 * s-except.ads (Foreign_Exception): New exception - placeholder for
2073 * raise-gcc.c (__gnat_setup_current_excep): Declare
2074 (CXX_EXCEPTION_CLASS): Define (not yet used)
2075 (GNAT_EXCEPTION_CLASS): Define.
2076 (is_handled_by): Handle foreign exceptions.
2077 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2079 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2081 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2083 2011-08-29 Thomas Quinot <quinot@adacore.com>
2085 * a-synbar-posix.adb: Minor reformatting.
2087 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2089 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2090 a-exetim-default.ads (Interrupt_Clocks_Supported,
2091 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2092 definitions to be compliant with AI-0171. The target systems do not
2093 support separate account for the execution time of interrupt handlers.
2095 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2097 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2098 in the barrier to put first the easiest to evaluate (and the one which
2099 will be True more often). More efficient.
2101 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2103 * s-atocou-x86.adb: Fix constraint in machine code insertion.
2105 2011-08-29 Bob Duff <duff@adacore.com>
2107 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2108 attributes that are now aspects, as specified by AI05-0229-1.
2109 * sem_ch13.adb (Analyze_Aspect_Specifications,
2110 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2111 pragmas or attribute references, as appropriate.
2113 2011-08-29 Robert Dewar <dewar@adacore.com>
2115 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2116 a-synbar-posix.ads: Minor reformatting.
2118 2011-08-29 Yannick Moy <moy@adacore.com>
2120 * snames.ads-tmpl: Add name Force.
2122 2011-08-29 Pascal Obry <obry@adacore.com>
2124 * prj-nmsc.adb: Minor reformatting.
2126 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2128 * a-exetim.ads (Interrupt_Clocks_Supported,
2129 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2130 definitions to be compliant with AI-0171.
2132 2011-08-29 Robert Dewar <dewar@adacore.com>
2134 * a-ngelfu.adb: Add comments.
2136 2011-08-29 Geert Bosch <bosch@adacore.com>
2138 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2139 the closest machine number to Pi / 2.0.
2141 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2143 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2144 package Ada.Synchronous_Barriers.
2145 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2146 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2147 default implementation using protected objects and another one
2148 a-synbar-posix using POSIX barriers as the underlying support.
2149 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2150 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2151 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2152 Clean up dependencies.
2153 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2155 2011-08-29 Robert Dewar <dewar@adacore.com>
2157 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2158 exp_dist.adb: Minor code reorganization.
2161 2011-08-29 Thomas Quinot <quinot@adacore.com>
2163 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2164 primitive operation must support external streaming if it is not a
2165 controlling access result.
2167 2011-08-29 Thomas Quinot <quinot@adacore.com>
2169 * sinfo.ads, sem_ch7.adb: Minor reformatting.
2171 2011-08-29 Bob Duff <duff@adacore.com>
2173 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2174 restriction on allocators, as required by AI05-0013-1.
2175 * restrict.ads: Minor comment fix.
2177 2011-08-29 Tristan Gingold <gingold@adacore.com>
2179 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2180 (To_Jmpbuf_Address): Ditto
2181 (builtin_longjmp): Ditto
2183 2011-08-29 Thomas Quinot <quinot@adacore.com>
2185 * sem_res.adb: Minor reformatting.
2187 2011-08-29 Vincent Celier <celier@adacore.com>
2189 * make.adb (Gnatmake): Move special processing for VM targets after the
2190 call to Get_Target_Parameters.
2192 2011-08-29 Thomas Quinot <quinot@adacore.com>
2194 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2196 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2198 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2199 where an anonymous access discriminant of a limited designated type
2200 appears in a non-immutably limited discriminated type and issue an
2201 error message. Add local variable Desig_T and replace all occurrences
2204 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2206 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2207 implementation is compliant to RM D.15(15/2) after the modification
2208 imposed by AI05-0094-1 (binding interpretation).
2210 2011-08-29 Robert Dewar <dewar@adacore.com>
2212 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
2213 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
2215 2011-08-29 Thomas Quinot <quinot@adacore.com>
2217 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
2218 the scope name, do not report a missing label as a style violation (it
2219 will be diagnosed as an illegality).
2220 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
2221 variant records: Get_Enum_Lit_From_Pos already returns a usage
2222 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
2223 on Expr in Integer_Literal case so that it can be used by
2226 2011-08-29 Tristan Gingold <gingold@adacore.com>
2228 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
2230 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
2231 (Build_Abort_Block_Handler): New function to build an Abort_Signal
2233 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
2234 Build_Abort_Block_Handler to build the exception handler. Do not
2235 undefer aborts for the Abort_Signal exception handler if back-end
2236 exception mechanism.
2237 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
2238 back_end exceptions for all others and abort_signal.
2239 * s-except.ads (ZCX_By_Default): New constant.
2240 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
2241 (Raise_Exception_Always): Ditto.
2242 (Raise_From_Signal_Handler): Ditto.
2243 (Raise_With_Location_And_Msg): Ditto.
2244 (Raise_With_Msg): Ditto.
2246 (Reraise_Occurence): Ditto.
2247 (Reraise_Occurrence_Always): Ditto.
2248 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
2249 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
2251 2011-08-29 Thomas Quinot <quinot@adacore.com>
2253 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
2255 2011-08-29 Robert Dewar <dewar@adacore.com>
2257 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
2258 Minor code reorganization.
2260 2011-08-29 Bob Duff <duff@adacore.com>
2262 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
2263 2012, not just Ada 2005.
2265 2011-08-29 Vincent Celier <celier@adacore.com>
2267 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
2268 with a project file or with gprbuid, if -gnatep= is specified, the
2269 builder may need to be invoked with -x.
2271 2011-08-29 Tristan Gingold <gingold@adacore.com>
2273 * a-exexpr-gcc.adb: Minor comment fix.
2275 2011-08-29 Robert Dewar <dewar@adacore.com>
2277 * sem_ch8.adb: Minor reformatting.
2279 2011-08-29 Bob Duff <duff@adacore.com>
2281 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
2282 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
2283 treating "some" as unreserved in earlier Ada versions. This is now
2284 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
2285 rather than Name_Some, since Tok_Some is now recognized as reserved.
2286 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
2288 * scans.ads: Minor comment fixes.
2289 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
2290 for other language versions.
2291 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
2292 treating "some" as unreserved in earlier Ada versions. This is now
2293 handled in Snames.Is_Keyword_Name.
2294 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
2296 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
2297 unreserved in earlier Ada versions. This is now handled in
2298 Snames.Is_Keyword_Name.
2299 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
2300 words as for other language versions.
2301 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
2302 Ada 2012, not just Ada 2005.
2304 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2306 * sem_ch13.adb: Additional semantic checks for aspects involved in
2309 2011-08-29 Matthew Heaney <heaney@adacore.com>
2311 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
2312 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
2313 Container parameter.
2314 (Ancestor_Find): ditto.
2316 2011-08-29 Thomas Quinot <quinot@adacore.com>
2318 * par-endh.adb: Minor reformatting.
2320 2011-08-29 Tristan Gingold <gingold@adacore.com>
2322 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
2323 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
2324 (Adjust_N_CLeanups_For): Remove.
2325 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
2327 (Propgate_Exception): Adjust.
2328 * raise-gcc.c: Add a few static/const.
2329 (Adjust_N_Cleanups_For): Remove declaration.
2330 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
2332 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2334 * sem_ch8.adb: Use type of function return when rewriting as object
2337 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2339 * sem_type.adb: Minor reformatting.
2341 2011-08-29 Robert Dewar <dewar@adacore.com>
2343 * makeutl.adb: Minor reformatting.
2345 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2347 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
2348 function call of a limited type, the expansion of the renaming is
2349 complicated by the presence of various temporaries and subtypes that
2350 capture constraints of the renamed object.
2351 Rewrite node as an object declaration, whose expansion is simpler.
2352 Given that the object is limited there is no copy involved and no
2355 2011-08-29 Robert Dewar <dewar@adacore.com>
2357 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
2358 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
2360 2011-08-29 Tristan Gingold <gingold@adacore.com>
2362 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
2363 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
2364 system-linux-hppa.ads, system-linux-s390.ads,
2365 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
2366 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
2367 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
2368 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
2369 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
2370 system-solaris-sparc.ads, system-lynxos-x86.ads,
2371 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
2372 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
2373 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
2374 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
2375 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
2376 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
2377 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
2378 * opt.ads: Adjust comment.
2379 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
2380 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
2381 * system.ads: Move GCC_ZCX_Support to obsolete entries.
2383 2011-08-29 Emmanuel Briot <briot@adacore.com>
2385 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
2386 file name is specified on the gnatmake or gprbuild command line, and
2387 before we search for that file in the project.
2389 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2391 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
2392 used to determine whether a possible interpretation for an overloadable
2393 entity is declared within the current instantiation and should be
2394 included in the candidate set.
2396 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2398 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
2400 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2402 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
2403 access subtype is access_to_subprogram, when applying checks for
2406 2011-08-29 Matthew Heaney <heaney@adacore.com>
2408 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
2409 for sibling when common parent.
2411 2011-08-29 Thomas Quinot <quinot@adacore.com>
2413 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
2416 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2418 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
2419 for the return type when in ASIS mode.
2421 2011-08-29 Vincent Celier <celier@adacore.com>
2423 * make.adb (Gnatmake): Get the default search dirs, then the target
2424 parameters after getting the Builder switches, as the Builder switches
2425 may include --RTS= and that could change the default search dirs.
2427 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2429 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
2430 Make_Final_Call. Move the processing for class-wide types before the
2431 processing for derivations from [Limited_]Controlled.
2432 (Make_Final_Call): Move the processing for class-wide types before the
2433 processing for derivations from [Limited_]Controlled.
2434 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
2435 Add code to account for alignments larger than the list header. Add a
2436 comment illustrating the structure of the allocated object + padding +
2438 (Deallocate_Any_Controlled): Add code to account for alignments larger
2439 than the list header.
2441 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2443 * sinfo.ads, sinfo.adb: New node kind
2444 N_Formal_Incomplete_Type_Definition, related flags.
2445 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
2446 Parse formal incomplete types.
2447 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
2449 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
2450 Formal incomplete types do not need completion.
2451 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
2452 Validate_Incomplete_Type_Instance): New procedures to handle formal
2454 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
2455 that corresponds to a formal incomplete type.
2456 * sprint.adb: Handle formal incomplete type declarations.
2457 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
2460 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2462 * a-fihema.ads, a-fihema.adb: Unit removed.
2463 * a-undesu.ads, a-undesu.adb: New unit implementing
2464 Ada.Unchecked_Deallocate_Subpool.
2465 * einfo.adb: Remove Associated_Collection from the node usage.
2466 Add Finalization_Master to the node usage.
2467 (Associated_Collection): Removed.
2468 (Finalization_Master): New routine.
2469 (Set_Associated_Collection): Removed.
2470 (Set_Finalization_Master): New routine.
2471 (Write_Field23_Name): Remove Associated_Collection from the output. Add
2472 Finalization_Master to the output.
2473 * einfo.ads: Remove attribute Associated_Collection and its uses in
2475 Add new attribute Finalization_Master along with its uses in entitites.
2476 (Associated_Collection): Removed along with its pragma import.
2477 (Finalization_Master): New routine along with a pragma import.
2478 (Set_Associated_Collection): Removed along with its pragma import.
2479 (Set_Finalization_Master): New routine along with a pragma import.
2480 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2481 Build_Finalization_Collection with Build_Finalization_Master.
2482 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2483 before the bodies of the predefined routines. Add comment explaining
2484 this. Replace call to Build_Finalization_Collection with
2485 Build_Finalization_Master.
2486 (Freeze_Type): Replace call to Build_Finalization_Collection with
2487 Build_Finalization_Master.
2488 (Make_Finalize_Address_Body): Comment reformatting.
2489 (Make_Predefined_Primitive_Specs): Code reformatting.
2490 (Stream_Operation_OK): Update comment mentioning finalization
2491 collections. Replace RE_Finalization_Collection with
2492 RE_Finalization_Master.
2493 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2494 Associated_Collection with Finalization_Master. Replace call to
2495 Build_Finalization_Collection with Build_Finalization_Master.
2496 (Expand_Allocator_Expression): Replace call to Associated_Collection
2497 with Finalization_Master. Replace call to Set_Associated_Collection with
2498 Set_Finalization_Master. Remove the generation of
2499 Set_Finalize_Address_Ptr.
2500 (Expand_N_Allocator): Replace call to Associated_Collection with
2501 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2502 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2503 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2504 comment on usage. Replace call to Needs_BIP_Collection with
2505 Needs_BIP_Finalization_Master Remplace BIP_Collection with
2506 BIP_Finalization_Master. Update all comments which mention finalization
2507 collections. Replace Associated_Collection with
2508 Finalization_Master. Replace Build_Finalization_Collection with
2509 Build_Finalization_Master.
2510 (BIP_Formal_Suffix): Update BIP_Collection's case.
2511 (Build_Heap_Allocator): Update the related comment. Rename local
2512 variable Collect to Fin_Mas_Id and update its occurrences. Update
2513 comments which mention finalization collections. Replace
2514 Set_Associated_Collection with Set_Finalization_Master.
2515 (Expand_Call): Update the code which detects a special piece of library
2517 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2518 Add_Collection_Actual_To_Build_In_Place_Call with
2519 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2520 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2521 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2522 Add_Collection_Actual_To_Build_In_Place_Call with
2523 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2524 (Make_Build_In_Place_Call_In_Assignment): Replace call to
2525 Add_Collection_Actual_To_Build_In_Place_Call with
2526 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2527 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2528 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2529 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2530 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2531 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2532 Replace call to Set_Associated_Collection with Set_Finalization_Master.
2533 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2534 Replace the call to Associated_Collection with Finalization_Master.
2535 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2536 Update the way finalization master names are generated. Update the
2537 retrieval of the correct access type which will carry the pool and
2539 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2540 (Make_Finalize_Address_Body): Abstract types do not need
2541 Finalize_Address. Code reformatting.
2542 (Make_Finalize_Address_Stmts): Update comment on usage.
2543 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2544 (Process_Declarations): Update comments.
2545 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2546 Build_Finalization_Master. Update associated comment.
2547 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2548 * exp_ch13.adb: Update comments which mention finalization collections.
2549 (Expand_N_Free_Statement): Replace the call to Associated_Collection
2550 with Finalization_Master.
2551 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2552 create calls to routines Allocate_Any_Controlled and
2553 Deallocate_Any_Controlled.
2554 (Find_Finalize_Address): New routine.
2555 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2557 (Requires_Cleanup_Actions): Update the comment on freeze node
2559 * exp_util.ads: Remove comment on generated code for
2560 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2561 is better to simply look in the body.
2562 * freeze.adb (Freeze_All): Update the comment of finalization
2563 collections. Replace the call to Associated_Collection with
2564 Finalization_Master. Replace the call to Build_Finalization_Collection
2565 with Build_Finalization_Master.
2566 * impunit.adb: Add a-undesu and s-stposu to the list of units.
2567 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2569 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2570 Ada.Finalization. Add processing for children of System.Storage_Pools.
2571 * rtsfind.ads: Remove the naming of second level children of
2573 Remove Ada_Finalization_Heap_Management from the list of units.
2574 Remove subtype Ada_Finalization_Child.
2575 Remove the following subprogram entities:
2579 RE_Finalization_Collection
2580 RE_Finalization_Collection_Ptr
2581 RE_Set_Finalize_Address_Ptr
2583 Add the naming of second level children of System.Storage_Pools.
2584 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2586 Add subtype System_Storage_Pools_Child.
2587 Add the following subprogram entities to System.Finalization_Masters:
2589 RE_Finalization_Master
2590 RE_Finalization_Master_Ptr
2592 Add the following subprogram entities to System.Storage_Pools.Subpools:
2594 RE_Allocate_Any_Controlled
2595 RE_Deallocate_Any_Controlled
2596 RE_Root_Storage_Pool_With_Subpools
2600 Move the following subprogram entities from
2601 Ada.Finalization.Heap_Management to System.Finalization_Masters:
2603 RE_Add_Offset_To_Address
2608 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2609 Set_Associated_Collection with Set_Finalization_Master.
2610 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2611 BIP_Finalization_Master is created.
2612 * s-finmas.adb: New unit System.Finalization_Masters.
2613 * s-finmas.ads: New unit System.Finalization_Masters.
2614 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2615 * s-stposu.ads, s-stposu.adb: New unit implementing
2616 System.Storage_Pools.Subpools.
2618 2011-08-29 Bob Duff <duff@adacore.com>
2620 * tbuild.adb: Add assertion.
2622 2011-08-29 Thomas Quinot <quinot@adacore.com>
2624 * s-pooglo.adb: Minor reformatting.
2626 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2628 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2629 an indexed component of a packed array whose element type is a record
2630 with a representation clause different from that of the right-hand
2631 side, generate a temporary to minimuze the number of bit-field
2632 operations generated.
2634 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2636 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2637 declarations, and thus are likely insertion points for actions.
2639 2011-08-29 Bob Duff <duff@adacore.com>
2641 * einfo.ads: Minor comment fix.
2643 2011-08-29 Robert Dewar <dewar@adacore.com>
2645 * frontend.adb, gnat1drv.adb: Minor reformatting.
2647 2011-08-29 Tristan Gingold <gingold@adacore.com>
2649 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2650 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
2651 space in front of the header.
2653 2011-08-29 Johannes Kanig <kanig@adacore.com>
2655 * frontend.adb (Frontend): Exit after creating Standard package when
2656 -gnatd.H is present.
2657 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2660 2011-08-29 Robert Dewar <dewar@adacore.com>
2662 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2663 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2664 snames.ads-tmpl: Minor reformatting.
2666 2011-08-29 Philippe Gil <gil@adacore.com>
2668 * prj.adb (Reset_Units_In_Table): New procedure.
2669 Reset units to avoid access to freed memory.
2671 2011-08-29 Thomas Quinot <quinot@adacore.com>
2673 * get_scos.adb: When reading a P statement SCO without a pragma name
2674 (from an older ALI file), ensure that the Pragma_Name component is set
2675 to Unknown_Pragma (not left uninitialized).
2677 2011-08-29 Vincent Celier <celier@adacore.com>
2679 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2680 modified to compute correctly the object path of a SAL project that is
2681 extending another library project.
2682 (Write_Path_File): New procedure.
2683 * makeutl.ads (Directories): New table moved from Buildgpr
2684 (Get_Directories): New procedure moved from Buildgpr
2685 (Write_Path_File): New procedure
2686 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2687 paths before binding SALs, instead of Set_Ada_Paths.
2688 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2690 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2691 (Current_Source_Path_File_Of): New function
2692 (Set_Current_Object_Path_File_Of): New procedure
2693 (Current_Source_Object_File_Of): New function
2694 (Set_Current_Object_Path_File_Of): New procedure
2695 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2696 (Current_Source_Path_File_Of): New function
2697 (Set_Current_Object_Path_File_Of): New procedure
2698 (Current_Source_Object_File_Of): New function
2699 (Set_Current_Object_Path_File_Of): New procedure
2701 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2703 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2704 packed entity, use a bit-field assignment only if there is no change of
2707 2011-08-29 Thomas Quinot <quinot@adacore.com>
2709 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2710 Is_RTU instead of using Chars comparisons.
2712 2011-08-29 Thomas Quinot <quinot@adacore.com>
2714 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2715 temporary object if the actual is constrained, and the discriminants
2716 read from the stream don't match.
2718 2011-08-29 Tristan Gingold <gingold@adacore.com>
2720 * sem_attr.adb, exp_attr.adb: Add handling of
2721 Attribute_System_Allocator_Alignment
2722 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2723 Attribute_System_Allocator_Alignment.
2724 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2725 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2726 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2727 get_target_system_allocator_alignment.
2729 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2731 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2734 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2736 * exp_ch3.adb (In_Runtime): Fix typo.
2738 2011-08-29 Bob Duff <duff@adacore.com>
2740 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
2742 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2744 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
2745 and a separate tag assignment is generated, ensure that the tag
2746 assignment is analyzed.
2748 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2750 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
2751 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
2752 of statement lists that may contain local declarations.
2753 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
2754 duplicate the triggering statements needed for the expansion of this
2755 construct, when the trigger is a dispatching call to a synchronized
2758 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2760 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
2761 * bindgen.adb: Add comments.
2762 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
2765 2011-08-29 Robert Dewar <dewar@adacore.com>
2767 * exp_attr.adb: Minor reformatting.
2768 Minor code reorganization and commenting.
2769 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
2772 2011-08-29 Thomas Quinot <quinot@adacore.com>
2774 * get_scos.adb: Ignore chaining indicators not currently supported
2777 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2779 * system.ads: Minor editing.
2781 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2783 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
2785 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
2786 Attribute_Elab_Subp_Body.
2787 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
2788 * sem_util.adb: Update comments.
2790 2011-08-29 Thomas Quinot <quinot@adacore.com>
2792 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
2793 pragma name for each SCO statement corresponding to a pragma.
2795 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2797 * opt.ads: Minor editing.
2799 2011-08-29 Yannick Moy <moy@adacore.com>
2801 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
2802 that only made sense for CodePeer mode.
2804 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2806 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2807 which is no longer used.
2808 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2809 handling of the 64-bit division check.
2810 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2812 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2815 2011-08-29 Thomas Quinot <quinot@adacore.com>
2817 * get_scos.adb: Minor reformatting.
2819 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2821 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2822 statement list is wrapped in a block, the block is explicitly analyzed
2823 in order to properly redecorate the entities and create a servicing
2826 2011-08-29 Tristan Gingold <gingold@adacore.com>
2828 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2829 (Set_Zero_Cost_Handling): Remove.
2831 2011-08-29 Thomas Quinot <quinot@adacore.com>
2833 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2835 2011-08-29 Geert Bosch <bosch@adacore.com>
2837 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2838 instruction, as the latter may produce -0.0, which is not a valid VAX
2840 (Neg_G): Likewise for VAX F float.
2842 2011-08-29 Robert Dewar <dewar@adacore.com>
2844 * exp_util.adb: Minor reformatting.
2846 2011-08-29 Yannick Moy <moy@adacore.com>
2848 * sem_ch3.adb: Minor comment update.
2850 2011-08-29 Thomas Quinot <quinot@adacore.com>
2852 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2855 2011-08-29 Thomas Quinot <quinot@adacore.com>
2857 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2858 current statement sequence on a generic instantiation or a subprogram
2861 2011-08-29 Robert Dewar <dewar@adacore.com>
2863 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2866 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2868 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2869 Correct the check which involves the freeze node of a controlled or
2870 access-to-controlled type.
2872 2011-08-29 Geert Bosch <bosch@adacore.com>
2874 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2876 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2879 2011-08-29 Yannick Moy <moy@adacore.com>
2881 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2882 for every index type and component type that is not a subtype_mark.
2883 (Process_Subtype): Set Etype of subtype.
2885 2011-08-29 Robert Dewar <dewar@adacore.com>
2887 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2888 reorganization. Minor reformatting.
2890 2011-08-29 Steve Baird <baird@adacore.com>
2892 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2893 for CodePeer and ALFA modes.
2895 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2897 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2898 that comes from an enclosing scope if it is not the renaming of an
2899 actual, to handle properly a spurious ambiguity in an instance.
2901 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2903 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2904 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
2905 use it instead of the Esize of the first parameter.
2906 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2908 <Size>: Likewise. Call it for composite types on the RM size.
2910 2011-08-29 Yannick Moy <moy@adacore.com>
2912 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2913 * sem_util.adb (Unique_Name): Correct behaviour for names of
2916 2011-08-29 Yannick Moy <moy@adacore.com>
2918 * sem_prag.adb (Check_Precondition_Postcondition): In formal
2919 verification mode, analyze pragma expression for correctness, for
2920 pre/post on library-level subprogram, as it is not expanded later.
2922 2011-08-29 Yannick Moy <moy@adacore.com>
2924 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2925 in formal verification.
2927 2011-08-29 Thomas Quinot <quinot@adacore.com>
2929 * sem_util.adb: Minor reformatting.
2930 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2932 * par_sco.ads, par_sco.adb: Update comments.
2934 2011-08-29 Yannick Moy <moy@adacore.com>
2936 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2937 associated getter/setter.
2938 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2940 2011-08-29 Vincent Celier <celier@adacore.com>
2942 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2943 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2944 with declarations for Language_Kind and Dependency_Kind for Ada.
2945 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2946 (Process_Compiler): Take into account the new attributes Dependency_Kind
2948 (Check_Configuration): Check if language kind is unit based, not if the
2949 language name is Ada.
2950 (Process_Exceptions_Unit_Based): Ditto
2951 (Add_Language): Remove default additions of language and dependency kind
2952 * prj.ads: Minor comment change
2953 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2955 2011-08-29 Johannes Kanig <kanig@adacore.com>
2957 * debug.adb: Update comments.
2959 2011-08-24 Joseph Myers <joseph@codesourcery.com>
2961 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2962 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2963 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2964 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2965 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2967 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2969 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2970 (GNATLIBCFLAGS_FOR_C): Replace
2971 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2972 (gnatlib-shared-default, gnatlib-shared-dual-win32)
2973 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2974 (gnatlib-sjlj, gnatlib-zcx): Likewise.
2976 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
2978 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2980 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2982 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2984 2011-08-05 Nicolas Roche <roche@adacore.com>
2986 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2987 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2989 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
2991 2011-08-05 Matthew Heaney <heaney@adacore.com>
2993 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
2994 subprogram bodies declared out-of-order.
2996 2011-08-05 Yannick Moy <moy@adacore.com>
2998 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
2999 entities directly in package Standard, otherwise skip the standard
3002 2011-08-05 Robert Dewar <dewar@adacore.com>
3004 * a-cbmutr.adb: Minor reformatting
3005 (Allocate_Node): refactor node allocation algorithm
3007 2011-08-05 Robert Dewar <dewar@adacore.com>
3009 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
3010 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
3012 (Analyze_Pragma, case Check_Policy): Ditto.
3013 * sem_prag.ads (Check_Disabled): New function
3014 * snames.ads-tmpl: Add Name_Disable.
3016 2011-08-05 Robert Dewar <dewar@adacore.com>
3018 * gnat_rm.texi: Document implementation-defined policy DISABLE for
3019 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
3021 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3023 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
3024 that appears in a generic formal part and applies to a formal
3027 2011-08-05 Robert Dewar <dewar@adacore.com>
3029 * a-cbmutr.ads: Minor reformatting.
3031 2011-08-05 Matthew Heaney <heaney@adacore.com>
3033 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
3034 to check count, check sign of value instead.
3035 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
3036 (Copy_Subtree): allocate copy of source element
3037 (Equal_Subtree): compare elements, not access objects
3039 2011-08-05 Vincent Celier <celier@adacore.com>
3041 * gnat_ugn.texi: Fix VMS alternative.
3043 2011-08-05 Thomas Quinot <quinot@adacore.com>
3045 * sem_ch11.adb: Add comment.
3047 2011-08-05 Robert Dewar <dewar@adacore.com>
3049 * exp_util.adb: Minor comment fix.
3051 2011-08-05 Robert Dewar <dewar@adacore.com>
3053 * scng.adb (Error_Unterminated_String): Improve flag position when
3056 2011-08-05 Matthew Heaney <heaney@adacore.com>
3058 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3060 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3061 multiway tree containers.
3063 2011-08-05 Robert Dewar <dewar@adacore.com>
3065 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3066 * stylesw.adb: Implement -gnatyC to control comment spacing
3067 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3069 * usage.adb: Add line for -gnatyC.
3071 2011-08-05 Robert Dewar <dewar@adacore.com>
3073 * gnat_ugn.texi: Document -gnatyC.
3074 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3075 synonym for COMMENTS2).
3077 2011-08-05 Robert Dewar <dewar@adacore.com>
3079 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3080 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3081 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3082 a-comutr.ads, lib-xref.adb: Minor reformatting.
3084 2011-08-05 Robert Dewar <dewar@adacore.com>
3086 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3087 warning if there is an exception handler present.
3089 2011-08-05 Pascal Obry <obry@adacore.com>
3091 * a-iteint.ads: Fix copyright year.
3093 2011-08-05 Thomas Quinot <quinot@adacore.com>
3095 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3096 statement SCO for a USE clause or a representation clause.
3098 2011-08-05 Yannick Moy <moy@adacore.com>
3100 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3101 between body and spec for stub.
3102 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3103 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3104 pragma precondition or postcondition, for which the enclosing
3105 subprogram or package in the AST is not the desired one, return empty.
3107 2011-08-05 Thomas Quinot <quinot@adacore.com>
3109 * g-expect.adb: Minor reformatting.
3111 2011-08-05 Bob Duff <duff@adacore.com>
3113 * a-fihema.adb: Comment out OS_Lib.
3115 2011-08-05 Matthew Heaney <heaney@adacore.com>
3117 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3118 (unbounded multiway tree containers) and a-iteint.ads.
3119 * a-comutr.ads, a-comutr.adb:
3120 This is the new Ada 2012 unit for unbounded multiway tree containers
3121 * a-cimutr.ads, a-cimutr.adb
3122 This is the new Ada 2012 unit for indefinite multiway tree containers
3123 * a-iteint.ads: New file.
3125 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3127 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
3129 2011-08-05 Bob Duff <duff@adacore.com>
3131 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3133 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3135 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3137 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3138 general indexing aspects of Ada2012. Called when analyzing indexed
3139 components when other interpretations fail.
3140 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3141 in an expression context where overloading is meaningful. This excludes
3142 the occurrence in an aspect specification (efficiency only).
3143 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3144 related to iterators can be set by an attribute specification, but
3146 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3147 Constant_Indexing and Variable_Indexing.
3148 (Check_Indexing_Functions): New procedure to perform legality checks.
3149 Additional semantic checks at end of declarations.
3151 2011-08-05 Sergey Rybin <rybin@adacore.com>
3153 * tree_io.ads: Update ASIS_Version_Number because of the change of the
3154 order of calling Tree_Write/Tree_Read routines made for aspects.
3156 2011-08-05 Bob Duff <duff@adacore.com>
3158 * a-fihema.adb (Finalize): Fix race condition.
3160 2011-08-05 Yannick Moy <moy@adacore.com>
3162 * sem_ch12.adb (Analyze_Package_Instantiation,
3163 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3166 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3168 * sem_type.adb (Specific_Type): in an instance, the type-specific
3169 operand of an equality check that involves null may have a private
3170 type. Use full view to determine legality of construct.
3172 2011-08-05 Vincent Celier <celier@adacore.com>
3174 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3175 delete or close the file when the call to gnatmake was successful.
3177 2011-08-05 Yannick Moy <moy@adacore.com>
3179 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3180 Global_Discard_Names.
3182 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3184 * sinfo.ads: comments on use of entity field for aspect specifications.
3186 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3188 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3189 node is not itself an entity but a selected component, it is a
3190 rewritten parameterless call to an en enclosing synchronized operation,
3191 and this expansion will be performed again in the instance, so there is
3192 no global information to preserve.
3194 2011-08-05 Javier Miranda <miranda@adacore.com>
3196 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3197 for renamings of predefined primitives.
3198 (In_Predef_Prims_DT): New subprogram.
3200 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3202 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3203 possible interpretation of name is a reference type, add an
3204 interpretation that is the designated type of the reference
3205 discriminant of that type.
3206 * sem_res.adb (resolve): If the interpretation imposed by context is an
3207 implicit dereference, rewrite the node as the deference of the
3208 reference discriminant.
3209 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
3210 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
3211 parent type or base type.
3212 * sem_ch4.adb (Process_Indexed_Component,
3213 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
3214 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
3215 Check for implicit dereference.
3216 (List_Operand_Interps): Indicate when an implicit dereference is
3218 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
3220 2011-08-05 Thomas Quinot <quinot@adacore.com>
3222 * scos.ads: Update documentation of SCO table. Pragma statements can now
3223 be marked as disabled (using 'p' instead of 'P' as the statement kind).
3224 * par_sco.ads, par_sco.adb: Implement the above change.
3225 (Process_Decisions_Defer): Generate a P decision for the first parameter
3226 of a dyadic pragma Debug.
3227 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
3229 * put_scos.adb: Code simplification based on above change.
3231 2011-08-05 Robert Dewar <dewar@adacore.com>
3233 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
3234 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
3235 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
3236 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
3238 2011-08-05 Bob Duff <duff@adacore.com>
3240 * a-stunau.ads, g-spipat.adb: Update comments.
3242 2011-08-05 Bob Duff <duff@adacore.com>
3244 * a-fihema.ads: Minor comment fix.
3245 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
3247 (Attach, Detach): Remove some unnecessary code.
3248 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
3250 2011-08-05 Bob Duff <duff@adacore.com>
3252 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
3253 allocation for Objects component. This simplifies the code somewhat. It
3254 is also a little more efficient in the not-so-unusual case where there
3255 are no controlled objects allocated.
3256 Make Finalization_Started flag atomic.
3257 (Finalize): Avoid unnecessary detachment of items from the list.
3258 (pcol): Minor cleanup.
3260 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3262 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
3263 package whose name is the same as that of the generic unit, or its
3266 2011-08-05 Bob Duff <duff@adacore.com>
3268 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
3269 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
3270 Minor comment fixes.
3272 2011-08-05 Arnaud Charlet <charlet@adacore.com>
3274 * make.adb (Linking_Phase): No longer need to set source search path
3275 before calling gnatlink in CodePeer mode.
3276 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
3277 gcc in CodePeer mode, since the binder generated file no longer has a
3279 * switch.ads, switch.adb (Is_Language_Switch): Removed.
3280 * switch-c.adb: Update comment.
3282 2011-08-05 Thomas Quinot <quinot@adacore.com>
3284 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
3286 2011-08-05 Nicolas Roche <roche@adacore.com>
3288 * gnat_ugn.texi: Fix minor syntax error issue.
3290 2011-08-05 Vincent Celier <celier@adacore.com>
3292 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3293 delete or close the file when the call to gnatmake returns a non
3294 successful return code.
3296 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3298 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
3299 check, indicate that the copy of the original node does not come from
3300 source, to prevent an infinite recursion of the expansion.
3302 2011-08-05 Johannes Kanig <kanig@adacore.com>
3304 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
3305 VC generation for subprogram bodies.
3307 2011-08-05 Yannick Moy <moy@adacore.com>
3310 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
3311 the base type with the smallest allowed base type.
3313 2011-08-05 Sergey Rybin <rybin@adacore.com>
3315 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
3318 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3320 * sem_ch12.ads: minor comment updates.
3322 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3324 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
3325 instantiation and a formal package the compiler generates a package
3326 renaming declaration so that the generic name within the declaration
3327 is interpreted as a renaming of the instance. At the end of a formal
3328 package declaration, this renaming must become invisible.
3330 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3332 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
3333 comparison and rely on concrete entities instead.
3335 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3337 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
3338 and discriminants, to indicate that the type has an access discriminant
3339 that supports implicit dereference.
3340 * snames.ads-tmpl: Add names of aspects and attributes related to
3341 Ada2012 iterators: constant_indexing, default_iterator,
3342 iterator_element, implicit_dereference, variable_indexing.
3343 * aspects.ads, aspects.adb: entries for iterator-related aspects.
3344 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
3345 iterator-related aspects.
3346 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
3348 2011-08-05 Sergey Rybin <rybin@adacore.com>
3350 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
3351 metrics in gnatmetric to cover new kinds of coupling mentrics.
3353 2011-08-05 Steve Baird <baird@adacore.com>
3355 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
3356 of calling the user-defined main subprogram.
3357 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
3358 is set) Call_Main_Subprogram ahead of, as opposed to
3360 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
3361 generation of a "with" of the user-defined main subprogram.
3362 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
3363 (which is now called from Gen_Main instead).
3365 2011-08-05 Emmanuel Briot <briot@adacore.com>
3367 * projects.texi: Added reference to the Makefile package.
3369 2011-08-05 Thomas Quinot <quinot@adacore.com>
3371 * exp_ch7.adb: Minor comment rewording.
3373 2011-08-05 Ed Falis <falis@adacore.com>
3375 * env.c: Fix comment.
3377 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3379 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
3380 character comparison and rely on concrete entities instead.
3382 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3384 * sem_ch3.adb: (Check_Private_Overriding): better error message,
3385 suggested by AI95-0068.
3387 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3389 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
3390 the two potential initialization calls. This accounts for any
3391 access-before-elaboration checks which may precede the initialization
3393 (Next_Suitable_Statement): New routine. Returns the next real statement
3394 after the input node while skipping generated checks.
3395 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
3396 with comment on usage.
3397 Do not generate Elaborate_All when the trigger is a finalization call
3398 coming from a type init proc.
3399 (Check_Elab_Call): Propagate the initialization procedure context to
3400 subsequent calls to Check_A_Call.
3401 (Check_Internal_Call_Continue): Propagate the initialization procedure
3402 context to subsequent calls to Check_Elab_Call.
3403 (Is_Finalization_Procedure): New routine. Returns True if the input
3404 entity denotes a [Deep_]Finalize routine.
3405 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
3406 along with comment on usage.
3408 2011-08-05 Vadim Godunko <godunko@adacore.com>
3410 * s-atocou.ads: Add list of supported platforms.
3412 2011-08-05 Yannick Moy <moy@adacore.com>
3414 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
3416 * opt.ads (Disable_ALI_File): new Boolean flag
3417 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
3419 2011-08-05 Ed Falis <falis@adacore.com>
3421 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
3422 environ is properly defined.
3424 2011-08-05 Vincent Celier <celier@adacore.com>
3426 * make.adb (Compilation_Phase): Exit immediately when all objects have
3427 been found up to date, to avoid multiple exit messages.
3428 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
3429 same project for languages with no compiler.
3430 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
3432 2011-08-05 Robert Dewar <dewar@adacore.com>
3434 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
3435 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
3436 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
3437 s-atocou-builtin.adb: Minor reformatting.
3439 2011-08-05 Yannick Moy <moy@adacore.com>
3441 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
3442 if the node to wrap is a pragma check, this node and enclosed
3443 expression are not expanded, so do not apply any transformations here.
3444 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
3445 introducing transient scopes.
3447 2011-08-05 Jose Ruiz <ruiz@adacore.com>
3449 * adaint.c (__gnat_set_writable, __gnat_set_readable,
3450 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
3451 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
3452 routine is available, so we use the default implementation of these
3454 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
3455 support for copying attributes on VxWorks 6.
3457 2011-08-05 Yannick Moy <moy@adacore.com>
3459 * debug.adb: Remove use of -gnatd.D.
3460 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
3461 * opt.ads: Simplify variables for ALFA mode, to keep one only
3462 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
3465 2011-08-05 Vincent Celier <celier@adacore.com>
3467 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
3468 Builder'Default_Switches.
3470 2011-08-05 Vincent Celier <celier@adacore.com>
3472 * makeusg.adb: Add lines for --create-map-file switches.
3474 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3476 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
3477 profile is incomplete and the full view is available, replace it with
3479 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3480 incomplete, freezing the subprogram is delayed until the full view is
3482 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3483 fixed-point multiplication operator and the predefined operator is
3484 resolved in favor of the user-defined one.
3486 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3488 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3491 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3493 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3494 whether a type lacks user-defined Read or Write operations, or has a
3495 component that lacks them.
3496 * sem_attr.adb (Check_Stream_Attribute): if restriction
3497 No_Default_Stream_Attributes is active, verify that all subcomponent
3498 types of the target have user-defined stream operations, and report
3500 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3501 * exp_strm.adb: Build_Elementary_Input_Call,
3502 Build_Elementary_Write_Call): remove checks for restriction
3503 No_Default_Stream_Attributes, now checked in semantics.
3505 2011-08-04 Vincent Celier <celier@adacore.com>
3507 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3508 switches on the command line, look for all valid --RTS switches in the
3509 Builder switches and for each language use the first runtime name found
3510 to invoke gprconfig.
3511 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3512 command line and there is no auto-configuration.
3513 (Runtime_Name_Set_For): New function.
3515 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3517 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3518 elaborate initialization expression for variable Abort when processing
3519 a package body or a declaration.
3520 (Create_Finalizer): Propagate the package context when creating the
3521 exception-related variables.
3522 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3523 For_Package along with usage comment.
3525 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3527 * gcc-interface/Makefile.in: Clean up targets.
3528 Enable new package for atomic counters and copy-on-write implementation
3529 of unbounded strings on x86 platforms.
3530 * gcc-interface/Make-lang.in: Update dependencies.
3532 2011-08-04 Robert Dewar <dewar@adacore.com>
3534 * exp_ch7.adb: Minor reformatting.
3536 2011-08-04 Robert Dewar <dewar@adacore.com>
3538 * exp_strm.adb: Minor reformatting.
3540 2011-08-04 Vadim Godunko <godunko@adacore.com>
3542 * s-atocou.adb: Replace by dummy version and use on targets where atomic
3543 operations are not supported.
3544 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3545 * s-atocou-x86.adb: New file.
3546 * Makefile.rtl: Add s-atocou.o file
3548 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3550 * make.adb (Compile): Move setting of CodePeer_Mode to ...
3551 (Compilation_Phase): ... here.
3552 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3554 2011-08-04 Thomas Quinot <quinot@adacore.com>
3556 * Make-generated.in: Fix minor typo in comment.
3558 2011-08-04 Thomas Quinot <quinot@adacore.com>
3560 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3563 2011-08-04 Robert Dewar <dewar@adacore.com>
3565 * a-coinho.adb: Minor reformatting.
3567 2011-08-04 Robert Dewar <dewar@adacore.com>
3569 * a-coinho.ads: Minor reformatting.
3571 2011-08-04 Vadim Godunko <godunko@adacore.com>
3573 * s-atocou.ads, s-atocou.adb: New files.
3574 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3575 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3576 direct use of GCC's atomic builtins and replace them by use of new
3577 atomic counter package.
3579 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3581 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3583 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3585 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3586 with a call to Get_External_Tag.
3587 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3588 subprogram usage. Remove the guard against package declarations and
3589 bodies since Build_Cleanup_Statements is no longer invoked in that
3591 (Build_Components): Initialize Tagged_Type_Stmts when the context
3592 contains at least one library-level tagged type.
3593 (Build_Finalizer): New local variables Has_Tagged_Types and
3594 Tagged_Type_Stmts along with associated comments on usage. Update the
3595 logic to include tagged type processing.
3596 (Create_Finalizer): Insert all library-level tagged type unregistration
3597 code before the jump block circuitry.
3598 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3599 (Expand_N_Package_Declaration): Remove the call to
3600 Build_Cleanup_Statements.
3601 (Process_Tagged_Type_Declaration): New routine. Generate a call to
3602 unregister the external tag of a tagged type.
3603 (Processing_Actions): Reimplemented to handle tagged types.
3604 (Process_Declarations): Detect the declaration of a library-level
3605 tagged type and carry out the appropriate actions.
3606 (Unregister_Tagged_Types): Removed. The machinery has been directly
3607 merged with Build_Finalizer.
3609 2011-08-04 Robert Dewar <dewar@adacore.com>
3611 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3612 gnatls.adb, exp_ch3.adb: Minor reformatting.
3614 2011-08-04 Marc Sango <sango@adacore.com>
3616 * sem_attr.adb (Analyze_Attribute): Replace the message
3617 "invisible attribute of}" of the spark restriction violation in
3618 attribute reference by the simple message "invisible attribute of type".
3619 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3620 two insertion characters: '&' and '}'.
3622 2011-08-04 Vadim Godunko <godunko@adacore.com>
3624 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3625 * a-coinho.ads, a-coinho.adb: New file.
3626 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3628 2011-08-04 Nicolas Roche <roche@adacore.com>
3630 * alfa_test.adb: Not all ali files are containing alfa information even
3631 if compiled with -gnatd.F. So suppress warning about missing ALFA
3634 2011-08-04 Yannick Moy <moy@adacore.com>
3636 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3638 * put_alfa.adb: Check that scope name is not empty.
3640 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3642 * exp_ch3.adb (Stream_Operation_Ok): new predicate
3643 Needs_Elementary_Stream_Operation, to determine whether user-defined
3644 Read and Write attributes are available for the elementary components
3645 of the given type. If only the predefined attributes are available,
3646 then when restriction No_Default_Stream_Attributes is active the
3647 predefined stream attributes for the composite type cannot be created.
3649 2011-08-04 Robert Dewar <dewar@adacore.com>
3651 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3652 Put routines in alpha order
3654 2011-08-04 Jose Ruiz <ruiz@adacore.com>
3656 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3657 * gcc-interface/Make-lang.in: Update dependencies.
3659 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3661 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3662 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3665 2011-08-04 Robert Dewar <dewar@adacore.com>
3667 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3668 lib-xref-alfa.adb: Minor reformatting.
3670 2011-08-04 Marc Sango <sango@adacore.com>
3672 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3673 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3674 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3677 2011-08-04 Tristan Gingold <gingold@adacore.com>
3679 * bindgen.adb (Gen_Adainit_C): Remove.
3680 (Gen_Adafinal_C): Ditto.
3681 (Gen_Elab_Externals_C): Ditto.
3682 (Gen_Elab_Calls_C): Ditto.
3683 (Gen_Elab_Order_C): Ditto.
3684 (Gen_Elab_Defs_C): Ditto.
3685 (Gen_Finalize_Library_C): Ditto.
3686 (Gen_Finalize_Library_Defs_C): Ditto.
3687 (Gen_Main_C): Ditto.
3688 (Gen_Output_File_C): Ditto.
3689 (Gen_Restrictions_C): Ditto.
3690 (Gen_Versions_C): Ditto.
3691 (Write_Info_Ada_C): Ditto.
3692 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3693 (Gen_Output_File): Do not force Ada_Bind_File anymore.
3694 Always call Gen_Output_File_Ada.
3695 * gnatlink.adb (Begin_Info): Now a constant.
3697 (Ada_Bind_File): Remove
3698 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
3699 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3700 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3701 * opt.ads (Ada_Bind_File): Remove.
3703 2011-08-04 Thomas Quinot <quinot@adacore.com>
3705 * projects.texi: Document target-specific directory in default project
3708 2011-08-04 Thomas Quinot <quinot@adacore.com>
3710 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3713 2011-08-04 Yannick Moy <moy@adacore.com>
3715 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3716 opt.ads, lib-xref.ads: Code clean up.
3718 2011-08-04 Yannick Moy <moy@adacore.com>
3720 * gnat_rm.texi: Update description of Test_Case
3721 * gnat_ugn.texi: Typo.
3723 2011-08-04 Ed Falis <falis@adacore.com>
3725 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3727 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3729 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3730 it is of type Root_Controlled. This action eliminates fields Prev and
3731 Next from type equality.
3733 2011-08-04 Yannick Moy <moy@adacore.com>
3735 * lib-xref-alfa.adb: Correct typo.
3737 2011-08-04 Matthew Heaney <heaney@adacore.com>
3739 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
3742 2011-08-04 Yannick Moy <moy@adacore.com>
3744 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
3745 (Analyze_Pragma): allow static string expression for name of Test_Case,
3746 instead of simply string literals.
3747 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
3750 2011-08-04 Vincent Celier <celier@adacore.com>
3752 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
3753 case suffixes to find truncated main sources.
3755 2011-08-04 Tristan Gingold <gingold@adacore.com>
3757 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
3758 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
3759 (Compute_Current_Task): Ditto.
3761 2011-08-04 Tristan Gingold <gingold@adacore.com>
3763 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
3765 2011-08-04 Yannick Moy <moy@adacore.com>
3767 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
3768 library-level constant.
3769 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
3770 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
3771 used as selector of parameter association, in ALFA mode.
3773 2011-08-04 Robert Dewar <dewar@adacore.com>
3775 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
3776 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
3779 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3781 * make.adb (Linking_Phase): Set source search path before calling
3782 gnatlink in CodePeer mode.
3784 2011-08-04 Javier Miranda <miranda@adacore.com>
3786 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
3787 Remove code which takes care of building TSDs.
3788 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
3789 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
3790 the accessibility check in VM targets.
3791 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
3792 (Building_Static_DT): Now returns false for VM targets.
3793 (Build_VM_TSDs): Removed.
3794 (Expand_Interface_Conversion): Generate missing runtime check for
3795 conversions to interface types whose target type is unknown at compile
3797 (Make_VM_TSD): Add missing code to disable the generation of calls to
3798 Check_TSD if the tagged type is not defined at library level, or not
3799 has a representation clause specifying its external tag, or -gnatdQ is
3801 * exp_disp.ads (Build_VM_TSDs): Removed.
3802 (Make_VM_TSDs): Spec relocated from exp_disp.adb
3803 * sem_disp.adb (Check_Dispatching_Operation): No code required to
3804 register primitives in the dispatch tables in VM targets.
3805 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3806 initialization of class-wide interface objects in VM targets.
3807 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3810 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3812 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3813 when dotnet-ld cannot be found.
3815 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3817 * bindgen.adb: Simplify significantly generation of binder body file in
3819 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3820 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3823 2011-08-04 Yannick Moy <moy@adacore.com>
3825 * sem_prag.adb, sem.ads: Code cleanup.
3827 2011-08-04 Tristan Gingold <gingold@adacore.com>
3829 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3830 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3831 results if possible.
3832 * s-stusta.adb (Print): Adjust after changes in s-stausa.
3833 * gnat_ugn.texi: Update dynamic stack usage section.
3835 2011-08-04 Steve Baird <baird@adacore.com>
3837 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3838 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3839 contains only a call to the user-defined main subprogram.
3840 (Gen_Main_Ada) - If CodePeer_Mode is set, then
3841 call the "wrapper" subprogram instead of directly
3842 calling the user-defined main subprogram.
3844 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3846 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3847 alternatives of a case statement for controlled objects. Rename local
3848 variable A to Dead_Alt.
3849 (Expand_N_If_Statement): Check the then and else statements of an if
3850 statement for controlled objects. Check the then statements of all
3851 elsif parts of an if statement for controlled objects.
3852 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3854 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3855 detects a loop associated with the expansion of an array object.
3856 Augment the processing of the loop statements to account for a possible
3857 wrap done by Process_Statements_For_Controlled_Objects.
3858 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3859 statements and abortable part of an asynchronous select for controlled
3861 (Expand_N_Conditional_Entry_Call): Check the else statements of a
3862 conditional entry call for controlled objects.
3863 (Expand_N_Selective_Accept): Check the alternatives of a selective
3864 accept for controlled objects.
3865 (Expand_N_Timed_Entry_Call): Check the entry call and delay
3866 alternatives of a timed entry call for controlled objects.
3867 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3868 exception handler for controlled objects.
3869 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3870 Add formal parameter Nested_Constructs along with its associated
3872 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3873 Requires_Cleanup_Actions.
3874 (Process_Statements_For_Controlled_Objects): New routine.
3875 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3876 routine. Inspect a node which contains a non-handled sequence of
3877 statements for controlled objects. If such an object is found, the
3878 statements are wrapped in a block.
3880 2011-08-04 Bob Duff <duff@adacore.com>
3882 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3883 need to compare with Class_Wide_Type (T2), in order to get at the
3884 original class-wide type node.
3885 * sem_type.ads (Covers): Improve the comment.
3886 * einfo.ads (Class_Wide_Type): Improve the comment.
3887 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3888 the type of the Deref.
3890 2011-08-04 Yannick Moy <moy@adacore.com>
3892 * gnat_rm.texi: Document that Test_Case pragma can only appear on
3893 separate declarations.
3894 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3895 check identifier of pragma argument.
3896 (Chain_TC): check that no other test case associated to the same entity
3897 share the same name.
3898 (Check_Test_Case): disallow test case inside subprogram body
3899 (Analyze_Pragma): correct call to check identifier and not argument
3900 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3901 function gets name from test case pragma.
3903 2011-08-04 Yannick Moy <moy@adacore.com>
3905 * gnat_rm.texi: Document new pragma and aspect.
3906 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3907 (No_Duplicates_Allowed): new constant array defining whether duplicates
3908 aspects of each kind can appear on the same declaration.
3909 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3910 field, which points to a node holding the previous Spec_PPC_List.
3911 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3912 through the indirection with Contract.
3913 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3914 * par-prag.adb (Prag): do nothing on Test_Case pragma
3915 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3917 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3918 component Ensures of Test_Case.
3919 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3920 (Analyze_Generic_Subprogram_Declaration,
3921 Analyze_Subprogram_Instantiation,
3922 Analyze_Abstract_Subprogram_Declaration,
3923 Analyze_Subprogram_Body_Helper,
3924 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3925 insert contract in subprogram node at point of definition
3927 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3928 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3929 corresponding pragma
3930 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3931 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3932 similar to the analysis of pre/post
3933 (Derive_Subprogram): insert contract in subprogram node at point of
3935 * sem_prag.adb, sem_prag.ads
3936 (Check_Arg_Is_String_Literal, Check_Identifier):
3937 new checking procedures to be called in treatment of pragmas
3938 (Check_Test_Case): new procedure to check that a Test_Case aspect or
3939 pragma is well-formed. This does not check currently that 'Result is
3940 used only in the Ensures component of a Test_Case.
3941 (Analyze_Pragma): add case for Test_Case
3942 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3943 components of a Test_Case.
3944 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3945 expressions in the 3rd (and 4th if present) arguments of a Test_Case
3946 pragma, treated as spec expressions.
3947 (Sig_Flags): add value -1 for Test_Case.
3948 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3949 Get_Requires_From_Test_Case_Pragma): getters for both expression
3950 components of a Test_Case.
3951 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3952 indirection between an entry or [generic] subprogram entity and its
3953 pre/post + test-cases.
3954 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3955 get/set for fields of an N_Contract node.
3956 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3957 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3958 names and pragma for Test_Case.
3959 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3961 2011-08-04 Vincent Celier <celier@adacore.com>
3963 * gnat_ugn.texi: Improve documentation of gnatmake switch
3964 --source-info-file=.
3966 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3968 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3969 type). Initialize Atyp to the appropriate type which is later checked
3970 for completion. Rewrite the assertion associated with private type
3973 2011-08-04 Ed Falis <falis@adacore.com>
3975 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3976 initialize the number of CPUs.
3978 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3980 * sem_type.adb (Disambiguate): New subsidiary routine
3981 In_Same_Declaration_List, to implement AI05-0020: a user-defined
3982 equality on an anonymous access type whose designated type is private
3983 does not lead to an ambiguity with the universal access equality
3984 operator in the body or child units of the defining package. The same
3985 is true for a multiplication operator on a private type completed with
3988 2011-08-04 Javier Miranda <miranda@adacore.com>
3990 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
3991 (Normalize_Scalars_Config): Removed.
3993 (Register_Opt_Config_Switches): Remove registering config values of
3994 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
3995 (Restore_Opt_Config_Switches): Remove code which restores the values of
3996 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3997 Init_Or_Norm_Scalars.
3998 (Save_Opt_Config_Switches): Remove code which saves values of
3999 Init_Or_Norm_Scalars and Normalize_Scalars.
4000 (Set_Opt_Config_Switches): Remove code which restores config values of
4001 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4002 Init_Or_Norm_Scalars.
4004 2011-08-04 Yannick Moy <moy@adacore.com>
4006 * frontend.adb (Frontend): remove previous patch to avoid full
4007 qualification in ALFA mode.
4008 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
4009 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
4010 unique name for an entity, which could be used to identify the entity
4011 across compilation units.
4013 2011-08-04 Thomas Quinot <quinot@adacore.com>
4016 (Initialize_Default_Project_Path): Add target specific directory
4017 ($prefix/$target/lib/gnat) in front of project path in all cases
4018 (making gnatmake's behaviour consistent with gprbuild).
4019 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
4020 Pass target name from Sdefault to project subsystem.
4021 * gnatls.adb: Show new target specific default project directory.
4023 2011-08-04 Johannes Kanig <kanig@adacore.com>
4025 * cstand.adb: Add Information to Identifier in Standard
4026 (Identifer_For): Set Entity to the corresponding entity
4028 2011-08-04 Sergey Rybin <rybin@adacore.com>
4030 * gnat_ugn.texi: Update doc on gnatcheck.
4032 2011-08-04 Yannick Moy <moy@adacore.com>
4034 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
4037 2011-08-04 Yannick Moy <moy@adacore.com>
4039 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
4040 performing expansion.
4041 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
4042 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
4043 it is not called in ALFA mode.
4045 2011-08-04 Emmanuel Briot <briot@adacore.com>
4047 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4048 after all, so removed.
4050 2011-08-04 Sergey Rybin <rybin@adacore.com>
4052 * vms_data.ads: Add missing VMS qualifiers.
4054 2011-08-04 Emmanuel Briot <briot@adacore.com>
4056 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4057 the list of files on the command line after processing it through
4060 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4062 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4063 processing for .NET/JVM. These targets can now benefit from
4064 Raise_From_Controlled_Operation and they share the same processing with
4066 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4067 These targets need transient scopes in order to properly finalize short
4068 lived controlled objects.
4069 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4070 NET/JVM. These targets can now benefit from
4071 Raise_From_Controlled_Operation and they share the same processing with
4074 2011-08-04 Geert Bosch <bosch@adacore.com>
4076 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4078 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4080 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4081 Expand_Record_Aggregate, to determine whether aggregate must be
4082 expanded into assignments. This is the case if the ancestor part is
4083 private, regarless of the setting of the flag Has_Private_Ancestor.
4085 2011-08-04 Ed Falis <falis@adacore.com>
4087 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4089 2011-08-04 Bob Duff <duff@adacore.com>
4091 * sinfo.ads: Fix comment.
4093 2011-08-04 Steve Baird <baird@adacore.com>
4095 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4096 choose a package name in much the same way as is
4097 done for JGNAT when VM_Target /= No_VM, except that
4098 a slightly more distinctive prefix string is used.
4100 2011-08-04 Emmanuel Briot <briot@adacore.com>
4102 * makeutl.adb (Complete_Mains): no longer accept unit names on the
4103 gnatmake command line.
4104 This behavior was never documented (and was supported only because of
4105 an early bug in the code). This case might lead to ambiguous cases
4106 (between unit names and truncated base names without suffixes).
4108 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4110 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4111 Remove the external tag of a tagged type from the internal hash table.
4112 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4113 expanded usage of the routine. Strenghten the check for Is_Master. Add
4114 processing for tagged types.
4115 (Build_Finalizer): Create all the necessary lists used in finalizer
4116 creation when the processed context is a package that may contain
4118 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4119 Requires_Cleanup_Actions.
4120 (Expand_N_Package_Body): Package bodies may need clean up code
4121 depending on whether they contain tagged types.
4122 (Expand_N_Package_Declaration): Package declarations may need clean up
4123 code depending on whether they contain tagged types.
4124 (Unregister_Tagged_Types): New routine. Search through a list of
4125 declarations or statements, looking for non-abstract Ada tagged types.
4126 For each such type, generate code to unregister the external tag.
4127 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4128 Requires_Cleanup_Actions.
4129 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4130 through a list of declarations or statements looking for non-abstract
4131 Ada tagged types or controlled objects.
4132 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4133 Requires_Cleanup_Actions.
4134 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4135 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4138 2011-08-04 Vincent Celier <celier@adacore.com>
4140 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4141 has Ada sources, not project Project, because if the root project
4142 Project has no sources of its own, all projects will be deemed without
4145 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4147 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4148 of the No_Param_Proc acc-to-subp type used for initialization of
4149 __gnat_finalize_library_objects so that it's declared at library level
4150 rather than nested inside of the adainit routine.
4152 2011-08-04 Javier Miranda <miranda@adacore.com>
4154 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4155 if the tagged type has a representation clause which specifies its
4158 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4160 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4161 Remove previous procedure with that name.
4162 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4164 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4165 subtype mark, the ancestor cannot have unknown discriminants.
4166 (Resolve_Record_Aggregate): if the type has invisible components
4167 because of a private ancestor, the aggregate is illegal.
4169 2011-08-04 Vincent Celier <celier@adacore.com>
4171 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4172 account switches -gnat2005, -gnat12 and -gnat2012.
4174 2011-08-04 Bob Duff <duff@adacore.com>
4176 * s-tasdeb.ads: Minor comment fix.
4178 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4180 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4182 * switch.ads, switch.adb (Is_Language_Switch): New function.
4184 2011-08-04 Vincent Celier <celier@adacore.com>
4186 * switch-c.adb: Minor comment addition.
4188 2011-08-04 Vincent Celier <celier@adacore.com>
4190 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4191 ending with '=' is followed by a space (missing file name).
4193 2011-08-04 Pascal Obry <obry@adacore.com>
4195 * g-regist.ads: Fix size of HKEY on x86_64-windows.
4197 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4199 * sem_ch12.adb (Analyze_Associations): New routine
4200 Check_Overloaded_Formal_Subprogram to reject a formal package when
4201 there is a named association or a box initialisation for an overloaded
4202 formal subprogram of the corresponding generic.
4204 2011-08-04 Yannick Moy <moy@adacore.com>
4206 * alfa.ads (ALFA_Xref_Record): add component for type of entity
4207 * get_alfa.adb, put_alfa.adb: Read and write new component of
4209 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
4211 2011-08-04 Pascal Obry <obry@adacore.com>
4213 * urealp.adb: Minor reformatting.
4215 2011-08-04 Tristan Gingold <gingold@adacore.com>
4217 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
4218 Handle the case when Cleanup_Protected_Object returns Empty.
4220 2011-08-04 Yannick Moy <moy@adacore.com>
4222 * frontend.adb (Frontend): only qualify names in non-ALFA mode
4224 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4226 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
4227 call, ignore functions.
4229 2011-08-04 Geert Bosch <bosch@adacore.com>
4231 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
4234 2011-08-04 Emmanuel Briot <briot@adacore.com>
4236 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
4237 as an index for Builder'Switches. This conforms to the documentation.
4238 * make.adb (Insert_Project_Sources): avoid duplicate code
4240 2011-08-04 Emmanuel Briot <briot@adacore.com>
4242 * makeutl.adb (Complete_Mains): if the user has passed a relative file
4243 name on the command line (for instance "../dummy"), never assume it can
4246 2011-08-04 Tristan Gingold <gingold@adacore.com>
4248 * bindgen.adb: Remove code the reference or create the
4249 Break_Start/__gnat_break_start procedure.
4250 * s-stalib.adb (Break_Start): Removed.
4252 2011-08-04 Emmanuel Briot <briot@adacore.com>
4254 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
4255 shared with gprbuild.
4257 2011-08-04 Yannick Moy <moy@adacore.com>
4259 * par-ch4.adb (P_Primary): preferentially issue an error message about
4260 a missing parenthesis arount a conditional or case expression in Ada
4261 2012 mode, if we detect that the alignment is not correct for a
4264 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4266 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
4267 tag-to-class-wide conversion as needing finalization actions.
4268 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
4269 a tag-to-class-wide conversion as needing finalization actions.
4270 (Is_Finalizable_Transient): The result of a tag-to-class-wide
4271 conversion does not need finalization actions.
4272 (Is_Tag_To_CW_Conversion): New routine.
4273 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
4274 whether an object is the result of a tag-to-class-wide conversion.
4276 2011-08-04 Yannick Moy <moy@adacore.com>
4278 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
4279 the left-hand-side and right-hand-side of a conjunct are inserted when
4280 translating a pre- or postcondition
4281 * sem_ch6.adb: Correct typo in comment
4283 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4285 * gnat_rm.texi: Ravenscar does not prohibit dependence on
4286 Unchecked_Conversion and Unchecked_Deallocation.
4288 2011-08-04 Thomas Quinot <quinot@adacore.com>
4290 * make.adb: Minor reformatting.
4292 2011-08-04 Emmanuel Briot <briot@adacore.com>
4294 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
4295 sources in the project and its imported projects, but not in the whole
4298 2011-08-04 Emmanuel Briot <briot@adacore.com>
4300 * make.adb: Remove debug trace.
4302 2011-08-04 Vincent Celier <celier@adacore.com>
4304 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
4305 path in canonical form, to be able to compare path names on platforms
4306 such as Windows or Darwin.
4308 2011-08-04 Thomas Quinot <quinot@adacore.com>
4310 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
4311 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
4312 * scos.ads: Update documentation accordingly.
4313 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
4316 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4318 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
4319 attribute only if prefix type is scalar.
4321 2011-08-04 Emmanuel Briot <briot@adacore.com>
4323 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
4324 in gnatmake for specifying mains on the command line that do not belong
4325 to the main project. These mains must currently all belong to the same
4327 (Ultimate_Extension_Of): removed, since duplicated
4328 Ultimate_Extending_Project.
4330 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4332 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
4334 (CodePeer_Mode_String): New.
4335 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
4337 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
4338 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
4339 mode, since no useful elaboration subprogram is needed by CodePeer.
4340 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
4341 In this mode, compile binder file with -gnatC and do stop after this
4344 2011-08-04 Vincent Celier <celier@adacore.com>
4346 * exp_ch7.adb: Minor comment fix.
4348 2011-08-04 Robert Dewar <dewar@adacore.com>
4350 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
4351 exp_ch4.adb, makeutl.adb: Minor reformatting.
4353 2011-08-04 Emmanuel Briot <briot@adacore.com>
4355 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4356 Create several new subprograms to move code out of Make. This makes the
4357 code more readable, removes code duplication, and is a preparation work
4358 for adding support for aggregate projects.
4360 2011-08-04 Tristan Gingold <gingold@adacore.com>
4362 * s-po32gl.ads, s-po32gl.adb: New files.
4363 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
4364 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
4365 (Build_Finalization_Collection): Use it.
4366 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
4367 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
4369 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
4370 * gcc-interface/Make-lang.in: Update dependencies.
4372 2011-08-04 Emmanuel Briot <briot@adacore.com>
4374 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
4377 2011-08-04 Emmanuel Briot <briot@adacore.com>
4379 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
4380 command line is not a file name, also check whether it could be a unit
4383 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4385 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4386 the header of the finalization routine.
4387 If the unit has no finalizer but is a body whose spec has one, then
4388 generate the decrement of the elaboration entity only.
4389 If the unit has a finalizer and is a spec, then do not generate the
4390 decrement of the elaboration entity.
4391 (Gen_Finalize_Library_C): Likewise.
4393 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4395 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
4396 (Bounds_Size_Expression): Removed.
4397 (Double_Alignment_Of): New subsidiary routine.
4398 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
4399 for a hole in the dope vector of unconstrained arrays due to different
4400 index and element alignments.
4402 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4404 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
4405 raise program_error because body has not been seen yet.
4407 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4409 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
4412 2011-08-04 Vincent Celier <celier@adacore.com>
4414 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
4416 2011-08-04 Yannick Moy <moy@adacore.com>
4418 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
4419 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
4421 2011-08-04 Thomas Quinot <quinot@adacore.com>
4423 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
4424 instantiation in RCI.
4426 2011-08-04 Emmanuel Briot <briot@adacore.com>
4428 * make.adb: Share more code with gprbuild
4430 2011-08-04 Emmanuel Briot <briot@adacore.com>
4432 * projects.texi: Added documentation for the IDE'Gnat project file
4435 2011-08-04 Nicolas Roche <roche@adacore.com>
4437 * gnat_rm.texi: Minor editing.
4439 2011-08-04 Javier Miranda <miranda@adacore.com>
4441 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
4442 and the library case for VM targets.
4443 (Gen_Adainit_Ada): Likewise.
4445 2011-08-04 Robert Dewar <dewar@adacore.com>
4447 * g-altive.ads: Minor comment updates.
4448 * prj-nmsc.adb: Minor reformatting.
4450 2011-08-04 Javier Miranda <miranda@adacore.com>
4453 (Normalize_Scalars_Config): Value of the configuration switch set by
4454 pragma Normalize_Scalars when it appears in the gnat.adc file.
4455 (Normalize_Scalars): New field for record Config_Switches_Type. Used
4456 to save and restore settings of this pragma.
4458 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
4459 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
4461 2011-08-04 Vincent Celier <celier@adacore.com>
4463 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
4465 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4467 * makeutl.adb: Minor reformatting.
4469 2011-08-04 Olivier Hainque <hainque@adacore.com>
4471 * g-altive.ads: Update comments to reflect that only the soft
4472 binding is available today.
4474 2011-08-04 Robert Dewar <dewar@adacore.com>
4476 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
4477 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4478 * gcc-interface/Make-lang.in: Update dependencies.
4480 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4482 * prj-env.adb: Remove local debug traces.
4484 2011-08-04 Yannick Moy <moy@adacore.com>
4486 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4487 was used instead of Hi_OK, which could cause a read of an uninitialized
4488 value later on. Detected while working on the new warning.
4489 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4491 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4492 in more cases, in order to detect more unreferenced values.
4493 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4494 object for expression, if any.
4496 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4498 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4499 the operand types instead of the Esize.
4501 2011-08-04 Steve Baird <baird@adacore.com>
4503 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4504 enable CodePeer_Mode.
4505 * bindusg.adb (Display): Add help message describing -P binder switch.
4506 * gnat_ugn.texi: Document -P binder switch.
4507 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4508 user-defined main program directly.
4509 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4510 user-defined main program in the context clause of the package body.
4512 2011-08-04 Yannick Moy <moy@adacore.com>
4514 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4515 duplicate of Defining_Entity
4516 (Get_Unique_Entity_For_Decl): rename function into
4517 Unique_Defining_Entity
4518 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4519 (Formal_Proof_On): remove synthesized flag
4520 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4521 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4522 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4523 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4524 Annotate (Formal_Proof)
4526 2011-08-04 Emmanuel Briot <briot@adacore.com>
4528 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4529 source files with non-standard naming schemes, in imported projects
4531 2011-08-04 Emmanuel Briot <briot@adacore.com>
4533 * makeutl.adb (Complete_Mains): when a multi-unit source file is
4534 specified on the gprbuild command line, we need to compile all units
4535 within that file, not just the first one we find
4536 Fix error message for mains that are not found.
4538 2011-08-04 Thomas Quinot <quinot@adacore.com>
4540 * sem_ch6.adb: Update comment.
4541 * sem_ch12.adb: Minor reformatting.
4543 2011-08-04 Bob Duff <duff@adacore.com>
4545 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4546 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4547 race condition whose symptom is to fail to lock Parent. That, in turn,
4548 causes Parent.Awake_Count to be accessed without locking Parent, which
4549 causes another race condition whose symptom is that Parent.Awake_Count
4550 can be off by 1 (either too high or too low). The solution is to lock
4551 Parent unconditionally, and then lock Acceptor, before reading
4552 Acceptor.Terminate_Alternative.
4554 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4556 * debug.adb: Update comment.
4558 2011-08-04 Robert Dewar <dewar@adacore.com>
4560 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4561 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4562 exp_ch6.adb: Minor reformatting.
4564 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4566 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4569 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4571 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4573 2011-08-04 Thomas Quinot <quinot@adacore.com>
4575 * sinfo.ads: Minor reformatting.
4577 2011-08-04 Emmanuel Briot <briot@adacore.com>
4579 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4580 even if there is no location.
4582 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4584 * sem_res.adb, sem_ch4.adb: move check for restriction
4585 No_Task_Hierarchy to resolve_allocator.
4587 2011-08-04 Thomas Quinot <quinot@adacore.com>
4589 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4590 This flag of N_Pragma nodes is not used, remove it as well as all of
4591 the associated circuitry.
4593 2011-08-04 Javier Miranda <miranda@adacore.com>
4595 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4596 runtime check on duplicated externa tags
4597 * debug.adb Document switch -gnatdQ.
4599 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4601 * a-fihema.ads: Minor typo fix.
4603 2011-08-04 Yannick Moy <moy@adacore.com>
4605 * sem_ch10.adb: Minor comment update.
4607 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4609 * einfo.adb: Update the node field usage to reflect the renaming of
4610 Return_Flag to Return_ Flag_Or_Transient_Decl.
4611 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4612 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4613 (Write_Field15_Name): Change Return_Flag to
4614 Return_Flag_Or_Transient_Decl.
4615 * einfo.ads: Rename node field Return_Flag to
4616 Return_Flag_Or_Transient_Decl. Update the associated comment and all
4617 occurrences in entities.
4618 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4619 associated Inline pragma.
4620 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4621 associated Inline pragma.
4622 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4624 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4625 Return_Flag and Set_Return_Flag.
4626 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4627 objects generated for controlled transients declared inside an
4628 Exception_With_Actions. Update the calls to Return_Flag.
4629 (Process_Object_Declaration): Add code to add a null guard for hook
4630 objects generated for controlled transients declared inside an
4631 Exception_With_Actions. Update related comment.
4632 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4633 objects generated for controlled transients declared inside an
4634 Exception_With_Actions. Update the calls to Return_Flag.
4635 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4637 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4639 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4640 positional aggregate.
4642 2011-08-04 Vincent Celier <celier@adacore.com>
4644 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4645 SLOC only for pragmas.
4647 2011-08-04 Emmanuel Briot <briot@adacore.com>
4649 * projects.texi: Minor typo fix.
4651 2011-08-04 Emmanuel Briot <briot@adacore.com>
4653 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4654 on case-sensitive file systems.
4656 2011-08-04 Thomas Quinot <quinot@adacore.com>
4658 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4659 nested in a disabled pragma.
4660 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4661 enclosing pragma, if any, for X decisions.
4663 2011-08-04 Thomas Quinot <quinot@adacore.com>
4665 * sem_prag.adb: Minor reformatting.
4667 2011-08-04 Vincent Celier <celier@adacore.com>
4669 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4670 allowed in no run time mode.
4672 2011-08-04 Vincent Celier <celier@adacore.com>
4674 * make.adb (Check): When -gnatc is used, check for the source file
4675 inside the ALI file with a canonical case file name.
4677 2011-08-04 Emmanuel Briot <briot@adacore.com>
4679 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4680 overriding the separator.
4682 2011-08-04 Robert Dewar <dewar@adacore.com>
4684 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4685 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4687 2011-08-04 Robert Dewar <dewar@adacore.com>
4689 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4691 2011-08-04 Yannick Moy <moy@adacore.com>
4693 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4694 'Result only appears in postcondition of function.
4696 2011-08-04 Thomas Quinot <quinot@adacore.com>
4698 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4699 external tag, include the value of the external tag in the exception
4702 2011-08-04 Yannick Moy <moy@adacore.com>
4704 * sem_attr.adb (Result): modify error message for misplaced 'Result
4706 2011-08-04 Sergey Rybin <rybin@adacore.com>
4708 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4709 clear that the second argument must be an identifier.
4711 2011-08-04 Thomas Quinot <quinot@adacore.com>
4713 * exp_ch9.adb (Build_Barrier_Function): When compiling with
4714 -fpreserve-control-flow, insert an IF statement on the barrier
4715 condition to ensure that a conditional branch instruction is generated.
4717 2011-08-04 Emmanuel Briot <briot@adacore.com>
4719 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4720 (Processing_Flags.Ignore_Missing_With): new flag.
4722 2011-08-04 Emmanuel Briot <briot@adacore.com>
4724 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4725 Source_List_File on case-insensitive systems where the file is actually
4726 on a case-sensitive file system (NFS,...).
4728 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4730 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4731 function return contains a controlled [extension] aggregate and the
4732 return statement is not part of a handled sequence of statements, wrap
4733 the return in a block. This ensures that all controlled temporaries
4734 generated during aggregate resolution will be picked up by the
4735 finalization machinery.
4737 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4739 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
4740 components, freeze type before resolution, to ensure that default
4741 initializations are present for all components.
4742 * sem_res.adb (Resolve_Actuals): the designated object of an
4743 accces-to-constant type is a legal actual in a call to an
4744 initialization procedure.
4746 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4748 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
4749 N_Unchecked_Type_Conversion to the possible containers of a renamed
4752 2011-08-04 Yannick Moy <moy@adacore.com>
4754 * par-ch13.adb (Aspect_Specifications_Present): recognize
4755 "with Identifier'Class =>" as an aspect, so that a meaningful warning
4756 is issued in Strict mode.
4757 * par.adb: Fix typos in comments.
4759 2011-08-04 Yannick Moy <moy@adacore.com>
4761 * sem_attr.adb (Result): modify error message to take into account Post
4762 aspect when compiling Ada 2012 (or newer) code.
4764 2011-08-04 Nicolas Roche <roche@adacore.com>
4766 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
4767 remove need for GCC exceptions.
4769 2011-08-04 Vincent Celier <celier@adacore.com>
4771 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
4772 project, not the source file name.
4773 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
4774 excluded, continue looking. This excluded source will only be returned
4775 if there is no other source with the same base name that is not locally
4778 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4780 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
4781 private and one of the operands is a real literal, use a qualified
4782 expression rather than a conversion which is not meaningful to the
4785 2011-08-04 Yannick Moy <moy@adacore.com>
4787 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
4788 corresponding aspect X'Class are allowed, proceed with analysis of the
4789 aspect instead of skipping it.
4791 2011-08-04 Tristan Gingold <gingold@adacore.com>
4793 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
4794 This will allow to have an Ada implementation for the subprogram.
4796 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4798 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
4799 completion and aspects are present, apply them to the entity for the
4800 type which is currently the partial view, but which is the one that
4802 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4803 applies to a partial view, indicate that the full view has predicates
4804 and delayed aspects.
4805 (Replace_Type_Reference): Handle properly predicates that apply to the
4806 full view of a private completion.
4808 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4810 * layout.adb (Layout_Type): For composite types, do not set Esize.
4811 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4813 (Size_Known): Look at the RM size of components instead of the Esize.
4814 (Freeze_Record_Type): Look at the RM size instead of the Esize to
4815 issue warning and activate Implicit_Packing.
4816 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
4817 if the Esize is not known.
4818 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4819 for elementary types only.
4820 (Analyze_Record_Representation_Clause): Look at the RM size instead
4821 of the Esize to issue errors.
4822 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4824 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
4826 Look at the RM size instead of the Esize for types if the latter is
4828 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4830 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4832 * sem_type.adb: proper handling of equality not involving anonymous
4835 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4837 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4838 Vis_Decls. When creating a library-level finalizer for a package spec,
4839 both the declaration and body of the finalizer are inserted either in
4840 the visible or private declarations of the package spec.
4842 2011-08-04 Javier Miranda <miranda@adacore.com>
4844 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4845 use of the full-view of a type when invoking Is_Ancestor.
4846 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4847 the full-view of private parents is requested, then use also the
4848 full-view of the parent of the first derivation.
4850 2011-08-04 Tristan Gingold <gingold@adacore.com>
4852 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4853 instead of the locally imported procedure.
4854 * s-taprop-mingw.adb (Enter_Task): Ditto.
4855 * s-valrea.adb (Scan_Real): Ditto.
4856 * s-imgrea.adb (Set_Image_Real): Ditto.
4857 * s-flocon.ads: Make the package pure.
4859 2011-08-04 Thomas Quinot <quinot@adacore.com>
4861 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4862 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4863 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4864 New subprogram, moved here from...
4865 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4866 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4867 rewriting of the last argument into a procedure call statement here...
4868 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4871 2011-08-04 Thomas Quinot <quinot@adacore.com>
4873 * par_sco.adb: Minor reformatting.
4875 2011-08-04 Robert Dewar <dewar@adacore.com>
4877 * erroutc.adb: Minor reformatting.
4879 2011-08-04 Thomas Quinot <quinot@adacore.com>
4881 * par_sco.adb: Comment update.
4883 2011-08-04 Tristan Gingold <gingold@adacore.com>
4885 * s-flocon.ads: New file.
4886 * g-flocon.ads: Now a renaming of s-flocon.
4887 * Makefile.rtl: Add s-flocon.o
4889 2011-08-04 Javier Miranda <miranda@adacore.com>
4891 * exp_strm.adb (Build_Array_Input_Function): if the array type is
4892 constrained, do not attempt to build a subtype of it.
4894 2011-08-04 Yannick Moy <moy@adacore.com>
4896 * errout.ads Change comments: remove 'R'M as an example where quotes
4897 are needed; add ALFA as another case where quotes are not needed
4898 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4899 case where quotes are not needed.
4900 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4901 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4902 Remove all occurrences of 'A'L'F'A
4904 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4906 * sem_ch13.adb: check legality of invariant pragma.
4908 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4910 * bindgen.adb: Add comments.
4912 2011-08-04 Yannick Moy <moy@adacore.com>
4914 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4916 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4917 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4919 2011-08-04 Robert Dewar <dewar@adacore.com>
4921 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4922 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4923 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4925 2011-08-04 Thomas Quinot <quinot@adacore.com>
4927 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4929 2011-08-04 Thomas Quinot <quinot@adacore.com>
4932 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4935 2011-08-04 Robert Dewar <dewar@adacore.com>
4937 * einfo.ads, exp_ch4.adb: Minor reformatting.
4939 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4941 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4943 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4945 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4946 type in all cases to compute list of primitive operations, because full
4947 view may be an itype that is not attached to the list of declarations.
4949 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4951 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4952 library has already been finalized.
4953 (Gen_Adafinal_C): Likewise.
4954 (Gen_Adainit_Ada): Generate an early return if the library has
4955 already been elaborated.
4956 (Gen_Adainit_C): Likewise.
4957 (Gen_Output_File_Ada): Generate an elaboration flag.
4958 (Gen_Output_File_C): Likewise.
4960 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4962 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4963 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4964 built in the first place.
4965 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4966 for CodePeer because Finalize_Address was not built to begin with.
4967 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4969 2011-08-04 Pascal Obry <obry@adacore.com>
4971 * adaint.c (__gnat_tmp_name): Use current process id to create temp
4972 filenames, this ensures unicity of filenames across processes.
4974 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4976 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4977 Raise_Controlled to Raise_From_Controlled_Operation. Update the
4978 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4979 Add False as the actual to From_Abort in the generated call to
4980 Raise_From_Controlled_Operation.
4982 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4984 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4985 so that the ali file name can be retrieved from outside of this package.
4986 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4987 doing nothing in the general case, but used to update the object file
4988 timestamp if directly generated by the backend.
4989 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
4990 to a later time than the ali file one.
4992 2011-08-04 Yannick Moy <moy@adacore.com>
4994 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4995 entities whose body contains an Annotate pragma which forces formal
4997 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4998 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
4999 Mark_Non_ALFA_Subprogram to pass in a message and node.
5000 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
5001 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
5002 surrounding subprogram.
5003 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
5004 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
5005 as not in ALFA is annotated with Formal_Proof being On, then an error
5006 is issued based on the additional parameters for message and node.
5007 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
5008 * gcc-interface/Make-lang.in: Update dependencies.
5010 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5012 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
5013 Finalize_Address when CodePeer is enabled.
5015 2011-08-04 Pascal Obry <obry@adacore.com>
5017 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
5018 the latter returns a pointer to a static buffer which is deallocated
5019 at the end of the routine.
5021 2011-08-04 Yannick Moy <moy@adacore.com>
5023 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
5024 after index creation; mark unconstrained base array type generated as
5025 being in/not in ALFA as well
5026 (Make_Index): mark subtype created as in/not in ALFA
5027 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
5028 over a loop as in/not in ALFA, depending on its type and form of loop
5031 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5033 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
5034 directly to False on .NET and JVM.
5036 2011-08-04 Yannick Moy <moy@adacore.com>
5038 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
5039 constraint that subtype must come from source code to be in ALFA, so
5040 that anonymous subtypes can be in ALFA too.
5042 2011-08-04 Yannick Moy <moy@adacore.com>
5044 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5045 reference for ALFA mode.
5046 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5047 procedure public so as to use it from formal verification back-end.
5049 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5051 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5052 invalid checks of the Parameter, making Remove_Switch not working
5055 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5057 * targparm.ads: Update header: no run-time exception is needed on this
5060 2011-08-04 Vincent Celier <celier@adacore.com>
5062 * a-fihema.adb: Use System.IO instead of GNAT.IO
5064 2011-08-04 Thomas Quinot <quinot@adacore.com>
5066 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5067 are forbidden in Compiler_Unit mode.
5069 2011-08-04 Robert Dewar <dewar@adacore.com>
5071 * sem_util.adb: Minor reformatting.
5073 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5075 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5076 library-level finalizers.
5077 (Gen_Finalize_Library_C): Update the import string for library-level
5079 (Gen_Finalize_Library_Defs_C): Update the definition name of a
5080 library-level finalizer.
5081 * exp_ch7.adb: Remove with and use clauses for Stringt.
5082 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5083 Spec_Decl. Add local variable Body_Id. The names of library-level
5084 finalizers are now manually fully qualified and are no longer external.
5085 A single name is now capable of servicing .NET, JVM and non-VM targets.
5086 Pragma Export is no longer required to provide visibility for the name.
5087 (Create_Finalizer_String): Removed.
5088 (New_Finalizer_Name): New routine which mimics New_..._Name.
5090 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5092 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5093 elaboration counter to Standard_Short_Integer.
5094 * sem_util.adb (Build_Elaboration_Entity): Likewise.
5095 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5096 (Gen_Elab_Externals_C): Likewise.
5098 2011-08-04 Ed Falis <falis@adacore.com>
5100 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5101 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5102 system-vxworks-mips.ads, system-vxworks-x86.ads
5103 (Always_Compatible_Rep): set to False for all VxWorks targets.
5105 2011-08-04 Robert Dewar <dewar@adacore.com>
5107 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5108 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5109 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5110 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5111 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5112 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5113 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5114 Minor reformatting and code reorganization.
5116 2011-08-04 Emmanuel Briot <briot@adacore.com>
5118 * projects.texi: Added doc for aggregate projects.
5120 2011-08-04 Emmanuel Briot <briot@adacore.com>
5122 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5123 Add support for overriding the Project_Path in aggregate projects.
5125 2011-08-04 Robert Dewar <dewar@adacore.com>
5127 * a-cofove.ads: Minor reformatting.
5129 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5131 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5132 on the generated code.
5133 (Build_Finalize_Statements): Update the comment on the generated code.
5134 (Build_Initialize_Statements): Update the comment on the generated code.
5135 (Build_Object_Declarations): Add local variable Result. The object
5136 declarations are now built in sequence.
5137 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5140 2011-08-04 Robert Dewar <dewar@adacore.com>
5142 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5144 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5146 * einfo.ads (Elaboration_Entity): Document new definition and use.
5147 (Elaboration_Entity_Required): Adjust to above change.
5148 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5149 * exp_ch12.adb: And with and use for Snames.
5150 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5151 * exp_util.adb (Set_Elaboration_Flag): Likewise.
5152 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5153 <Check_Unit_Name>: Deal with N_Expanded_Name.
5154 <Attribute_Elaborated>: Extend to all unit names.
5155 * sem_elab.adb: And with and use for Uintp.
5156 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5157 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5158 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5159 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5160 from Gen_Adainit_Ada.
5161 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5162 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
5163 case, do not call System.Standard_Library.Adafinal; instead call
5164 finalize_library if needed.
5165 (Gen_Adafinal_C): Likewise.
5166 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5167 non-main program case.
5168 (Gen_Adainit_C): Generate a couple of external declarations here.
5169 In the main program case, set SSL.Finalize_Library_Objects.
5170 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5171 (Gen_Elab_Calls_C): Likewise.
5172 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
5173 (Gen_Finalize_Library_C): Likewise. Generate a full function.
5174 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5176 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5177 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
5179 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5180 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
5181 of external declarations. Call Gen_Finalize_Library_C.
5183 2011-08-04 Emmanuel Briot <briot@adacore.com>
5185 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5186 Compute_Compilation_Phases): new subprogram.
5187 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5188 The number of mains as well as the various compilation phases that
5189 need to be run are now project tree specific, since various
5190 aggregated trees might have different requirements. In particular,
5191 they do not all require bind or link phases.
5193 2011-08-04 Emmanuel Briot <briot@adacore.com>
5195 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5196 (Project_Tree_Appdata): New type.
5197 It is now possible to associate application-specific data to a project
5198 tree. In particular, this is used in the gprbuild builder to avoid a
5199 number of global tables and htables, especially now that there can be
5200 several project trees loaded at once because of aggregate projects.
5201 (Debug_Name): new procedure.
5202 * projects.texi: Clarify syntax of "**" for Source_Dirs
5204 2011-08-03 Emmanuel Briot <briot@adacore.com>
5206 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5207 the "roots" for a main.
5208 (Fill_From_Project): add support for aggregate projects. Main units
5209 in aggregated projects are now automatically added in the list of
5210 files to build (although this fails later on in gprbuild, because
5211 these files are not using the root proejct tree, so this needs
5213 * gcc-interface/Make-lang.in: Update dependencies.
5215 2011-08-03 Yannick Moy <moy@adacore.com>
5217 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
5218 conditional expression in ALFA.
5219 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
5220 expressions as not in ALFA.
5222 2011-08-03 Robert Dewar <dewar@adacore.com>
5224 * a-cofove.adb: Minor reformatting.
5226 2011-08-03 Emmanuel Briot <briot@adacore.com>
5228 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
5229 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
5231 These packages are more logically placed in the Queue package, since
5232 they manipulate the queue. It is also likely that they can be adapted
5233 for gnatmake, thus sharing more code.
5234 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
5235 that we could move the above.
5237 2011-08-03 Emmanuel Briot <briot@adacore.com>
5239 * errutil.adb (Finalize): clean up the list of error messages on exit.
5240 Calling this subprogram multiple times will no longer show duplicate
5241 error messages on stderr.
5243 2011-08-03 Emmanuel Briot <briot@adacore.com>
5245 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
5246 Getopt_Switches when we have already define a command line
5249 2011-08-03 Yannick Moy <moy@adacore.com>
5251 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
5252 in ALFA. Instead, they are considered as assertions to prove.
5253 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
5254 nodes as not in ALFA. Instead, include conditional expressions in ALFA
5255 if they have no ELSE part, or if they occur in pre- and postconditions,
5256 where the Condition cannot have side-effects in ALFA
5257 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
5258 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
5259 Instead, include type conversion between scalar types in ALFA.
5260 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
5261 if-and-only-if its type is in ALFA.
5263 2011-08-03 Thomas Quinot <quinot@adacore.com>
5265 * scos.adb, get_scos.adb, put_scos.adb
5266 New code letter for decisions: G (entry guard)
5268 (Traverse_Subprogram_Body): Rename to...
5269 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
5270 (Traverse_Protected_Body): New subprogram
5271 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
5272 protected bodies and entry bodies.
5274 2011-08-03 Yannick Moy <moy@adacore.com>
5276 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
5277 entities with get/set subprograms, which is set on procedure entities
5278 generated by the compiler for a postcondition.
5279 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
5280 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
5281 entity for a declaration
5282 (Get_Unique_Entity_For_Decl): new function returning an entity which
5283 represents a declaration, so that matching spec and body have the same
5286 2011-08-03 Robert Dewar <dewar@adacore.com>
5288 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
5289 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
5291 2011-08-03 Yannick Moy <moy@adacore.com>
5293 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
5294 library-level because retriction No_Implicit_Dynamic_Code in the
5295 front-end prevents its definition as a local subprogram
5296 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
5297 for reuse in other contexts
5298 (Traverse_Declarations_Or_Statements,
5299 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5300 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
5301 procedures take a callback parameter to be called on all declarations
5303 (Traverse_All_Compilation_Units): new generic function to traverse a
5304 compilation unit and call a callback parameter on all declarations
5306 2011-08-03 Javier Miranda <miranda@adacore.com>
5308 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
5309 in Java since they are always enclosed in a namespace that
5310 differentiates them, and overloaded entities are supported by the VM.
5312 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5314 * checks.adb (Determine_Range): If a computed bound of an operation is
5315 outside the range of the base type of the expression, and overflow
5316 checks are enabled, the result is unknown and cannot be used for any
5317 subsequent constant folding.
5318 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
5319 unknown, so is the result of the comparison.
5321 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5323 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
5324 From_Abort. When finalization was triggered by an abort, propagate
5325 Standard'Abort_Signal rather than Program_Error.
5326 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
5328 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
5329 From_Abort. When finalization was triggered by an abort, propagate
5330 Standard'Abort_Signal rather than Program_Error.
5331 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
5333 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
5334 Abort_Id. Update the calls to Build_Object_Declarations and
5335 Build_Raise_Statement to include Abort_Id.
5336 (Build_Adjust_Statements): New local variable Abort_Id. Update the
5337 calls to Build_Object_Declarations and Build_Raise_Statement to include
5339 (Build_Finalize_Statements): New local variable Abort_Id. Update the
5340 calls to Build_Object_Declarations and Build_Raise_Statement to include
5342 (Build_Components): Create an entity for Abort_Id when exceptions are
5343 allowed on the target.
5344 (Build_Finalizer): New local variable Abort_Id.
5345 (Build_Initialize_Statements): New local variable Abort_Id. Update the
5346 calls to Build_Object_Declarations and Build_Raise_Statement to include
5348 (Build_Object_Declarations): Add new formal Abort_Id. Create the
5349 declaration of flag Abort_Id to preserve the original abort status
5350 before finalization code is executed.
5351 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
5352 runtime routine Raise_From_Controlled_Operation.
5353 (Create_Finalizer): Update the call to Build_Raise_Statement to include
5354 Abort_Id. Update the call to Build_Object_Declarations to include
5355 Abort_Id. Update the layout of the finalizer body.
5356 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
5357 (Process_Transient_Objects): New local variable Abort_Id. Remove the
5358 clunky code to create all flags and objects related to
5359 exception propagation and replace it with a call to
5360 Build_Object_Declarations. Update the call to Build_Raise_Statement to
5362 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
5363 Add new formal Abort_Id and associated comment on its use.
5364 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
5366 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
5367 Remove the clunky code to create all flags and objects related to
5368 exception propagation and replace it with a call to
5369 Build_Object_Declarations. Update the call to Build_Raise_Statement.
5371 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5373 * s-tassta.adb: Fix minor typos.
5375 2011-08-03 Robert Dewar <dewar@adacore.com>
5377 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
5378 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
5380 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5382 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
5383 to packages. This ensures that the finalizer body will not end up
5384 inside the freeze node.
5385 (Process_Declarations): Add code to detect whether a freeze node has a
5386 nested finalization collection.
5388 2011-08-03 Pascal Obry <obry@adacore.com>
5390 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
5391 (Current_Session): Return a not null access to Session_Type.
5392 (Default_Session): Likewise.
5394 2011-08-03 Robert Dewar <dewar@adacore.com>
5396 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
5397 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
5399 2011-08-03 Pascal Obry <obry@adacore.com>
5401 * g-awk.ads: Minor comment fix.
5403 2011-08-03 Sergey Rybin <rybin@adacore.com>
5405 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5406 the tree structure related to discriminant constraints.
5407 Original_Discriminant cannot be used any more for computing the
5408 defining name for the reference to a discriminant.
5410 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5412 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
5413 function is not visibly tagged, this is not a dispatching call and
5414 therfore is not Tag_Indeterminate, even if the function is marked as
5415 dispatching on result.
5417 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5419 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
5420 (Expand_N_Free_Statement): Add a guard to protect against run-times
5421 which do not support controlled types.
5422 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
5423 against run-times which do not support controlled types.
5424 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
5425 against run-times which do not support controlled types.
5426 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
5427 against run-times which do not support controlled types.
5428 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
5429 protect against run-times which do not support controlled types.
5431 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5433 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
5434 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
5436 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5438 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
5439 modified in the source, to prevent spurious warnings when compiling
5442 2011-08-03 Thomas Quinot <quinot@adacore.com>
5444 * a-except-2005.adb: Minor reformatting.
5446 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5448 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
5449 is a renaming declaration in the private part of a package, do not emit
5450 a warning that the with_clause could be moved because the renaming may
5451 be used in the body or in a child unit.
5453 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5455 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5456 Propagate the Comes_From_Source attribute from the original return
5457 object to the renaming.
5459 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5461 * exp_ch7.adb (Build_Raise_Statement): Do not call
5462 Raise_From_Controlled_Operation when this routine is not present in
5463 the run-time library.
5464 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
5465 libraries (Ravenscar), tasks are non-terminating, and protected objects
5466 and tasks can only appear at library level, so we do not want
5467 finalization of protected objects nor tasks.
5468 * exp_intr.adb: Minor clarification in comment.
5469 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
5470 Gen_Output_File_C): Remove references to finalization of library-level
5471 objects when using restricted run-time libraries.
5473 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5475 * sem_ch3.adb (Build_Discriminant_Constraints): Set
5476 Original_Discriminant only if the parent type is a generic formal.
5478 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5480 * exp_ch13.adb: Add with and use clause for Targparm;
5481 (Expand_N_Free_Statement): Prevent the generation of a custom
5482 Deallocate on .NET/JVM targets since this requires pools and address
5484 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5485 .NET/JVM targets, attach the newly allocated object to the access
5486 type's finalization collection. Do not generate a call to
5487 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5488 exist in the runtime.
5489 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5490 create a custom Allocate for object that do not require initialization.
5491 Attach a newly allocated object to the access type's finalization
5492 collection on .NET/JVM.
5493 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5494 assignment of controlled types on .NET/JVM. The two hidden pointers
5495 Prev and Next and stored and later restored after the assignment takes
5497 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5498 kludge for .NET/JVM to recognize a particular piece of code coming from
5499 Heap_Management and change the call to Finalize into Deep_Finalize.
5500 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5501 finalization collections on .NET/JVM only for types derived from
5502 Controlled. Separate the association of storage pools with a collection
5503 and only allow it on non-.NET/JVM targets.
5504 (Make_Attach_Call): New routine.
5505 (Make_Detach_Call): New routine.
5506 (Process_Object_Declarations): Suppress the generation of
5507 build-in-place return object clean up code on .NET/JVM since it uses
5509 * exp_ch7.ads (Make_Attach_Call): New routine.
5510 (Make_Detach_Call): New routine.
5511 * exp_intr.adb Add with and use clause for Targparm.
5512 (Expand_Unc_Deallocation): Detach a controlled object from a collection
5513 on .NET/JVM targets.
5514 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5515 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5516 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5517 names used in finalization.
5519 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5521 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5522 (Attach, Detach): Lock the current task when chaining an object onto a
5525 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5527 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5528 Rewritten to create the message strings when the exception is not
5529 raised by an abort during finalization.
5530 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5531 Raise_From_Controlled_Operation and update its associated comment.
5532 * a-fihema.ads, a-fihema.adb: New GNAT unit.
5533 Ada.Finalization.Heap_Management provides key functionality
5534 associated with controlled objects on the heap, their creation,
5535 finalization and reclamation. Type Finalization_Collection is
5536 effectively a wrapper which sits ontop of a storage pool and performs
5537 all necessary bookkeeping for all the objects it contains. Each
5538 access-to-controlled or access-to-class-wide type receives a collection
5539 as part of its expansion. The compiler generates buffer code and
5540 invokes Allocate / Deallocate to create and destroy allocated
5542 * a-finali.adb ("="): Removed.
5543 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5544 fields Prev and Next.
5545 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5546 A library unit with at least one controlled object on the library level
5547 has a special finalizer which is invoked by the binder. To signal this,
5548 ali files carry field PF.
5549 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5550 associated comment on field usage.
5551 * a-tags.adb (Get_RC_Offset): Removed.
5552 (Needs_Finalization): New routine.
5553 * a-tags.ads: Update the structure of the GNAT dispatch tables.
5554 Dispatch tables now carry field Needs_Finalization which provides
5555 runtime indication whether a type is controlled or has controlled
5556 components or both. Remove field RC_Offset.
5557 (Get_RC_Offset): Removed along with its associated pragma Export.
5558 Since tagged types with controlled components no longer carry hidden
5559 field _controller, the special mechanism to retrieve its location is no
5561 (Needs_Finalization): New routine.
5562 * atree.ads, atree.adb (Elist24): New routine.
5563 (Set_Elist24): New routine.
5564 * atree.h: Add a define clause for Elist24.
5565 * bindgen.adb New library-level variable Lib_Final_Built.
5566 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5567 presence of a VM target, the routine generates calls to the proper
5568 library finalization routine.
5569 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5570 targets. Set the correct library finalization routine depending on
5571 whether the library has controlled objects or this is a VM compilation.
5572 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5573 to library-level finalizers of compiled units in reverse order of
5574 elaboration. It also produces exception management code and reraises a
5575 potential exception after all units have been finalized.
5576 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5577 library-level finalizers of compiled units in reverse order of
5579 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5580 definitions of all library-level finalizers available to the compilation
5581 (Gen_Main_Ada): Directly call Adafinal which now contails all target
5583 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5584 System.Standard_Library.Adafinal directly. If the library needs
5585 finalization actions, create the sequence of finalization calls.
5586 (Gen_Output_File_Ada): Alphabetize local variables and constants.
5587 Generate a with clause for System.Soft_Links when compiling for a VM.
5588 Remove the code which imports System.Standard_Library.Adafinal as
5589 Do_Finalize. Generate the library finalization routine.
5590 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5591 If the library needs finalization actions, create all the definitions
5592 of library- level finalizers.
5593 (Has_Finalizer): New routine. Determines whether at least one compiled
5594 unit has a library-level finalizer.
5595 Add type Qualification_Mode.
5596 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5597 * einfo.adb: New usage of field 15 as Return_Flag.
5598 Remove Finalization_Chain_Entity from the usages of field 19.
5599 Remove Associated_Final_Chain from the usages of field 23.
5600 New usage of field 23 as Associated_Collection.
5601 New usage of field 24 as Finalizer.
5602 New usage of flag 252 as Is_Processed_Transient.
5603 (Associated_Final_Chain): Removed.
5604 (Associated_Collection): New routine.
5605 (Finalization_Chain_Entity): Removed.
5606 (Finalizer): New routine.
5607 (Is_Finalizer): New routine.
5608 (Is_Processed_Transient): New routine.
5609 (Return_Flag): New routine.
5610 (Set_Associated_Final_Chain): Removed.
5611 (Set_Associated_Collection): New routine.
5612 (Set_Finalization_Chain_Entity): Removed.
5613 (Set_Finalizer): New routine.
5614 (Set_Is_Processed_Transient): New routine.
5615 (Set_Return_Flag): New routine.
5616 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5618 (Write_Field8_Name): Alphabetize the output.
5619 (Write_Field11_Name): Alphabetize the output.
5620 (Write_Field12_Name): Alphabetize the output.
5621 (Write_Field13_Name): Alphabetize the output.
5622 (Write_Field14_Name): Alphabetize the output.
5623 (Write_Field15_Name): Alphabetize the output.
5624 (Write_Field16_Name): Alphabetize the output.
5625 (Write_Field17_Name): Alphabetize the output.
5626 (Write_Field18_Name): Alphabetize the output.
5627 (Write_Field19_Name): Alphabetize the output. Remove the output of
5628 Finalization_Chain_Entity.
5629 (Write_Field20_Name): Alphabetize the output.
5630 (Write_Field21_Name): Alphabetize the output.
5631 (Write_Field22_Name): Alphabetize the output.
5632 (Write_Field23_Name): Alphabetize the output. Remove the output of
5633 Associated_Final_Chain. Add output for Associated_Collection.
5634 (Write_Field24_Name): Alphabetize the output.
5635 (Write_Field25_Name): Add output for Finalizer.
5636 (Write_Field26_Name): Alphabetize the output.
5637 (Write_Field27_Name): Alphabetize the output.
5638 (Write_Field28_Name): Alphabetize the output.
5639 * einfo.ads: Add new field description for Associated_Collection and
5641 Remove Associated_Final_Chain and its uses in nodes.
5642 Remove Finalization_Chain_Entity and its uses in nodes.
5643 Add new field description for Finalizer and its uses in nodes.
5644 Add new synthesized attribute Is_Finalizer.
5645 Add new flag description for Is_Processed_Transient and its uses in
5647 Add new field description for Return_Flag and its uses in nodes.
5648 (Associated_Final_Chain): Removed along with its pragma Inline.
5649 (Associated_Collection): New routine and pragma Inline.
5650 (Finalization_Chain_Entity): Removed along with its pragma Inline.
5651 (Finalizer): New routine and pragma Inline.
5652 (Is_Finalizer): New routine and pragma Inline.
5653 (Is_Processed_Transient): New routine and pragma Inline.
5654 (Return_Flag): New routine and pragma Inline.
5655 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5656 (Set_Associated_Collection): New routine and pragma Inline.
5657 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5658 (Set_Finalizer): New routine and pragma Inline.
5659 (Set_Is_Processed_Transient): New routine and pragma Inline.
5660 (Set_Return_Flag): New routine and pragma Inline.
5661 * exp_aggr.adb: Alphabetize subprograms.
5662 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5663 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5664 associated comments. Remove local variables External_Final_List and
5666 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5667 Ancestor. Remove the retrieval of finalization lists. Update the call to
5669 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5670 lists. Update the call to Late_Expansion.
5671 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5672 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5673 (Gen_Assign): Remove the retrieval of the finalization list used to
5674 build the assignment. Update the calls to Make_Init_Call and
5676 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5677 Remove the mechanism to determine attachment levels and finalization
5678 list retrieval. Remove the processing for coextensions.
5679 (Init_Controller): Removed. Controllers no longer exist.
5680 (Late_Expansion): Remove formals Flist and Obj along with their
5681 associated comments. Update the calls to Build_Record_Aggr_Code and
5682 Build_Array_Aggr_Code.
5683 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5684 (Expand_N_Freeze_Entity): Add special processing for finalizers which
5685 appear in entry bodies, protected subprograms and task bodies.
5686 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5687 * exp_ch3.adb (Add_Final_Chain): Removed.
5688 (Build_Array_Init_Proc): Alphabetize local variables.
5689 (Build_Assignment): Alphabetize local variables. Update the call to
5691 (Build_Class_Wide_Master): Rename local variables to better reflect
5693 (Build_Discriminant_Assignments): Code reformatting.
5694 (Build_Init_Call_Thru): Code reformatting.
5695 (Build_Init_Procedure): Code reformatting. Generate a special version
5696 of Deep_Finalize which is capable of finalizing all initialized
5697 components and ignore the rest.
5698 (Build_Init_Statements): Rename local variables to better reflect their
5700 Reimplement the mechanism to include the creation and update of an index
5701 variable called a "counter". It is used as a bookmark for tracing
5702 initialized and non-initialized components.
5703 (Build_Initialization_Call): Remove local variable Controller_Typ.
5704 Alphabetize all local variables. Remove the initialization of the
5705 record controller and update the call to Make_Init_Call.
5706 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5707 New local variable Counter.
5708 (Constrain_Array): Alphabetize.
5709 (Expand_Freeze_Array_Type): Create a collection instead of a
5711 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5712 Finalize_Address which is used in conjunction with allocated controlled
5714 (Expand_N_Object_Declaration): Remove the creation of a finalization
5715 list for anonymous access types. Update the calls to Make_Init_Call and
5717 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5718 retrieval of finalization lists. Remove the expansion of the record
5719 controller. Create TSS primitive Finalize_Address used in conjunction
5720 with controlled objects on the heap. Create finalization collections
5721 for access-to-controlled record components.
5722 (Expand_Record_Controller): Removed.
5723 (Freeze_Type): Remove the freezing of record controllers. Freezing of
5724 class-wide types now requires additional processing. Create
5725 finalization collections for access-to-controlled types.
5726 (Increment_Counter): New routine.
5727 (Make_Counter): New routine.
5728 (Make_Eq_If): Remove the mention of Name_uController.
5729 (Make_Predefined_Primitive_Specs): There is no longer need to skip
5730 types coming from System.Finalization_Root.
5731 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5732 (Predefined_Primitive_Bodies): There is no longer need to skip types
5733 coming from System.Finalization_Root.
5734 (Stream_Operation_OK): Do not generate stream routines for
5735 type Ada.Finalization.Heap_Management.Finalization_Collection.
5736 * exp_ch3.ads: Alphabetize subprograms.
5737 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
5738 Add with and use clause for Lib.
5739 (Complete_Coextension_Finalization): Removed.
5740 (Complete_Controlled_Allocation): New routine. Create a finalization
5741 collection for anonymous access-to-controlled types. Create a custom
5742 Allocate which interfaces with the back end and the machinery in
5744 (Expand_Allocator_Expression): Add necessary calls to
5745 Complete_Controlled_Allocation. Remove the retrieval of finalization
5746 lists. Update the calls to Make_Adjust_Call. Generate a call to
5747 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5748 the associated collection.
5749 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
5750 Code clean up. Remove the retrieval of finalization lists and
5752 Update the call to Make_Init_Call. Generate a call to
5753 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5754 the associated collection.
5755 (Get_Allocator_Final_List): Removed. Finalization lists are not
5757 (Suitable_Element): Remove the mention of Name_uController.
5758 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
5759 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
5760 the left hand side, carry out the assignment and adjust the left hand
5762 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
5763 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
5764 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
5765 BIP_Collection and BIPcollection.
5766 (Build_Heap_Allocator): New routine used to allocate the return object
5767 of a build-in-place function onto a collection.
5768 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
5769 (Expand_Call): Do not replace direct calls to Deep routines with their
5771 (Expand_N_Extended_Return_Statement): Give all variables shorter names
5772 and update their occurrences. Add a special return flag to monitor the
5773 [ab]normal execution of the function. The flag is set right before the
5775 Rewrite the mechanism used to allocate a build-in-place return object
5776 on the heap or on a storage pool.
5777 (Is_Direct_Deep_Call): New routine.
5778 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
5779 build-in-place function call instead of a final list. Build a call to
5780 Set_Finalize_Address_Ptr to decorate the associated collection.
5781 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
5782 order to name the build-in-place function call's result for later
5783 finalization. Add a collection to a build-in-place function call
5784 instead of a final list.
5785 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
5786 build-in-place function call instead of a final list. Remove the code
5787 which moves one final list and transforms it into the actual in a
5788 nested build-in-place call.
5789 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
5790 build-in-place function call instead of a final list.
5791 (Move_Final_List): Removed.
5792 (Needs_BIP_Collection): New routine.
5793 (Needs_BIP_Final_List): Removed.
5794 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
5795 enumeration type BIP_Formal_Kind.
5796 Update the related comment.
5797 (Needs_BIP_Collection): New routine.
5798 (Needs_BIP_Final_List): Removed.
5799 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
5800 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
5801 majority of subprograms in this unit. Add Name_Finalize_Address to
5802 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5803 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5804 statements for an array type.
5805 (Build_Adjust_Statements): Create the adjust statements for a record
5807 (Build_Cleanup_Statements): New routine. A procedure which given any
5808 construct containing asynchronous calls, references to _master, or is a
5809 task body, a task allocation or a protected body produces the necessary
5810 runtime calls to clean up these constructs.
5811 (Build_Exception_Handler): New routine.
5812 (Build_Final_List): Removed.
5813 (Build_Finalization_Collection): New routine. A core procedure which
5814 creates a collection to service heap allocated controlled objects
5815 associated with an access-to-controlled type.
5816 (Build_Finalize_Statements): Create the finalization statements for a
5818 (Build_Finalizer): New routine. A core procedure which given any
5819 construct with declarations and/or statements detects all objects which
5820 need any type of clean up (controlled objects, protected objects) and
5821 generates all necessary code to clean up the said objects in the proper
5823 (Build_Finalizer_Call): New routine.
5824 (Build_Initialize_Statements): Create the initialization statements for
5825 an array type. The generated routine contains code to finalize partially
5827 (Build_Object_Declarations): New routine.
5828 (Build_Raise_Statement): New routine.
5829 (Clean_Simple_Protected_Objects): Removed.
5830 (Controller_Component): Removed.
5831 (Enclosing_Function): New routine.
5832 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5833 either declarations or statements or both.
5834 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5835 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5837 (Find_Final_List): Removed.
5838 (Global_Flist_Ref): Removed.
5839 (In_Finalization_Root): Removed.
5840 (Insert_Actions_In_Scope_Around): Determine the range of the transient
5841 scope in terms of tree nodes. Process all transient variables within
5843 (Make_Adjust_Call): Rewritten. There is no longer an attach call
5844 generated after the adjust.
5845 (Make_Attach_Call): Removed.
5846 (Make_Call): New routine.
5847 (Make_Clean): Removed.
5848 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5850 (Make_Deep_Proc): Rewritten to generate the new profile signature used
5852 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5854 (Make_Final_Call): Modified to simply create a call to either
5855 Deep_Finalize or Finalize.
5856 (Make_Finalize_Address_Body): New routine.
5857 (Make_Finalize_Address_Stmts): New routine. A function which produces
5858 TSS primitive Finalize_Address used in conjunction with heap allocated
5860 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5861 (Make_Init_Call): Rewritten. There is no longer an attach call
5862 generated after initialization.
5863 (Make_Local_Deep_Finalize): New routine.
5864 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5865 (Make_Transient_Block): Remove the finalization list retrieval and
5867 (Needs_Finalization): Moved to Exp_Util.
5868 (Parent_Field_Type): New routine.
5869 (Preprocess_Components): New routine.
5870 (Process_Transient_Objects): New routine.
5871 (Wrap_HSS_In_Block): New routine.
5872 (Wrap_Transient_Declaration): Remove finalization list management and
5873 controller insertion.
5874 (Wrap_Transient_Expression): Code reformatting.
5875 (Wrap_Transient_Statement): Code reformatting.
5876 * exp_ch7.ads (Build_Final_List): Removed.
5877 (Build_Finalization_Collection): New routine.
5878 (Build_Raise_Statement): New routine.
5879 (Controller_Component): Removed.
5880 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5881 (Find_Final_List): Removed.
5882 (In_Finalization_Root): Removed.
5883 (Is_Simple_Protected_Type): Update related comment.
5884 (Make_Adjust_Call): New parameter profile and associated comments.
5885 (Make_Attach_Call): Removed.
5886 (Make_Final_Call): New parameter profile and associated comments.
5887 (Make_Finalize_Address_Body): New routine.
5888 (Make_Init_Call): New parameter profile and associated comments.
5889 (Make_Local_Deep_Finalize): New routine.
5890 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5891 (Needs_Finalization): Moved to Exp_Util.
5892 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5893 (Expand_N_Protected_Body): Remove the handling of finalization lists.
5894 (Find_Protection_Type): Moved to Exp_Util.
5895 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5896 (Make_DT): Update sequence of dispatch table initialization. Remove the
5897 initialization of field RC_Offset. Add initialization of field Needs_
5899 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5900 Reimplement how an object is first finalized, then deallocated.
5901 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5903 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5904 Register TSS_Finalize_Address with type TSS_Names.
5905 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5906 procedure provides the interface between an allocation / deallocation
5907 and the support machinery in Ada.Finalization.Heap_Management.
5908 (Find_Init_Call): Code reformatting.
5909 (Find_Init_Call_In_List): Code reformatting.
5910 (Find_Protection_Type): Moved from Exp_Ch9.
5911 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5912 (Has_Controlled_Coextensions): Removed.
5913 (Has_Controlled_Objects): New routine.
5914 (In_Library_Level_Package_Body): New routine.
5915 (Insert_Action_After): New routine.
5916 (Is_Finalizable_Transient): New routine. This predicate determines
5917 whether an object declaration is one of the many variants of controlled
5919 (Is_Null_Access_BIP_Func_Call): New routine.
5920 (Is_Non_BIP_Func_Call): New routine.
5921 (Is_Related_To_Func_Return): New routine.
5922 (Needs_Finalization): Moved from Exp_Ch7.
5923 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5924 (Find_Protection_Type): Moved from Exp_Ch9.
5925 (Has_Controlled_Coextensions): Removed.
5926 (Has_Controlled_Objects): New routine.
5927 (In_Library_Level_Package_Body): New routine.
5928 (Insert_Action_After): New routine.
5929 (Is_Finalizable_Transient): New routine.
5930 (Is_Null_Access_BIP_Func_Call): New routine.
5931 (Is_Non_BIP_Func_Call): New routine.
5932 (Is_Related_To_Func_Return): New routine.
5933 (Needs_Finalization): Moved from Exp_ch7.
5934 * expander.adb (Expand): Add a case for N_Free_Statement.
5935 * freeze.adb (Freeze_All): Replace the generation of a finalization
5936 list with a collection for access-to-controlled types.
5937 (Freeze_Entity): Code reformatting.
5938 (Freeze_Record_Type): Remove the freezing of a record controller
5940 (Freeze_Subprogram): Code reformatting.
5941 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5943 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5944 has a library-level finalizer.
5945 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5946 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5947 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5948 files. Add a-fihema to the list of object files.
5950 Alphabetize the associations in type Is_Parameterless_Attribute.
5951 * rtsfind.ads: Ada.Finalization_List.Controller and
5952 System.Finalization_Implementation are no longer a GNAT unit.
5953 Update the range of type Ada_Finalization_Child. Remove the following
5954 recoverable entities:
5956 RE_Attach_To_Final_List
5960 RE_Finalizable_Ptr_Ptr
5961 RE_Global_Final_List
5962 RE_Limited_Record_Controller
5965 RE_Record_Controller
5966 RE_Simple_List_Controller
5968 Add the following recoverable entities:
5970 RE_Add_Offset_To_Address
5974 RE_Exception_Identity
5975 RE_Finalization_Collection
5976 RE_Finalization_Collection_Ptr
5977 RE_Needs_Finalization
5978 RE_Save_Library_Occurrence
5979 RE_Set_Finalize_Address_Ptr
5980 RE_Set_Storage_Pool_Ptr
5982 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5984 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5985 (First_Stored_Discriminant): Remove the mention of Name_uController.
5986 * sem_aux.ads: Comment reformatting.
5987 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5988 to redecorate an already existing class-wide type.
5989 (Decorate_Tagged_Type): New parameter profile and associated comment.
5990 Create a "shadow class-wide type" for a shadow entity.
5991 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
5992 of the final chain along with the associated comment.
5993 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
5994 Full_Desig and set it to the full view of the designated type.
5995 Initialize the finalization collection to empty.
5996 (Build_Derived_Record_Type): Alphabetize local variables. Code
5998 (Collect_Fixed_Components): Remove the mention of Name_uController.
5999 (Create_Constrained_Components): Remove the mention of Name_uController.
6000 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
6001 class-wide type of a shadow entity.
6002 (Process_Full_View): Update the machinery which marks type
6003 Limited_Controlled's entity as limited.
6004 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
6005 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
6006 list, instead make a collection build-in-place formal.
6007 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
6008 a designated type in order to establish a match between the renaming
6009 and the renamed entity.
6010 (Find_Selected_Component): Add guard to prevent spurious exceptions
6011 from being raised on .NET/JVM.
6012 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
6013 to the list of primitive that need special processing. Update arrays
6014 C_Names and D_Names.
6015 (Replace_Types): Handle class-wide types.
6016 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
6017 different parameter profile, look at the first formal.
6018 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
6019 use clauses for Exp_Util.
6020 * sem_res.adb: Remove with and use clauses for Elists.
6021 (Propagate_Coextensions): Removed.
6022 (Resolve_Allocator): Do not propagate the list of coextensions from one
6023 allocator to another.
6024 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
6025 Deaccessed_T to Desig_Typ.
6026 (Enter_Name): Remove the mention of Name_uController.
6027 (Gather_Components): Remove the mention of Name_uController.
6028 (Incomplete_Or_Private_View): New routine.
6029 (Is_Coextension_Root): Removed.
6030 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
6031 * sem_util.ads (Incomplete_Or_Private_View): New routine.
6032 (Is_Coextension_Root): Removed.
6033 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
6034 Controlled types are now derived from a null tagged record. Remove
6035 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
6036 * sinfo.adb (Coextensions): Removed.
6037 (Set_Coextensions): Removed.
6038 * sinfo.ads: Remove Coextensions from the explanation of node fields
6039 and its uses in nodes.
6040 Update the field usage of N_Allocator.
6041 (Coextensions): Removed along with its pragma Inline.
6042 (Set_Coextensions): Removed along with its pragma Inline.
6043 * snames.ads-tmpl: Remove names
6048 Name_uLocal_Final_List
6049 Name_Finalization_Root
6056 Name_Finalize_Address
6057 * s-pooglo.adb (Allocate): Add overriding indicator.
6058 (Deallocate): Add overriding indicator.
6059 (Storage_Size): Add overriding indicator.
6060 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6061 than Finalize_Global_List.
6062 (Null_Finalize_Global_List): Removed.
6063 (Save_Library_Occurrence): New routine.
6064 * s-soflin.ads: Remove variable Finalize_Global_List along with its
6065 initialization. Add variable Finalize_Library_Objects along with its
6066 pragma Export. Add variables Library_Exception and
6067 Library_Exception_Set along with their pragma Export.
6068 (Null_Finalize_Global_List): Removed.
6069 (Save_Library_Occurrence): New routine.
6070 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6071 rather than Finalize_Global_List.
6072 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6073 of the constructed node.
6075 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6077 * link.c: Include "auto-host.h" before system headers.
6079 2011-08-03 Vincent Celier <celier@adacore.com>
6081 * make.adb (Gnatmake): Add to table Library_Projs only library projects
6082 that are not extended. Do not check if a library project that is
6083 extended should be regenerated. Do not add to table Library_Paths the
6084 libraries that are in extended projects. Link only with libraries that
6085 are in libray projects that are not extended.
6086 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6087 for a library project that is extended.
6089 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6091 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6092 conforming subprogram renamings that appear to be completions if they
6093 are not fully conformant.
6094 Such renamings are homographs but not completions.
6095 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6096 names in a subprogram renaming that appears in an instance.
6098 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6100 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6101 not immutably limited, build actual subtype from expression to provide
6102 proper bounds to caller.
6104 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6106 * sem_ch8.adb: Minor comment correction.
6108 2011-08-03 Thomas Quinot <quinot@adacore.com>
6110 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6111 returning a limited array, use an extended return statement.
6113 2011-08-03 Vincent Celier <celier@adacore.com>
6115 * make.adb (Initialize): If --subdirs= is used, but no project file is
6116 specified, attempt to create the specify subdir if it does not already
6117 exist and use it as the object directory as if -D had been specified.
6119 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6121 * s-tpopsp-vms.adb: New file.
6122 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6123 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6125 2011-08-03 Emmanuel Briot <briot@adacore.com>
6127 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6130 2011-08-03 Yannick Moy <moy@adacore.com>
6132 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6133 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6134 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6135 detect that an array has static bounds.
6137 2011-08-03 Thomas Quinot <quinot@adacore.com>
6139 * exp_dist.adb: Minor reformatting.
6141 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6143 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6144 (ATCB_Key): Removed, not always used.
6146 2011-08-03 Emmanuel Briot <briot@adacore.com>
6148 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6149 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6150 most remaining global variables.
6152 2011-08-03 Robert Dewar <dewar@adacore.com>
6154 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6155 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6158 2011-08-03 Javier Miranda <miranda@adacore.com>
6160 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6161 that must be passed by copy in VM targets.
6163 2011-08-03 Emmanuel Briot <briot@adacore.com>
6165 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6166 duplicates a similar htable now in the project tree.
6168 2011-08-03 Claire Dross <dross@adacore.com>
6170 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6171 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6172 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6173 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6174 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6175 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6176 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6179 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6181 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6182 (ATCB_Key): Removed, not always used.
6183 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6185 * s-tpopsp-tls.adb: New file.
6186 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6187 x86/x64/ia64/powerpc/sparc Linux.
6189 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6191 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6192 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6194 2011-08-03 Thomas Quinot <quinot@adacore.com>
6196 * rtsfind.ads, exp_dist.adb, exp_dist.ads
6197 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6198 Fix type selection for mapping integer types to PolyORB types.
6200 2011-08-03 Bob Duff <duff@adacore.com>
6202 * sem_ch7.adb: Minor comment clarification.
6204 2011-08-03 Bob Duff <duff@adacore.com>
6206 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6207 an error analyzing a choice, skip further processing. Further
6208 processing could cause a crash or cascade errors.
6210 2011-08-03 Emmanuel Briot <briot@adacore.com>
6212 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
6213 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
6214 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6215 prj-env.ads (Shared_Project_Tree_Data): new type
6216 An aggregate project and its aggregated trees need to share the common
6217 data structures used for lists of strings, packages,... This makes the
6218 code simpler since otherwise we have to pass the root tree (also used
6219 for the configuration file data) in addition to the current project
6220 tree. This also avoids ambiguities as to which tree should be used.
6221 And finally this saves a bit of memory.
6222 (For_Every_Project_Imported): new parameter Tree.
6223 Since aggregated projects are using a different tree, we need to let
6224 the caller know which tree to use to manipulate the returned project.
6226 2011-08-03 Robert Dewar <dewar@adacore.com>
6228 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
6229 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
6230 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
6231 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
6233 2011-08-03 Javier Miranda <miranda@adacore.com>
6235 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
6236 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
6238 2011-08-03 Bob Duff <duff@adacore.com>
6240 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
6243 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
6245 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
6246 g-sehash.ads: Fix typo. Update header.
6248 2011-08-03 Thomas Quinot <quinot@adacore.com>
6250 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
6253 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6255 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
6256 prefixes of private types along with records, since the selector may be
6258 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
6259 private types along with records, since the selector may be a
6262 2011-08-03 Emmanuel Briot <briot@adacore.com>
6264 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
6266 2011-08-03 Javier Miranda <miranda@adacore.com>
6268 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
6269 Tagged_Type_Expansion.
6271 2011-08-03 Yannick Moy <moy@adacore.com>
6273 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
6274 violation when the argument of concatenation is the name of a
6277 2011-08-03 Emmanuel Briot <briot@adacore.com>
6279 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
6280 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
6281 (Process_Declarative_Items): new parameter Child_Env.
6283 2011-08-03 Yannick Moy <moy@adacore.com>
6285 * alfa.ads: Update format of ALFA section in ALI file in order to
6286 add a mapping from bodies to specs when both are present.
6287 (ALFA_Scope_Record): Add components for spec file/scope.
6288 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
6290 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
6291 collected, fill in the spec information when relevant.
6292 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
6295 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6297 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
6298 code unit to decide whether to add internally generated subprograms.
6300 2011-08-03 Javier Miranda <miranda@adacore.com>
6302 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
6303 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
6304 be handled by copy in VM targets.
6306 2011-08-03 Emmanuel Briot <briot@adacore.com>
6308 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
6309 code with Makeutl.Get_Switches.
6310 * prj-tree.adb: Update comment.
6312 2011-08-03 Thomas Quinot <quinot@adacore.com>
6314 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
6315 subprogram with a limited formal that does not support external
6318 2011-08-03 Yannick Moy <moy@adacore.com>
6320 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
6322 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
6323 not from current unit in two phases, because it is not possible to
6324 change the table while iterating over its content.
6325 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
6327 2011-08-03 Sergey Rybin <rybin@adacore.com>
6329 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
6330 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
6332 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6334 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
6335 and the component type is composite, this is ambiguous for predefined
6336 concatenation, but if the node is not overloaded and the entity is a use
6337 -defined function its profile can be used to resolve that aggregate.
6339 2011-08-03 Robert Dewar <dewar@adacore.com>
6341 * exp_ch4.adb: Minor code cleanup.
6343 2011-08-03 Thomas Quinot <quinot@adacore.com>
6345 * exp_dist.adb: Do not generate distribution stubs if serious errors
6346 have been diagnosed.
6348 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6350 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
6351 the first formal of a primitive operation, go to the base type to
6352 handle properly an access to a derived type with constrained
6354 * sem_type.adb (Disambiguate): an immediately visible operator hides a
6355 user-defined function that is only use-visible.
6357 2011-08-03 Robert Dewar <dewar@adacore.com>
6359 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
6360 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
6361 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
6362 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
6363 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
6364 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
6365 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
6366 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
6368 2011-08-03 Robert Dewar <dewar@adacore.com>
6370 * repinfo.adb (List_Mechanism): Add handling of
6371 Convention_Ada_Pass_By_XXX.
6372 * sem_mech.adb (Set_Mechanism): Ditto.
6373 * sem_prag.adb (Process_Convention): Add entries for
6374 Convention_Ada_Pass_By_XXX.
6375 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
6377 2011-08-03 Pascal Obry <obry@adacore.com>
6379 * makeutl.adb: Minor reformatting.
6381 2011-08-03 Vincent Celier <celier@adacore.com>
6384 (Get_File_Name) If the file cannot be found when there are no config
6385 pragmas file and May_Fail is True, return No_File instead of the file
6386 name, to be consistent.
6388 2011-08-03 Pascal Obry <obry@adacore.com>
6390 * adaint.c (__gnat_is_executable_file_attr): Avoid access
6393 2011-08-03 Javier Miranda <miranda@adacore.com>
6396 (Same_Representation): In VM targets the representation of arrays with
6397 aliased components differs from arrays with non-aliased components.
6399 2011-08-03 Emmanuel Briot <briot@adacore.com>
6401 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
6402 not systematically lower case attribute indexes that contain no "."
6403 Fix definition of several Naming attributes, which take
6404 a unit name as index and therefore should be case insensitive.
6405 Minor refactoring (reduce length of variable names).
6407 2011-08-03 Emmanuel Briot <briot@adacore.com>
6409 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
6411 2011-08-03 Emmanuel Briot <briot@adacore.com>
6413 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
6414 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
6415 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
6416 prj-tree.ads (Prj.Tree.Environment): new type.
6418 2011-08-03 Emmanuel Briot <briot@adacore.com>
6420 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
6421 prj-tree.adb, prj-tree.ads (Environment): new type.
6423 2011-08-03 Emmanuel Briot <briot@adacore.com>
6425 * prj-tree.ads: Remove unused variable.
6427 2011-08-03 Yannick Moy <moy@adacore.com>
6429 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
6430 issuing messages related to SPARK restriction violation.
6432 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6434 * sem_ch6.adb: guard against error nodes in return statements.
6436 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6438 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
6439 a warning can only appear on a configuration file, so emit warning
6440 without further checks.
6442 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6444 * s-interr.ads: add overriding keyword.
6446 2011-08-03 Geert Bosch <bosch@adacore.com>
6448 * exp_attr.adb: Fix minor typo.
6450 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6452 * par-ch4.adb: improve error recovery.
6454 2011-08-03 Emmanuel Briot <briot@adacore.com>
6456 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
6457 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
6460 2011-08-03 Emmanuel Briot <briot@adacore.com>
6462 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
6463 "external" as an attribute name in aggregate projects.
6465 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6467 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
6468 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
6469 from 0, so we need to adjust.
6471 2011-08-03 Emmanuel Briot <briot@adacore.com>
6473 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
6474 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
6476 2011-08-03 Yannick Moy <moy@adacore.com>
6478 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6479 restriction on overloaded entity if the entity is not an operator.
6481 2011-08-03 Yannick Moy <moy@adacore.com>
6483 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6484 restrict.ads: Rename remaining Check_Formal_Restriction* into
6485 Check_SPARK_Restriction*.
6487 2011-08-03 Emmanuel Briot <briot@adacore.com>
6489 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6490 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6492 (Project_Empty): removed
6493 (Empty_Project): new parameter Qualifier
6494 This is used to have fields specific to aggregate projects, cleaner
6495 New field to store the list of aggregated projects.
6496 (Check_Aggregate_Project): removed
6497 (Process_Aggregated_Projects, Free): new subprograms.
6499 2011-08-03 Olivier Hainque <hainque@adacore.com>
6501 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6503 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6505 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6506 explicit dereference of an unconstrained type, create a constrained
6507 subtype for it, as is done for function calls that return an
6510 2011-08-03 Thomas Quinot <quinot@adacore.com>
6512 * g-pehage.adb (Finalize): Avoid possible double-free.
6514 2011-08-03 Steve Baird <baird@adacore.com>
6516 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6517 Elab_Spec/Body attrs in CodePeer_Mode.
6519 2011-08-03 Javier Miranda <miranda@adacore.com>
6521 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6522 low bound is not known at compile time but they have no others choice.
6523 Done because in this case the bounds can be obtained directly from the
6526 2011-08-03 Ed Falis <falis@adacore.com>
6528 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6529 on VxWorks SMP. Remove unusable constant ANY_CPU.
6531 2011-08-03 Emmanuel Briot <briot@adacore.com>
6533 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6534 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6535 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6536 Prj.Env.Initialize_Empty): new subprograms
6537 (Get_Env, Find_Project): remove parameter Target_Name.
6539 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6541 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6542 as a condition for the delayed call to Derived_Subprograms done for the
6543 case of the rewriting of a derived type that constrains the
6544 discriminants of its parent type.
6545 Avoids redundant subprogram derivations for private subtype derivations.
6547 2011-08-03 Javier Miranda <miranda@adacore.com>
6549 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6550 Build_Record_Aggr_Code.
6551 (Build_Record_Aggr_Code): Add missing support to initialize hidden
6552 discriminants in extension aggregates.
6554 2011-08-03 Emmanuel Briot <briot@adacore.com>
6556 * prj-pp.adb (Print): also output project qualifiers, since in
6557 particular "aggregate" is mandatory in an aggregate project.
6559 2011-08-03 Emmanuel Briot <briot@adacore.com>
6561 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6562 (Debug_Output): new function.
6564 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6566 * gnat_ugn.texi: Document -Wstack-usage.
6567 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6569 2011-08-03 Thomas Quinot <quinot@adacore.com>
6571 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6572 have keyword LIMITED.
6574 2011-08-03 Yannick Moy <moy@adacore.com>
6576 * alfa.adb, alfa.ads, alfa_test.adb: New files.
6577 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6578 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6579 section (does not happen in compiler, only if code directly calls
6581 * get_alfa.adb, get_alfa.ads: New files.
6582 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6584 * lib-xref-alfa.adb: New file.
6585 * lib-xref.adb, lib-xref.ads
6586 (Xref_Entry): redefine information needed in cross-references for ALFA.
6587 Push ALFA treatments in separated local package.
6588 (Enclosing_Subpragram_Or_Package): treat specially subprogram
6589 identifiers. Return entity of package body instead of spec. Return
6590 Empty for a scope with no location.
6591 (Generate_Reference): adapt to new components for ALFA information.
6592 Remove the need for D references on definitions.
6593 (Is_Local_Reference): moved to ALFA local package
6594 (Output_References): extract subfunction as Extract_Source_Name
6595 (Output_Local_References): remove procedure, replaced by filtering of
6596 cross-references in package ALFA and printing in Put_ALFA.
6597 (Write_Entity_Name): remove procedure
6598 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6599 print exact name of entity as it appears in source file
6600 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6601 * put_alfa.adb, put_alfa.ads: New files.
6602 * xref_lib.adb (Search_Xref): protect read of cross-references against
6603 reading other sections of the ALI file, in gnatxref
6604 (Search): protect read of cross-references against reading other
6605 sections of the ALI file, in gnatfind.
6606 * gcc-interface/Make-lang.in: Update dependencies.
6608 2011-08-03 Thomas Quinot <quinot@adacore.com>
6610 * sem_ch3.adb: Minor reformatting.
6612 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6614 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6615 raising an exception.
6617 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6619 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6620 type, always use 1 as the lower bound or string, even if lower bound of
6621 context is not static, to handle properly null strings in a non-static
6624 2011-08-03 Bob Duff <duff@adacore.com>
6626 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6627 always legal on the right-hand side of an assignment statement; there
6628 is always an applicable index constraint in this case. Therefore, the
6629 check for Pkind = N_Assignment_Statement is now unconditional -- it
6630 doesn't depend on whether Is_Constrained (Typ).
6632 2011-08-03 Robert Dewar <dewar@adacore.com>
6634 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6636 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6638 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6639 for an itype created within a generic unit.
6641 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6643 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6644 suppresses all inlining.
6646 2011-08-03 Robert Dewar <dewar@adacore.com>
6648 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6649 exp_aggr.adb: Minor reformatting.
6651 2011-08-03 Thomas Quinot <quinot@adacore.com>
6653 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6654 tagged assignment when discriminant checks are suppressed. This is
6655 useless and extremely costly in terms of static stack usage.
6657 2011-08-03 Bob Duff <duff@adacore.com>
6659 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6660 of generics, because this leads to the wrong entity in the wrong scope,
6661 causing (e.g.) pragma Export_Procedure to get an error if the entity is
6663 (Process_Interface_Name): Follow Alias for instances of generics, to
6664 correct for the above change.
6666 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6668 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6669 is an integer literal it is always safe to replace the reference. In
6670 addition, if the reference appears in the generated code for an object
6671 declaration it is necessary to copy because otherwise the reference
6672 might be to the uninitilized value of the discriminant of the object
6675 2011-08-03 Pascal Obry <obry@adacore.com>
6677 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6678 ACL used, in this case we want to check for ending .exe, not .exe
6679 anywhere in the path.
6681 2011-08-03 Sergey Rybin <rybin@adacore.com>
6683 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6684 the tree structure (semantic decoration of references to record
6687 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6689 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6690 choices of a named array aggregate, bail out when any choices are
6691 marked as Errors_Posted.
6693 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6695 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6696 in which entity is frozen, to handle properly loop variables in
6699 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6701 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6702 subtype is not static, compute the upper bound using attributes, to
6703 handle properly index types that are not integer types.
6705 2011-08-03 Bob Duff <duff@adacore.com>
6707 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6708 Update copyright notice.
6710 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6712 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6713 Original_Discriminant if within an instance.
6714 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6716 2011-08-03 Thomas Quinot <quinot@adacore.com>
6718 * einfo.ads: Minor reformatting.
6720 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6722 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6723 composite type with an unfrozen subcomponent, in the profile of a
6724 primitive operation.
6726 2011-08-03 Robert Dewar <dewar@adacore.com>
6728 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6730 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6732 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6733 unconstrained type with discriminants is initialized with an aggregate,
6734 use the constrained subtype of the aggregate as the type of the object,
6735 because it is immutable, and this allows the back-end to generate no
6736 code for the object declaration.
6738 2011-08-03 Robert Dewar <dewar@adacore.com>
6740 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
6741 comparison operand is variable, and turns out to be zero or negative.
6743 2011-08-03 Javier Miranda <miranda@adacore.com>
6746 (Expand_Dispatching_Constructor_Call): Disable expansion of
6747 code required for native targets. Done to avoid generating
6748 references to unavailable runtime entities in VM targets.
6750 (Expand_N_Object_Declaration): Add missing support to handle
6751 the explicit initialization of class-wide interface objects.
6754 2011-08-03 Matthew Heaney <heaney@adacore.com>
6756 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
6758 2011-08-03 Matthew Heaney <heaney@adacore.com>
6760 * a-cbdlli.adb (Splice): move source items from first to last
6762 2011-08-03 Yannick Moy <moy@adacore.com>
6764 * sem_util.ads: comment added.
6766 2011-08-03 Javier Miranda <miranda@adacore.com>
6769 (Expand_Record_Aggregate): In VM targets disable the expansion into
6770 assignments of aggregates whose type is not known at compile time.
6772 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6774 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
6775 protected entries and task entries, to build the proper renaming
6776 declaration for entry formals, used in debugging.
6777 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
6778 parameters in the same way.
6780 2011-08-02 Robert Dewar <dewar@adacore.com>
6782 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
6783 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
6784 code reorganization.
6786 2011-08-02 Robert Dewar <dewar@adacore.com>
6788 * debug.adb: Debug flag d.P to suppress length comparison optimization
6789 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
6790 comparison of Length by comparing First/Last instead.
6792 2011-08-02 Matthew Heaney <heaney@adacore.com>
6794 * a-cobove.ads: Code clean up.
6796 2011-08-02 Vincent Celier <celier@adacore.com>
6798 * adaint.c (file_names_case_sensitive_cache): New static int.
6799 (__gnat_get_file_names_case_sensitive): Cache the return value in
6800 file_names_case_sensitive_cache at the first invocation, to avoid
6801 multiple calls to getenv.
6803 2011-08-02 Bob Duff <duff@adacore.com>
6805 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6807 2011-08-02 Yannick Moy <moy@adacore.com>
6809 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6810 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6811 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6812 indicate that we are in a precondition or postcondition. This is used in
6813 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6814 decide whether to flag the spec or body of the current subprogram as
6817 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
6819 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6821 * a-extiin.ads: New file.
6823 2011-08-02 Bob Duff <duff@adacore.com>
6825 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6826 now raises Name_Error instead of Use_Error in certain cases. The other
6827 parts of this AI were already implemented properly.
6829 2011-08-02 Vincent Celier <celier@adacore.com>
6831 * link.c: Only import "auto-host.h" when building the gnattools.
6833 2011-08-02 Yannick Moy <moy@adacore.com>
6835 * sem_util.adb: Inter-unit inlining does not work for a subprogram
6836 which calls a local subprogram, so extract subprogram
6837 from Mark_Non_ALFA_Subprogram_Body.
6839 2011-08-02 Javier Miranda <miranda@adacore.com>
6842 (Extract_Dispatching_Call): If the type of the dispatching object is an
6843 access type then return an explicit dereference in the Object out-mode
6846 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6848 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6849 compatibility checks for all indexes of an array subtype, not just the
6850 first. Reset Has_Dynamic_Range_Check on the subtype before each
6851 potential check to ensure that Insert_Range_Checks will not elide any
6852 of the dynamic checks.
6854 2011-08-02 Yannick Moy <moy@adacore.com>
6856 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6857 SPARK restriction at parsing time.
6858 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6859 directive only if the SPARK restriction is set for this unit.
6861 2011-08-02 Yannick Moy <moy@adacore.com>
6863 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6864 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6865 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6866 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6867 Mark_Non_ALFA_Subprogram_Body.
6868 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6871 2011-08-02 Yannick Moy <moy@adacore.com>
6873 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6876 2011-08-02 Robert Dewar <dewar@adacore.com>
6878 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6879 exp_ch3.adb: Minor reformatting.
6881 2011-08-02 Emmanuel Briot <briot@adacore.com>
6883 * adaint.c (__gnat_locate_exec_on_path): only returns executable
6884 files, not any regular file.
6885 (__gnat_locate_file_with_predicate): new subprogram.
6887 2011-08-02 Yannick Moy <moy@adacore.com>
6889 * sinfo.adb, sinfo.ads: Restrict the use of flags
6890 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6891 nodes, plus N_Subtype_Declaration for the 2nd one.
6893 2011-08-02 Sergey Rybin <rybin@adacore.com>
6895 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6896 - fix bugs in the description of Source_Trace;
6897 - get rid of UNIT_NAME;
6899 2011-08-02 Javier Miranda <miranda@adacore.com>
6902 (Build_Dispatching_Requeue): Adding support for VM targets
6903 since we cannot directly reference the Tag entity.
6904 * exp_sel.adb (Build_K): Adding support for VM targets.
6905 (Build_S_Assignment): Adding support for VM targets.
6907 (Default_Prim_Op_Position): In VM targets do not restrict availability
6908 of predefined interface primitives to compiling in Ada 2005 mode.
6909 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6910 restricted to compiling in Ada 2005 mode.
6911 (Make_VM_TSD): Generate code that declares and initializes the OSD
6912 record. Needed to support dispatching calls through synchronized
6915 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6916 primitives associated with synchronized interfaces.
6917 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6918 primitives associated with synchronized interfaces.
6920 2011-08-02 Yannick Moy <moy@adacore.com>
6922 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6923 statements hidden in SPARK if preceded by the HIDE directive
6924 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6925 exception handlers as hidden in SPARK if preceded by the HIDE directive
6926 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6927 if starting with the HIDE directive
6928 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6929 starting with the HIDE directive; mark the declarations in a private
6930 part as hidden in SPARK if the private part starts with the HIDE
6932 * restrict.adb, restrict.ads
6933 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6934 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6935 argument node belongs to a part which is hidden in SPARK
6936 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6937 parts in SPARK; protect the possibly costly call to
6938 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6939 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6940 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6941 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6943 (Scan): recognize special comment starting with '#' and followed by
6944 SPARK keyword "hide" as a HIDE directive.
6946 2011-08-02 Yannick Moy <moy@adacore.com>
6948 * types.ads, erroutc.ads: Minor reformatting.
6950 2011-08-02 Vincent Celier <celier@adacore.com>
6952 * link.c: Add response file support for cross platforms.
6954 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6956 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6957 in an association, set parent field of copy before partial analysis.
6958 * sem_res.adb (Resolve_Slice): create reference to itype only when
6959 expansion is enabled.
6961 2011-08-02 Yannick Moy <moy@adacore.com>
6963 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6964 for new flag denoting which subprogram bodies are in ALFA
6965 * restrict.adb, sem_ch7.adb: Update comment
6966 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6967 sem_ch9.adb, sem_res.adb: Add calls to
6968 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6969 * sem_ch6.adb (Analyze_Function_Return): add calls to
6970 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6971 middle of the body, and extended return.
6972 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6973 False when missing return.
6974 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6975 to True for subprograms whose spec is in ALFA. Remove later on the flag
6976 on the entity used for a subprogram body when there exists a separate
6978 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6979 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6980 False, otherwise do nothing.
6982 2011-08-02 Robert Dewar <dewar@adacore.com>
6984 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6986 2011-08-02 Yannick Moy <moy@adacore.com>
6988 * sem_ch4.ads: minor formatting.
6990 2011-08-02 Yannick Moy <moy@adacore.com>
6992 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6993 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6994 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6995 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6996 opt.ads: cleanup of SPARK mode
6998 2011-08-02 Yannick Moy <moy@adacore.com>
7000 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7002 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7003 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7005 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7006 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7007 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7008 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7010 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7012 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7013 functions whose return type is not in ALFA.
7014 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7016 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7017 parameter's type is not in ALFA.
7018 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7021 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7023 * sem_ch6 (Analyze_Expression_Function): treat the function as
7024 Inline_Always, and introduce a subprogram declaration for it when it is
7026 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7027 expression functions, so that the back-end can determine whether they
7028 can in fact be inlined.
7029 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7030 a function body comes from an expression function.
7032 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7034 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7035 null exclusions to test Can_Never_Be_Null on the anonymous access types
7036 of the formals rather than testing the formals themselves. Exclude this
7037 check in cases where the Old_Formal is marked as a controlling formal,
7038 to avoid issuing spurious errors for bodies completing dispatching
7039 operations (due to the flag not getting set on controlling access
7040 formals in body specs).
7041 (Find_Corresponding_Spec): When checking full and subtype conformance of
7042 subprogram bodies in instances, pass Designated and E in that order, for
7043 consistency with the expected order of the formals (New_Id followed by
7046 2011-08-02 Robert Dewar <dewar@adacore.com>
7048 * sem_ch8.adb: Minor reformatting.
7050 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7052 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7053 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7054 primitive operations of class-wide actuals.
7056 2011-08-02 Javier Miranda <miranda@adacore.com>
7058 * exp_atag.ads, exp_atag.adb
7059 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7060 since its value is implicitly passed in argument Typ.
7061 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7062 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7063 Build_Common_Dispatching_Select_Statements.
7065 2011-08-02 Robert Dewar <dewar@adacore.com>
7067 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7068 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7071 2011-08-02 Robert Dewar <dewar@adacore.com>
7073 * sem_res.adb: Minor reformatting.
7074 * sem_prag.adb: Minor reformatting.
7076 2011-08-02 Javier Miranda <miranda@adacore.com>
7078 * exp_atag.adb, exp_atags.ads
7079 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7080 by the tagged type Entity. Required to use this routine in the VM
7081 targets since we do not have available the Tag entity in the VM
7084 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7085 Ada.Tags has not been previously loaded.
7087 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7088 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7090 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7091 view of enclosing scopes. Required to handle enclosing scopes that
7092 are synchronized types whose full view is a task type.
7094 (Build_VM_TSDs): Minor code improvement to avoid generating and
7095 analyzing lists with empty nodes.
7096 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7097 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7098 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7099 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7100 (Make_Select_Specific_Data_Table): Add support for VM targets.
7101 (Make_VM_TSD): Generate code to initialize the SSD structure of
7104 2011-08-02 Yannick Moy <moy@adacore.com>
7106 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7107 cross-references section in ALI.
7108 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7109 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7111 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7112 subprogram or package entity of a node
7113 (Is_Local_Reference_Type): new function returns True for references
7114 selected in local cross-references.
7115 (Lt): function extracted from Lt in Output_References
7116 (Write_Entity_Name): function extracted from Output_References
7117 (Generate_Definition): generate reference with type 'D' for definition
7118 of objects (object declaration and parameter specification), with
7119 appropriate locations and units, for use in local cross-references.
7120 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7121 references of type 'I' for initialization in object definition.
7122 (Output_References): move part of function Lt and procedure
7123 Write_Entity_Name outside of the body. Ignore references of types 'D'
7124 and 'I' introduced for local cross-references.
7125 (Output_Local_References): new procedure to output the local
7126 cross-references sections.
7127 (Lref_Entity_Status): new array defining whether an entity is a local
7128 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7129 with 'I' type when initialization expression is present.
7130 * get_scos.adb, get_scos.ads: Correct comments and typos
7132 2011-08-02 Javier Miranda <miranda@adacore.com>
7134 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7136 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7138 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7141 2011-08-02 Vincent Celier <celier@adacore.com>
7143 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7144 (No_Space_Img): New function
7145 (Find_Excluded_Sources): When reading from a file, record the file name
7146 and the line number for each excluded source.
7147 (Mark_Excluded_Sources): When reporting an error, if the excluded
7148 sources were read from a file, include file name and line number in
7151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7153 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7155 2011-08-02 Robert Dewar <dewar@adacore.com>
7157 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7159 2011-08-02 Javier Miranda <miranda@adacore.com>
7161 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7162 generation of TSDs to the DOTNET compiler.
7163 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7164 generation of TSDs to the DOTNET compiler.
7166 2011-08-02 Javier Miranda <miranda@adacore.com>
7168 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7169 record of all the tagged types declared inside library level package
7170 declarations, library level package bodies or library level subprograms.
7171 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7172 associated with a given tagged type.
7173 (Build_VM_TSDs): New subprogram.
7174 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7175 compilation units that are subprograms.
7176 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7177 compilation units that are package bodies.
7178 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7179 units that are a package declaration or a package instantiation.
7180 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7181 reorganization to improve the error generated by the frontend when the
7182 function Ada.Tags.Secondary_Tag is not available.
7183 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7184 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7186 2011-08-02 Javier Miranda <miranda@adacore.com>
7188 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7190 2011-08-02 Robert Dewar <dewar@adacore.com>
7192 * s-imenne.ads: Minor reformatting.
7194 2011-08-02 Robert Dewar <dewar@adacore.com>
7196 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7197 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7198 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7200 2011-08-02 Robert Dewar <dewar@adacore.com>
7202 * einfo.ads (Materialize_Entity): Document this is only for renamings
7203 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7204 required debug information in the case where we transform the object
7205 declaration into a renaming declaration.
7206 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7208 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7211 2011-08-02 Robert Dewar <dewar@adacore.com>
7213 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7214 Suppress_Init_Procs.
7215 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7216 Suppress_Initialization/Initialization_Suppressed.
7217 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7218 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7219 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7220 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7222 2011-08-02 Robert Dewar <dewar@adacore.com>
7224 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7229 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7230 only have inheritable classwide pre/postconditions.
7232 2011-08-02 Javier Miranda <miranda@adacore.com>
7234 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7235 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7236 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7237 checks if the external tag of a type is the same as the external tag
7238 of some other declaration.
7240 2011-08-02 Thomas Quinot <quinot@adacore.com>
7242 * s-taskin.ads: Minor reformatting.
7244 2011-08-02 Emmanuel Briot <briot@adacore.com>
7246 * g-comlin.adb (Display_Help): swap the order in which it prints the
7247 short help and the general usage.
7249 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7251 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7252 the aspect declarations and attach them to the generic copy for
7253 subsequent analysis.
7254 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7255 declarations of the generic tree to the new subprogram declarations.
7256 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7257 conditions that apply to a subprogram instance.
7259 2011-08-02 Robert Dewar <dewar@adacore.com>
7261 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7263 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7265 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7266 private type with a tagged full view is not derived in the immediate
7267 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7269 2011-08-02 Robert Dewar <dewar@adacore.com>
7271 * exp_ch4.adb: Minor reformatting.
7273 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7275 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7276 Ada2012 iterator, the loop will be rewritten during expansion into a
7277 while loop with a cursor and an element declaration. Do not analyze the
7278 body in this case, because if the container is for indefinite types the
7279 actual subtype of the elements will only be determined when the cursor
7280 declaration is analyzed.
7282 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7284 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7285 size/alignment related attributes in CodePeer_Mode.
7287 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7289 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7290 Prepend_Element, since this can result in the operation getting the
7291 wrong slot in the full type's dispatch table if the full type has
7292 inherited operations. The incomplete type's operation will get added
7293 to the proper position in the full type's primitives
7294 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7295 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7296 dispatching operations, since there are cases where nonprimitive
7297 subprograms can get added to the list of incomplete dependents (such
7298 as subprograms in nested packages).
7299 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7300 private part when determining whether to add a primitive with a
7301 parameter of a tagged incomplete type to the Private_Dependents list.
7302 Such primitives can also occur in the visible part, and should not have
7303 been excluded from being private dependents.
7304 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7305 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7306 list of a Taft-amendment incomplete type is a primitive before issuing
7307 an error that the full type must appear in the same unit. There are
7308 cases where nonprimitives can be in the list (such as subprograms in
7310 * sem_disp.adb (Derives_From): Use correct condition for checking that
7311 a formal's type is derived from the type of the corresponding formal in
7312 the parent subprogram (the condition was completely wrong). Add
7313 checking that was missing for controlling result types being derived
7314 from the result type of the parent operation.
7316 2011-08-02 Yannick Moy <moy@adacore.com>
7318 * errout.adb (First_Node): minor renaming
7319 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7322 2011-08-02 Yannick Moy <moy@adacore.com>
7324 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7325 before accessing operands.
7326 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7327 decide whether an initialization expression respects SPARK rules, as
7328 the plain node is the expanded one. This allows for more valid warnings
7330 * gnat_rm.texi: Minor update.
7332 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7334 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7337 2011-08-02 Robert Dewar <dewar@adacore.com>
7339 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7341 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7343 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7344 loop statements and the element renaming declaration with a block when
7345 the element type is controlled.
7347 2011-08-02 Yannick Moy <moy@adacore.com>
7349 * sinfo.ads: Minor formatting.
7351 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7353 * sem_aggr.adb (Add_Association): if the association has a box and no
7354 expression, use the Sloc of the aggregate itself for the new
7356 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7359 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7361 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7362 When a container is provided via a function call, generate a renaming
7363 of the function result. This avoids the creation of a transient scope
7364 and the premature finalization of the container.
7365 * exp_ch7.adb (Is_Container_Cursor): Removed.
7366 (Wrap_Transient_Declaration): Remove the supression of the finalization
7367 of the list controller when the declaration denotes a container cursor,
7370 2011-08-02 Yannick Moy <moy@adacore.com>
7372 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7373 node is from source, instead of the original node being from source.
7375 (Resolve_Array_Aggregate): refine the check for a static expression, to
7376 recognize also static ranges
7377 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7378 Array_Type_Declaration): postpone the test for the type being a subtype
7379 mark after the type has been resolved, so that component-selection and
7380 expanded-name are discriminated.
7381 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7382 to distinguish the case of an iteration scheme, so that an error is
7383 issed on a non-static range in SPARK except in an iteration scheme.
7384 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7385 In_Iter_Schm = True.
7386 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7387 user-defined operators so that they are allowed in renaming
7389 (Find_Selected_Component): refine the check for prefixing of operators
7390 so that they are allowed in renaming. Move the checks for restrictions
7391 on selector name after analysis discriminated between
7392 component-selection and expanded-name.
7393 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7394 concatenation argument of string type if it is static.
7395 * sem_util.adb, sem_util.ads
7396 (Check_Later_Vs_Basic_Declarations): add a new function
7397 Is_Later_Declarative_Item to decice which declarations are allowed as
7398 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7399 mode, add that renamings are considered as later items.
7400 (Enclosing_Package): new function to return the enclosing package
7401 (Enter_Name): correct the rule for homonyms in SPARK
7402 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7403 from source (result of expansion) to avoid issuing wrong warnings.
7405 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7407 * errout.adb: On anything but an expression First_Node returns its
7410 2011-08-02 Pascal Obry <obry@adacore.com>
7412 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7414 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7416 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7417 Set the associated loop as the related expression of internally
7419 * exp_ch7.adb (Is_Container_Cursor): New routine.
7420 (Wrap_Transient_Declaration): Supress the finalization of the list
7421 controller when the declaration denotes a container cursor.
7423 2011-08-02 Yannick Moy <moy@adacore.com>
7425 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7427 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7428 expression is a simple expression. This check cannot be performed in
7429 the semantics, so just drop it.
7430 (P_Index_Or_Discriminant_Constraint): move check that the index or
7431 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7432 semantics. Other cases were previously checked in the semantics.
7433 * par-ch4.adb (P_Name): move checks that a selector name is not
7434 character literal or an operator symbol to Find_Selected_Component in
7436 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7437 declarations are not placed after later declarations in a separate
7438 procedure in Sem_Util (possibly not the best choice?), to be used both
7439 during parsing, for Ada 83 mode, and during semantic analysis, for
7441 * par-endh.adb (Check_End): move check that end label is not missing
7442 to Process_End_Label in the semantics
7443 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7444 the special case for SPARK restriction
7445 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7446 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7447 parameter Force to issue the error message even on internal node (used
7448 for generated end label). Call Check_Restriction to check when an error
7449 must be issued. In SPARK mode, issue an error message even if the
7450 restriction is not set.
7451 (Check_Restriction): new procedure with an additional out parameter to
7452 inform the caller that a message has been issued
7453 * sem_aggr.adb: Minor modification of message
7454 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7455 instead of issuing an error message directly
7456 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7457 declarations are not placed after later declarations, by calling
7458 Check_Later_Vs_Basic_Declarations
7459 (Analyze_Subtype_Declaration): move here the check that an index or
7460 discriminant constraint must be a subtype mark. Change the check that
7461 a subtype of String must start at one so that it works on subtype marks.
7462 * sem_ch4.adb (Analyze_Call): move here the check that a named
7463 association cannot follow a positional one in a call
7464 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7465 instead of issuing an error message directly
7466 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7467 selector name is not a character literal or an operator symbol. Move
7468 here the check that the prefix of an expanded name cannot be a
7469 subprogram or a loop statement.
7470 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7471 procedure called from parsing and semantics to check that basic
7472 declarations are not placed after later declarations
7473 (Process_End_Label): move here the check that end label is not missing
7475 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7477 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7478 representation clause in codepeer mode, since it confuses CodePeer and
7479 does not bring useful info.
7481 2011-08-02 Ed Falis <falis@adacore.com>
7483 * init.c: initialize fp hw on MILS.
7485 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7487 * errout.adb (First_Node): for bodies, return the node itself (small
7488 optimization). For other nodes, do not check source_unit if the node
7489 comes from Standard.
7491 2011-08-02 Robert Dewar <dewar@adacore.com>
7493 * exp_ch3.adb: Minor comment additions.
7494 * sem_ch13.adb: Minor reformatting.
7496 2011-08-02 Pascal Obry <obry@adacore.com>
7498 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7500 2011-08-02 Robert Dewar <dewar@adacore.com>
7502 * sem_attr.adb: Minor reformatting.
7504 2011-08-02 Robert Dewar <dewar@adacore.com>
7506 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7507 (Has_Default_Component_Value): Removed
7508 * einfo.ads Comment updates
7509 (Has_Default_Aspect): Replaces Has_Default_Value
7510 (Has_Default_Component_Value): Removed
7512 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7514 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7515 (Get_Simple_Init_Val): Handle Default_Value aspect
7516 (Needs_Simple_Initialization): Handle Default_Value aspect
7517 * exp_ch3.ads: Needs_Simple_Initialization
7518 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7519 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7521 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7522 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7523 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7525 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7527 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7528 package containing iteration primitives.
7529 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7531 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7533 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7534 "of", pre-analyze expression in case it is a function call with
7535 finalization actions that must be placed ahead of the loop.
7536 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7537 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7539 2011-08-02 Geert Bosch <bosch@adacore.com>
7541 * cstand.adb (Create_Float_Types): Only consider C's long double for
7542 Long_Long_Float, in addition to double.
7544 2011-08-02 Robert Dewar <dewar@adacore.com>
7546 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7547 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7548 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7551 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7553 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7556 2011-08-02 Javier Miranda <miranda@adacore.com>
7558 * einfo.ads, einfo.adb
7559 (Original_Access_Type): Move this attribute to Node26 since there was
7560 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7561 which causes conflicts and breaks the generation of the .NET compiler.
7562 (Interface_Name): Add missing documentation on JGNAT only uses of
7565 2011-08-02 Geert Bosch <bosch@adacore.com>
7567 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7568 (Find_Back_End_Float_Type): Likewise
7569 (Create_Back_End_Float_Types): Likewise
7570 (Create_Float_Types): Likewise
7571 (Register_Float_Type): Likewise
7572 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7573 Nlist and split out type selection in new local Find_Base_Type function.
7574 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7576 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7578 2011-08-02 Robert Dewar <dewar@adacore.com>
7580 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7582 * opt.ads: Minor comment change.
7583 * sem_ch12.adb: Minor code reorganization.
7585 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7587 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7588 subtype's list of rep items to the list on the full subtype in the case
7589 where the lists are the same.
7591 2011-08-02 Geert Bosch <bosch@adacore.com>
7593 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7594 using the one from System.Strings, which also deallocates all strings.
7596 2011-08-02 Geert Bosch <bosch@adacore.com>
7598 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7600 * gcc-interface/Make-lang.in: Update dependencies.
7602 2011-08-02 Olivier Hainque <hainque@adacore.com>
7604 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7607 2011-08-02 Javier Miranda <miranda@adacore.com>
7609 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7610 associated with anonymous access to subprograms.
7612 2011-08-02 Geert Bosch <bosch@adacore.com>
7615 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7616 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7617 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7618 (Add_Symbol_Definition): Move to switch-c.adb
7619 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7620 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7621 (Add_Symbol_Definition): Move to switch-c.adb.
7622 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7624 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7626 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7627 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7629 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7630 (Add_Symbol_Definition): Moved from Prepcomp.
7631 * switch-c.ads: Update copyright notice. Use String_List instead of
7632 Argument_List, removing dependency on System.OS_Lib.
7634 2011-08-02 Yannick Moy <moy@adacore.com>
7636 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7637 mode on initialization expression which does not respect SPARK
7639 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7640 if the tree referenced by its argument represents an initialization
7641 expression in SPARK, suitable for initializing an object in an object
7644 2011-08-02 Javier Miranda <miranda@adacore.com>
7646 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7647 internally generated access to subprogram with its associated protected
7649 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7651 2011-08-02 Geert Bosch <bosch@adacore.com>
7653 * cstand.adb (Register_Float_Type): Print information about type to
7654 register, if the Debug_Flag_Dot_B is set.
7655 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7656 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7657 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7658 with a requested precision of more than Max_Digits digits and no more
7659 than Max_Base_Digits digits, if a range specification is present and the
7660 Predefined_Float_Types list has a suitable type to derive from.
7661 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7662 case of type completion with pragma Import
7664 (Process_Import_Predefined_Type): Processing to complete a type
7665 with pragma Import. Currently supports floating point types only.
7666 (Set_Convention_From_Pragma): Do nothing without underlying type.
7667 (Process_Convention): Guard against absence of underlying type,
7668 which may happen when importing incomplete types.
7669 (Process_Import_Or_Interface): Handle case of importing predefined
7670 types. Tweak error message.
7672 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7674 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7675 functions to previous change. Reorganize code slightly.
7677 2011-08-02 Geert Bosch <bosch@adacore.com>
7679 * back_end.ads (Register_Type_Proc): New call back procedure type for
7680 allowing the back end to provide information about available types.
7681 (Register_Back_End_Types): New procedure to register back end types.
7682 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7684 * cstand.adb (Back_End_Float_Types): New list for floating point types
7685 supported by the back end.
7686 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7687 (Copy_Float_Type): New procedure to make new copies of predefined types.
7688 (Register_Float_Type): New call back procedure to populate the BEFT list
7689 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7690 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7691 (Create_Float_Types): New procedure to create entities for floating
7692 point types predefined in Standard, and put these and any remaining
7693 BEFTs on the Predefined_Float_Types list.
7694 * stand.ads (Predefined_Float_Types): New list for predefined floating
7695 point types that do not have declarations in package Standard.
7697 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7699 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7700 entity node for the unit containing the parameter.
7701 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7702 (Add_Inlined_Subprogram): Likewise.
7703 * gcc-interface/Make-lang.in: Update dependencies.
7705 2011-08-02 Thomas Quinot <quinot@adacore.com>
7707 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7710 2011-08-02 Geert Bosch <bosch@adacore.com>
7712 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7714 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7716 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7717 computed value of Base_Type.
7719 2011-08-02 Yannick Moy <moy@adacore.com>
7721 * restrict.adb (Check_Restriction): issue an error for any use of
7722 class-wide, even if the No_Dispatch restriction is not set.
7723 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7724 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7725 when completing a private extension, the type named in the private part
7726 is not the same as that named in the visible part.
7727 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7728 of an inherited primitive operations of a tagged type or type extension
7729 that returns the tagged type.
7730 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7731 function which returns True for an implicit operation inherited by the
7732 derived type declaration for the argument type.
7733 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7736 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7738 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7739 Process_Bounds, to perform analysis with expansion of a range or an
7740 expression that is the iteration scheme for a loop.
7741 (Analyze_Iterator_Specification): If domain of iteration is given by a
7742 function call with a controlled result, as is the case if call returns
7743 a predefined container, ensure that finalization actions are properly
7745 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7747 2011-08-02 Javier Miranda <miranda@adacore.com>
7749 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7750 * gcc-interface/Make-lang.in: Update dependencies.
7752 2011-08-02 Javier Miranda <miranda@adacore.com>
7754 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7755 determine if the analysis is performed using N or Original_Node (N).
7756 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7757 functionality of routine Is_Variable avoids code duplication.
7758 * checks.adb (Determine_Range): Handle temporaries generated by
7759 Remove_Side_Effects.
7761 2011-08-02 Javier Miranda <miranda@adacore.com>
7763 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7764 expansion of the condition. Required since the previous analysis was
7765 done with expansion disabled (see Resolve_Quantified_Expression) and
7766 hence checks were not inserted and record comparisons have not been
7769 2011-08-02 Ed Falis <falis@adacore.com>
7771 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7774 2011-08-02 Bob Duff <duff@adacore.com>
7776 * opt.ads: Minor comment fix.
7778 2011-08-02 Bob Duff <duff@adacore.com>
7780 * sem_ch12.adb (Analyze_Package_Instantiation,
7781 Analyze_Subprogram_Instantiation): Turn off style checking while
7782 analyzing an instance. Whatever style checks that apply to the generic
7783 unit should apply, so it makes no sense to apply them in an instance.
7784 This was causing trouble when compiling an instance of a runtime
7785 unit that violates the -gnatyO switch.
7786 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7787 one of the two case statements, causing spurious errors.
7789 2011-08-02 Robert Dewar <dewar@adacore.com>
7791 * uname.adb: Minor reformatting.
7792 * gnatcmd.adb: Minor reformatting.
7793 * exp_attr.adb: Minor reformatting.
7795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7797 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7798 No_Dispatching_Calls, do not look for the Assign primitive, because
7799 predefined primitives are not created in this case.
7801 2011-08-02 Bob Duff <duff@adacore.com>
7803 * stylesw.ads: Minor comment fixes.
7805 2011-08-02 Robert Dewar <dewar@adacore.com>
7807 * freeze.adb (Add_To_Result): New procedure.
7809 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7811 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7812 time, if the specific run-time routines for handling streams of strings
7813 are not available, use the default mechanism.
7815 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7817 * s-regpat.ads: Fix typo.
7819 2011-08-02 Vincent Celier <celier@adacore.com>
7821 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7822 not null, call it to create the in memory config project file without
7823 parsing an existing default config project file.
7825 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7827 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7829 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7831 * sem_elim.adb: an abstract subprogram does not need an eliminate
7832 pragma for its descendant to be eliminable.
7834 2011-08-02 Ed Falis <falis@adacore.com>
7836 * init.c: revert to handling before previous checkin for VxWorks
7837 * s-intman-vxworks.adb: delete unnecessary declarations related to
7838 using Ada interrupt facilities for handling signals.
7839 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7840 * s-intman-vxworks.ads: Import __gnat_install_handler as
7841 Initialize_Interrupts.
7842 * s-taprop-vxworks.adb: Delete Signal_Mask.
7843 (Abort_Handler): change construction of mask to unblock exception
7846 2011-08-02 Jerome Guitton <guitton@adacore.com>
7848 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7849 Debug_Raise_Exception before propagation starts.
7851 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7853 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7854 to Restriction_Check_Required.
7855 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7856 * sem_res.adb (Resolve_Call): Likewise.
7857 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7859 2011-08-02 Bob Duff <duff@adacore.com>
7861 * stylesw.ads: Update comment.
7862 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7863 * errout.ads: Remove obsolete comment.
7865 2011-08-02 Javier Miranda <miranda@adacore.com>
7867 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7868 (Set_Is_Safe_To_Reevaluate): new procedure.
7869 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7870 assignment is allowed on safe-to-reevaluate variables.
7871 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7872 temporary created to remove side effects in expressions that use
7873 the secondary stack as safe-to-reevaluate.
7874 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7875 variables that are not true constants.
7877 2011-08-02 Robert Dewar <dewar@adacore.com>
7879 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7880 sem_res.adb, sem_ch6.adb: Minor reformatting.
7882 2011-08-02 Jerome Guitton <guitton@adacore.com>
7884 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7886 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7888 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7889 not set Overridden_Operation if subprogram is an initialization
7892 2011-08-02 Yannick Moy <moy@adacore.com>
7894 * par-ch6.adb: Correct obsolete name in comments
7895 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7896 which takes two message arguments (existing function takes one), with
7897 second message used for continuation.
7898 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7899 block statements that originate from a source block statement, not
7900 generated block statements
7901 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7902 symmetry with procedure case
7903 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7904 function to issue an error in formal mode if a package specification
7905 contains more than one tagged type or type extension.
7906 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7907 parameters matching formals of tagged types are objects (or ancestor
7908 type conversions of objects), not general expressions. Issue an error
7909 on view conversions that are not involving ancestor conversion of an
7911 (Resolve_Type_Conversion): in formal mode, issue an error on the
7912 operand of an ancestor type conversion which is not an object
7913 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7914 procedure so that it works also for actuals of function calls
7915 (Is_Actual_Tagged_Parameter): new function which determines if its
7916 argument is an actual parameter of a formal of tagged type in a
7918 (Is_SPARK_Object_Reference): new function which determines if the tree
7919 referenced by its argument represents an object in SPARK
7921 2011-08-02 Robert Dewar <dewar@adacore.com>
7923 * sem_ch3.adb: Minor reformatting
7924 Minor comment addition
7925 Minor error msg text change
7927 2011-08-02 Javier Miranda <miranda@adacore.com>
7929 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7930 function. Used to be more precise when we generate a variable plus one
7931 assignment to remove side effects in the evaluation of the Bound
7933 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7934 of the bound expression to force its re-analysis and thus expand the
7935 associated transient scope (if required). Code cleanup replacing the
7936 previous code that declared the constant entity by an invocation to
7937 routine Force_Evaluation which centralizes this work in the frontend.
7939 2011-08-02 Robert Dewar <dewar@adacore.com>
7941 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7942 (Base_Type): Now uses improved Is_Base_Type function
7943 * einfo.ads (Base_Type): Inline this function
7945 2011-08-02 Robert Dewar <dewar@adacore.com>
7947 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7948 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7950 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7952 * gcc-interface/Make-lang.in: Update dependencies.
7953 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7956 2011-08-02 Yannick Moy <moy@adacore.com>
7958 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7959 non-simple expression used in delta constraint
7960 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7961 index constraint which is not a subtype mark
7962 * par.adb: With and use Restrict
7963 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7964 mode on component type which is not a subtype mark and default
7965 expression on component
7966 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7967 of string which does not have a lower index bound equal to 1
7968 (Array_Type_Declaration): issue an error in formal mode on index or
7969 component type which is not a subtype mark, and on aliased keyword on
7971 (Derived_Type_Declaration): issue an error in formal mode on interface,
7972 limited or abstract type
7973 (Record_Type_Declaration): issue an error in formal mode on interface
7974 (Record_Type_Definition): issue an error in formal mode on tagged types
7975 and type extensions not declared in the specification of a library unit
7976 package; on null non-tagged record; on variant part
7978 2011-08-02 Vincent Celier <celier@adacore.com>
7980 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7981 not declared for qualified library project when Library_Name is not
7982 declared, but Library_Dir is.
7984 2011-08-02 Robert Dewar <dewar@adacore.com>
7986 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7987 pragmas (affects aspects [Component_]Default_Value
7988 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7989 component type for the resolution
7991 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7993 * einfo.adb (Base_Type): Tune implementation for speed.
7995 2011-08-02 Robert Dewar <dewar@adacore.com>
7997 * freeze.adb: Minor reformatting.
7999 2011-08-02 Thomas Quinot <quinot@adacore.com>
8001 * scos.ads: Update comments.
8003 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8005 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8006 base type, because the parent may be a subtype of a private type whose
8007 convention is established in a private part.
8009 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8011 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8012 statement in a block when the expansion of the return expression has
8013 created a finalization chain.
8014 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8015 with the parent node.
8016 Add N_Extended_Return_Statement to handle the case where a transient
8017 object declaration appears in the Return_Object_Declarations list of
8018 an extended return statement.
8020 2011-08-02 Matthew Gingell <gingell@adacore.com>
8022 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8023 unused parameter 'name'.
8025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8027 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8028 inherited operation, check whether its alias, which is the source
8029 operastion that it renames, has been marked eliminated.
8031 2011-08-02 Javier Miranda <miranda@adacore.com>
8033 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8034 in-mode parameter whose type is an access type since it can be used to
8035 modify its designated object. Enforce code that handles as safe an
8036 access type that is not access-to-constant but it is the result of a
8037 previous removal of side-effects.
8038 (Remove_Side_Effects): Minor code reorganization of cases which require
8039 no action. Done to incorporate documentation on new cases uncovered
8040 working in this ticket: no action needed if this routine was invoked
8041 too early and the nodes are not yet decorated.
8042 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8043 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8044 were issued with actuals that are implicitly provided by
8047 2011-08-02 Robert Dewar <dewar@adacore.com>
8049 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8051 2011-08-02 Yannick Moy <moy@adacore.com>
8053 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8054 to issue an error in formal mode on attribute not supported in this mode
8055 (Analyze_Attribute): issue errors on standard attributes not supported
8057 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8058 comment, and issue error in formal mode on modulus which is not a power
8060 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8062 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8064 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8065 operator on modular type (except 'not').
8067 2011-08-02 Robert Dewar <dewar@adacore.com>
8069 * gnat_rm.texi: Minor reformatting.
8071 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8073 * s-osinte-linux.ads: Minor comment update and reformatting.
8074 * i-cexten.ads: Make this unit pure, as for its parent.
8075 Will allow its usage in more contexts if needed.
8077 2011-08-02 Robert Dewar <dewar@adacore.com>
8079 * s-utf_32.ads: Minor comment fix.
8081 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8083 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8084 operation of a tagged synchronized type, handle the case where the
8085 controlling argument is overloaded.
8087 2011-08-02 Yannick Moy <moy@adacore.com>
8089 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8090 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8091 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8092 SPARK mode and formal verification mode on processing SPARK restriction
8093 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8094 requiring consistency checking.
8096 2011-08-02 Robert Dewar <dewar@adacore.com>
8098 * sem_res.adb: Minor reformatting.
8100 2011-08-02 Robert Dewar <dewar@adacore.com>
8102 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8103 a-cforse.ads: Remove unneeded with of Ada.Containers
8104 Remove commented out pragma Inline's
8105 Move specifications of new subprograms to the actual specs
8107 2011-08-02 Yannick Moy <moy@adacore.com>
8109 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8110 a-cforse.ads: Update comments.
8112 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8114 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8116 2011-08-02 Robert Dewar <dewar@adacore.com>
8118 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8119 a-cforse.ads, a-cofove.ads: Minor reformatting.
8121 2011-08-02 Claire Dross <dross@adacore.com>
8123 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8124 a-cofove.ads: Add comments.
8126 2011-08-02 Yannick Moy <moy@adacore.com>
8128 * gnat_rm.texi: Document formal containers.
8130 2011-08-02 Emmanuel Briot <briot@adacore.com>
8132 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8135 2011-08-02 Robert Dewar <dewar@adacore.com>
8137 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8140 2011-08-02 Robert Dewar <dewar@adacore.com>
8142 * aspects.adb: New aspects Default_Value and Default_Component_Value
8143 New format of Aspect_Names table checks for omitted entries
8144 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8145 handling of boolean aspects for derived types.
8146 New aspects Default_Value and Default_Component_Value
8147 New format of Aspect_Names table checks for omitted entries
8148 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8149 (Has_Default_Value): New flag
8150 (Has_Default_Component_Value): New flag
8151 (Has_Default_Value): New flag
8152 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8154 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8155 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8156 Default_Value and Default_Component_Value
8157 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8158 New aspects Default_Value and Default_Component_Value
8159 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8160 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8162 2011-08-02 Vincent Celier <celier@adacore.com>
8164 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8165 inherit library kind.
8167 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8169 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8172 2011-08-02 Robert Dewar <dewar@adacore.com>
8174 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8176 2011-08-02 Yannick Moy <moy@adacore.com>
8178 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8180 2011-08-02 Robert Dewar <dewar@adacore.com>
8182 * impunit.adb: Add comment.
8184 2011-08-02 Yannick Moy <moy@adacore.com>
8186 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8187 qualification of aggregates in formal mode
8188 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8190 (Resolve_Aggregate): complete the test that an aggregate is adequately
8191 qualified in formal mode
8193 2011-08-02 Pascal Obry <obry@adacore.com>
8195 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8196 * mlib-prj.adb: Supress warning when compiling binder generated file.
8197 (Build_Library): Supress all warnings when compiling the binder
8200 2011-08-02 Yannick Moy <moy@adacore.com>
8202 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8204 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8205 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8206 Add with/use clauses to make Check_Formal_Restriction visible
8208 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8210 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8211 in-parameters when type of the generic formal is private in the generic
8212 spec and non-private in the body.
8214 2011-08-02 Claire Dross <dross@adacore.com>
8216 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8217 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8218 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8219 * impunit.adb, Makefile.rtl: Take new files into account.
8221 2011-08-02 Robert Dewar <dewar@adacore.com>
8223 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8224 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8226 2011-08-02 Yannick Moy <moy@adacore.com>
8228 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8230 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8231 matching static array bounds, taking into account the special case of
8233 * sem_ch3.adb: Typo in comment.
8235 2011-08-02 Yannick Moy <moy@adacore.com>
8237 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8238 which issues an error in formal mode if its argument node is originally
8240 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8241 has a discriminant specification so that it does not include the case
8243 (Derived_Type_Declaration): move here the test that a derived type has a
8244 discriminant specification
8245 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8246 first element of a component association before accessing its choices
8247 (presence of component association is not enough)
8248 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8249 declaration is a library item before accessing the next element in a
8250 list, as library items are not member of lists
8251 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8252 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8253 Check_Formal_Restriction whenever possible.
8255 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8257 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8258 reference when needed.
8260 2011-08-02 Bob Duff <duff@adacore.com>
8262 * gnat_ugn.texi: Fix typo.
8264 2011-08-02 Vincent Celier <celier@adacore.com>
8266 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8267 archive file name. Do not use the full path name of archives for Open
8270 2011-08-02 Robert Dewar <dewar@adacore.com>
8272 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8273 Analyze_Aspect_Specifications
8275 (Analyze_Aspect_Specifications): New handling for boolean aspects
8276 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8277 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8278 sequence for Analyze_Aspect_Specifications
8279 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8280 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8282 2011-08-02 Robert Dewar <dewar@adacore.com>
8284 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8285 aspects, since these no longer exist.
8287 2011-08-02 Robert Dewar <dewar@adacore.com>
8289 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8290 semicolon, do not try to see if there are aspects following it.
8291 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8294 2011-08-02 Robert Dewar <dewar@adacore.com>
8296 * sem_ch8.adb, aspects.ads: Minor reformatting.
8298 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8300 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8301 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8303 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8305 2011-08-02 Yannick Moy <moy@adacore.com>
8307 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8308 mode on subprogram declaration outside of package specification, unless
8309 it is followed by a pragma Import
8310 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8311 Access_Type_Declaration): issue error in formal mode on access type
8312 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8314 (Analyze_Object_Declaration): issue error in formal mode on object
8315 declaration which does not respect SPARK restrictions
8316 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8317 declaration which does not respect SPARK restrictions
8318 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8319 error in formal mode on digits or delta constraint
8320 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8321 decimal fixed point type
8322 (Derived_Type_Declaration): issue error in formal mode on derived type
8323 other than type extensions of tagged record types
8324 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8325 with check on access definition
8326 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8327 mode on protected definition.
8328 (Analyze_Task_Definition): issue error in formal mode on task definition
8330 2011-08-02 Robert Dewar <dewar@adacore.com>
8332 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8334 2011-08-02 Javier Miranda <miranda@adacore.com>
8336 * sem_ch6.adb (Can_Override_Operator): New function.
8337 (Verify_Overriding_Indicator): Add missing code to check overriding
8338 indicator in operators. Fixes regression.
8339 (Check_Overriding_Indicator): Minor reformating after replacing the
8340 code that evaluates if the subprogram can override an operator by
8341 invocations to the above new function.
8343 (Write_Field26_Name): Add missing code to ensure that, following
8344 the documentation in einfo.ads, this field is not shown as attribute
8345 "Static_Initialization" on non-dispatching functions.
8347 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8349 * sem_res.adb (Resolve_Call): A call to
8350 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8351 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8352 i.e., when the second parameter is of type Time_Span.
8354 2011-08-02 Vincent Celier <celier@adacore.com>
8356 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8357 with an archive instead of -L<library dir> -l<library name>.
8359 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8361 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8362 mark the base types In_Use in addition to making the operations
8365 2011-08-02 Ed Falis <falis@adacore.com>
8367 * init.c: add and setup __gnat_signal_mask for the exception signals
8368 * s-inmaop-vxworks.adb: new file.
8369 * s-intman-vxworks.adb: remove unnecessary initializations and
8371 * s-intman-vxworks.ads: remove unnecessary variable
8372 * s-taprop-vxworks.adb: simplify signal initialization
8374 2011-08-02 Robert Dewar <dewar@adacore.com>
8376 * sem_ch8.adb: Minor code reorganization, comment updates.
8378 2011-08-02 Robert Dewar <dewar@adacore.com>
8380 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8381 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8383 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8384 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8386 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8388 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8389 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8390 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8391 use_type_clauses, to handle more efficiently use_type and use_all_type
8393 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8394 Ada2012 Use_All_Type clause.
8395 (Use_Class_Wide_Operations): new procedure.
8397 2011-08-02 Robert Dewar <dewar@adacore.com>
8399 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8400 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8401 expression to expression function.
8403 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8405 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8406 if types are compatible.
8408 2011-08-02 Yannick Moy <moy@adacore.com>
8410 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8411 returns True if its argument array types have same dimension and same
8412 static bounds at each index.
8413 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8414 OUT or IN OUT paramaters which are not view conversions in SPARK.
8415 (Resolve_Arithmetic_Op): issue an error in formal mode on
8416 multiplication or division with operands of fixed point types which are
8417 not qualified or explicitly converted.
8418 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8419 Boolean or array type (except String) operands.
8420 (Resolve_Equality_Op): issue an error in formal mode on equality
8421 operators for array types other than String with non-matching static
8423 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8424 for array types with non-matching static bounds. Factorize the code in
8425 Matching_Static_Array_Bounds.
8426 (Resolve_Qualified_Expression): issue an error in formal mode on
8427 qualified expressions for array types with non-matching static bounds.
8428 (Resolve_Type_Conversion): issue an error in formal mode on type
8429 conversion for array types with non-matching static bounds
8431 2011-08-02 Robert Dewar <dewar@adacore.com>
8433 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8435 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8437 * par-ch9.adb: save location of entry for proper error message.
8439 2011-08-02 Javier Miranda <miranda@adacore.com>
8441 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8442 (Use_Full_View) which permits this routine to climb through the
8443 ancestors using the full-view of private parents.
8444 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8445 Use_Full_View to true in calls to Is_Ancestor.
8446 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8447 true in call to Is_Ancestor.
8448 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8449 Use_Full_View to true in call to Is_Ancestor.
8450 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8451 call to Is_Ancestor.
8452 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8453 Use_Full_View to true in calls to Is_Ancestor.
8454 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8455 Make_Select_Specific_Data_Table, Register_Primitive,
8456 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8457 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8458 to true in call to Is_Ancestor.
8459 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8460 Use_Full_View to true in calls to Is_Ancestor.
8462 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8463 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8465 2011-08-02 Robert Dewar <dewar@adacore.com>
8467 * gnat_rm.texi: Minor reformatting.
8468 * sem_prag.adb: Minor reformatting.
8470 2011-08-02 Tristan Gingold <gingold@adacore.com>
8472 * vms_data.ads: Add VMS qualifier for -gnateP.
8474 2011-08-02 Robert Dewar <dewar@adacore.com>
8476 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8477 * par-ch7.adb (P_Package): Proper placement of aspects for package
8479 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8480 (End_Statements): Add Is_Sloc parameterr
8481 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8482 (Check_End): Ad Is_Sloc parameter
8483 (End_Statements): Add Is_Sloc parameterr
8485 2011-08-02 Vincent Celier <celier@adacore.com>
8487 * ug_words: Add VMS qualifier equivalent to -gnateP:
8488 /SYMBOL_PREPROCESSING.
8490 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8492 * gnat-style.texi: For hexadecimal numeric literals the typical
8493 grouping of digits is 4 to represent 2 bytes.
8494 A procedure spec which is split into several lines is indented two
8497 2011-08-02 Yannick Moy <moy@adacore.com>
8499 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8500 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8501 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8503 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8504 choice in array aggregate
8505 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8507 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8508 positional and named aggregate for record, or others in record
8509 aggregate, or multiple choice in record aggregate
8510 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8511 array operands to logical operations AND, OR and XOR do not have the
8512 same static lower and higher bounds
8513 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8515 2011-08-01 Robert Dewar <dewar@adacore.com>
8517 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8518 Replaces Last_Source_Node_In_Sequence.
8519 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8520 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8521 parens and blank in string (this was inconsistently implemented).
8523 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8524 blank in string (this was inconsistently implemented).
8526 (Set_Global_Switches): Set formal mode switches appropriately
8527 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8529 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8530 call Set_Error_Msg_Lang to set "spark" as language name.
8531 * par.adb: Remove unnecessary call to set formal language for errout
8532 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8533 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8535 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8536 calls to it, moved after resolution so that types are known
8537 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8538 result of concatenation is not of type String
8539 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8540 concatenation is not properly restricted
8541 * gnat_rm.texi: Add doc on pragma Spark_95.
8542 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8543 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8544 * gcc-interface/Make-lang.in: Update dependencies.
8546 2011-08-01 Javier Miranda <miranda@adacore.com>
8548 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8549 condition that detects if the overridden operation must replace an
8552 2011-08-01 Javier Miranda <miranda@adacore.com>
8554 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8555 code declarations inserted by Insert_Actions in each alternative of the
8556 N_Case_Expression node.
8558 2011-08-01 Robert Dewar <dewar@adacore.com>
8560 * sem_ch6.adb: Minor code reorganization.
8561 * sem_util.adb: Minor reformatting.
8563 2011-08-01 Pascal Obry <obry@adacore.com>
8565 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8566 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8568 2011-08-01 Yannick Moy <moy@adacore.com>
8570 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8571 literal or operator symbol which is prefixed
8572 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8573 mode on access attributes.
8574 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8575 that concatenation operands are properly restricted in formal mode
8576 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8577 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8578 result of the concatenation has a type different from String.
8579 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8580 Analyze_Quantified_Expression, Analyze_Slice,
8581 Analyze_Null): issue an error in formal mode on unsupported constructs
8583 (Analyze_Block_Statement): only issue error on source block statement
8584 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8585 function which returns the last node in a list of nodes for which
8586 Comes_From_Source returns True, if any
8587 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8588 Last_Source_Node_In_Sequence
8589 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8590 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8591 mode on unsupported constructs
8592 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8593 rest of the actions may be needed later on since the error is marked as
8595 * sinfo.ads: Typos in comments.
8597 2011-08-01 Pascal Obry <obry@adacore.com>
8599 * projects.texi: Minor editing.
8601 2011-08-01 Yannick Moy <moy@adacore.com>
8603 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8604 insertion character ~~
8605 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8606 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8607 with insertion character ~~
8608 (Set_Msg_Text): treat insertion character ~~
8609 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8610 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8611 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8612 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8613 errors related to the formal language restriction not serious
8614 (insertion character |).
8615 * par.adb (Par): set formal language for error messages if needed
8616 * sem_ch6.adb (Check_Missing_Return): take into account possible
8617 generated statements at the end of the function
8618 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8619 enumeration value to define a new pragma SPARK_95
8620 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8621 SPARK_Version): new type and variables to store the SPARK version
8623 (SPARK_Mode): return True when SPARK_Version is set
8624 * par-prag.adb: Correct indentation
8625 (Prag): take Pragma_SPARK_95 into account
8626 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8629 2011-08-01 Robert Dewar <dewar@adacore.com>
8631 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8632 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8633 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8635 2011-08-01 Pascal Obry <obry@adacore.com>
8637 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8638 Target_Name to Get_Path call.
8639 (Parse_Single_Project): Likewise.
8640 (Post_Parse_Context_Clause): Likewise.
8641 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8642 Call Initialise_Project_Path with the proper Target_Name.
8643 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8645 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8646 with the proper Target_Name.
8647 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8649 (Parse_Project_And_Apply_Config): Likewise.
8650 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8651 This is fine as this part of the code is supporting only native
8653 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8654 is fine as this part of the code is supporting only native compilation.
8656 2011-08-01 Yannick Moy <moy@adacore.com>
8658 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8659 of homonym, unless the homonym is one of the cases allowed in SPARK
8660 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8661 package declaration occurring after a body.
8663 2011-08-01 Robert Dewar <dewar@adacore.com>
8665 * checks.adb, exp_ch4.adb: Minor reformatting.
8667 2011-08-01 Javier Miranda <miranda@adacore.com>
8669 * einfo.ads (Access_Disp_Table): Fix documentation.
8670 (Dispatch_Table_Wrappers): Fix documentation.
8672 2011-08-01 Pascal Obry <obry@adacore.com>
8674 * prj-env.adb, prj-env.ads: Minor reformatting.
8676 2011-08-01 Yannick Moy <moy@adacore.com>
8678 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8679 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8680 procedures out of these packages.
8681 * errout.ads, errout.adb
8682 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8683 procedures in of this package
8684 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8685 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8686 on misplaced later vs initial declarations, like in Ada 83
8687 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8688 formal mode on attribute of private type whose full type declaration
8690 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8691 package declaration inside a package specification
8692 (Analyze_Full_Type_Declaration): issue error in formal mode on
8693 controlled type or discriminant type
8694 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8695 user-defined operator means that it should come from the source
8696 (New_Overloaded_Entity): issue error in formal mode on overloaded
8698 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8700 2011-08-01 Thomas Quinot <quinot@adacore.com>
8702 * atree.adb: Minor reformatting.
8703 * checks.adb: Minor reformatting.
8705 2011-08-01 Vincent Celier <celier@adacore.com>
8707 * s-parame-vms-ia64.ads: Fix typo in comment
8709 * s-parame-vms-restrict.ads: Removed, unused.
8711 2011-08-01 Javier Miranda <miranda@adacore.com>
8714 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8716 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8717 * sem_ch3.ads, sem_ch3.adb
8718 (Is_Constant_Bound): New extended version of the subprogram that was
8719 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8720 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8721 * sem_aux.ads (Constant_Value): Fix typo in comment.
8722 * checks.adb (Generate_Index_Checks): New implementation which, for
8723 array objects with constant bounds, generates the runtime check
8724 referencing the bounds of the array type. For other cases this routine
8725 provides its previous behavior obtaining such values from the array
8727 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8729 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8730 we cannot have semantic interpretations of the new node.
8732 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8734 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8737 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8739 * sem_ch8.adb: Minor code editing.
8740 * s-vxwext.adb: Remove trailing space.
8741 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8742 consistency with other files.
8744 2011-08-01 Thomas Quinot <quinot@adacore.com>
8746 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8748 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8750 * par-ch10.adb: reject parameterized expressions as compilation unit.
8751 * sem_ch4.adb: handle properly conditional expression with overloaded
8752 then_clause and no else_clause.
8754 2011-08-01 Tristan Gingold <gingold@adacore.com>
8756 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8757 like done by System.Aux_DEC.
8758 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8760 2011-08-01 Yannick Moy <moy@adacore.com>
8762 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8763 missing label at end of declaration (subprogram or package)
8764 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8765 of positional and named parameter association
8766 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8767 Error_Msg_SP which adds a prefix to the error message giving the name
8768 of the formal language analyzed
8769 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8770 access result type in subprogram, unconstrained array as result type,.
8771 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8773 * sem_ch8.adb: Code clean up.
8775 2011-08-01 Javier Miranda <miranda@adacore.com>
8777 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8778 * einfo.ads (Access_Disp_Table): Fix documentation.
8779 (Dispatch_Table_Wrappers): Fix documentation.
8780 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8781 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8782 to enforce the documentation of this attribute.
8783 (Set_Is_Interface): Cleanup the assertion.
8784 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8785 the Underlying_Type entity before reading attribute Access_Disp_Table.
8786 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8787 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8788 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8789 the Underlying_Type entity before reading attribute Access_Disp_Table.
8790 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8791 Locate the Underlying_Type entity before reading attribute
8794 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8796 * s-poosiz.ads: Additional overriding indicators.
8798 2011-08-01 Yannick Moy <moy@adacore.com>
8800 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8802 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8803 parameter specification does not include a subtype mark.
8804 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8805 formal mode on abstract subprogram.
8806 (Analyze_Subprogram_Specification): issue error in formal mode on
8807 user-defined operator.
8808 (Process_Formals): issue error in formal mode on access parameter and
8810 * sem_ch9.adb (Analyze_Abort_Statement,
8811 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8812 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8813 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8814 Analyze_Requeue, Analyze_Selective_Accept,
8815 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8816 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8817 issue error in formal mode on user-defined raise statement.
8819 2011-08-01 Thomas Quinot <quinot@adacore.com>
8821 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8822 declaration being hidden when overriding an implicit inherited
8824 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8825 (-gnats), do not complain about a source file that contains only a
8828 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8830 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8831 variable if already set.
8833 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8835 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8836 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8837 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8838 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8839 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8840 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8841 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8842 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8843 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8844 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8845 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8846 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8847 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8848 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8849 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8850 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8851 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8852 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8853 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8854 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8855 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8856 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8857 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8858 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8859 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8860 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8861 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8862 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8863 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8864 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8865 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8866 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8867 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8868 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8869 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8870 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8871 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8872 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8873 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8874 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8875 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8876 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8877 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8878 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8879 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8880 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8881 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8882 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8883 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8884 Use GNAT instead of GNARL.
8886 2011-08-01 Bob Duff <duff@adacore.com>
8888 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8889 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8890 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8893 2011-08-01 Yannick Moy <moy@adacore.com>
8895 * debug.adb (d.D) reverve flag for the SPARK mode
8896 (d.E) reverve flag for SPARK generation mode
8897 (d.F) reverve flag for Why generation mode
8898 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8899 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8900 functions which return True when the corresponding modes are set
8901 (Formal_Language): return "spark" or "alfa" when in formal verification
8903 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8904 Error_Msg to prefix the error message with a tag giving the formal
8906 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8907 message with a tag giving the formal language
8908 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8910 (Analyze_Case_Statement): issue error in formal mode on case statement
8911 with a single "others" case alternative
8912 (Analyze_Exit_Statement): issue errors in formal mode on exit
8913 statements which do not respect SPARK restrictions
8914 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8915 (Check_Unreachable_Code): always issue an error (not a warning) in
8916 formal mode on unreachable code (concerns both code after an infinite
8917 loop and after an unconditional jump, both not allowed in SPARK)
8918 * sem_ch6.adb (Analyze_Return_Statement): add call to
8919 Set_Return_Present for a procedure containing a return statement
8920 (already done for functions in Analyze_Function_Return)
8921 (Analyze_Function_Return): issue error in formal mode on extended
8922 return or if return is not last statement in function
8923 (Check_Missing_Return): issue error in formal mode if function does
8924 not end with return or if procedure contains a return
8925 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8926 function to detect if there is an inner scope of its parameter S which
8929 2011-08-01 Thomas Quinot <quinot@adacore.com>
8931 * sem_ch6.ads: Minor reformatting.
8933 2011-08-01 Javier Miranda <miranda@adacore.com>
8935 * sem_util.adb (Abstract_Interface_List): Complete condition when
8936 processing private type declarations to avoid reading unavailable
8938 (Is_Synchronized_Tagged_Type): Complete condition when processing
8939 private extension declaration nodes to avoid reading unavailable
8942 2011-08-01 Thomas Quinot <quinot@adacore.com>
8944 * sem_ch3.adb: Minor reformatting.
8946 2011-08-01 Thomas Quinot <quinot@adacore.com>
8948 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8949 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8950 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8951 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8952 for VMS, instead parametrize the common implementation with
8953 System.Parameters declarations.
8955 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8957 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8959 2011-08-01 Tristan Gingold <gingold@adacore.com>
8961 * seh_init.c: Fix SEH handler installation on win64.
8963 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8965 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8966 double analysis of an anonymous access to subprogram, because it can
8967 lead to improper sharing of profiles and a back-end crash.
8969 2011-08-01 Robert Dewar <dewar@adacore.com>
8971 * make.adb, sem_ch4.adb: Minor reformatting.
8972 * gcc-interface/Make-lang.in: Update dependencies.
8973 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8975 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8977 * gnat_rm.texi: Fix definition of Long_Integer.
8979 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8981 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8982 to prevent storage exhaustion.
8983 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8984 finalized is a function body, insert the cleanup code before the final
8985 return statement, to prevent spurious warnings.
8986 * s-pooglo.ads: add overriding indicator.
8988 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8990 * sem_ch4.adb (Operator_Check): improve error message when both a
8991 with_clause and a use_clause are needed to make operator usage legal.
8992 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8993 determine whether a compilation unit is visible within an other,
8994 either through a with_clause in the current unit, or a with_clause in
8995 its library unit or one one of its parents.
8997 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8999 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9000 over an arbitrary expression of an array or container type.
9001 * lib-xref.adb: clarify comment.
9003 2011-08-01 Bob Duff <duff@adacore.com>
9005 * einfo.ads: Minor reformatting.
9006 * debug.adb: Minor comment improvement.
9008 2011-08-01 Javier Miranda <miranda@adacore.com>
9010 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9011 consider hidden subprograms as valid candidates.
9013 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9015 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9017 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9019 * gnat_ugn.texi: Fix typo.
9021 2011-08-01 Robert Dewar <dewar@adacore.com>
9023 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9024 lib-xref.adb: Minor reformatting
9026 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9028 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9029 when to generate a call to Move_Final_List.
9030 (Has_Controlled_Parts): Remove this function.
9032 2011-08-01 Geert Bosch <bosch@adacore.com>
9034 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9037 2011-08-01 Thomas Quinot <quinot@adacore.com>
9039 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9040 explicit raise of a predefined exception as Comes_From_Source if the
9041 original N_Raise_Statement comes from source.
9043 2011-08-01 Robert Dewar <dewar@adacore.com>
9045 * sinfo.ads: Add comment.
9046 * sem_ch6.adb: Minor reformatting.
9048 2011-08-01 Robert Dewar <dewar@adacore.com>
9050 * freeze.adb (Freeze_Entity): Refine check for bad component size
9051 clause to avoid rejecting confirming clause when atomic/aliased present.
9053 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9055 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9056 better determine whether an entity reference is a write.
9057 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9059 * lib-xref.adb (Output_References): Do no suppress a read reference at
9060 the same location as an immediately preceeding modify-reference, to
9061 handle properly in-out actuals.
9063 2011-08-01 Tristan Gingold <gingold@adacore.com>
9065 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9067 2011-08-01 Quentin Ochem <ochem@adacore.com>
9069 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9070 heap to compute the result.
9072 2011-08-01 Robert Dewar <dewar@adacore.com>
9074 * atree.ads: Minor reformatting.
9076 2011-08-01 Emmanuel Briot <briot@adacore.com>
9078 * g-expect.adb (Get_Command_Output): Fix memory leak.
9080 2011-08-01 Geert Bosch <bosch@adacore.com>
9082 * cstand.adb (P_Float_Type): New procedure to print the definition of
9083 predefined fpt types.
9084 (P_Mixed_Name): New procedure to print a name using mixed case
9085 (Print_Standard): Use P_Float_Type for printing floating point types
9086 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9087 precision IEEE float.
9089 2011-08-01 Thomas Quinot <quinot@adacore.com>
9091 * sem_ch3.adb: Minor reformatting.
9093 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9095 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9096 the completion of a generic function, insert the new body rather than
9097 rewriting the original.
9099 2011-08-01 Yannick Moy <moy@adacore.com>
9101 * sinfo.ads, errout.ads: Typos in comments.
9103 2011-08-01 Robert Dewar <dewar@adacore.com>
9105 * par-endh.adb: Minor reformatting.
9107 2011-08-01 Robert Dewar <dewar@adacore.com>
9109 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9110 (Pre_Post_Aspects): New subtype.
9111 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9112 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9113 * par-ch7.adb (P_Package): Remove Decl parameter
9114 (P_Package): Handle new syntax for aspects (before IS)
9115 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9117 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9118 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9119 (P_Package): Remove Decl parameter
9120 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9122 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9124 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9125 * sinfo.ads: Document new syntax for aspects in packages etc.
9126 * sprint.adb: Handle new syntax of aspects before IS in package
9128 2011-08-01 Thomas Quinot <quinot@adacore.com>
9130 * atree.ads: Minor reformatting.
9131 * sem_prag.adb: Minor reformatting.
9133 2011-08-01 Robert Dewar <dewar@adacore.com>
9135 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9136 case expr alternative.
9138 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9140 * sem_ch12.adb: Fix typo.
9142 2011-08-01 Geert Bosch <bosch@adacore.com>
9144 * sem_prag.adb (Check_No_Link_Name): New procedure.
9145 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9146 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9147 instead of Standard_Long_Long_Float_Size global. Preparation for
9148 eventual removal of per type constants.
9149 * exp_util.ads (Get_Stream_Size): New function returning the stream
9150 size value of subtype E.
9151 * exp_util.adb (Get_Stream_Size): Implement new function.
9152 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9154 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9156 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9158 2011-08-01 Geert Bosch <bosch@adacore.com>
9160 * cstand.adb: Fix comments.
9161 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9164 2011-08-01 Robert Dewar <dewar@adacore.com>
9166 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9168 2011-08-01 Geert Bosch <bosch@adacore.com>
9170 * atree.ads: Fix comment.
9172 2011-08-01 Robert Dewar <dewar@adacore.com>
9174 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9175 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9176 * par.adb: Add with for Namet.Sp.
9177 * par-tchk.adb: Minor reformatting.
9179 2011-08-01 Vincent Celier <celier@adacore.com>
9181 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9182 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9183 of the init procedure of a SAL.
9184 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9187 2011-08-01 Thomas Quinot <quinot@adacore.com>
9189 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9192 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9194 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9196 2011-08-01 Thomas Quinot <quinot@adacore.com>
9198 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9199 conformant with its spec (return True only for types that have
9200 an overriding Initialize primitive operation that prevents them from
9201 having preelaborable initialization).
9202 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9203 initialization for controlled types in Ada 2005 or later mode.
9205 2011-08-01 Robert Dewar <dewar@adacore.com>
9207 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9209 (Same_Aspect): New function.
9210 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9211 Type_Invariant, Precondition, Postcondition.
9212 * snames.ads-tmpl: Add Name_Type_Invariant.
9214 2011-08-01 Robert Dewar <dewar@adacore.com>
9216 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9218 (Freeze_All_Ent): Fix error in handling inherited aspects.
9219 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9220 already analyzed, but don't skip entire processing of a declaration,
9221 that's wrong in some cases of declarations being rewritten.
9222 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9223 Don't delay for integer, string literals
9224 Treat predicates in usual manner for delay, remove special case code,
9226 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9227 (Build_Predicate_Function): Update saved expression in aspect
9228 (Build_Invariant_Procedure): Update saved expression in aspect
9229 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9230 of replacement of discriminant references if the reference is simple.
9232 2011-08-01 Robert Dewar <dewar@adacore.com>
9234 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9235 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9236 Static_Predicate and Dynamic_Predicate.
9237 (Build_Predicate_Function): Add processing for Static_Predicate
9238 and Dynamic_Predicate.
9239 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9240 (From_Static_Predicate): New flag
9241 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9243 2011-08-01 Robert Dewar <dewar@adacore.com>
9245 * usage.adb: Documentation cleanup for Ada version modes in usage.
9246 * expander.adb: Minor reformatting.
9248 2011-08-01 Robert Dewar <dewar@adacore.com>
9250 * atree.ads: Minor comment fix.
9251 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9252 a-witeio.ads, sem_prag.adb: Minor reformatting.
9254 2011-08-01 Doug Rupp <rupp@adacore.com>
9256 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9257 pointers. Use descrip.h header file for convenience. Add some
9260 2011-08-01 Robert Dewar <dewar@adacore.com>
9262 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9263 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9264 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9266 (Check_Aspect_At_End_Of_Declarations): New procedure
9267 (Analye_Aspect_Specification): Minor changes for above procedures
9268 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9269 specification node as well.
9271 2011-08-01 Pascal Obry <obry@adacore.com>
9273 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9274 Windows files. Use GetFilesAttributes() in this case to check for file
9275 existence instead of returning with an error code.
9277 2011-08-01 Vincent Celier <celier@adacore.com>
9279 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9280 High is above Source length.
9282 2011-08-01 Robert Dewar <dewar@adacore.com>
9284 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9286 2011-08-01 Robert Dewar <dewar@adacore.com>
9288 * aspects.ads (Boolean_Aspects): New subtype.
9289 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9290 for derived types in cases where the parent type and derived type have
9292 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9293 with aspects when parent type also has aspects.
9294 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9295 boolean expression at this point).
9296 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9297 accordance with final decision on the Ada 2012 feature.
9298 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9300 2011-08-01 Matthew Heaney <heaney@adacore.com>
9302 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9304 2011-08-01 Pascal Obry <obry@adacore.com>
9306 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9307 Fix Replace_Slice when High is above current string size.
9308 (Replace_Slice): Fix DL computation when High is above current
9311 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9313 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9315 2011-08-01 Matthew Heaney <heaney@adacore.com>
9317 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9320 2011-08-01 Pascal Obry <obry@adacore.com>
9322 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9325 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9327 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9328 access to protected subprograms in generic bodies.
9329 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9330 protected type, indicate that the convention of the subprogram is
9331 Convention_Protected, because it may be used in subsequent declarations
9332 within the protected declaration.
9334 2011-08-01 Vincent Celier <celier@adacore.com>
9336 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9337 and "final" procedures when the name of the library is "ada", to avoid
9338 duplicate symbols "adainit" and "adafinal" in executables.
9340 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9342 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9343 quantified expression that appears within a postcondition and uses the
9344 Ada2012 'Result attribute.
9346 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9348 * init.c (__gnat_error_handler): Cast reason to int.
9349 (__gnat_install_handler): Explain sa_sigaction use.
9351 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9353 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9354 subprogram has copy-in copy-out parameters, try to promote the mode of
9355 the return type if it is passed in registers.
9357 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9359 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9360 left operand as addressable.
9362 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9364 * gcc-interface/gigi.h (build_function_stub): Remove.
9365 (build_return_expr): Likewise.
9366 (convert_vms_descriptor): Declare.
9367 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9368 (build_function_stub): Move to...
9369 * gcc-interface/utils2.c (build_return_expr): Move to...
9370 * gcc-interface/trans.c (build_function_stub): ...here.
9371 (build_return_expr): ...here.
9372 (Subprogram_Body_to_gnu): Add local variable for language_function.
9373 Disconnect the parameter attributes cache, if any, once done with it.
9374 Call end_subprog_body only after setting the end_locus.
9375 Build the stub associated with the function, if any, at the very end.
9376 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9377 variables and streamline control flow.
9379 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9382 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9385 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9388 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9389 Assign to act.sa_sigaction.
9390 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9391 current->return_address to char * before arithmetic.
9393 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9395 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9396 Correct argument types.
9397 Extract code from reason.
9398 (__gnat_install_handler): Assign to act.sa_sigaction.
9400 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9402 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9403 (GNAT1_OBJS): ...here.
9405 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9408 * g-socthi-mingw.adb (Fill): Fix formatting.
9410 * gcc-interface/gigi.h: Move around comment.
9412 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9415 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9417 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9420 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9422 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9424 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9425 range comparison if Pmode is SImode.
9427 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9428 Eric Botcazou <ebotcazou@adacore.com>
9430 * adadecode.c: Wrap up in extern "C" block.
9431 * adadecode.h: Likewise.
9432 * adaint.c: Likewise. Remove 'const' keyword.
9433 * adaint.h: Likewise.
9435 * atree.h: Likewise.
9437 * cstreams.c: Likewise.
9441 * final.c: Likewise.
9443 * initialize.c: Likewise.
9445 * namet.h: Likewise.
9446 * nlists.h: Likewise.
9447 * raise.c: Likewise.
9448 * raise.h: Likewise.
9449 * repinfo.h: Likewise.
9450 * seh_init.c: Likewise.
9451 * targext.c: Likewise.
9452 * tracebak.c: Likewise.
9453 * uintp.h: Likewise.
9454 * urealp.h: Likewise.
9455 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9456 * xsinfo.adb: Likewise.
9457 * xsnamest.adb: Likewise.
9458 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9459 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9460 * gcc-interface/misc.c: Likewise.
9461 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9462 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9463 ada/targext.o here...
9464 (GNAT_ADA_OBJS): ...and not here.
9465 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9466 (GNATBIND_OBJS): Reorder.
9468 2011-07-07 Richard Henderson <rth@redhat.com>
9470 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9471 dwarf2out_frame_init.
9473 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9475 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9477 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9480 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9482 2011-07-06 Richard Guenther <rguenther@suse.de>
9484 * gcc-interface/misc.c (gnat_init): Merge calls to
9485 build_common_tree_nodes and build_common_tree_nodes_2.
9486 Re-initialize boolean_false_node.
9488 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9489 Olivier Hainque <hainque@adacore.com>
9490 Nicolas Setton <setton@adacore.com>
9492 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9493 the type according to the ARTIFICIAL_P parameter.
9494 (create_type_decl): Likewise.
9495 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9497 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9499 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9500 (gnatbind): Likewise.
9502 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9504 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9506 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9508 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9509 local variable throughout. Remove useless call to Base_Type.
9510 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9511 Take it also into account for the volatileness of the field. Set the
9512 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9514 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9516 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9517 on a dereference built for a by-ref object if it has an address clause.
9519 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9521 * einfo.ads (Address_Taken): Document use for the second argument of
9522 Asm_Input and Asm_Output attributes.
9523 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9524 argument is an entity name, then set Address_Taken on it.
9525 <Attribute_Asm_Output>: Likewise.
9526 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9527 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9528 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9529 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9531 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9534 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9536 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9538 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9539 (ada/utils.o): Update dependencies.
9540 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9541 ../../../libcpp/libcpp.a.
9542 * gcc-interface/utils.c: Include common/common-target.h.
9543 (process_attributes): Use targetm_common.have_named_sections.
9545 2011-06-07 Richard Guenther <rguenther@suse.de>
9547 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9550 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9552 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9553 TREE_THIS_NOTRAP flag.
9555 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9557 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9560 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9562 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9563 constants whose full view has discriminants specially.
9565 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9567 * gcc-interface/utils.c: Include diagnostic.h.
9568 (gnat_write_global_declarations): Output debug information for all
9569 global type declarations before finalizing the compilation unit.
9570 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9572 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9574 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9576 2011-05-25 Kai Tietz <ktietz@redhat.com>
9578 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9579 initialization instead of const/none-const pointer assignment.
9581 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9583 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9584 $(EXTRA_GNAT1_OBJS).
9585 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9586 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9587 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9588 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9589 libcommon-target.a instead of prefix.o.
9591 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9594 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9596 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9598 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9599 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9600 instead of version.o.
9602 2011-05-18 Kai Tietz <ktietz@redhat.com>
9604 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9605 boolean_false_node instead of integer_zero_node.
9606 (convert_with_check): Likewise.
9607 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9609 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9611 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9612 type of the parameter is an unconstrained array, convert the actual to
9613 the type of the formal in the In Out and Out cases as well.
9615 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9617 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9618 call build_function_type_array or build_varargs_function_type_array
9620 (create_subprog_type): Don't call build_function_type; call
9621 build_function_type_vec instead.
9623 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9625 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9626 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9627 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9629 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9631 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9633 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9634 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9636 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9638 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9640 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9642 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9643 instead of accessing TYPE_ARG_TYPES directly.
9644 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9646 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9649 * gcc-interface/gigi.h (get_variant_part): Declare.
9650 * gcc-interface/decl.c (get_variant_part): Make global.
9651 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9652 types have the same constant size, are record types and T1 has a
9653 variant part while T2 doesn't.
9655 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9657 * gcc-interface/utils.c (begin_subprog_body): Do not call
9659 (end_subprog_body): Likewise.
9661 2011-05-04 Richard Guenther <rguenther@suse.de>
9663 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9665 (pos_to_constructor): Likewise.
9667 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9668 Eric Botcazou <ebotcazou@adacore.com>
9670 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9671 of build_function_type. Adjust calls to...
9672 (build_raise_check): ...this. Do not take a void_tree parameter.
9673 Call build_function_type_list instead of build_function_type.
9674 Fix head comment and swap couple of conditional blocks.
9676 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9678 * gnatvsn.ads (Library_Version): Bump to 4.7.
9679 (Current_Year): Bump to 2011.
9681 2011-04-29 Michael Matz <matz@suse.de>
9683 * gcc-interface/misc.c (gnat_handle_option): Set
9684 warn_maybe_uninitialized.
9686 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9688 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9689 the Watson/McCabe paper.
9691 2011-04-23 Jim Meyering <meyering@redhat.com>
9693 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9695 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9697 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9700 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9702 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9704 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9705 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9706 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9707 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9708 <all>: Do not set flags on the reused DECL node coming from an alias.
9709 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9710 don't need debug info here...
9711 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9712 (gigi): Adjust calls to create_subprog_decl.
9713 (build_raise_check): Likewise.
9714 (establish_gnat_vms_condition_handler): Likewise.
9715 (Compilation_Unit_to_gnu): Likewise.
9716 (gnat_to_gnu): Likewise.
9718 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9720 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9721 (NO_REORDER_ADAFLAGS): New variable.
9722 (EXTRA_GNATTOOLS): Always define.
9723 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9724 Clean up and adjust list of files compiled with special options.
9725 * gcc-interface/Make-lang.in: Likewise.
9726 (ada/decl.o): Cosmetical change.
9727 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9729 2011-04-20 Jim Meyering <meyering@redhat.com>
9731 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9733 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9735 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9736 $(CFLAGS) on the link line.
9738 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9740 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9741 padded type built for the return type if it is unconstrained.
9743 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9745 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9747 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9749 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9750 before calling TREE_CHAIN.
9751 * gcc-interface/misc.c (gnat_init_ts): New function.
9752 (LANG_HOOKS_INIT_TS): Define.
9754 2011-04-12 Martin Jambor <mjambor@suse.cz>
9756 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9757 instead of cgraph_node.
9759 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9761 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9762 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9765 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9767 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9768 of aggregate types that contain a placeholder.
9770 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9772 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9774 (handle_type_generic_attribute): Likewise.
9776 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9779 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9781 2011-04-04 Kai Tietz <ktietz@redhat.com>
9784 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9787 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9789 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9790 type case, do not strip a padding type around the array type.
9792 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9794 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9797 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9799 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9800 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9801 code for -feliminate-unused-debug-types.
9802 (gnat_post_options): Likewise.
9804 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9806 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9807 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9810 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9812 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9813 DECL_ARTIFICIAL flag on enumeration types.
9815 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9817 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9818 fat pointer types artificial unconditionally.
9819 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9822 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9824 * gcc-interface/gigi.h (get_dummy_type): Declare.
9825 (build_dummy_unc_pointer_types): Likewise.
9826 (finish_fat_pointer_type): Likewise.
9827 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9828 fat pointer type has been built, complete it in place.
9829 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9830 and thin pointers. Remove useless variable.
9831 (finish_fat_pointer_type): Make global and move to...
9832 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9833 (get_dummy_type): New function.
9834 (build_dummy_unc_pointer_types): Likewise.
9835 (gnat_pushdecl): Propage the name to the anonymous variants only.
9836 (update_pointer_to): Only adjust the pointer types in the unconstrained
9839 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9841 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9842 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9843 if this is a Taft amendment type and the full declaration is available.
9844 * gcc-interface/trans.c (process_type): Likewise.
9845 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9846 (process_freeze_entity): Likewise.
9847 * gcc-interface/utils.c (dummy_global): New static variable.
9848 (gnat_write_global_declarations): If there are types declared as used
9849 at the global level, insert them in the global hash table.
9851 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9853 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9854 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9855 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9857 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9858 flag of the type accordingly.
9859 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9861 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9863 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9864 finalizing types when updating the pointers to the designated type.
9865 <all>: Finalize the deferred types even if we didn't defer processing
9866 of incomplete types in this invocation.
9868 2011-04-01 Olivier Hainque <hainque@adacore.com>
9869 Nicolas Setton <setton@adacore.com>
9870 Eric Botcazou <ebotcazou@adacore.com>
9872 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9873 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9875 2011-03-28 Kai Tietz <ktietz@redhat.com>
9877 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9879 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9880 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9882 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9884 2011-03-28 Tristan Gingold <gingold@adacore.com>
9887 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9888 Use ada output of gnatbind.
9889 (ada/b_gnatb.adb): Ditto.
9890 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9891 (ada.mostlyclean, ada.stage1)
9892 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9893 (ada.stagefeedback): Adjust.
9894 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9895 Use ada output of gnatbind.
9896 (b_gnatm.adb): Ditto.
9897 (b_gnatl.o, b_gnatm.o): New rules.
9899 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9901 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9902 for the padded type built to support a specified size or alignment.
9904 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9906 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9907 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9908 unconditionally to the end of the unit when the designated type is
9910 <all>: Rename local variable. Attempt to un-defer types only and do it
9911 for limited_with'ed types as well.
9912 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9913 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9914 consistently and remove redundant call to finalize_from_with_types.
9916 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9918 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9919 subprograms without a previous spec declared in the same unit.
9920 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9921 subprograms at the end of the unit instead of at the beginning.
9922 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9923 isn't public for the special handling of non-inline functions nested
9924 inside inline external functions.
9926 2011-03-25 Jeff Law <law@redhat.com>
9928 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9930 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9932 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9933 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9934 to compute Set_Size_Depends_On_Discriminant.
9935 (Layout_Type): Call it on array types in back-end layout mode.
9936 * sem_util.adb (Requires_Transient_Scope): Return true for array
9937 types only if the size depends on the value of discriminants.
9938 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9939 type if the RHS is a call to a function that returns an unconstrained
9940 type with default discriminant.
9942 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9944 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9945 non-conversion to the nominal result type at the end.
9947 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9949 * gcc-interface/trans.c (create_temporary): New function taken from...
9950 (create_init_temporary): ...here. Call it.
9951 (call_to_gnu): Create the temporary for the return value early, if any.
9952 Create it for a function with copy-in/copy-out parameters if there is
9953 no target; in other cases of copy-in/copy-out, use another temporary.
9954 Push the new binding level lazily. Add and rename local variables.
9956 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9958 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9960 (set_rm_size): Likewise.
9962 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9964 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9965 for the padded type built in order to support a specified alignment.
9966 Fix incorrect formatting.
9968 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9971 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9973 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9975 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9976 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9977 to the end of the list. Adjust recursive call. Rename local variable.
9978 If REORDER is true, reorder components of the record type.
9979 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9980 components_to_record and adjust the parameter list.
9982 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9984 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9985 disabled, use the variable for bounds of loop iteration scheme.
9987 2011-03-21 Kai Tietz <ktietz@redhat.com>
9990 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9992 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9994 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9995 out whether the expression is read-only. Short-circuit placeholder
9996 case and rename a couple of local variables.
9998 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10000 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10001 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10002 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10003 (convert): Deal with conversions from a smaller form type specially.
10005 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10007 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10008 its argument, except for the special -I- switch.
10010 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10012 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10015 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10017 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10019 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10021 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10023 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10024 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10025 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10026 Do not generate the check directly, instead instantiate the template
10027 check present in the descriptor.
10028 (make_descriptor_field): Move around.
10029 (build_vms_descriptor32): Build a template check in the POINTER field.
10030 (build_vms_descriptor): Remove useless suffixes.
10031 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10033 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10036 * targext.c: Include target files if IN_RTS is defined.
10038 2011-01-26 Richard Guenther <rguenther@suse.de>
10041 * targext.c: Include config.h.
10042 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10045 2011-01-04 Pascal Obry <obry@adacore.com>
10046 Eric Botcazou <ebotcazou@adacore.com>
10048 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10050 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10052 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10053 end-of-case on the end label and its associated gotos, if any.
10055 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10057 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10058 expressions of the parameter cache within the statement group of
10059 the CICO mechanism.
10061 2011-01-04 Olivier Hainque <hainque@adacore.com>
10062 Eric Botcazou <ebotcazou@adacore.com>
10064 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10065 (set_end_locus_from_node): New function.
10066 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10067 make and the function end_locus.
10068 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10069 for the elaboration subprogram.
10070 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10071 set the end_locus of the expression as well.
10073 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10076 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10077 variables that are referenced in exception handlers volatile.
10081 Copyright (C) 2011 Free Software Foundation, Inc.
10083 Copying and distribution of this file, with or without modification,
10084 are permitted in any medium without royalty provided the copyright
10085 notice and this notice are preserved.
10087 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10088 - fix bugs in the description of Source_Trace;
10089 - get rid of UNIT_NAME;
10091 2011-08-02 Javier Miranda <miranda@adacore.com>
10094 (Build_Dispatching_Requeue): Adding support for VM targets
10095 since we cannot directly reference the Tag entity.
10096 * exp_sel.adb (Build_K): Adding support for VM targets.
10097 (Build_S_Assignment): Adding support for VM targets.
10099 (Default_Prim_Op_Position): In VM targets do not restrict availability
10100 of predefined interface primitives to compiling in Ada 2005 mode.
10101 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10102 restricted to compiling in Ada 2005 mode.
10103 (Make_VM_TSD): Generate code that declares and initializes the OSD
10104 record. Needed to support dispatching calls through synchronized
10107 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10108 primitives associated with synchronized interfaces.
10109 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10110 primitives associated with synchronized interfaces.
10112 2011-08-02 Yannick Moy <moy@adacore.com>
10114 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10115 statements hidden in SPARK if preceded by the HIDE directive
10116 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10117 exception handlers as hidden in SPARK if preceded by the HIDE directive
10118 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10119 if starting with the HIDE directive
10120 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10121 starting with the HIDE directive; mark the declarations in a private
10122 part as hidden in SPARK if the private part starts with the HIDE
10124 * restrict.adb, restrict.ads
10125 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10126 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10127 argument node belongs to a part which is hidden in SPARK
10128 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10129 parts in SPARK; protect the possibly costly call to
10130 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10131 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10132 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10133 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10135 (Scan): recognize special comment starting with '#' and followed by
10136 SPARK keyword "hide" as a HIDE directive.
10138 2011-08-02 Yannick Moy <moy@adacore.com>
10140 * types.ads, erroutc.ads: Minor reformatting.
10142 2011-08-02 Vincent Celier <celier@adacore.com>
10144 * link.c: Add response file support for cross platforms.
10146 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10148 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10149 in an association, set parent field of copy before partial analysis.
10150 * sem_res.adb (Resolve_Slice): create reference to itype only when
10151 expansion is enabled.
10153 2011-08-02 Yannick Moy <moy@adacore.com>
10155 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10156 for new flag denoting which subprogram bodies are in ALFA
10157 * restrict.adb, sem_ch7.adb: Update comment
10158 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10159 sem_ch9.adb, sem_res.adb: Add calls to
10160 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10161 * sem_ch6.adb (Analyze_Function_Return): add calls to
10162 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10163 middle of the body, and extended return.
10164 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10165 False when missing return.
10166 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10167 to True for subprograms whose spec is in ALFA. Remove later on the flag
10168 on the entity used for a subprogram body when there exists a separate
10170 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10171 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10172 False, otherwise do nothing.
10174 2011-08-02 Robert Dewar <dewar@adacore.com>
10176 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10178 2011-08-02 Yannick Moy <moy@adacore.com>
10180 * sem_ch4.ads: minor formatting.
10182 2011-08-02 Yannick Moy <moy@adacore.com>
10184 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10185 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10186 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10187 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10188 opt.ads: cleanup of SPARK mode
10190 2011-08-02 Yannick Moy <moy@adacore.com>
10192 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10194 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10195 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10197 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10198 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10199 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10200 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10202 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10204 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10205 functions whose return type is not in ALFA.
10206 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10208 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10209 parameter's type is not in ALFA.
10210 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10213 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10215 * sem_ch6 (Analyze_Expression_Function): treat the function as
10216 Inline_Always, and introduce a subprogram declaration for it when it is
10218 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10219 expression functions, so that the back-end can determine whether they
10220 can in fact be inlined.
10221 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10222 a function body comes from an expression function.
10224 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10226 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10227 null exclusions to test Can_Never_Be_Null on the anonymous access types
10228 of the formals rather than testing the formals themselves. Exclude this
10229 check in cases where the Old_Formal is marked as a controlling formal,
10230 to avoid issuing spurious errors for bodies completing dispatching
10231 operations (due to the flag not getting set on controlling access
10232 formals in body specs).
10233 (Find_Corresponding_Spec): When checking full and subtype conformance of
10234 subprogram bodies in instances, pass Designated and E in that order, for
10235 consistency with the expected order of the formals (New_Id followed by
10238 2011-08-02 Robert Dewar <dewar@adacore.com>
10240 * sem_ch8.adb: Minor reformatting.
10242 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10244 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10245 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10246 primitive operations of class-wide actuals.
10248 2011-08-02 Javier Miranda <miranda@adacore.com>
10250 * exp_atag.ads, exp_atag.adb
10251 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10252 since its value is implicitly passed in argument Typ.
10253 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10254 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10255 Build_Common_Dispatching_Select_Statements.
10257 2011-08-02 Robert Dewar <dewar@adacore.com>
10259 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10260 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10261 Minor reformatting.
10263 2011-08-02 Robert Dewar <dewar@adacore.com>
10265 * sem_res.adb: Minor reformatting.
10266 * sem_prag.adb: Minor reformatting.
10268 2011-08-02 Javier Miranda <miranda@adacore.com>
10270 * exp_atag.adb, exp_atags.ads
10271 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10272 by the tagged type Entity. Required to use this routine in the VM
10273 targets since we do not have available the Tag entity in the VM
10276 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10277 Ada.Tags has not been previously loaded.
10279 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10280 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10282 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10283 view of enclosing scopes. Required to handle enclosing scopes that
10284 are synchronized types whose full view is a task type.
10286 (Build_VM_TSDs): Minor code improvement to avoid generating and
10287 analyzing lists with empty nodes.
10288 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10289 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10290 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10291 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10292 (Make_Select_Specific_Data_Table): Add support for VM targets.
10293 (Make_VM_TSD): Generate code to initialize the SSD structure of
10296 2011-08-02 Yannick Moy <moy@adacore.com>
10298 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10299 cross-references section in ALI.
10300 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10301 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10303 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10304 subprogram or package entity of a node
10305 (Is_Local_Reference_Type): new function returns True for references
10306 selected in local cross-references.
10307 (Lt): function extracted from Lt in Output_References
10308 (Write_Entity_Name): function extracted from Output_References
10309 (Generate_Definition): generate reference with type 'D' for definition
10310 of objects (object declaration and parameter specification), with
10311 appropriate locations and units, for use in local cross-references.
10312 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10313 references of type 'I' for initialization in object definition.
10314 (Output_References): move part of function Lt and procedure
10315 Write_Entity_Name outside of the body. Ignore references of types 'D'
10316 and 'I' introduced for local cross-references.
10317 (Output_Local_References): new procedure to output the local
10318 cross-references sections.
10319 (Lref_Entity_Status): new array defining whether an entity is a local
10320 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10321 with 'I' type when initialization expression is present.
10322 * get_scos.adb, get_scos.ads: Correct comments and typos
10324 2011-08-02 Javier Miranda <miranda@adacore.com>
10326 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10328 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10330 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10333 2011-08-02 Vincent Celier <celier@adacore.com>
10335 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10336 (No_Space_Img): New function
10337 (Find_Excluded_Sources): When reading from a file, record the file name
10338 and the line number for each excluded source.
10339 (Mark_Excluded_Sources): When reporting an error, if the excluded
10340 sources were read from a file, include file name and line number in
10343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10345 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10347 2011-08-02 Robert Dewar <dewar@adacore.com>
10349 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10351 2011-08-02 Javier Miranda <miranda@adacore.com>
10353 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10354 generation of TSDs to the DOTNET compiler.
10355 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10356 generation of TSDs to the DOTNET compiler.
10358 2011-08-02 Javier Miranda <miranda@adacore.com>
10360 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10361 record of all the tagged types declared inside library level package
10362 declarations, library level package bodies or library level subprograms.
10363 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10364 associated with a given tagged type.
10365 (Build_VM_TSDs): New subprogram.
10366 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10367 compilation units that are subprograms.
10368 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10369 compilation units that are package bodies.
10370 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10371 units that are a package declaration or a package instantiation.
10372 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10373 reorganization to improve the error generated by the frontend when the
10374 function Ada.Tags.Secondary_Tag is not available.
10375 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10376 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10378 2011-08-02 Javier Miranda <miranda@adacore.com>
10380 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10382 2011-08-02 Robert Dewar <dewar@adacore.com>
10384 * s-imenne.ads: Minor reformatting.
10386 2011-08-02 Robert Dewar <dewar@adacore.com>
10388 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10389 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10390 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10392 2011-08-02 Robert Dewar <dewar@adacore.com>
10394 * einfo.ads (Materialize_Entity): Document this is only for renamings
10395 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10396 required debug information in the case where we transform the object
10397 declaration into a renaming declaration.
10398 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10400 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10401 Materialize_Entity.
10403 2011-08-02 Robert Dewar <dewar@adacore.com>
10405 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10406 Suppress_Init_Procs.
10407 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10408 Suppress_Initialization/Initialization_Suppressed.
10409 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10410 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10411 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10412 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10414 2011-08-02 Robert Dewar <dewar@adacore.com>
10416 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10417 Minor reformatting.
10419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10421 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10422 only have inheritable classwide pre/postconditions.
10424 2011-08-02 Javier Miranda <miranda@adacore.com>
10426 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10427 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10428 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10429 checks if the external tag of a type is the same as the external tag
10430 of some other declaration.
10432 2011-08-02 Thomas Quinot <quinot@adacore.com>
10434 * s-taskin.ads: Minor reformatting.
10436 2011-08-02 Emmanuel Briot <briot@adacore.com>
10438 * g-comlin.adb (Display_Help): swap the order in which it prints the
10439 short help and the general usage.
10441 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10443 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10444 the aspect declarations and attach them to the generic copy for
10445 subsequent analysis.
10446 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10447 declarations of the generic tree to the new subprogram declarations.
10448 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10449 conditions that apply to a subprogram instance.
10451 2011-08-02 Robert Dewar <dewar@adacore.com>
10453 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10455 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10457 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10458 private type with a tagged full view is not derived in the immediate
10459 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10461 2011-08-02 Robert Dewar <dewar@adacore.com>
10463 * exp_ch4.adb: Minor reformatting.
10465 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10467 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10468 Ada2012 iterator, the loop will be rewritten during expansion into a
10469 while loop with a cursor and an element declaration. Do not analyze the
10470 body in this case, because if the container is for indefinite types the
10471 actual subtype of the elements will only be determined when the cursor
10472 declaration is analyzed.
10474 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10476 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10477 size/alignment related attributes in CodePeer_Mode.
10479 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10481 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10482 Prepend_Element, since this can result in the operation getting the
10483 wrong slot in the full type's dispatch table if the full type has
10484 inherited operations. The incomplete type's operation will get added
10485 to the proper position in the full type's primitives
10486 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10487 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10488 dispatching operations, since there are cases where nonprimitive
10489 subprograms can get added to the list of incomplete dependents (such
10490 as subprograms in nested packages).
10491 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10492 private part when determining whether to add a primitive with a
10493 parameter of a tagged incomplete type to the Private_Dependents list.
10494 Such primitives can also occur in the visible part, and should not have
10495 been excluded from being private dependents.
10496 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10497 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10498 list of a Taft-amendment incomplete type is a primitive before issuing
10499 an error that the full type must appear in the same unit. There are
10500 cases where nonprimitives can be in the list (such as subprograms in
10502 * sem_disp.adb (Derives_From): Use correct condition for checking that
10503 a formal's type is derived from the type of the corresponding formal in
10504 the parent subprogram (the condition was completely wrong). Add
10505 checking that was missing for controlling result types being derived
10506 from the result type of the parent operation.
10508 2011-08-02 Yannick Moy <moy@adacore.com>
10510 * errout.adb (First_Node): minor renaming
10511 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10514 2011-08-02 Yannick Moy <moy@adacore.com>
10516 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10517 before accessing operands.
10518 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10519 decide whether an initialization expression respects SPARK rules, as
10520 the plain node is the expanded one. This allows for more valid warnings
10522 * gnat_rm.texi: Minor update.
10524 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10526 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10529 2011-08-02 Robert Dewar <dewar@adacore.com>
10531 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10533 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10535 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10536 loop statements and the element renaming declaration with a block when
10537 the element type is controlled.
10539 2011-08-02 Yannick Moy <moy@adacore.com>
10541 * sinfo.ads: Minor formatting.
10543 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10545 * sem_aggr.adb (Add_Association): if the association has a box and no
10546 expression, use the Sloc of the aggregate itself for the new
10548 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10551 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10553 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10554 When a container is provided via a function call, generate a renaming
10555 of the function result. This avoids the creation of a transient scope
10556 and the premature finalization of the container.
10557 * exp_ch7.adb (Is_Container_Cursor): Removed.
10558 (Wrap_Transient_Declaration): Remove the supression of the finalization
10559 of the list controller when the declaration denotes a container cursor,
10562 2011-08-02 Yannick Moy <moy@adacore.com>
10564 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10565 node is from source, instead of the original node being from source.
10567 (Resolve_Array_Aggregate): refine the check for a static expression, to
10568 recognize also static ranges
10569 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10570 Array_Type_Declaration): postpone the test for the type being a subtype
10571 mark after the type has been resolved, so that component-selection and
10572 expanded-name are discriminated.
10573 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10574 to distinguish the case of an iteration scheme, so that an error is
10575 issed on a non-static range in SPARK except in an iteration scheme.
10576 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10577 In_Iter_Schm = True.
10578 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10579 user-defined operators so that they are allowed in renaming
10581 (Find_Selected_Component): refine the check for prefixing of operators
10582 so that they are allowed in renaming. Move the checks for restrictions
10583 on selector name after analysis discriminated between
10584 component-selection and expanded-name.
10585 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10586 concatenation argument of string type if it is static.
10587 * sem_util.adb, sem_util.ads
10588 (Check_Later_Vs_Basic_Declarations): add a new function
10589 Is_Later_Declarative_Item to decice which declarations are allowed as
10590 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10591 mode, add that renamings are considered as later items.
10592 (Enclosing_Package): new function to return the enclosing package
10593 (Enter_Name): correct the rule for homonyms in SPARK
10594 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10595 from source (result of expansion) to avoid issuing wrong warnings.
10597 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10599 * errout.adb: On anything but an expression First_Node returns its
10602 2011-08-02 Pascal Obry <obry@adacore.com>
10604 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10606 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10608 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10609 Set the associated loop as the related expression of internally
10611 * exp_ch7.adb (Is_Container_Cursor): New routine.
10612 (Wrap_Transient_Declaration): Supress the finalization of the list
10613 controller when the declaration denotes a container cursor.
10615 2011-08-02 Yannick Moy <moy@adacore.com>
10617 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10619 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10620 expression is a simple expression. This check cannot be performed in
10621 the semantics, so just drop it.
10622 (P_Index_Or_Discriminant_Constraint): move check that the index or
10623 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10624 semantics. Other cases were previously checked in the semantics.
10625 * par-ch4.adb (P_Name): move checks that a selector name is not
10626 character literal or an operator symbol to Find_Selected_Component in
10628 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10629 declarations are not placed after later declarations in a separate
10630 procedure in Sem_Util (possibly not the best choice?), to be used both
10631 during parsing, for Ada 83 mode, and during semantic analysis, for
10633 * par-endh.adb (Check_End): move check that end label is not missing
10634 to Process_End_Label in the semantics
10635 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10636 the special case for SPARK restriction
10637 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10638 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10639 parameter Force to issue the error message even on internal node (used
10640 for generated end label). Call Check_Restriction to check when an error
10641 must be issued. In SPARK mode, issue an error message even if the
10642 restriction is not set.
10643 (Check_Restriction): new procedure with an additional out parameter to
10644 inform the caller that a message has been issued
10645 * sem_aggr.adb: Minor modification of message
10646 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10647 instead of issuing an error message directly
10648 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10649 declarations are not placed after later declarations, by calling
10650 Check_Later_Vs_Basic_Declarations
10651 (Analyze_Subtype_Declaration): move here the check that an index or
10652 discriminant constraint must be a subtype mark. Change the check that
10653 a subtype of String must start at one so that it works on subtype marks.
10654 * sem_ch4.adb (Analyze_Call): move here the check that a named
10655 association cannot follow a positional one in a call
10656 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10657 instead of issuing an error message directly
10658 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10659 selector name is not a character literal or an operator symbol. Move
10660 here the check that the prefix of an expanded name cannot be a
10661 subprogram or a loop statement.
10662 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10663 procedure called from parsing and semantics to check that basic
10664 declarations are not placed after later declarations
10665 (Process_End_Label): move here the check that end label is not missing
10667 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10669 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10670 representation clause in codepeer mode, since it confuses CodePeer and
10671 does not bring useful info.
10673 2011-08-02 Ed Falis <falis@adacore.com>
10675 * init.c: initialize fp hw on MILS.
10677 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10679 * errout.adb (First_Node): for bodies, return the node itself (small
10680 optimization). For other nodes, do not check source_unit if the node
10681 comes from Standard.
10683 2011-08-02 Robert Dewar <dewar@adacore.com>
10685 * exp_ch3.adb: Minor comment additions.
10686 * sem_ch13.adb: Minor reformatting.
10688 2011-08-02 Pascal Obry <obry@adacore.com>
10690 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10692 2011-08-02 Robert Dewar <dewar@adacore.com>
10694 * sem_attr.adb: Minor reformatting.
10696 2011-08-02 Robert Dewar <dewar@adacore.com>
10698 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10699 (Has_Default_Component_Value): Removed
10700 * einfo.ads Comment updates
10701 (Has_Default_Aspect): Replaces Has_Default_Value
10702 (Has_Default_Component_Value): Removed
10704 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10706 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10707 (Get_Simple_Init_Val): Handle Default_Value aspect
10708 (Needs_Simple_Initialization): Handle Default_Value aspect
10709 * exp_ch3.ads: Needs_Simple_Initialization
10710 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10711 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10713 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10714 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10715 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10717 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10719 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10720 package containing iteration primitives.
10721 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10723 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10725 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10726 "of", pre-analyze expression in case it is a function call with
10727 finalization actions that must be placed ahead of the loop.
10728 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10729 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10731 2011-08-02 Geert Bosch <bosch@adacore.com>
10733 * cstand.adb (Create_Float_Types): Only consider C's long double for
10734 Long_Long_Float, in addition to double.
10736 2011-08-02 Robert Dewar <dewar@adacore.com>
10738 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10739 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10740 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10741 Minor reformatting.
10743 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10745 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10748 2011-08-02 Javier Miranda <miranda@adacore.com>
10750 * einfo.ads, einfo.adb
10751 (Original_Access_Type): Move this attribute to Node26 since there was
10752 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10753 which causes conflicts and breaks the generation of the .NET compiler.
10754 (Interface_Name): Add missing documentation on JGNAT only uses of
10757 2011-08-02 Geert Bosch <bosch@adacore.com>
10759 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10760 (Find_Back_End_Float_Type): Likewise
10761 (Create_Back_End_Float_Types): Likewise
10762 (Create_Float_Types): Likewise
10763 (Register_Float_Type): Likewise
10764 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10765 Nlist and split out type selection in new local Find_Base_Type function.
10766 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10768 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10770 2011-08-02 Robert Dewar <dewar@adacore.com>
10772 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10774 * opt.ads: Minor comment change.
10775 * sem_ch12.adb: Minor code reorganization.
10777 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10779 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10780 subtype's list of rep items to the list on the full subtype in the case
10781 where the lists are the same.
10783 2011-08-02 Geert Bosch <bosch@adacore.com>
10785 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10786 using the one from System.Strings, which also deallocates all strings.
10788 2011-08-02 Geert Bosch <bosch@adacore.com>
10790 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10792 * gcc-interface/Make-lang.in: Update dependencies.
10794 2011-08-02 Olivier Hainque <hainque@adacore.com>
10796 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10799 2011-08-02 Javier Miranda <miranda@adacore.com>
10801 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10802 associated with anonymous access to subprograms.
10804 2011-08-02 Geert Bosch <bosch@adacore.com>
10807 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10808 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10809 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10810 (Add_Symbol_Definition): Move to switch-c.adb
10811 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10812 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10813 (Add_Symbol_Definition): Move to switch-c.adb.
10814 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10816 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10817 Move to warnsw.adb.
10818 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10819 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10820 Move to warnsw.adb.
10821 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10822 (Add_Symbol_Definition): Moved from Prepcomp.
10823 * switch-c.ads: Update copyright notice. Use String_List instead of
10824 Argument_List, removing dependency on System.OS_Lib.
10826 2011-08-02 Yannick Moy <moy@adacore.com>
10828 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10829 mode on initialization expression which does not respect SPARK
10831 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10832 if the tree referenced by its argument represents an initialization
10833 expression in SPARK, suitable for initializing an object in an object
10836 2011-08-02 Javier Miranda <miranda@adacore.com>
10838 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10839 internally generated access to subprogram with its associated protected
10841 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10843 2011-08-02 Geert Bosch <bosch@adacore.com>
10845 * cstand.adb (Register_Float_Type): Print information about type to
10846 register, if the Debug_Flag_Dot_B is set.
10847 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10848 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10849 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10850 with a requested precision of more than Max_Digits digits and no more
10851 than Max_Base_Digits digits, if a range specification is present and the
10852 Predefined_Float_Types list has a suitable type to derive from.
10853 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10854 case of type completion with pragma Import
10856 (Process_Import_Predefined_Type): Processing to complete a type
10857 with pragma Import. Currently supports floating point types only.
10858 (Set_Convention_From_Pragma): Do nothing without underlying type.
10859 (Process_Convention): Guard against absence of underlying type,
10860 which may happen when importing incomplete types.
10861 (Process_Import_Or_Interface): Handle case of importing predefined
10862 types. Tweak error message.
10864 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10866 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10867 functions to previous change. Reorganize code slightly.
10869 2011-08-02 Geert Bosch <bosch@adacore.com>
10871 * back_end.ads (Register_Type_Proc): New call back procedure type for
10872 allowing the back end to provide information about available types.
10873 (Register_Back_End_Types): New procedure to register back end types.
10874 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10876 * cstand.adb (Back_End_Float_Types): New list for floating point types
10877 supported by the back end.
10878 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10879 (Copy_Float_Type): New procedure to make new copies of predefined types.
10880 (Register_Float_Type): New call back procedure to populate the BEFT list
10881 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10882 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10883 (Create_Float_Types): New procedure to create entities for floating
10884 point types predefined in Standard, and put these and any remaining
10885 BEFTs on the Predefined_Float_Types list.
10886 * stand.ads (Predefined_Float_Types): New list for predefined floating
10887 point types that do not have declarations in package Standard.
10889 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10891 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10892 entity node for the unit containing the parameter.
10893 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10894 (Add_Inlined_Subprogram): Likewise.
10895 * gcc-interface/Make-lang.in: Update dependencies.
10897 2011-08-02 Thomas Quinot <quinot@adacore.com>
10899 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10902 2011-08-02 Geert Bosch <bosch@adacore.com>
10904 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10906 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10908 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10909 computed value of Base_Type.
10911 2011-08-02 Yannick Moy <moy@adacore.com>
10913 * restrict.adb (Check_Restriction): issue an error for any use of
10914 class-wide, even if the No_Dispatch restriction is not set.
10915 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10916 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10917 when completing a private extension, the type named in the private part
10918 is not the same as that named in the visible part.
10919 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10920 of an inherited primitive operations of a tagged type or type extension
10921 that returns the tagged type.
10922 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10923 function which returns True for an implicit operation inherited by the
10924 derived type declaration for the argument type.
10925 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10928 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10930 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10931 Process_Bounds, to perform analysis with expansion of a range or an
10932 expression that is the iteration scheme for a loop.
10933 (Analyze_Iterator_Specification): If domain of iteration is given by a
10934 function call with a controlled result, as is the case if call returns
10935 a predefined container, ensure that finalization actions are properly
10937 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10939 2011-08-02 Javier Miranda <miranda@adacore.com>
10941 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10942 * gcc-interface/Make-lang.in: Update dependencies.
10944 2011-08-02 Javier Miranda <miranda@adacore.com>
10946 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10947 determine if the analysis is performed using N or Original_Node (N).
10948 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10949 functionality of routine Is_Variable avoids code duplication.
10950 * checks.adb (Determine_Range): Handle temporaries generated by
10951 Remove_Side_Effects.
10953 2011-08-02 Javier Miranda <miranda@adacore.com>
10955 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10956 expansion of the condition. Required since the previous analysis was
10957 done with expansion disabled (see Resolve_Quantified_Expression) and
10958 hence checks were not inserted and record comparisons have not been
10961 2011-08-02 Ed Falis <falis@adacore.com>
10963 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10966 2011-08-02 Bob Duff <duff@adacore.com>
10968 * opt.ads: Minor comment fix.
10970 2011-08-02 Bob Duff <duff@adacore.com>
10972 * sem_ch12.adb (Analyze_Package_Instantiation,
10973 Analyze_Subprogram_Instantiation): Turn off style checking while
10974 analyzing an instance. Whatever style checks that apply to the generic
10975 unit should apply, so it makes no sense to apply them in an instance.
10976 This was causing trouble when compiling an instance of a runtime
10977 unit that violates the -gnatyO switch.
10978 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10979 one of the two case statements, causing spurious errors.
10981 2011-08-02 Robert Dewar <dewar@adacore.com>
10983 * uname.adb: Minor reformatting.
10984 * gnatcmd.adb: Minor reformatting.
10985 * exp_attr.adb: Minor reformatting.
10987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10989 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10990 No_Dispatching_Calls, do not look for the Assign primitive, because
10991 predefined primitives are not created in this case.
10993 2011-08-02 Bob Duff <duff@adacore.com>
10995 * stylesw.ads: Minor comment fixes.
10997 2011-08-02 Robert Dewar <dewar@adacore.com>
10999 * freeze.adb (Add_To_Result): New procedure.
11001 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11003 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11004 time, if the specific run-time routines for handling streams of strings
11005 are not available, use the default mechanism.
11007 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11009 * s-regpat.ads: Fix typo.
11011 2011-08-02 Vincent Celier <celier@adacore.com>
11013 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11014 not null, call it to create the in memory config project file without
11015 parsing an existing default config project file.
11017 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11019 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11021 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11023 * sem_elim.adb: an abstract subprogram does not need an eliminate
11024 pragma for its descendant to be eliminable.
11026 2011-08-02 Ed Falis <falis@adacore.com>
11028 * init.c: revert to handling before previous checkin for VxWorks
11029 * s-intman-vxworks.adb: delete unnecessary declarations related to
11030 using Ada interrupt facilities for handling signals.
11031 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11032 * s-intman-vxworks.ads: Import __gnat_install_handler as
11033 Initialize_Interrupts.
11034 * s-taprop-vxworks.adb: Delete Signal_Mask.
11035 (Abort_Handler): change construction of mask to unblock exception
11038 2011-08-02 Jerome Guitton <guitton@adacore.com>
11040 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11041 Debug_Raise_Exception before propagation starts.
11043 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11045 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11046 to Restriction_Check_Required.
11047 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11048 * sem_res.adb (Resolve_Call): Likewise.
11049 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11051 2011-08-02 Bob Duff <duff@adacore.com>
11053 * stylesw.ads: Update comment.
11054 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11055 * errout.ads: Remove obsolete comment.
11057 2011-08-02 Javier Miranda <miranda@adacore.com>
11059 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11060 (Set_Is_Safe_To_Reevaluate): new procedure.
11061 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11062 assignment is allowed on safe-to-reevaluate variables.
11063 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11064 temporary created to remove side effects in expressions that use
11065 the secondary stack as safe-to-reevaluate.
11066 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11067 variables that are not true constants.
11069 2011-08-02 Robert Dewar <dewar@adacore.com>
11071 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11072 sem_res.adb, sem_ch6.adb: Minor reformatting.
11074 2011-08-02 Jerome Guitton <guitton@adacore.com>
11076 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11078 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11080 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11081 not set Overridden_Operation if subprogram is an initialization
11084 2011-08-02 Yannick Moy <moy@adacore.com>
11086 * par-ch6.adb: Correct obsolete name in comments
11087 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11088 which takes two message arguments (existing function takes one), with
11089 second message used for continuation.
11090 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11091 block statements that originate from a source block statement, not
11092 generated block statements
11093 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11094 symmetry with procedure case
11095 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11096 function to issue an error in formal mode if a package specification
11097 contains more than one tagged type or type extension.
11098 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11099 parameters matching formals of tagged types are objects (or ancestor
11100 type conversions of objects), not general expressions. Issue an error
11101 on view conversions that are not involving ancestor conversion of an
11103 (Resolve_Type_Conversion): in formal mode, issue an error on the
11104 operand of an ancestor type conversion which is not an object
11105 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11106 procedure so that it works also for actuals of function calls
11107 (Is_Actual_Tagged_Parameter): new function which determines if its
11108 argument is an actual parameter of a formal of tagged type in a
11110 (Is_SPARK_Object_Reference): new function which determines if the tree
11111 referenced by its argument represents an object in SPARK
11113 2011-08-02 Robert Dewar <dewar@adacore.com>
11115 * sem_ch3.adb: Minor reformatting
11116 Minor comment addition
11117 Minor error msg text change
11119 2011-08-02 Javier Miranda <miranda@adacore.com>
11121 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11122 function. Used to be more precise when we generate a variable plus one
11123 assignment to remove side effects in the evaluation of the Bound
11125 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11126 of the bound expression to force its re-analysis and thus expand the
11127 associated transient scope (if required). Code cleanup replacing the
11128 previous code that declared the constant entity by an invocation to
11129 routine Force_Evaluation which centralizes this work in the frontend.
11131 2011-08-02 Robert Dewar <dewar@adacore.com>
11133 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11134 (Base_Type): Now uses improved Is_Base_Type function
11135 * einfo.ads (Base_Type): Inline this function
11137 2011-08-02 Robert Dewar <dewar@adacore.com>
11139 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11140 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11142 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11144 * gcc-interface/Make-lang.in: Update dependencies.
11145 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11148 2011-08-02 Yannick Moy <moy@adacore.com>
11150 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11151 non-simple expression used in delta constraint
11152 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11153 index constraint which is not a subtype mark
11154 * par.adb: With and use Restrict
11155 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11156 mode on component type which is not a subtype mark and default
11157 expression on component
11158 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11159 of string which does not have a lower index bound equal to 1
11160 (Array_Type_Declaration): issue an error in formal mode on index or
11161 component type which is not a subtype mark, and on aliased keyword on
11163 (Derived_Type_Declaration): issue an error in formal mode on interface,
11164 limited or abstract type
11165 (Record_Type_Declaration): issue an error in formal mode on interface
11166 (Record_Type_Definition): issue an error in formal mode on tagged types
11167 and type extensions not declared in the specification of a library unit
11168 package; on null non-tagged record; on variant part
11170 2011-08-02 Vincent Celier <celier@adacore.com>
11172 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11173 not declared for qualified library project when Library_Name is not
11174 declared, but Library_Dir is.
11176 2011-08-02 Robert Dewar <dewar@adacore.com>
11178 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11179 pragmas (affects aspects [Component_]Default_Value
11180 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11181 component type for the resolution
11183 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11185 * einfo.adb (Base_Type): Tune implementation for speed.
11187 2011-08-02 Robert Dewar <dewar@adacore.com>
11189 * freeze.adb: Minor reformatting.
11191 2011-08-02 Thomas Quinot <quinot@adacore.com>
11193 * scos.ads: Update comments.
11195 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11197 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11198 base type, because the parent may be a subtype of a private type whose
11199 convention is established in a private part.
11201 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11203 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11204 statement in a block when the expansion of the return expression has
11205 created a finalization chain.
11206 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11207 with the parent node.
11208 Add N_Extended_Return_Statement to handle the case where a transient
11209 object declaration appears in the Return_Object_Declarations list of
11210 an extended return statement.
11212 2011-08-02 Matthew Gingell <gingell@adacore.com>
11214 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11215 unused parameter 'name'.
11217 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11219 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11220 inherited operation, check whether its alias, which is the source
11221 operastion that it renames, has been marked eliminated.
11223 2011-08-02 Javier Miranda <miranda@adacore.com>
11225 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11226 in-mode parameter whose type is an access type since it can be used to
11227 modify its designated object. Enforce code that handles as safe an
11228 access type that is not access-to-constant but it is the result of a
11229 previous removal of side-effects.
11230 (Remove_Side_Effects): Minor code reorganization of cases which require
11231 no action. Done to incorporate documentation on new cases uncovered
11232 working in this ticket: no action needed if this routine was invoked
11233 too early and the nodes are not yet decorated.
11234 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11235 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11236 were issued with actuals that are implicitly provided by
11239 2011-08-02 Robert Dewar <dewar@adacore.com>
11241 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11243 2011-08-02 Yannick Moy <moy@adacore.com>
11245 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11246 to issue an error in formal mode on attribute not supported in this mode
11247 (Analyze_Attribute): issue errors on standard attributes not supported
11249 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11250 comment, and issue error in formal mode on modulus which is not a power
11252 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11254 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11256 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11257 operator on modular type (except 'not').
11259 2011-08-02 Robert Dewar <dewar@adacore.com>
11261 * gnat_rm.texi: Minor reformatting.
11263 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11265 * s-osinte-linux.ads: Minor comment update and reformatting.
11266 * i-cexten.ads: Make this unit pure, as for its parent.
11267 Will allow its usage in more contexts if needed.
11269 2011-08-02 Robert Dewar <dewar@adacore.com>
11271 * s-utf_32.ads: Minor comment fix.
11273 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11275 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11276 operation of a tagged synchronized type, handle the case where the
11277 controlling argument is overloaded.
11279 2011-08-02 Yannick Moy <moy@adacore.com>
11281 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11282 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11283 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11284 SPARK mode and formal verification mode on processing SPARK restriction
11285 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11286 requiring consistency checking.
11288 2011-08-02 Robert Dewar <dewar@adacore.com>
11290 * sem_res.adb: Minor reformatting.
11292 2011-08-02 Robert Dewar <dewar@adacore.com>
11294 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11295 a-cforse.ads: Remove unneeded with of Ada.Containers
11296 Remove commented out pragma Inline's
11297 Move specifications of new subprograms to the actual specs
11299 2011-08-02 Yannick Moy <moy@adacore.com>
11301 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11302 a-cforse.ads: Update comments.
11304 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11306 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11308 2011-08-02 Robert Dewar <dewar@adacore.com>
11310 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11311 a-cforse.ads, a-cofove.ads: Minor reformatting.
11313 2011-08-02 Claire Dross <dross@adacore.com>
11315 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11316 a-cofove.ads: Add comments.
11318 2011-08-02 Yannick Moy <moy@adacore.com>
11320 * gnat_rm.texi: Document formal containers.
11322 2011-08-02 Emmanuel Briot <briot@adacore.com>
11324 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11325 are empty sections.
11327 2011-08-02 Robert Dewar <dewar@adacore.com>
11329 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11332 2011-08-02 Robert Dewar <dewar@adacore.com>
11334 * aspects.adb: New aspects Default_Value and Default_Component_Value
11335 New format of Aspect_Names table checks for omitted entries
11336 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11337 handling of boolean aspects for derived types.
11338 New aspects Default_Value and Default_Component_Value
11339 New format of Aspect_Names table checks for omitted entries
11340 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11341 (Has_Default_Value): New flag
11342 (Has_Default_Component_Value): New flag
11343 (Has_Default_Value): New flag
11344 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11346 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11347 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11348 Default_Value and Default_Component_Value
11349 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11350 New aspects Default_Value and Default_Component_Value
11351 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11352 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11354 2011-08-02 Vincent Celier <celier@adacore.com>
11356 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11357 inherit library kind.
11359 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11361 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11362 Minor reformatting.
11364 2011-08-02 Robert Dewar <dewar@adacore.com>
11366 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11368 2011-08-02 Yannick Moy <moy@adacore.com>
11370 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11372 2011-08-02 Robert Dewar <dewar@adacore.com>
11374 * impunit.adb: Add comment.
11376 2011-08-02 Yannick Moy <moy@adacore.com>
11378 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11379 qualification of aggregates in formal mode
11380 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11382 (Resolve_Aggregate): complete the test that an aggregate is adequately
11383 qualified in formal mode
11385 2011-08-02 Pascal Obry <obry@adacore.com>
11387 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11388 * mlib-prj.adb: Supress warning when compiling binder generated file.
11389 (Build_Library): Supress all warnings when compiling the binder
11392 2011-08-02 Yannick Moy <moy@adacore.com>
11394 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11396 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11397 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11398 Add with/use clauses to make Check_Formal_Restriction visible
11400 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11402 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11403 in-parameters when type of the generic formal is private in the generic
11404 spec and non-private in the body.
11406 2011-08-02 Claire Dross <dross@adacore.com>
11408 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11409 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11410 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11411 * impunit.adb, Makefile.rtl: Take new files into account.
11413 2011-08-02 Robert Dewar <dewar@adacore.com>
11415 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11416 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11418 2011-08-02 Yannick Moy <moy@adacore.com>
11420 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11422 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11423 matching static array bounds, taking into account the special case of
11425 * sem_ch3.adb: Typo in comment.
11427 2011-08-02 Yannick Moy <moy@adacore.com>
11429 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11430 which issues an error in formal mode if its argument node is originally
11432 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11433 has a discriminant specification so that it does not include the case
11435 (Derived_Type_Declaration): move here the test that a derived type has a
11436 discriminant specification
11437 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11438 first element of a component association before accessing its choices
11439 (presence of component association is not enough)
11440 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11441 declaration is a library item before accessing the next element in a
11442 list, as library items are not member of lists
11443 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11444 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11445 Check_Formal_Restriction whenever possible.
11447 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11449 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11450 reference when needed.
11452 2011-08-02 Bob Duff <duff@adacore.com>
11454 * gnat_ugn.texi: Fix typo.
11456 2011-08-02 Vincent Celier <celier@adacore.com>
11458 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11459 archive file name. Do not use the full path name of archives for Open
11462 2011-08-02 Robert Dewar <dewar@adacore.com>
11464 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11465 Analyze_Aspect_Specifications
11467 (Analyze_Aspect_Specifications): New handling for boolean aspects
11468 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11469 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11470 sequence for Analyze_Aspect_Specifications
11471 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11472 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11474 2011-08-02 Robert Dewar <dewar@adacore.com>
11476 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11477 aspects, since these no longer exist.
11479 2011-08-02 Robert Dewar <dewar@adacore.com>
11481 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11482 semicolon, do not try to see if there are aspects following it.
11483 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11486 2011-08-02 Robert Dewar <dewar@adacore.com>
11488 * sem_ch8.adb, aspects.ads: Minor reformatting.
11490 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11492 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11493 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11495 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11497 2011-08-02 Yannick Moy <moy@adacore.com>
11499 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11500 mode on subprogram declaration outside of package specification, unless
11501 it is followed by a pragma Import
11502 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11503 Access_Type_Declaration): issue error in formal mode on access type
11504 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11506 (Analyze_Object_Declaration): issue error in formal mode on object
11507 declaration which does not respect SPARK restrictions
11508 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11509 declaration which does not respect SPARK restrictions
11510 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11511 error in formal mode on digits or delta constraint
11512 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11513 decimal fixed point type
11514 (Derived_Type_Declaration): issue error in formal mode on derived type
11515 other than type extensions of tagged record types
11516 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11517 with check on access definition
11518 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11519 mode on protected definition.
11520 (Analyze_Task_Definition): issue error in formal mode on task definition
11522 2011-08-02 Robert Dewar <dewar@adacore.com>
11524 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11526 2011-08-02 Javier Miranda <miranda@adacore.com>
11528 * sem_ch6.adb (Can_Override_Operator): New function.
11529 (Verify_Overriding_Indicator): Add missing code to check overriding
11530 indicator in operators. Fixes regression.
11531 (Check_Overriding_Indicator): Minor reformating after replacing the
11532 code that evaluates if the subprogram can override an operator by
11533 invocations to the above new function.
11535 (Write_Field26_Name): Add missing code to ensure that, following
11536 the documentation in einfo.ads, this field is not shown as attribute
11537 "Static_Initialization" on non-dispatching functions.
11539 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11541 * sem_res.adb (Resolve_Call): A call to
11542 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11543 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11544 i.e., when the second parameter is of type Time_Span.
11546 2011-08-02 Vincent Celier <celier@adacore.com>
11548 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11549 with an archive instead of -L<library dir> -l<library name>.
11551 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11553 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11554 mark the base types In_Use in addition to making the operations
11557 2011-08-02 Ed Falis <falis@adacore.com>
11559 * init.c: add and setup __gnat_signal_mask for the exception signals
11560 * s-inmaop-vxworks.adb: new file.
11561 * s-intman-vxworks.adb: remove unnecessary initializations and
11563 * s-intman-vxworks.ads: remove unnecessary variable
11564 * s-taprop-vxworks.adb: simplify signal initialization
11566 2011-08-02 Robert Dewar <dewar@adacore.com>
11568 * sem_ch8.adb: Minor code reorganization, comment updates.
11570 2011-08-02 Robert Dewar <dewar@adacore.com>
11572 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11573 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11575 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11576 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11578 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11580 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11581 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11582 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11583 use_type_clauses, to handle more efficiently use_type and use_all_type
11585 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11586 Ada2012 Use_All_Type clause.
11587 (Use_Class_Wide_Operations): new procedure.
11589 2011-08-02 Robert Dewar <dewar@adacore.com>
11591 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11592 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11593 expression to expression function.
11595 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11597 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11598 if types are compatible.
11600 2011-08-02 Yannick Moy <moy@adacore.com>
11602 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11603 returns True if its argument array types have same dimension and same
11604 static bounds at each index.
11605 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11606 OUT or IN OUT paramaters which are not view conversions in SPARK.
11607 (Resolve_Arithmetic_Op): issue an error in formal mode on
11608 multiplication or division with operands of fixed point types which are
11609 not qualified or explicitly converted.
11610 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11611 Boolean or array type (except String) operands.
11612 (Resolve_Equality_Op): issue an error in formal mode on equality
11613 operators for array types other than String with non-matching static
11615 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11616 for array types with non-matching static bounds. Factorize the code in
11617 Matching_Static_Array_Bounds.
11618 (Resolve_Qualified_Expression): issue an error in formal mode on
11619 qualified expressions for array types with non-matching static bounds.
11620 (Resolve_Type_Conversion): issue an error in formal mode on type
11621 conversion for array types with non-matching static bounds
11623 2011-08-02 Robert Dewar <dewar@adacore.com>
11625 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11627 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11629 * par-ch9.adb: save location of entry for proper error message.
11631 2011-08-02 Javier Miranda <miranda@adacore.com>
11633 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11634 (Use_Full_View) which permits this routine to climb through the
11635 ancestors using the full-view of private parents.
11636 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11637 Use_Full_View to true in calls to Is_Ancestor.
11638 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11639 true in call to Is_Ancestor.
11640 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11641 Use_Full_View to true in call to Is_Ancestor.
11642 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11643 call to Is_Ancestor.
11644 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11645 Use_Full_View to true in calls to Is_Ancestor.
11646 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11647 Make_Select_Specific_Data_Table, Register_Primitive,
11648 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11649 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11650 to true in call to Is_Ancestor.
11651 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11652 Use_Full_View to true in calls to Is_Ancestor.
11654 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11655 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11657 2011-08-02 Robert Dewar <dewar@adacore.com>
11659 * gnat_rm.texi: Minor reformatting.
11660 * sem_prag.adb: Minor reformatting.
11662 2011-08-02 Tristan Gingold <gingold@adacore.com>
11664 * vms_data.ads: Add VMS qualifier for -gnateP.
11666 2011-08-02 Robert Dewar <dewar@adacore.com>
11668 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11669 * par-ch7.adb (P_Package): Proper placement of aspects for package
11670 decl/instantiation.
11671 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11672 (End_Statements): Add Is_Sloc parameterr
11673 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11674 (Check_End): Ad Is_Sloc parameter
11675 (End_Statements): Add Is_Sloc parameterr
11677 2011-08-02 Vincent Celier <celier@adacore.com>
11679 * ug_words: Add VMS qualifier equivalent to -gnateP:
11680 /SYMBOL_PREPROCESSING.
11682 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11684 * gnat-style.texi: For hexadecimal numeric literals the typical
11685 grouping of digits is 4 to represent 2 bytes.
11686 A procedure spec which is split into several lines is indented two
11689 2011-08-02 Yannick Moy <moy@adacore.com>
11691 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11692 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11693 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11695 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11696 choice in array aggregate
11697 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11699 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11700 positional and named aggregate for record, or others in record
11701 aggregate, or multiple choice in record aggregate
11702 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11703 array operands to logical operations AND, OR and XOR do not have the
11704 same static lower and higher bounds
11705 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11707 2011-08-01 Robert Dewar <dewar@adacore.com>
11709 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11710 Replaces Last_Source_Node_In_Sequence.
11711 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11712 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11713 parens and blank in string (this was inconsistently implemented).
11715 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11716 blank in string (this was inconsistently implemented).
11718 (Set_Global_Switches): Set formal mode switches appropriately
11719 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11721 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11722 call Set_Error_Msg_Lang to set "spark" as language name.
11723 * par.adb: Remove unnecessary call to set formal language for errout
11724 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11725 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11727 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11728 calls to it, moved after resolution so that types are known
11729 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11730 result of concatenation is not of type String
11731 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11732 concatenation is not properly restricted
11733 * gnat_rm.texi: Add doc on pragma Spark_95.
11734 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11735 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11736 * gcc-interface/Make-lang.in: Update dependencies.
11738 2011-08-01 Javier Miranda <miranda@adacore.com>
11740 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11741 condition that detects if the overridden operation must replace an
11744 2011-08-01 Javier Miranda <miranda@adacore.com>
11746 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11747 code declarations inserted by Insert_Actions in each alternative of the
11748 N_Case_Expression node.
11750 2011-08-01 Robert Dewar <dewar@adacore.com>
11752 * sem_ch6.adb: Minor code reorganization.
11753 * sem_util.adb: Minor reformatting.
11755 2011-08-01 Pascal Obry <obry@adacore.com>
11757 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11758 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11760 2011-08-01 Yannick Moy <moy@adacore.com>
11762 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11763 literal or operator symbol which is prefixed
11764 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11765 mode on access attributes.
11766 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11767 that concatenation operands are properly restricted in formal mode
11768 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11769 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11770 result of the concatenation has a type different from String.
11771 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11772 Analyze_Quantified_Expression, Analyze_Slice,
11773 Analyze_Null): issue an error in formal mode on unsupported constructs
11775 (Analyze_Block_Statement): only issue error on source block statement
11776 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11777 function which returns the last node in a list of nodes for which
11778 Comes_From_Source returns True, if any
11779 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11780 Last_Source_Node_In_Sequence
11781 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11782 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11783 mode on unsupported constructs
11784 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11785 rest of the actions may be needed later on since the error is marked as
11787 * sinfo.ads: Typos in comments.
11789 2011-08-01 Pascal Obry <obry@adacore.com>
11791 * projects.texi: Minor editing.
11793 2011-08-01 Yannick Moy <moy@adacore.com>
11795 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11796 insertion character ~~
11797 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11798 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11799 with insertion character ~~
11800 (Set_Msg_Text): treat insertion character ~~
11801 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11802 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11803 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11804 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11805 errors related to the formal language restriction not serious
11806 (insertion character |).
11807 * par.adb (Par): set formal language for error messages if needed
11808 * sem_ch6.adb (Check_Missing_Return): take into account possible
11809 generated statements at the end of the function
11810 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11811 enumeration value to define a new pragma SPARK_95
11812 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11813 SPARK_Version): new type and variables to store the SPARK version
11815 (SPARK_Mode): return True when SPARK_Version is set
11816 * par-prag.adb: Correct indentation
11817 (Prag): take Pragma_SPARK_95 into account
11818 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11821 2011-08-01 Robert Dewar <dewar@adacore.com>
11823 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11824 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11825 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11827 2011-08-01 Pascal Obry <obry@adacore.com>
11829 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11830 Target_Name to Get_Path call.
11831 (Parse_Single_Project): Likewise.
11832 (Post_Parse_Context_Clause): Likewise.
11833 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11834 Call Initialise_Project_Path with the proper Target_Name.
11835 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11837 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11838 with the proper Target_Name.
11839 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11840 Part.Parse routine.
11841 (Parse_Project_And_Apply_Config): Likewise.
11842 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11843 This is fine as this part of the code is supporting only native
11845 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11846 is fine as this part of the code is supporting only native compilation.
11848 2011-08-01 Yannick Moy <moy@adacore.com>
11850 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11851 of homonym, unless the homonym is one of the cases allowed in SPARK
11852 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11853 package declaration occurring after a body.
11855 2011-08-01 Robert Dewar <dewar@adacore.com>
11857 * checks.adb, exp_ch4.adb: Minor reformatting.
11859 2011-08-01 Javier Miranda <miranda@adacore.com>
11861 * einfo.ads (Access_Disp_Table): Fix documentation.
11862 (Dispatch_Table_Wrappers): Fix documentation.
11864 2011-08-01 Pascal Obry <obry@adacore.com>
11866 * prj-env.adb, prj-env.ads: Minor reformatting.
11868 2011-08-01 Yannick Moy <moy@adacore.com>
11870 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11871 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11872 procedures out of these packages.
11873 * errout.ads, errout.adb
11874 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11875 procedures in of this package
11876 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11877 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11878 on misplaced later vs initial declarations, like in Ada 83
11879 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11880 formal mode on attribute of private type whose full type declaration
11882 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11883 package declaration inside a package specification
11884 (Analyze_Full_Type_Declaration): issue error in formal mode on
11885 controlled type or discriminant type
11886 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11887 user-defined operator means that it should come from the source
11888 (New_Overloaded_Entity): issue error in formal mode on overloaded
11890 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11892 2011-08-01 Thomas Quinot <quinot@adacore.com>
11894 * atree.adb: Minor reformatting.
11895 * checks.adb: Minor reformatting.
11897 2011-08-01 Vincent Celier <celier@adacore.com>
11899 * s-parame-vms-ia64.ads: Fix typo in comment
11901 * s-parame-vms-restrict.ads: Removed, unused.
11903 2011-08-01 Javier Miranda <miranda@adacore.com>
11906 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11908 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11909 * sem_ch3.ads, sem_ch3.adb
11910 (Is_Constant_Bound): New extended version of the subprogram that was
11911 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11912 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11913 * sem_aux.ads (Constant_Value): Fix typo in comment.
11914 * checks.adb (Generate_Index_Checks): New implementation which, for
11915 array objects with constant bounds, generates the runtime check
11916 referencing the bounds of the array type. For other cases this routine
11917 provides its previous behavior obtaining such values from the array
11919 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11921 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11922 we cannot have semantic interpretations of the new node.
11924 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11926 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11929 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11931 * sem_ch8.adb: Minor code editing.
11932 * s-vxwext.adb: Remove trailing space.
11933 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11934 consistency with other files.
11936 2011-08-01 Thomas Quinot <quinot@adacore.com>
11938 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11940 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11942 * par-ch10.adb: reject parameterized expressions as compilation unit.
11943 * sem_ch4.adb: handle properly conditional expression with overloaded
11944 then_clause and no else_clause.
11946 2011-08-01 Tristan Gingold <gingold@adacore.com>
11948 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11949 like done by System.Aux_DEC.
11950 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11952 2011-08-01 Yannick Moy <moy@adacore.com>
11954 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11955 missing label at end of declaration (subprogram or package)
11956 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11957 of positional and named parameter association
11958 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11959 Error_Msg_SP which adds a prefix to the error message giving the name
11960 of the formal language analyzed
11961 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11962 access result type in subprogram, unconstrained array as result type,.
11963 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11965 * sem_ch8.adb: Code clean up.
11967 2011-08-01 Javier Miranda <miranda@adacore.com>
11969 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11970 * einfo.ads (Access_Disp_Table): Fix documentation.
11971 (Dispatch_Table_Wrappers): Fix documentation.
11972 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11973 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11974 to enforce the documentation of this attribute.
11975 (Set_Is_Interface): Cleanup the assertion.
11976 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11977 the Underlying_Type entity before reading attribute Access_Disp_Table.
11978 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11979 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11980 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11981 the Underlying_Type entity before reading attribute Access_Disp_Table.
11982 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11983 Locate the Underlying_Type entity before reading attribute
11986 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11988 * s-poosiz.ads: Additional overriding indicators.
11990 2011-08-01 Yannick Moy <moy@adacore.com>
11992 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11994 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11995 parameter specification does not include a subtype mark.
11996 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11997 formal mode on abstract subprogram.
11998 (Analyze_Subprogram_Specification): issue error in formal mode on
11999 user-defined operator.
12000 (Process_Formals): issue error in formal mode on access parameter and
12001 default expression.
12002 * sem_ch9.adb (Analyze_Abort_Statement,
12003 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12004 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12005 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12006 Analyze_Requeue, Analyze_Selective_Accept,
12007 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12008 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12009 issue error in formal mode on user-defined raise statement.
12011 2011-08-01 Thomas Quinot <quinot@adacore.com>
12013 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12014 declaration being hidden when overriding an implicit inherited
12016 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12017 (-gnats), do not complain about a source file that contains only a
12020 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12022 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12023 variable if already set.
12025 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12027 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12028 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12029 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12030 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12031 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12032 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12033 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12034 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12035 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12036 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12037 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12038 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12039 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12040 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12041 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12042 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12043 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12044 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12045 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12046 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12047 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12048 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12049 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12050 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12051 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12052 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12053 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12054 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12055 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12056 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12057 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12058 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12059 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12060 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12061 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12062 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12063 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12064 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12065 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12066 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12067 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12068 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12069 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12070 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12071 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12072 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12073 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12074 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12075 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12076 Use GNAT instead of GNARL.
12078 2011-08-01 Bob Duff <duff@adacore.com>
12080 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12081 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12082 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12085 2011-08-01 Yannick Moy <moy@adacore.com>
12087 * debug.adb (d.D) reverve flag for the SPARK mode
12088 (d.E) reverve flag for SPARK generation mode
12089 (d.F) reverve flag for Why generation mode
12090 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12091 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12092 functions which return True when the corresponding modes are set
12093 (Formal_Language): return "spark" or "alfa" when in formal verification
12095 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12096 Error_Msg to prefix the error message with a tag giving the formal
12098 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12099 message with a tag giving the formal language
12100 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12102 (Analyze_Case_Statement): issue error in formal mode on case statement
12103 with a single "others" case alternative
12104 (Analyze_Exit_Statement): issue errors in formal mode on exit
12105 statements which do not respect SPARK restrictions
12106 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12107 (Check_Unreachable_Code): always issue an error (not a warning) in
12108 formal mode on unreachable code (concerns both code after an infinite
12109 loop and after an unconditional jump, both not allowed in SPARK)
12110 * sem_ch6.adb (Analyze_Return_Statement): add call to
12111 Set_Return_Present for a procedure containing a return statement
12112 (already done for functions in Analyze_Function_Return)
12113 (Analyze_Function_Return): issue error in formal mode on extended
12114 return or if return is not last statement in function
12115 (Check_Missing_Return): issue error in formal mode if function does
12116 not end with return or if procedure contains a return
12117 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12118 function to detect if there is an inner scope of its parameter S which
12121 2011-08-01 Thomas Quinot <quinot@adacore.com>
12123 * sem_ch6.ads: Minor reformatting.
12125 2011-08-01 Javier Miranda <miranda@adacore.com>
12127 * sem_util.adb (Abstract_Interface_List): Complete condition when
12128 processing private type declarations to avoid reading unavailable
12130 (Is_Synchronized_Tagged_Type): Complete condition when processing
12131 private extension declaration nodes to avoid reading unavailable
12134 2011-08-01 Thomas Quinot <quinot@adacore.com>
12136 * sem_ch3.adb: Minor reformatting.
12138 2011-08-01 Thomas Quinot <quinot@adacore.com>
12140 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12141 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12142 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12143 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12144 for VMS, instead parametrize the common implementation with
12145 System.Parameters declarations.
12147 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12149 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12151 2011-08-01 Tristan Gingold <gingold@adacore.com>
12153 * seh_init.c: Fix SEH handler installation on win64.
12155 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12157 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12158 double analysis of an anonymous access to subprogram, because it can
12159 lead to improper sharing of profiles and a back-end crash.
12161 2011-08-01 Robert Dewar <dewar@adacore.com>
12163 * make.adb, sem_ch4.adb: Minor reformatting.
12164 * gcc-interface/Make-lang.in: Update dependencies.
12165 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12167 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12169 * gnat_rm.texi: Fix definition of Long_Integer.
12171 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12173 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12174 to prevent storage exhaustion.
12175 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12176 finalized is a function body, insert the cleanup code before the final
12177 return statement, to prevent spurious warnings.
12178 * s-pooglo.ads: add overriding indicator.
12180 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12182 * sem_ch4.adb (Operator_Check): improve error message when both a
12183 with_clause and a use_clause are needed to make operator usage legal.
12184 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12185 determine whether a compilation unit is visible within an other,
12186 either through a with_clause in the current unit, or a with_clause in
12187 its library unit or one one of its parents.
12189 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12191 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12192 over an arbitrary expression of an array or container type.
12193 * lib-xref.adb: clarify comment.
12195 2011-08-01 Bob Duff <duff@adacore.com>
12197 * einfo.ads: Minor reformatting.
12198 * debug.adb: Minor comment improvement.
12200 2011-08-01 Javier Miranda <miranda@adacore.com>
12202 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12203 consider hidden subprograms as valid candidates.
12205 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12207 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12209 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12211 * gnat_ugn.texi: Fix typo.
12213 2011-08-01 Robert Dewar <dewar@adacore.com>
12215 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12216 lib-xref.adb: Minor reformatting
12218 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12220 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12221 when to generate a call to Move_Final_List.
12222 (Has_Controlled_Parts): Remove this function.
12224 2011-08-01 Geert Bosch <bosch@adacore.com>
12226 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12227 "," in choice list.
12229 2011-08-01 Thomas Quinot <quinot@adacore.com>
12231 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12232 explicit raise of a predefined exception as Comes_From_Source if the
12233 original N_Raise_Statement comes from source.
12235 2011-08-01 Robert Dewar <dewar@adacore.com>
12237 * sinfo.ads: Add comment.
12238 * sem_ch6.adb: Minor reformatting.
12240 2011-08-01 Robert Dewar <dewar@adacore.com>
12242 * freeze.adb (Freeze_Entity): Refine check for bad component size
12243 clause to avoid rejecting confirming clause when atomic/aliased present.
12245 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12247 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12248 better determine whether an entity reference is a write.
12249 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12251 * lib-xref.adb (Output_References): Do no suppress a read reference at
12252 the same location as an immediately preceeding modify-reference, to
12253 handle properly in-out actuals.
12255 2011-08-01 Tristan Gingold <gingold@adacore.com>
12257 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12259 2011-08-01 Quentin Ochem <ochem@adacore.com>
12261 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12262 heap to compute the result.
12264 2011-08-01 Robert Dewar <dewar@adacore.com>
12266 * atree.ads: Minor reformatting.
12268 2011-08-01 Emmanuel Briot <briot@adacore.com>
12270 * g-expect.adb (Get_Command_Output): Fix memory leak.
12272 2011-08-01 Geert Bosch <bosch@adacore.com>
12274 * cstand.adb (P_Float_Type): New procedure to print the definition of
12275 predefined fpt types.
12276 (P_Mixed_Name): New procedure to print a name using mixed case
12277 (Print_Standard): Use P_Float_Type for printing floating point types
12278 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12279 precision IEEE float.
12281 2011-08-01 Thomas Quinot <quinot@adacore.com>
12283 * sem_ch3.adb: Minor reformatting.
12285 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12287 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12288 the completion of a generic function, insert the new body rather than
12289 rewriting the original.
12291 2011-08-01 Yannick Moy <moy@adacore.com>
12293 * sinfo.ads, errout.ads: Typos in comments.
12295 2011-08-01 Robert Dewar <dewar@adacore.com>
12297 * par-endh.adb: Minor reformatting.
12299 2011-08-01 Robert Dewar <dewar@adacore.com>
12301 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12302 (Pre_Post_Aspects): New subtype.
12303 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12304 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12305 * par-ch7.adb (P_Package): Remove Decl parameter
12306 (P_Package): Handle new syntax for aspects (before IS)
12307 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12309 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12310 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12311 (P_Package): Remove Decl parameter
12312 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12314 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12316 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12317 * sinfo.ads: Document new syntax for aspects in packages etc.
12318 * sprint.adb: Handle new syntax of aspects before IS in package
12320 2011-08-01 Thomas Quinot <quinot@adacore.com>
12322 * atree.ads: Minor reformatting.
12323 * sem_prag.adb: Minor reformatting.
12325 2011-08-01 Robert Dewar <dewar@adacore.com>
12327 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12328 case expr alternative.
12330 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12332 * sem_ch12.adb: Fix typo.
12334 2011-08-01 Geert Bosch <bosch@adacore.com>
12336 * sem_prag.adb (Check_No_Link_Name): New procedure.
12337 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12338 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12339 instead of Standard_Long_Long_Float_Size global. Preparation for
12340 eventual removal of per type constants.
12341 * exp_util.ads (Get_Stream_Size): New function returning the stream
12342 size value of subtype E.
12343 * exp_util.adb (Get_Stream_Size): Implement new function.
12344 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12346 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12348 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12350 2011-08-01 Geert Bosch <bosch@adacore.com>
12352 * cstand.adb: Fix comments.
12353 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12354 count of arguments.
12356 2011-08-01 Robert Dewar <dewar@adacore.com>
12358 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12360 2011-08-01 Geert Bosch <bosch@adacore.com>
12362 * atree.ads: Fix comment.
12364 2011-08-01 Robert Dewar <dewar@adacore.com>
12366 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12367 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12368 * par.adb: Add with for Namet.Sp.
12369 * par-tchk.adb: Minor reformatting.
12371 2011-08-01 Vincent Celier <celier@adacore.com>
12373 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12374 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12375 of the init procedure of a SAL.
12376 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12379 2011-08-01 Thomas Quinot <quinot@adacore.com>
12381 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12384 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12386 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12388 2011-08-01 Thomas Quinot <quinot@adacore.com>
12390 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12391 conformant with its spec (return True only for types that have
12392 an overriding Initialize primitive operation that prevents them from
12393 having preelaborable initialization).
12394 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12395 initialization for controlled types in Ada 2005 or later mode.
12397 2011-08-01 Robert Dewar <dewar@adacore.com>
12399 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12401 (Same_Aspect): New function.
12402 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12403 Type_Invariant, Precondition, Postcondition.
12404 * snames.ads-tmpl: Add Name_Type_Invariant.
12406 2011-08-01 Robert Dewar <dewar@adacore.com>
12408 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12410 (Freeze_All_Ent): Fix error in handling inherited aspects.
12411 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12412 already analyzed, but don't skip entire processing of a declaration,
12413 that's wrong in some cases of declarations being rewritten.
12414 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12415 Don't delay for integer, string literals
12416 Treat predicates in usual manner for delay, remove special case code,
12418 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12419 (Build_Predicate_Function): Update saved expression in aspect
12420 (Build_Invariant_Procedure): Update saved expression in aspect
12421 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12422 of replacement of discriminant references if the reference is simple.
12424 2011-08-01 Robert Dewar <dewar@adacore.com>
12426 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12427 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12428 Static_Predicate and Dynamic_Predicate.
12429 (Build_Predicate_Function): Add processing for Static_Predicate
12430 and Dynamic_Predicate.
12431 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12432 (From_Static_Predicate): New flag
12433 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12435 2011-08-01 Robert Dewar <dewar@adacore.com>
12437 * usage.adb: Documentation cleanup for Ada version modes in usage.
12438 * expander.adb: Minor reformatting.
12440 2011-08-01 Robert Dewar <dewar@adacore.com>
12442 * atree.ads: Minor comment fix.
12443 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12444 a-witeio.ads, sem_prag.adb: Minor reformatting.
12446 2011-08-01 Doug Rupp <rupp@adacore.com>
12448 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12449 pointers. Use descrip.h header file for convenience. Add some
12452 2011-08-01 Robert Dewar <dewar@adacore.com>
12454 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12455 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12456 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12458 (Check_Aspect_At_End_Of_Declarations): New procedure
12459 (Analye_Aspect_Specification): Minor changes for above procedures
12460 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12461 specification node as well.
12463 2011-08-01 Pascal Obry <obry@adacore.com>
12465 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12466 Windows files. Use GetFilesAttributes() in this case to check for file
12467 existence instead of returning with an error code.
12469 2011-08-01 Vincent Celier <celier@adacore.com>
12471 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12472 High is above Source length.
12474 2011-08-01 Robert Dewar <dewar@adacore.com>
12476 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12478 2011-08-01 Robert Dewar <dewar@adacore.com>
12480 * aspects.ads (Boolean_Aspects): New subtype.
12481 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12482 for derived types in cases where the parent type and derived type have
12484 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12485 with aspects when parent type also has aspects.
12486 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12487 boolean expression at this point).
12488 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12489 accordance with final decision on the Ada 2012 feature.
12490 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12492 2011-08-01 Matthew Heaney <heaney@adacore.com>
12494 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12496 2011-08-01 Pascal Obry <obry@adacore.com>
12498 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12499 Fix Replace_Slice when High is above current string size.
12500 (Replace_Slice): Fix DL computation when High is above current
12503 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12505 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12507 2011-08-01 Matthew Heaney <heaney@adacore.com>
12509 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12512 2011-08-01 Pascal Obry <obry@adacore.com>
12514 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12517 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12519 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12520 access to protected subprograms in generic bodies.
12521 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12522 protected type, indicate that the convention of the subprogram is
12523 Convention_Protected, because it may be used in subsequent declarations
12524 within the protected declaration.
12526 2011-08-01 Vincent Celier <celier@adacore.com>
12528 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12529 and "final" procedures when the name of the library is "ada", to avoid
12530 duplicate symbols "adainit" and "adafinal" in executables.
12532 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12534 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12535 quantified expression that appears within a postcondition and uses the
12536 Ada2012 'Result attribute.
12538 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12540 * init.c (__gnat_error_handler): Cast reason to int.
12541 (__gnat_install_handler): Explain sa_sigaction use.
12543 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12545 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12546 subprogram has copy-in copy-out parameters, try to promote the mode of
12547 the return type if it is passed in registers.
12549 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12551 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12552 left operand as addressable.
12554 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12556 * gcc-interface/gigi.h (build_function_stub): Remove.
12557 (build_return_expr): Likewise.
12558 (convert_vms_descriptor): Declare.
12559 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12560 (build_function_stub): Move to...
12561 * gcc-interface/utils2.c (build_return_expr): Move to...
12562 * gcc-interface/trans.c (build_function_stub): ...here.
12563 (build_return_expr): ...here.
12564 (Subprogram_Body_to_gnu): Add local variable for language_function.
12565 Disconnect the parameter attributes cache, if any, once done with it.
12566 Call end_subprog_body only after setting the end_locus.
12567 Build the stub associated with the function, if any, at the very end.
12568 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12569 variables and streamline control flow.
12571 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12574 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12575 g-trasym-dwarf.adb.
12577 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12580 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12581 Assign to act.sa_sigaction.
12582 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12583 current->return_address to char * before arithmetic.
12585 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12587 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12588 Correct argument types.
12589 Extract code from reason.
12590 (__gnat_install_handler): Assign to act.sa_sigaction.
12592 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12594 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12595 (GNAT1_OBJS): ...here.
12597 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12600 * g-socthi-mingw.adb (Fill): Fix formatting.
12602 * gcc-interface/gigi.h: Move around comment.
12604 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12607 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12609 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12612 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12614 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12616 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12617 range comparison if Pmode is SImode.
12619 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12620 Eric Botcazou <ebotcazou@adacore.com>
12622 * adadecode.c: Wrap up in extern "C" block.
12623 * adadecode.h: Likewise.
12624 * adaint.c: Likewise. Remove 'const' keyword.
12625 * adaint.h: Likewise.
12626 * argv.c: Likewise.
12627 * atree.h: Likewise.
12629 * cstreams.c: Likewise.
12631 * exit.c: Likewise.
12633 * final.c: Likewise.
12634 * init.c: Likewise.
12635 * initialize.c: Likewise.
12636 * link.c: Likewise.
12637 * namet.h: Likewise.
12638 * nlists.h: Likewise.
12639 * raise.c: Likewise.
12640 * raise.h: Likewise.
12641 * repinfo.h: Likewise.
12642 * seh_init.c: Likewise.
12643 * targext.c: Likewise.
12644 * tracebak.c: Likewise.
12645 * uintp.h: Likewise.
12646 * urealp.h: Likewise.
12647 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12648 * xsinfo.adb: Likewise.
12649 * xsnamest.adb: Likewise.
12650 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12651 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12652 * gcc-interface/misc.c: Likewise.
12653 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12654 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12655 ada/targext.o here...
12656 (GNAT_ADA_OBJS): ...and not here.
12657 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12658 (GNATBIND_OBJS): Reorder.
12660 2011-07-07 Richard Henderson <rth@redhat.com>
12662 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12663 dwarf2out_frame_init.
12665 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12667 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12669 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12672 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12674 2011-07-06 Richard Guenther <rguenther@suse.de>
12676 * gcc-interface/misc.c (gnat_init): Merge calls to
12677 build_common_tree_nodes and build_common_tree_nodes_2.
12678 Re-initialize boolean_false_node.
12680 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12681 Olivier Hainque <hainque@adacore.com>
12682 Nicolas Setton <setton@adacore.com>
12684 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12685 the type according to the ARTIFICIAL_P parameter.
12686 (create_type_decl): Likewise.
12687 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12689 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12691 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12692 (gnatbind): Likewise.
12694 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12696 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12698 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12700 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12701 local variable throughout. Remove useless call to Base_Type.
12702 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12703 Take it also into account for the volatileness of the field. Set the
12704 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12706 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12708 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12709 on a dereference built for a by-ref object if it has an address clause.
12711 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12713 * einfo.ads (Address_Taken): Document use for the second argument of
12714 Asm_Input and Asm_Output attributes.
12715 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12716 argument is an entity name, then set Address_Taken on it.
12717 <Attribute_Asm_Output>: Likewise.
12718 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12719 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12720 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12721 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12723 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12725 PR middle-end/46500
12726 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12728 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12730 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12731 (ada/utils.o): Update dependencies.
12732 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12733 ../../../libcpp/libcpp.a.
12734 * gcc-interface/utils.c: Include common/common-target.h.
12735 (process_attributes): Use targetm_common.have_named_sections.
12737 2011-06-07 Richard Guenther <rguenther@suse.de>
12739 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12742 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12744 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12745 TREE_THIS_NOTRAP flag.
12747 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12749 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12752 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12754 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12755 constants whose full view has discriminants specially.
12757 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12759 * gcc-interface/utils.c: Include diagnostic.h.
12760 (gnat_write_global_declarations): Output debug information for all
12761 global type declarations before finalizing the compilation unit.
12762 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12764 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12766 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12768 2011-05-25 Kai Tietz <ktietz@redhat.com>
12770 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12771 initialization instead of const/none-const pointer assignment.
12773 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12775 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12776 $(EXTRA_GNAT1_OBJS).
12777 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12778 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12779 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12780 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12781 libcommon-target.a instead of prefix.o.
12783 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12786 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12788 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12790 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12791 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12792 instead of version.o.
12794 2011-05-18 Kai Tietz <ktietz@redhat.com>
12796 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12797 boolean_false_node instead of integer_zero_node.
12798 (convert_with_check): Likewise.
12799 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12801 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12803 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12804 type of the parameter is an unconstrained array, convert the actual to
12805 the type of the formal in the In Out and Out cases as well.
12807 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12809 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12810 call build_function_type_array or build_varargs_function_type_array
12812 (create_subprog_type): Don't call build_function_type; call
12813 build_function_type_vec instead.
12815 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12817 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12818 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12819 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12821 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12823 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12825 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12826 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12828 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12830 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12832 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12834 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12835 instead of accessing TYPE_ARG_TYPES directly.
12836 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12838 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12841 * gcc-interface/gigi.h (get_variant_part): Declare.
12842 * gcc-interface/decl.c (get_variant_part): Make global.
12843 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12844 types have the same constant size, are record types and T1 has a
12845 variant part while T2 doesn't.
12847 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12849 * gcc-interface/utils.c (begin_subprog_body): Do not call
12851 (end_subprog_body): Likewise.
12853 2011-05-04 Richard Guenther <rguenther@suse.de>
12855 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12857 (pos_to_constructor): Likewise.
12859 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12860 Eric Botcazou <ebotcazou@adacore.com>
12862 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12863 of build_function_type. Adjust calls to...
12864 (build_raise_check): ...this. Do not take a void_tree parameter.
12865 Call build_function_type_list instead of build_function_type.
12866 Fix head comment and swap couple of conditional blocks.
12868 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12870 * gnatvsn.ads (Library_Version): Bump to 4.7.
12871 (Current_Year): Bump to 2011.
12873 2011-04-29 Michael Matz <matz@suse.de>
12875 * gcc-interface/misc.c (gnat_handle_option): Set
12876 warn_maybe_uninitialized.
12878 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12880 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12881 the Watson/McCabe paper.
12883 2011-04-23 Jim Meyering <meyering@redhat.com>
12885 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12887 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12889 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12892 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12894 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12896 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12897 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12898 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12899 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12900 <all>: Do not set flags on the reused DECL node coming from an alias.
12901 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12902 don't need debug info here...
12903 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12904 (gigi): Adjust calls to create_subprog_decl.
12905 (build_raise_check): Likewise.
12906 (establish_gnat_vms_condition_handler): Likewise.
12907 (Compilation_Unit_to_gnu): Likewise.
12908 (gnat_to_gnu): Likewise.
12910 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12912 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12913 (NO_REORDER_ADAFLAGS): New variable.
12914 (EXTRA_GNATTOOLS): Always define.
12915 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12916 Clean up and adjust list of files compiled with special options.
12917 * gcc-interface/Make-lang.in: Likewise.
12918 (ada/decl.o): Cosmetical change.
12919 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12921 2011-04-20 Jim Meyering <meyering@redhat.com>
12923 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12925 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12927 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12928 $(CFLAGS) on the link line.
12930 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12932 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12933 padded type built for the return type if it is unconstrained.
12935 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12937 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12939 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12941 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12942 before calling TREE_CHAIN.
12943 * gcc-interface/misc.c (gnat_init_ts): New function.
12944 (LANG_HOOKS_INIT_TS): Define.
12946 2011-04-12 Martin Jambor <mjambor@suse.cz>
12948 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12949 instead of cgraph_node.
12951 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12953 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12954 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12957 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12959 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12960 of aggregate types that contain a placeholder.
12962 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12964 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12966 (handle_type_generic_attribute): Likewise.
12968 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12971 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12973 2011-04-04 Kai Tietz <ktietz@redhat.com>
12976 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12979 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12981 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12982 type case, do not strip a padding type around the array type.
12984 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12986 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12989 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12991 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12992 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12993 code for -feliminate-unused-debug-types.
12994 (gnat_post_options): Likewise.
12996 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12998 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12999 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13002 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13004 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13005 DECL_ARTIFICIAL flag on enumeration types.
13007 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13009 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13010 fat pointer types artificial unconditionally.
13011 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13014 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13016 * gcc-interface/gigi.h (get_dummy_type): Declare.
13017 (build_dummy_unc_pointer_types): Likewise.
13018 (finish_fat_pointer_type): Likewise.
13019 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13020 fat pointer type has been built, complete it in place.
13021 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13022 and thin pointers. Remove useless variable.
13023 (finish_fat_pointer_type): Make global and move to...
13024 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13025 (get_dummy_type): New function.
13026 (build_dummy_unc_pointer_types): Likewise.
13027 (gnat_pushdecl): Propage the name to the anonymous variants only.
13028 (update_pointer_to): Only adjust the pointer types in the unconstrained
13031 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13033 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13034 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13035 if this is a Taft amendment type and the full declaration is available.
13036 * gcc-interface/trans.c (process_type): Likewise.
13037 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13038 (process_freeze_entity): Likewise.
13039 * gcc-interface/utils.c (dummy_global): New static variable.
13040 (gnat_write_global_declarations): If there are types declared as used
13041 at the global level, insert them in the global hash table.
13043 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13045 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13046 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13047 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13049 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13050 flag of the type accordingly.
13051 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13053 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13055 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13056 finalizing types when updating the pointers to the designated type.
13057 <all>: Finalize the deferred types even if we didn't defer processing
13058 of incomplete types in this invocation.
13060 2011-04-01 Olivier Hainque <hainque@adacore.com>
13061 Nicolas Setton <setton@adacore.com>
13062 Eric Botcazou <ebotcazou@adacore.com>
13064 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13065 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13067 2011-03-28 Kai Tietz <ktietz@redhat.com>
13069 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13071 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13072 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13074 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13076 2011-03-28 Tristan Gingold <gingold@adacore.com>
13079 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13080 Use ada output of gnatbind.
13081 (ada/b_gnatb.adb): Ditto.
13082 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13083 (ada.mostlyclean, ada.stage1)
13084 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13085 (ada.stagefeedback): Adjust.
13086 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13087 Use ada output of gnatbind.
13088 (b_gnatm.adb): Ditto.
13089 (b_gnatl.o, b_gnatm.o): New rules.
13091 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13093 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13094 for the padded type built to support a specified size or alignment.
13096 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13098 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13099 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13100 unconditionally to the end of the unit when the designated type is
13102 <all>: Rename local variable. Attempt to un-defer types only and do it
13103 for limited_with'ed types as well.
13104 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13105 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13106 consistently and remove redundant call to finalize_from_with_types.
13108 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13110 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13111 subprograms without a previous spec declared in the same unit.
13112 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13113 subprograms at the end of the unit instead of at the beginning.
13114 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13115 isn't public for the special handling of non-inline functions nested
13116 inside inline external functions.
13118 2011-03-25 Jeff Law <law@redhat.com>
13120 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13122 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13124 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13125 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13126 to compute Set_Size_Depends_On_Discriminant.
13127 (Layout_Type): Call it on array types in back-end layout mode.
13128 * sem_util.adb (Requires_Transient_Scope): Return true for array
13129 types only if the size depends on the value of discriminants.
13130 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13131 type if the RHS is a call to a function that returns an unconstrained
13132 type with default discriminant.
13134 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13136 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13137 non-conversion to the nominal result type at the end.
13139 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13141 * gcc-interface/trans.c (create_temporary): New function taken from...
13142 (create_init_temporary): ...here. Call it.
13143 (call_to_gnu): Create the temporary for the return value early, if any.
13144 Create it for a function with copy-in/copy-out parameters if there is
13145 no target; in other cases of copy-in/copy-out, use another temporary.
13146 Push the new binding level lazily. Add and rename local variables.
13148 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13150 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13152 (set_rm_size): Likewise.
13154 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13156 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13157 for the padded type built in order to support a specified alignment.
13158 Fix incorrect formatting.
13160 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13163 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13165 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13167 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13168 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13169 to the end of the list. Adjust recursive call. Rename local variable.
13170 If REORDER is true, reorder components of the record type.
13171 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13172 components_to_record and adjust the parameter list.
13174 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13176 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13177 disabled, use the variable for bounds of loop iteration scheme.
13179 2011-03-21 Kai Tietz <ktietz@redhat.com>
13182 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13184 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13186 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13187 out whether the expression is read-only. Short-circuit placeholder
13188 case and rename a couple of local variables.
13190 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13192 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13193 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13194 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13195 (convert): Deal with conversions from a smaller form type specially.
13197 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13199 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13200 its argument, except for the special -I- switch.
13202 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13204 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13207 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13209 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13211 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13213 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13215 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13216 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13217 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13218 Do not generate the check directly, instead instantiate the template
13219 check present in the descriptor.
13220 (make_descriptor_field): Move around.
13221 (build_vms_descriptor32): Build a template check in the POINTER field.
13222 (build_vms_descriptor): Remove useless suffixes.
13223 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13225 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13228 * targext.c: Include target files if IN_RTS is defined.
13230 2011-01-26 Richard Guenther <rguenther@suse.de>
13233 * targext.c: Include config.h.
13234 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13237 2011-01-04 Pascal Obry <obry@adacore.com>
13238 Eric Botcazou <ebotcazou@adacore.com>
13240 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13242 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13244 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13245 end-of-case on the end label and its associated gotos, if any.
13247 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13249 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13250 expressions of the parameter cache within the statement group of
13251 the CICO mechanism.
13253 2011-01-04 Olivier Hainque <hainque@adacore.com>
13254 Eric Botcazou <ebotcazou@adacore.com>
13256 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13257 (set_end_locus_from_node): New function.
13258 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13259 make and the function end_locus.
13260 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13261 for the elaboration subprogram.
13262 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13263 set the end_locus of the expression as well.
13265 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13268 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13269 variables that are referenced in exception handlers volatile.
13273 Copyright (C) 2011 Free Software Foundation, Inc.
13275 Copying and distribution of this file, with or without modification,
13276 are permitted in any medium without royalty provided the copyright
13277 notice and this notice are preserved.