1 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4 of iteration is an expression, its value must be captured in a
5 renaming declaration, so that modification of the elements is
6 propagated to the original container.
8 2011-09-02 Pascal Obry <obry@adacore.com>
10 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
11 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
12 prj-tree.adb: Minor reformatting and style fixes.
14 2011-09-02 Robert Dewar <dewar@adacore.com>
16 * s-rident.ads: Add new restriction No_Implicit_Aliasing
17 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
19 (Analyze_Attribute, case Address): ditto
20 (Analyze_Attribute, case Unrestricted_Access): ditto
21 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
22 No_Implicit_Aliasing restriction.
23 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
25 2011-09-02 Ed Schonberg <schonberg@adacore.com>
27 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
28 is an unchecked conversion, apply test to its expression.
30 2011-09-02 Javier Miranda <miranda@adacore.com>
32 * sem_ch3.adb (Check_Abstract_Overriding): When
33 traversing the chain of aliased subprograms avoid reporting a
34 redundant error on the current entity.
36 2011-09-02 Sergey Rybin <rybin@adacore.com>
38 * gnat_ugn.texi: Minor clean up.
40 2011-09-02 Bob Duff <duff@adacore.com>
42 * s-htable.adb (Set_If_Not_Present): Use renaming
43 instead of ":=", because the type Key is limited in the generic (even
44 if not in the instances).
46 2011-09-02 Robert Dewar <dewar@adacore.com>
48 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
49 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
52 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
54 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
55 inherited component with the enclosing derived type. Code reformatting.
57 2011-09-02 Gary Dismukes <dismukes@adacore.com>
59 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
60 return done when overflow checks are enabled, since comparisons against
61 Lor and Hir should not be done when OK1 is False.
63 2011-09-02 Gary Dismukes <dismukes@adacore.com>
65 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
66 Add new formal Master_Exp. When present, add that expression to the
67 call as an extra actual.
68 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
69 Fmaster_Actual and in the case of a BIP call initializing a return
70 object of an enclosing BIP function set it to a
71 new reference to the implicit finalization master
72 formal of the enclosing function. Fmaster_Actual is
73 then passed to the new formal Master_Exp on the call to
74 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
75 initializations of Enclosing_Func to its declaration.
77 2011-09-02 Thomas Quinot <quinot@adacore.com>
79 * csets.ads: Minor reformatting
81 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
83 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
84 the full view of a private type coming from an instantiation.
85 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
86 loop to iterate over the declarations rather than use the
87 First_Entity / Next_Entity scheme.
89 2011-09-02 Ed Schonberg <schonberg@adacore.com>
91 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
92 X'range (N) into X'First (N) .. X'Last (N), do not share the
93 dimension indicator N, if present. Even though it is a static
94 constant, its source location may be modified when printing
95 expanded code under -gnatDL, and node sharing will lead to chaos
96 in Sprint on large files, by generating a sloc value that does
97 not correspond to any source file.
99 2011-09-02 Bob Duff <duff@adacore.com>
101 * einfo.adb: (Has_Xref_Entry): Do not call
102 Implementation_Base_Type. Lib.Xref has been
103 rewritten to avoid the need for it, and it was costly.
104 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
105 functions in support of efficient xref.
106 * lib-xref-alfa.adb: Misc changes related to Key component of
108 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
109 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
110 no longer does. This is the one place where it is needed.
112 2011-09-02 Johannes Kanig <kanig@adacore.com>
114 * g-comlin.adb (Getopt): New optional argument Concatenate to have
115 similar interface as the other Getopt function.
117 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
119 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
120 a call to Set_Finalize_Address if there is no allocator available.
121 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
122 a case of allocator expansion where the allocator is not expanded but
123 needs a custom allocate routine. Code reformatting.
124 (Is_Finalizable_Transient): Remove local variables Has_Rens and
125 Ren_Obj. Code reformatting.
126 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
127 through the use of 'reference.
128 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
129 as part of build-in-place expansion. They are intentionally marked as
130 coming from source, but their parents are not.
132 2011-09-02 Ed Schonberg <schonberg@adacore.com>
134 * sem_ch10.adb (Analyze_With_Clause): If the library unit
135 is the generated subprogram declaration for a child unit body
136 that acts as spec, use the original body in the with_clause,
137 to prevent binding errors.
139 2011-09-02 Vincent Celier <celier@adacore.com>
141 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
142 qualifier /MULTI_UNIT_INDEX=
144 2011-09-02 Johannes Kanig <kanig@adacore.com>
146 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
147 instead of calling the callback function
149 2011-09-02 Robert Dewar <dewar@adacore.com>
151 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
152 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
154 2011-09-02 Vincent Celier <celier@adacore.com>
156 * prj-nmsc.adb: (Find_Sources): When the list of sources is
157 explicitly declared in an extending project, do not warn if a source
158 for an inherited naming exception is not found.
160 2011-09-02 Gary Dismukes <dismukes@adacore.com>
162 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
163 expansion is inactive.
165 2011-09-02 Ed Schonberg <schonberg@adacore.com>
167 * sem_util.adb (Note_Possible_Modification): If the entity
168 being modified is the renaming generated for an Ada2012 iterator
169 element, the enclosing container or array is modified as well.
171 2011-09-02 Jose Ruiz <ruiz@adacore.com>
173 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
174 Initialize): Define and initialize the
175 mutex attributes and condition variable attributes locally.
177 2011-09-02 Vincent Celier <celier@adacore.com>
179 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
180 exception replaced in an extending project.
181 (Check_Object): No error when the other source is locally removed.
183 2011-09-02 Yannick Moy <moy@adacore.com>
185 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
188 2011-08-31 Arnaud Charlet <charlet@adacore.com>
190 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
192 * gcc-interface/Make-lang.in: Update dependencies.
194 2011-09-01 Robert Dewar <dewar@adacore.com>
196 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
198 2011-09-01 Jose Ruiz <ruiz@adacore.com>
200 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
201 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
202 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
203 specific for systems where their glibc version does not define the
204 routines to handle dynamically allocated CPU sets.
206 2011-09-01 Vincent Celier <celier@adacore.com>
208 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
209 prj-env.adb: Implement inheritance of naming exceptions in extending
212 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
214 * gnatls.adb: Display simple message instead of content of
217 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
219 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
220 access discriminant and anonymous access component scopes.
221 (Inherit_Component): Reuse the itype of an access discriminant
222 or anonymous access component by copying it in order to set the proper
223 scope. This is done only when the parent and the derived type
224 are in different scopes.
225 (Set_Anonymous_Etype): New routine.
227 2011-09-01 Robert Dewar <dewar@adacore.com>
229 * a-convec.adb: Minor reformatting throughout.
231 2011-09-01 Jose Ruiz <ruiz@adacore.com>
233 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
234 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
235 CPU_ALLOC_SIZE and CPU_FREE linux macros.
236 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
237 CPU_SET_S respectively because we are now using dynamically allocated
238 CPU sets which are more portable across different glibc versions.
239 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
240 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
241 masks dynamically according to the number of processors in the target
243 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
244 respectively, so we need to pass the size of the masks as
246 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
247 created cpu_set_t masks
248 with the number of processors available in the target platform,
249 instead of static bit arrays. It enhances portability because
250 it uses the information from the target platform.
251 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
252 are using a restricted run-time library, use the flag
253 Configurable_Run_Time_Mode instead of Restricted_Profile.
255 2011-09-01 Vincent Celier <celier@adacore.com>
257 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
258 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
260 2011-09-01 Nicolas Roche <roche@adacore.com>
262 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
263 on VxWorks in kernel mode.
265 2011-09-01 Jose Ruiz <ruiz@adacore.com>
267 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
268 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
269 directly the bit array.
270 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
271 the linux macros with the same name.
272 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
273 wrappers around the CPU_ZERO and CPU_SET linux macros.
275 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
277 * exp_ch7.adb (Find_Insertion_List): Removed.
278 (Process_Transient_Objects): Insert the declarations of the hook
279 access type and the hook object before the associated transient object.
281 2011-09-01 Jose Ruiz <ruiz@adacore.com>
283 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
284 package System.Aux_Dec when using restricted run-time libraries which
285 do not have this package.
287 2011-09-01 Tristan Gingold <gingold@adacore.com>
289 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
291 2011-09-01 Bob Duff <duff@adacore.com>
293 * sem_attr.adb (Analyze_Access_Attribute): Do not call
294 Kill_Current_Values for P'Unrestricted_Access, where P is library level
296 2011-09-01 Thomas Quinot <quinot@adacore.com>
298 * exp_ch5.adb: Minor reformatting
299 * gnat_ugn.texi: Fix minor typos.
300 * gcc-interface/Make-lang.in: Update dependencies.
302 2011-09-01 Robert Dewar <dewar@adacore.com>
304 * inline.adb, sem_aggr.adb: Minor reformatting.
306 2011-09-01 Ed Schonberg <schonberg@adacore.com>
308 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
310 2011-09-01 Robert Dewar <dewar@adacore.com>
312 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
314 2011-09-01 Bob Duff <duff@adacore.com>
316 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
317 body" the same as "in inlined body", because visibility shouldn't
320 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
322 * inline.adb (Add_Inlined_Body): Refine previous change.
324 2011-09-01 Gary Dismukes <dismukes@adacore.com>
326 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
327 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
328 Test for case where call
329 initializes an object of a return statement before testing for
330 a constrained call, to ensure that all such cases get handled
331 by simply passing on the caller's parameters. Also, in that
332 case call Needs_BIP_Alloc_Form to determine whether to pass on
333 the BIP_Alloc_Form parameter of the enclosing function rather
334 than testing Is_Constrained. Add similar tests for the return
335 of a BIP call to later processing to ensure consistent handling.
336 (Needs_BIP_Alloc_Form): New utility function.
337 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
338 a BIP_Alloc_Form formal with call to new utility function
339 Needs_BIP_Alloc_Form.
341 2011-09-01 Pascal Obry <obry@adacore.com>
343 * prj-part.adb: Minor reformatting.
345 2011-09-01 Vincent Celier <celier@adacore.com>
347 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
348 half character in the unit name.
350 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
352 * exp_ch4.adb: Minor code and comment reformatting.
354 2011-09-01 Thomas Quinot <quinot@adacore.com>
356 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
357 for Is_Limited_Type and Is_Tagged_Type in condition checking
358 for by-reference type.
359 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
360 subprograms may have a completion because of a previous
361 Inline_Always clause, but the enclosing package must be marked
362 inlined for the subprogram body to become visible to the backend.
364 2011-09-01 Thomas Quinot <quinot@adacore.com>
366 * sem_aux.adb, exp_ch4.adb: Minor reformatting
368 2011-09-01 Pascal Obry <obry@adacore.com>
370 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
372 2011-09-01 Ed Schonberg <schonberg@adacore.com>
374 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
375 the formals of a subprogram stub that acts as a spec.
377 2011-09-01 Ed Schonberg <schonberg@adacore.com>
379 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
380 type, declare a renaming for it, not an object declaration.
382 2011-09-01 Yannick Moy <moy@adacore.com>
384 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
385 Ignore_Errors to ignore failures to read ALI files when True.
387 2011-09-01 Javier Miranda <miranda@adacore.com>
389 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
390 constructor calls associated with non-tagged record types.
392 2011-09-01 Robert Dewar <dewar@adacore.com>
394 * g-socthi-vms.adb: Minor reformatting.
396 2011-09-01 Nicolas Roche <roche@adacore.com>
398 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
399 in order to avoid impact of imcompatible changes.
400 * cstreams.c: Likewise
404 2011-09-01 Yannick Moy <moy@adacore.com>
406 * lib-writ.adb (Write_With_Lines): Always output complete information
407 on "with" line in Alfa mode, as this is required by formal verification
410 2011-09-01 Tristan Gingold <gingold@adacore.com>
412 * g-socthi-vms.adb: Add comments.
414 2011-09-01 Pascal Obry <obry@adacore.com>
416 * prj.ads: Minor reformatting.
418 2011-09-01 Vincent Celier <celier@adacore.com>
420 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
421 exceptions in the config pragmas file.
423 2011-09-01 Tristan Gingold <gingold@adacore.com>
425 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
427 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
429 * exp_ch7.adb (Find_Insertion_List): New routine.
430 (Process_Transient_Objects): Add code to handle the abnormal
431 finalization of a controlled transient associated with a subprogram
432 call. Since transients are cleaned up right after the associated
433 context, an exception raised during a subprogram call may bypass the
436 2011-09-01 Robert Dewar <dewar@adacore.com>
438 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
441 2011-09-01 Robert Dewar <dewar@adacore.com>
443 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
445 2011-09-01 Robert Dewar <dewar@adacore.com>
447 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
449 2011-09-01 Thomas Quinot <quinot@adacore.com>
451 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
452 GNATRTL_NONTASKING_OBJS.
454 2011-09-01 Robert Dewar <dewar@adacore.com>
456 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
457 possibility of this flag being set for formals in Ada 2012 mode.
458 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
460 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
462 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
464 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
467 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
469 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
470 insertion node in a tree of nested Expression_With_Actions nodes.
471 (Process_Transient_Object): In the case where a complex if statement
472 has been converted into nested Expression_With_Actions nodes, the
473 "hook" object and the associated access type must be inserted before
474 the top most Expression_With_Actions.
476 2011-09-01 Robert Dewar <dewar@adacore.com>
478 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
479 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
481 2011-09-01 Ed Schonberg <schonberg@adacore.com>
483 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
485 2011-09-01 Jose Ruiz <ruiz@adacore.com>
487 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
489 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
490 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
491 in a similar way as we do for the Priority or Dispatching_Domain aspect.
492 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
493 Dispatching_Domains_Frozen): Move this local data to package
494 System.Tasking because with the CPU aspect we need to have access
495 to this data when creating the task in System.Tasking.Stages.Create_Task
496 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
497 Move these variables from the body of
498 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
499 we need to have access to this data when creating the task in
500 System.Tasking.Stages.Create_Task.
501 * s-taskin.adb (Initialize): Signal the allocation of the environment
502 task to a CPU, if any, so that we know whether the CPU can be
503 transferred to a different dispatching domain.
504 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
505 is being allocated belongs to the dispatching domain where the task
506 lives. Signal the allocation of the task to a CPU, if any, so that we
507 know whether the CPU can be transferred to a different dispatching
510 2011-09-01 Ed Schonberg <schonberg@adacore.com>
512 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
513 attributes Same_Storage and Overlaps_Storage.
515 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
517 * exp_strm.adb: Remove with and use clause for Opt.
518 (Build_Array_Input_Function): Remove the version-dependent generation
519 of the return statement. The Ada 2005 tree is now the default.
521 2011-09-01 Yannick Moy <moy@adacore.com>
523 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
524 it is never empty when compiling in Alfa mode.
526 2011-09-01 Robert Dewar <dewar@adacore.com>
528 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
529 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
530 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
531 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
533 2011-09-01 Matthew Heaney <heaney@adacore.com>
535 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
536 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
537 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
538 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
539 unbounded queue container.
540 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
541 bounded queue container.
542 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
543 unbounded priority queue container.
544 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
545 bounded priority queue container.
547 2011-08-31 Pascal Obry <obry@adacore.com>
549 * a-direct.adb: Do not try to create an UNC path on Windows.
550 (Create_Path): Skip leading computer name in UNC path if any.
552 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
554 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
555 version-dependent generation of the return statement. The Ada 2005 tree
558 2011-08-31 Thomas Quinot <quinot@adacore.com>
560 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
561 types Stream_Element_Offset and Storage_Offset have a different native
562 type depending on whether the platform is 32 or 64 bits. When
563 exchanging them, always convert to 64 bits.
565 2011-08-31 Yannick Moy <moy@adacore.com>
567 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
568 --force-alfa to gnat2why.
570 2011-08-31 Ed Schonberg <schonberg@adacore.com>
572 * sem_ch12.adb (Save_References): If the node has aspects, save
573 references within the corresponding expressions in a separate step,
574 because the aspects are not directly in the tree for the declaration
575 to which they belong.
577 2011-08-31 Arnaud Charlet <charlet@adacore.com>
579 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
580 in CodePeer mode, since representation clauses are partially ignored.
581 * gcc-interface/Make-lang.in: Update dependencies.
583 2011-08-31 Jose Ruiz <ruiz@adacore.com>
585 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
586 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
587 to any dispatching domain.
589 2011-08-31 Thomas Quinot <quinot@adacore.com>
591 * exp_ch4.adb: Minor reformatting.
593 2011-08-31 Bob Duff <duff@adacore.com>
595 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
596 on nodes for which it is not defined.
597 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
600 2011-08-31 Bob Duff <duff@adacore.com>
602 * sem_ch3.adb (Process_Full_View): Disable legality check if
603 In_Instance, to avoid spurious errors.
604 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
605 if In_Instance, to avoid spurious errors.
607 2011-08-31 Pascal Obry <obry@adacore.com>
609 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
610 directory speparators.
611 (Compose): Use Dir_Seps to handle both forms.
612 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
614 (Extension): Use Dir_Seps to handle both forms.
616 2011-08-31 Pascal Obry <obry@adacore.com>
618 * prj-conf.adb: Minor reformatting.
620 2011-08-31 Jose Ruiz <ruiz@adacore.com>
622 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
623 dispatching domain aspect.
624 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
626 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
627 Dispatching_Domain aspect in a similar way as we do for the Priority
629 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
630 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
632 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
633 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
634 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
635 Dispatching_Domain and add it to the task definition.
636 (Sig_Flags): Add Pragma_Dispatching_Domain.
637 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
638 support to find the types Dispatching_Domain and
639 Dispatching_Domain_Access.
640 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
641 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
642 query the availability of a pragma Dispatching_Domain.
643 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
644 the expander to pass the Dispatching_Domain when creating a task.
645 (Name_Dispatching_Domain): Add this new name for a pragma.
646 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
647 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
648 task has been allocated at creation time.
649 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
650 Ravenscar is always null.
651 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
652 the task has been allocated at creation time.
653 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
654 a specific dispatching domain.
655 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
656 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
657 and CPU are specified for the task, and the CPU value is not contained
658 within the range of processors for the domain.
660 2011-08-31 Vincent Celier <celier@adacore.com>
662 * make.adb (Original_Gcc) : New constant String_Access.
663 (Gnatmake): For VM targets, do not use VM version of the compiler if
664 --GCC= has been specified.
666 2011-08-31 Thomas Quinot <quinot@adacore.com>
668 * sem_ch5.adb: Minor reformatting.
670 2011-08-31 Ed Schonberg <schonberg@adacore.com>
672 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
675 2011-08-31 Bob Duff <duff@adacore.com>
677 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
678 the access type is private; we don't care about privacy in expansion.
680 2011-08-31 Ed Schonberg <schonberg@adacore.com>
682 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
683 subcomponents tnat may be limited, because they originate in view
684 conflicts. If the original aggregate is legal and the actuals are
685 legal, the aggregate itself is legal.
687 2011-08-31 Matthew Heaney <heaney@adacore.com>
689 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
692 2011-08-31 Ed Schonberg <schonberg@adacore.com>
694 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
697 2011-08-31 Jose Ruiz <ruiz@adacore.com>
699 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
700 Interrupt_Priority aspects, force the analysis of the aspect expression
701 (when building the equivalent pragma). Otherwise, its analysis is done
702 too late, after the task or protected object has been created.
703 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
704 Analyze_Single_Task_Declaration): Remove the code to move the aspects
705 to the object declaration because they are needed in the type
708 2011-08-31 Robert Dewar <dewar@adacore.com>
710 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
711 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
714 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
716 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
717 if the corresponding type is malformed due to restriction violations.
719 2011-08-31 Robert Dewar <dewar@adacore.com>
721 * s-ransee.ads, s-ransee.adb: Minor reformatting.
723 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
725 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
726 would cause the generation of Set_Finalize_Address if the target is a
727 VM and the designated type is not derived from [Limited_]Controlled.
729 2011-08-31 Arnaud Charlet <charlet@adacore.com>
731 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
733 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
734 case of a compilation error.
736 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
738 * init.c (__gnat_error_handler): Standardize the stack overflow or
739 erroneous memory access message.
740 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
741 or erroneous memory access message.
743 2011-08-31 Robert Dewar <dewar@adacore.com>
745 * sem_ch4.adb: Minor reformatting.
746 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
748 2011-08-31 Thomas Quinot <quinot@adacore.com>
750 * scos.ads: Minor documentation clarification.
751 * put_scos.adb: Do not generate SCO unit header line for a unit that
754 2011-08-31 Robert Dewar <dewar@adacore.com>
756 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
758 2011-08-31 Tristan Gingold <gingold@adacore.com>
760 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
761 hold variables between these following subprograms.
762 (Build_Exception_Handler, Build_Object_Declarations,
763 Build_Raise_Statement): Use the above type as parameter.
764 Make the above adjustments.
765 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
767 2011-08-31 Pascal Obry <obry@adacore.com>
769 * projects.texi: Minor reformatting.
771 2011-08-31 Tristan Gingold <gingold@adacore.com>
773 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
774 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
776 2011-08-31 Ed Schonberg <schonberg@adacore.com>
778 * exp_ch5.adb: Minor code cleanup.
779 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
780 prevent cascaded errors.
781 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
782 variable of an iterator specification in current scope.
783 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
784 postconditions on the stack, as they contain no return statements.
786 2011-08-31 Yannick Moy <moy@adacore.com>
788 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
789 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
790 call Qualify_Entity_Names.
791 (Expand_Alfa): call Qualify_Entity_Names in more cases
792 * lib-xref-alfa.adb: Take into account system package.
793 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
794 CodePeer mode in which we are interested in finding bugs even if
795 compiler cannot compile source.
796 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
799 2011-08-31 Gary Dismukes <dismukes@adacore.com>
801 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
802 denoted by the subtype mark to ensure getting the concurrent type in
803 the case where the subtype mark denotes a private subtype of a
804 concurrent type (needed when using -gnatc).
805 (Process_Subtype): For the processing specific to type kinds, case on
806 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
807 subtype denotes a private subtype whose base type is nonprivate (needed
808 for subtypes of private fulfilled by task types when compiling with
811 2011-08-31 Gary Dismukes <dismukes@adacore.com>
813 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
814 late primitives that override interface operations when the full
815 expander is not active, to avoid blowups in Register_Primitive when
816 types don't have associated secondary dispatch tables.
818 2011-08-31 Yannick Moy <moy@adacore.com>
820 * alfa_test.adb: Code clean up.
822 2011-08-31 Marc Sango <sango@adacore.com>
824 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
825 by Comes_From_Source (Original_Node (N)) in order to treat also the
826 nodes which have been rewritten.
827 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
828 explicit dereference and slice violation in spark mode on the nodes
829 coming only from the source code.
831 2011-08-31 Robert Dewar <dewar@adacore.com>
833 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
834 lib-xref-alfa.adb: Minor reformatting.
836 2011-08-31 Matthew Heaney <heaney@adacore.com>
838 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
840 2011-08-31 Javier Miranda <miranda@adacore.com>
842 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
843 only for class-wide subprograms conflicting with entities of concurrent
846 2011-08-31 Matthew Heaney <heaney@adacore.com>
848 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
851 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
853 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
854 general description of the routine.
856 2011-08-31 Ed Schonberg <schonberg@adacore.com>
858 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
861 2011-08-31 Gary Dismukes <dismukes@adacore.com>
863 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
864 check is needed for a left-hand side that is a dereference, and the
865 base type is private without discriminants (whereas the full type does
866 have discriminants), an extra retrieval of the underlying type may be
867 needed in the case where the subtype is a record subtype whose base
868 type is private. Update comments.
870 2011-08-31 Javier Miranda <miranda@adacore.com>
872 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
873 found check if there is a class-wide subprogram covering the primitive.
875 2011-08-31 Yannick Moy <moy@adacore.com>
877 * sem_res.adb: Further cases where full expansion test is needed,
878 rather than expansion test.
880 2011-08-31 Pascal Obry <obry@adacore.com>
882 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
884 2011-08-31 Ed Schonberg <schonberg@adacore.com>
886 * exp_ch5.adb: Handle iterators over derived container types.
888 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
890 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
891 (Has_Anonymous_Master): New routine.
892 (Set_Has_Anonymous_Master): New routine.
893 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
894 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
895 (Current_Anonymous_Master): New routine.
896 (Current_Unit_First_Declaration): Removed.
897 (Current_Unit_Scope): Removed.
898 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
899 their objects on a per-unit heterogeneous finalization master.
901 2011-08-31 Matthew Heaney <heaney@adacore.com>
903 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
906 2011-08-31 Jose Ruiz <ruiz@adacore.com>
908 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
911 2011-08-31 Gary Dismukes <dismukes@adacore.com>
913 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
914 where the actual is an unexpanded call to 'Input.
916 2011-08-31 Yannick Moy <moy@adacore.com>
918 * sem_ch4.adb: Code clean up.
920 2011-08-31 Yannick Moy <moy@adacore.com>
922 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
924 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
926 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
927 and TSS primitive Finalize_Address if finalization is suppressed.
928 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
929 primitive Finalize_Address if finalization is suppressed.
931 2011-08-31 Jose Ruiz <ruiz@adacore.com>
933 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
934 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
935 sure that the underlying task has already been created before trying
936 to change its affinity.
937 (Set_CPU): Use the term processor instead of CPU, as we do in
940 2011-08-31 Vincent Celier <celier@adacore.com>
942 * prj-attr.adb: New Compiler attribute Source_File_Switches.
943 * prj-nmsc.adb (Process_Compiler): Process attribute
944 Source_File_Switches.
945 * prj.ads (Language_Config): New name list component
946 Name_Source_File_Switches.
947 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
949 2011-08-31 Ed Schonberg <schonberg@adacore.com>
951 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
952 discriminated component of an actual, expand at once to prevent
953 ouf-of-order references with generated subtypes.
955 2011-08-31 Yannick Moy <moy@adacore.com>
957 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
958 reference to operator in Alfa xrefs.
960 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
962 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
963 where the parent instance was frozen before the current instance due to
964 the presence of a source body. Update calls to Insert_After_Last_Decl.
965 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
966 Update the comment which illustrates the purpose of the routine.
967 Package instances are now frozen by source bodies which appear after
968 the instance. This ensures that entities coming from within the
969 instance are available for use in the said bodies.
970 (Install_Body): Add code to handle the case where the parent instance
971 was frozen before the current instance due to the presence of a source
972 body. Update calls to Insert_After_Last_Decl.
974 2011-08-31 Jose Ruiz <ruiz@adacore.com>
976 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
978 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
980 2011-08-31 Yannick Moy <moy@adacore.com>
982 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
984 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
985 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
986 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
987 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
988 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
989 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
990 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
991 ALFA in Alfa (we dropped acronym).
992 * einfo.adb (Primitive_Operations): Correctly return list of primitive
993 operations in a case where it returned previously No_Elist.
995 2011-08-31 Robert Dewar <dewar@adacore.com>
997 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
998 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
999 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1000 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
1001 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
1002 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
1005 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1007 * sem_ch12 (Check_Private_View): Revert previous change.
1008 * sem_res.adb (Conversion_Check): Do not emit the error message if the
1009 conversion is in a generic instance.
1011 2011-08-31 Matthew Heaney <heaney@adacore.com>
1013 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
1014 * a-chtgbo.adb (Free): Allow 0 as index value.
1016 2011-08-31 Matthew Heaney <heaney@adacore.com>
1018 * a-cborma.adb (Insert): Add comment to explain why no element
1021 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1023 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
1024 spec discriminant is already a concurrent type, in which case just use
1025 it, otherwise fetch the Corresponding_Concurrent_Type as before.
1027 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1029 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
1030 system-linux-mips.ads, system-linux-mipsel.ads,
1031 system-linux-mips64el.ads, system-linux-ppc64.ads,
1032 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
1034 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1036 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
1037 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
1038 (build_unary_op): Likewise.
1040 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1042 * raise-gcc.c: Do not include coretypes.h and tm.h.
1043 (setup_to_install): Remove test for compiler macro.
1044 * targext.c: Document use for the library.
1045 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
1047 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1049 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
1050 the expression to the nominal type if the latter is a record type with
1051 a variant part and the type of the former is a record type without one.
1053 2011-08-30 Yannick Moy <moy@adacore.com>
1055 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1056 expansion in Alfa mode.
1057 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
1058 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
1060 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
1061 * sem_res.adb: Ditto.
1062 * gcc-interface/Make-lang.in: Update dependencies.
1064 2011-08-30 Thomas Quinot <quinot@adacore.com>
1066 * g-socket.ads: Minor documentation adjustment.
1068 2011-08-30 Robert Dewar <dewar@adacore.com>
1070 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
1072 2011-08-30 Yannick Moy <moy@adacore.com>
1074 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
1075 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
1076 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
1077 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
1078 Revert change which introduced files for "light"
1079 expansion, to be replaced by a single file for Alfa expansion.
1081 2011-08-30 Robert Dewar <dewar@adacore.com>
1083 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
1084 Minor code reorg/reformatting.
1086 2011-08-30 Yannick Moy <moy@adacore.com>
1088 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
1089 common shorthand for (Expander_Active and not ALFA_Mode) that can be
1090 used for testing full expansion, that is active expansion not in the
1091 reduced mode for Alfa
1092 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
1093 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
1094 of the verbose (Expander_Active and not ALFA_Mode)
1096 2011-08-30 Tristan Gingold <gingold@adacore.com>
1098 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
1099 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
1100 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
1101 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
1103 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1105 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
1106 access conversions to check that the conversion is a rewritten node,
1107 rather than just having Comes_From_Source set to False, which wasn't
1110 2011-08-30 Robert Dewar <dewar@adacore.com>
1112 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
1113 g-socket.ads: Minor reformatting.
1115 2011-08-30 Thomas Quinot <quinot@adacore.com>
1117 * sem_util.adb: Minor reformatting.
1119 2011-08-30 Tristan Gingold <gingold@adacore.com>
1121 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
1122 to be compliant with the ABI.
1124 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1126 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
1127 of a designated type when the related access type is an actual in an
1128 instance. This ensures that the full view of designated type is
1129 available when inside the body of the instance.
1131 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1133 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
1134 in a position to be modified, a slice is treated like an indexed
1137 2011-08-30 Thomas Quinot <quinot@adacore.com>
1139 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
1140 field tv_sec in struct timeval.
1142 2011-08-30 Yannick Moy <moy@adacore.com>
1144 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
1145 blocks of code doing full expansion, previously only guarded by
1146 Expander_Active, by anding the test that ALFA_Mode is not set
1148 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1150 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
1151 add the function to the list of private dependents, for subsequent
1152 legality check on Taft amendment types.
1153 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
1154 Private_Dependents, as for other incomplete types.
1155 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
1156 Taft-amendment type is used as the return type of a function.
1158 2011-08-30 Javier Miranda <miranda@adacore.com>
1160 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
1161 which emits an error by a call to a new routine which report the error.
1162 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
1163 entity does not cover an existing interface.
1164 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
1166 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
1167 protected procedures or entries whose mode is not conformant.
1168 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
1169 an error by a call to a new routine which report the error.
1171 2011-08-30 Robert Dewar <dewar@adacore.com>
1173 * gnat_rm.texi: Minor change.
1174 * exp_attr_light.adb: Minor reformatting.
1176 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1178 * sem_ch3.adb: Patch inheritance of aspects in
1179 Complete_Private_Subtype, to avoid infinite loop.
1181 2011-08-30 Javier Miranda <miranda@adacore.com>
1183 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
1184 been reported and a subprogram covering an interface primitive is not
1185 found then skip generating the internal entity. Done to avoid crashing
1187 (Check_Abstract_Overriding): Change text of error of wrong formal of
1188 protected subprogram or entry. Done for consistency to emit exactly the
1189 same error reported by Check_Synchronized_Overriding. In addition, the
1190 error is restricted to protected types (bug found working on AI05-0090)
1192 2011-08-30 Yannick Moy <moy@adacore.com>
1194 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1195 expansion in Alfa mode.
1196 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
1197 * exp_light.adb, exp_light.ads: New package defining light expansion.
1198 * expander.adb (Expand): Call light expansion in Alfa mode
1199 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
1201 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
1203 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
1204 * gnat1drv.adb (Adjust_Global_Switches): Comment
1206 2011-08-30 Yannick Moy <moy@adacore.com>
1208 * lib-xref-alfa.adb: Minor refactoring.
1210 2011-08-30 Yannick Moy <moy@adacore.com>
1212 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
1214 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
1215 expansion in Alfa mode.
1216 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
1219 2011-08-30 Robert Dewar <dewar@adacore.com>
1221 * debug_a.adb: Update comment.
1223 2011-08-30 Robert Dewar <dewar@adacore.com>
1225 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
1226 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
1227 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
1228 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
1230 2011-08-30 Robert Dewar <dewar@adacore.com>
1232 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
1235 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1237 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
1238 Build_Finalization_Master by supplying an insertion node and enclosing
1239 scope. In its old version, the call did not generate a finalization
1241 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
1242 recognize anonymous access-to-controlled components. Rewrite the
1243 machinery which creates finalization masters to service anonymous
1244 access-to-controlled components of a record type. In its current state,
1245 only one heterogeneous master is necessary to handle multiple anonymous
1247 (Freeze_Type): Comment reformatting.
1248 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
1250 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
1251 associates TSS primitive Finalize_Address with either the master itself
1252 or with the internal hash table depending on the mode of operation of
1255 2011-08-30 Javier Miranda <miranda@adacore.com>
1257 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
1258 interface type then do not generate code to compare this component.
1259 Required since they have no components and their equality operator is
1262 2011-08-30 Steve Baird <baird@adacore.com>
1264 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
1265 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
1266 returns the (static) accessibility level of the object. Otherwise, the
1267 same as Type_Access_Level.
1268 (Dynamic_Accessibility_Level): New function; given an expression which
1269 could occur as the rhs of an assignment to a saooaaat (i.e., an
1270 expression of an access-to-object type), return the new value for the
1271 saooaaat's associated Extra_Accessibility object.
1272 (Effective_Extra_Accessibility): New function; same as
1273 Einfo.Extra_Accessibility except that object renames are looked through.
1275 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
1276 (Dynamic_Accessibility_Level): New function; see sem_util.ads
1278 (Effective_Extra_Accessibility): New function; see sem_util.ads
1280 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
1281 (Extra_Accessibility): Update comments.
1282 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
1283 except RM_Size field (which is only for types) is unaffected.
1285 (Extra_Accessibility): Expand domain to allow objects, not just formals.
1286 (Set_Extra_Accessibility): Expand domain to allow objects, not just
1288 (Init_Size): Add assertion that we are not trashing the
1289 Extra_Accessibility attribute of an object.
1290 (Init_Size_Align): Add assertion that we are not trashing the
1291 Extra_Accessibility attribute of an object.
1292 (Init_Object_Size_Align): New procedure; see einfo.ads description.
1293 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
1294 differently for the type of a (non-library-level) saooaaat depending
1295 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
1296 is queried in this set of changes - everything else (in particular,
1297 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
1298 driven off of the setting of the Is_Local_Anonymous_Access attribute.
1299 The special treatment of library-level saooaaats is an optimization,
1300 not required for correctnesss. This is based on the observation that the
1301 Ada2012 rules (static and dynamic) for saooaaats turn out to be
1302 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
1304 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
1305 false for the type of a saooaaat, declare and initialize its
1306 accessibility level object and set the Extra_Accessibility attribute
1307 of the saooaaat to refer to this object.
1308 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1309 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1310 calls to Effective_Extra_Accessibility in order to support
1311 renames of saooaaats.
1312 (Expand_N_Type_Conversion): Add new local function,
1313 Has_Extra_Accessibility, and call it when determining whether an
1314 accessibility check is needed.
1315 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1316 evaluate to True (without raising an exception).
1318 (Expand_N_Assignment_Statement): When assigning to an Ada2012
1319 saooaaat, update its associated Extra_Accessibility object (if
1320 it has one). This includes an accessibility check.
1321 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1322 a saooaaat, update its Extra_Accessibility object too (if it
1324 (Expand_Call): Replace a couple of calls to Type_Access_Level
1325 with calls to Dynamic_Access_Level to handle cases where
1326 passing a literal (any literal) is incorrect.
1327 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1328 checks associated with "Saooaat := Some_Object'Access;"; this must
1329 be rejected if Some_Object is declared in a more nested scope
1331 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1332 assignment to a saooaaat even if Is_Local_Anonymous_Access
1333 returns False for its type (indicating a 2012-style saooaaat).
1335 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1336 (which is only appropriate for objects, not types) with a call
1337 of Init_Object_Size_Align in order to avoid trashing the
1338 Extra_Accessibility attribute of a rename (the two attributes
1341 (Valid_Conversion) Replace six calls to Type_Access_Level with
1342 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1343 Ada2012 non-library-level saooaaat, the former returns library level
1344 while the latter returns the (static) accessibility level of the
1345 saooaaat. A type conversion to the anonymous type of a saooaaat
1346 can only occur as part of an assignment to the saooaaat, so we
1347 know that such a conversion must be in a lhs context, so Deepest
1348 yields the result that we need. If such a conversion could occur,
1349 say, as the operand of an equality operator, then this might not
1350 be right. Also add a test so that static accessibilty checks are
1351 performed for converting to a saooaaat's type even if
1352 Is_Local_Anonymous_Access yields False for the type.
1354 2011-08-30 Javier Miranda <miranda@adacore.com>
1356 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1357 controls generation of a warning associated with late declaration of
1358 dispatching functions. Required to avoid generating spurious
1361 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1363 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1364 return object has an anonymous access type and the function's type is
1365 a named access type.
1366 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1367 conversions on implicit conversions, since such conversions can occur
1368 for anonymous access cases due to expansion. Issue error for attempt
1369 to rename an anonymous expression as an object of a named access type.
1370 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1371 to indicate whether this function should report errors on invalid
1373 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1374 the expression is of an anonymous access type and the expected type is
1375 a named general access type, rewrite the expression as a type
1376 conversion, unless this is an expression of a membership test.
1377 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1378 calling of Error_Msg_N on new formal Report_Errs.
1379 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1380 calling of Error_Msg_NE on new formal Report_Errs.
1381 (Valid_Conversion): Move declaration of this function to the package
1382 spec, to allow calls from membership test processing. For Ada 2012,
1383 enforce legality restrictions on implicit conversions of anonymous
1384 access values to general access types, disallowing such conversions in
1385 cases where the expression has a dynamic accessibility level (access
1386 parameters, stand-alone anonymous access objects, or a component of a
1387 dereference of one of the first two cases).
1388 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1389 in the context of a named general access expected type.
1390 * exp_ch4.adb Add with and use of Exp_Ch2.
1391 (Expand_N_In): Add processing for membership tests applied to
1392 expressions of an anonymous access type. First, Valid_Conversion is
1393 called to check whether the test is statically False, and then the
1394 conversion is expanded to test that the expression's accessibility
1395 level is no deeper than that of the tested type. In the case of
1396 anonymous access-to-tagged types, a tagged membership test is applied
1398 (Tagged_Membership): Extend to handle access type cases, applying the
1399 test to the designated types.
1400 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1401 accessibility level, and the actual is a 'Access applied to a current
1402 instance, pass the accessibility level of the type of the current
1403 instance rather than applying Object_Access_Level to the prefix. Add a
1404 ??? comment, since this level isn't quite right either (will eventually
1405 need to pass an implicit level parameter to init procs).
1407 2011-08-30 Bob Duff <duff@adacore.com>
1409 * s-taskin.ads: Minor comment fix.
1411 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1413 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1414 component and the selector is a dispatching operation, check if it is
1415 a prefixed call before rewriting as a parameterless function call.
1417 2011-08-29 Jakub Jelinek <jakub@redhat.com>
1419 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1420 tsystem.h into $(RTSDIR) instead of rts.
1422 2011-08-29 Robert Dewar <dewar@adacore.com>
1424 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1426 * gcc-interface/Make-lang.in: Update dependencies.
1428 2011-08-29 Yannick Moy <moy@adacore.com>
1430 * alfa.ads (Name_Of_Heap_Variable): New constant name.
1431 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1432 table to hold dereferences.
1433 (Add_ALFA_Xrefs): Take into account dereferences as special
1434 reads/writes to the variable "HEAP".
1435 (Enclosing_Subprogram_Or_Package): Move subprogram here.
1436 (Generate_Dereference): New procedure to store a read/write dereferencew
1438 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1439 the special "HEAP" var.
1440 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1442 * sem_util.adb (Note_Possible_Modification): Store write dereference
1445 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1447 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1448 ensures that the level of the subpool access type is not deeper than
1449 that of the pool object.
1450 * sem_util.adb (Object_Access_Level): Expand to handle defining
1452 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1453 subpool handle name of a rewritten allocator.
1455 2011-08-29 Robert Dewar <dewar@adacore.com>
1457 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1459 2011-08-29 Thomas Quinot <quinot@adacore.com>
1461 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1462 values, we generate multiple triples of parameters in the TypeCode.
1463 Bump Choice_Index for each such triple so that a subsequent default
1464 choice is associated with the correct index in the typecode.
1466 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1468 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1470 (First, Last): Handle properly an iterator over a null container.
1472 2011-08-29 Bob Duff <duff@adacore.com>
1474 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
1475 processing if we run across a node with no Scope. This can happen if
1476 we're with-ing an library-level instance, and that instance got errors
1477 that caused "instantiation abandoned".
1478 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
1479 an exception instead of using Assert, so it won't go into an infinite
1480 loop, even when assertions are turned off.
1482 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1484 * a-coorse.adb: Proper handling of empty ordered sets.
1486 2011-08-29 Johannes Kanig <kanig@adacore.com>
1488 * debug.adb: Add comments.
1490 2011-08-29 Thomas Quinot <quinot@adacore.com>
1492 * a-except.adb, a-except-2005.adb: Minor comment rewording and
1495 2011-08-29 Yannick Moy <moy@adacore.com>
1497 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
1498 declaration for Itypes in Alfa mode.
1500 2011-08-29 Robert Dewar <dewar@adacore.com>
1502 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
1503 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1504 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
1507 2011-08-29 Tristan Gingold <gingold@adacore.com>
1509 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
1511 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
1512 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
1515 2011-08-29 Robert Dewar <dewar@adacore.com>
1517 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
1519 2011-08-29 Javier Miranda <miranda@adacore.com>
1521 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
1522 renamings of formal subprograms when the actual for a formal type is
1525 2011-08-29 Matthew Heaney <heaney@adacore.com>
1527 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
1530 2011-08-29 Matthew Heaney <heaney@adacore.com>
1532 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
1533 components of record type.
1534 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
1537 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1539 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
1540 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
1543 2011-08-29 Robert Dewar <dewar@adacore.com>
1545 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
1548 2011-08-29 Matthew Heaney <heaney@adacore.com>
1550 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
1551 components of record type.
1553 2011-08-29 Bob Duff <duff@adacore.com>
1555 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
1556 by the termination handler.
1558 2011-08-29 Yannick Moy <moy@adacore.com>
1560 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
1561 created in Alfa mode, instead of inserting artificial declarations of
1562 non-Itypes in the tree.
1563 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
1564 know if an Itype has a corresponding declaration, as defined in
1567 2011-08-29 Yannick Moy <moy@adacore.com>
1569 * gnat1drv.adb: Minor rewrite.
1571 2011-08-29 Bob Duff <duff@adacore.com>
1573 * s-tasuti.adb (Make_Passive): Work around race condition in
1574 Make_Independent, which can cause Wait_Count to be zero. So instead of
1575 asserting that Wait_Count > 0, and then decrementing it, decrement it
1576 only if Wait_Count > 0.
1577 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
1578 should be nonnegative, so declare them Natural instead of Integer.
1580 2011-08-29 Robert Dewar <dewar@adacore.com>
1582 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
1583 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
1584 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
1585 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
1586 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
1588 2011-08-29 Tristan Gingold <gingold@adacore.com>
1590 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
1592 2011-08-29 Vadim Godunko <godunko@adacore.com>
1594 * s-parint.ads: Minor comment clarification.
1596 2011-08-29 Vincent Celier <celier@adacore.com>
1598 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
1599 may be used as identifiers.
1601 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1603 * a-coinho.ads: Minor reformating.
1605 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1607 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
1608 container of a derived type.
1610 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1612 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1613 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
1615 2011-08-29 Pascal Obry <obry@adacore.com>
1617 * exp_disp.adb: Minor comment fix.
1618 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
1619 to avoid warnings when compiling with -Wall.
1620 (Make_Disp_Conditional_Select_Body): Likewise.
1621 (Make_Disp_Timed_Select_Body): Likewise.
1623 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1625 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
1626 an entity name, generate reference for it.
1628 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1630 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
1632 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
1633 the class-wide type.
1634 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
1636 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1638 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
1639 subtype for an object whose type is an unconstrained union.
1641 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1643 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
1644 is allowed in a component definition, by AI95-406.
1646 2011-08-29 Matthew Heaney <heaney@adacore.com>
1648 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
1650 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1652 * a-except-2005.adb: Alphabetize all routines.
1653 (Triggered_By_Abort): New routine.
1654 * a-except-2005.ads (Triggered_By_Abort): New routine.
1655 * a-except.adb Alphabetize all routines.
1656 (Triggered_By_Abort): New routine.
1657 * a-except.ads (Triggered_By_Abort): New routine.
1658 * exp_ch7.adb: Update all comments involving the detection of aborts in
1660 (Build_Object_Declarations): Do not generate code to detect the
1661 presence of an abort at the start of finalization code, use a runtime
1663 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
1665 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
1666 allocate a task on a subpool.
1667 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
1668 The flag disables all actions related to the maintenance of
1669 Finalize_Address_Table when subpools are not in use.
1670 (Allocate_Any_Controlled): Signal the machinery that subpools are in
1672 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
1673 performs costly task locking when subpools are not in use.
1675 2011-08-29 Yannick Moy <moy@adacore.com>
1677 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
1678 types and dispatching calls in Alfa mode.
1679 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
1680 correspondance between body and spec scopes, to reuse utility functions
1681 (Traverse_Declarations_Or_Statements): Protect access to body for stub
1682 by testing the presence of the library unit for the body
1683 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
1684 mode the expansion of accept statements is skipped
1685 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
1686 the unique entity corresponding to the one returned by
1687 Unique_Defining_Entity applied to the enclosing declaration of the
1690 2011-08-29 Bob Duff <duff@adacore.com>
1692 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
1693 gdb when x is not a node (it can be a node list, name_id, etc). pp is
1694 an alias for pn. ppp is an alias for pt.
1696 2011-08-29 Javier Miranda <miranda@adacore.com>
1698 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
1699 aggregate to take a consistent decision on the need to convert into
1700 assignments aggregates that initialize constant objects.
1702 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1704 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
1705 Build_Allocate_Deallocate_Proc in order to handle allocation of
1706 non-controlled objects on subpools.
1707 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
1708 to be end-user visible.
1709 * s-finmas.adb: Add with and use clause for System.HTable.
1710 Add an instantiation of Simple_HTable which provides a mapping between
1711 the address of a controlled object and the corresponding
1712 Finalize_Address used to clean up the object. The table is used when a
1713 master is operating in heterogeneous mode.
1714 (Attach): Explain why the input node is not verified on being already
1716 (Delete_Finalize_Address): New routine.
1717 (Detach): Add pragma Assert which ensures that a node is already
1719 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
1720 since nodes are no longer removed on traversal. Explain why node
1721 detachment is undesirable in this case.
1722 (Get_Finalize_Address): New routine.
1723 (Hash): New routine.
1724 (Is_Empty_List): Removed.
1725 (pm): Renamed to Print_Master. Add output for discriminant
1727 Comment reformatting.
1728 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1729 * s-finmas.ads: Various comments additions / improvements.
1730 Type Finalization_Master has a discriminant which determines the mode of
1732 (Delete_Finalize_Address): New routine.
1733 (Get_Finalize_Address): New routine.
1734 (pm): Renamed to Print_Master.
1735 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1736 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
1737 use clause for System.IO.
1738 (Allocate_Any_Controlled): Add machinery to set TSS primitive
1739 Finalize_Address depending on the mode of allocation and the mode of
1741 (Deallocate_Any_Controlled): Remove the relation pair object -
1742 Finalize_Address regardless of the master mode. Add comment explaining
1744 (Detach): Ensure that fields Prev and Next are null after detachment.
1745 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1746 scheme to check whether the list of subpools is empty. There is no
1747 longer need to store the next subpool or advance the current pointer.
1748 (Is_Empty_List): New routine.
1749 (Print_Pool): New routine.
1750 (Print_Subpool): New routine.
1751 * s-stposu.ads: Various comments additions / improvements.
1752 Field Master of type Root_Subpool is now a heterogeneous collection.
1753 (Print_Pool): New routine.
1754 (Print_Subpool): New routine.
1756 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1758 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1759 forms, using aspects of container types.
1760 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1761 Has_Implicit_Dereference flags, that may be set on the partial view.
1762 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1763 container type with an indexing aspect.
1764 (Analyze_Quantified_Expression): Analyze construct with expansion
1765 disabled, because it will be rewritten as a loop during expansion.
1766 (Try_Container_Indexing): The prefix itself may be a container type
1767 with an indexing aspect, as with a vector of vectors.
1768 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1769 the original doamin of iteration, for name capture.
1770 (Analyze_Iterator_Specification): If the domain is an expression that
1771 needs finalization, create a separate declaration for it.
1772 For an iterator with "of" retrieve default iterator info from aspect of
1773 container type. For "in" iterator, retrieve type of Iterate function.
1774 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1775 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1776 analysis, to prevent spurious errors about late attributes.
1777 * sprint.adb: Handle quantified expression with either loop or iterator
1779 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1782 2011-08-29 Vincent Celier <celier@adacore.com>
1784 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1785 Binder or Linker of the main project file.
1787 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1789 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1792 2011-08-29 Yannick Moy <moy@adacore.com>
1794 * exp_ch9.adb: Partial revert of previous change for Alfa mode
1796 2011-08-29 Yannick Moy <moy@adacore.com>
1798 * exp_ch11.adb: Minor expansion of comment.
1800 2011-08-29 Yannick Moy <moy@adacore.com>
1802 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1804 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1806 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1807 interpretation, set the type before resolving the operands, because
1808 legality checks on an exponention operand need to know the type of the
1811 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1813 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1814 cleanups on a master if the instance is within a generic unit.
1815 Complement to the corresponding fix to inline.adb for K520-030.
1817 2011-08-29 Tristan Gingold <gingold@adacore.com>
1819 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1821 * exp_intr.adb: Minor comment fix.
1823 2011-08-29 Bob Duff <duff@adacore.com>
1825 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1826 Delay_Required was used as an uninitialized variable.
1828 2011-08-29 Robert Dewar <dewar@adacore.com>
1830 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1831 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1832 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1834 2011-08-29 Thomas Quinot <quinot@adacore.com>
1836 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1837 Remove unused variables.
1839 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1841 * sem_res.adb: Remove Build_Explicit_Dereference.
1842 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1843 from sem_res.adb, used in analysis of additional constructs.
1844 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1845 expansion of iterators.
1846 (Is_Object_Reference): Recognize variables rewritten as explicit
1847 dereferences in Ada2012.
1848 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1849 Reversible_Iterator names, for expansion of Ada2012 iterators.
1850 * aspects.ads, aspects.adb (Find_Aspect): Utility.
1851 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1852 linked list container.
1853 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1854 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1856 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1858 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1861 2011-08-29 Vincent Celier <celier@adacore.com>
1863 * make.adb (Gnatmake): Get the maximum number of simultaneous
1864 compilation processes after the Builder switches has been scanned, as
1865 there may include -jnn.
1867 2011-08-29 Matthew Heaney <heaney@adacore.com>
1869 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1871 2011-08-29 Tristan Gingold <gingold@adacore.com>
1873 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1874 GNAT_DRIVER_COMMAND_LINE to 255.
1876 2011-08-29 Pascal Obry <obry@adacore.com>
1878 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1879 reformatting and style fix (class attribute casing).
1881 2011-08-29 Yannick Moy <moy@adacore.com>
1883 * exp_ch11.adb: Yet another case where expansion should be common
1884 between CodePeer and Alfa.
1886 2011-08-29 Yannick Moy <moy@adacore.com>
1888 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1890 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1892 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1893 incomplete type and its completion match.
1895 2011-08-29 Yannick Moy <moy@adacore.com>
1897 * exp_ch13.adb: Adjust previous change.
1899 2011-08-29 Robert Dewar <dewar@adacore.com>
1901 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1902 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1905 2011-08-29 Emmanuel Briot <briot@adacore.com>
1907 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1908 initialize aggregated projects.
1910 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1912 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1913 depth of candidates to resolve a potentially spurious ambiguity between
1914 two visible subprograms.
1916 2011-08-29 Yannick Moy <moy@adacore.com>
1918 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1920 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1921 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1924 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1926 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1929 2011-08-29 Thomas Quinot <quinot@adacore.com>
1931 * sem_res.adb: Minor reformatting.
1933 2011-08-29 Johannes Kanig <kanig@adacore.com>
1935 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1937 * gnat1drv.adb (Adjust_Global_Switches): Set
1938 Use_Expressions_With_Actions to False in ALFA mode.
1939 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1942 2011-08-29 Yannick Moy <moy@adacore.com>
1944 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1945 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1946 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1947 tagged types and dispatching calls in Alfa mode.
1949 2011-08-29 Javier Miranda <miranda@adacore.com>
1951 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1952 we do not report an error on an Empty node.
1954 2011-08-29 Geert Bosch <bosch@adacore.com>
1956 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1957 a-nlrear.o and a-nurear.o.
1959 2011-08-29 Robert Dewar <dewar@adacore.com>
1961 * freeze.adb: Minor code reorganization.
1963 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1964 sem_ch6.adb: Minor reformatting
1966 2011-08-29 Tristan Gingold <gingold@adacore.com>
1968 * s-except.ads, s-except.adb: Provide dummy body.
1970 2011-08-29 Yannick Moy <moy@adacore.com>
1972 * sem_warn.adb (Within_Postcondition): Take into account the case of
1973 an Ensures component in a Test_Case.
1975 2011-08-29 Tristan Gingold <gingold@adacore.com>
1977 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1978 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1979 System_Exceptions_Debug
1980 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1981 * a-except.adb: With and use System.Exceptions_Debug instead of
1983 * a-except-2005.adb: Likewise.
1984 * s-assert.adb: Likewise.
1985 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1986 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
1987 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1988 s-excdeb. Update dependencies.
1989 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1990 as these no longer need external libraries.
1992 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1994 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1995 exponentiation operator on universal values in a context that requires
1998 2011-08-29 Tristan Gingold <gingold@adacore.com>
2000 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
2001 before calling notify_handled_exception.
2002 * a-exextr.adb: Fix comment.
2004 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2006 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
2007 Finalize_Address of the access type's finalization master.
2008 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
2009 access type's finalization master. Add a guard to prevent
2010 Associated_Storage_Pool from being set on .NET/JVM.
2011 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
2012 attribute Finalize_Address of the access type's finalization master.
2013 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
2014 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
2015 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
2017 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
2018 use clause for System.IO
2019 (Detach): Relax the assertion, to be reinstated later.
2020 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
2021 Relax the assertion on Finalize_Address, to be reinstated later.
2022 (Is_Empty_List): New routine.
2023 (pm): New debug routine.
2024 (Set_Finalize_Address): New routine.
2025 * s-finmas.ads (pm): New debug routine.
2026 (Set_Finalize_Address): New routine.
2027 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
2029 2011-08-29 Tristan Gingold <gingold@adacore.com>
2031 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
2032 Remove convention C.
2034 2011-08-29 Tristan Gingold <gingold@adacore.com>
2036 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
2037 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
2038 (Finalize_TCB): Remove its finalization.
2039 (Initialize): Remove assignment of GET_Exc_Stack_Addr
2040 * s-soflin.adb (NT_Exc_Stack): Remove
2041 (Get_Exc_Stack_Addr_NT): Likewise.
2042 (Get_Exc_Stack_Addr_Soft): Likewise.
2043 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
2044 (Get_Exc_Stack_Addr): Likewise.
2045 (Get_Exc_Stack_Addr_Soft): Likewise
2046 * s-taspri-vms.ads (Exc_Stack_T): Remove.
2047 (Exc_Stack_Ptr_T): Likewise.
2048 (Private_Data): Remove Exc_Stack_Ptr component.
2050 2011-08-29 Tristan Gingold <gingold@adacore.com>
2052 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
2054 2011-08-29 Tristan Gingold <gingold@adacore.com>
2056 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
2058 2011-08-29 Geert Bosch <bosch@adacore.com>
2060 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
2061 L2_Norm, Swap_Column): New generic subprograms
2062 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
2063 L2_Norm, Swap_Column): Implement new subprograms in order to
2064 eliminate dependency on BLAS and LAPACK libraries in
2065 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
2066 version. Forward_Eliminate/Back_Substitute can be used to put a
2067 matrix in row echelon or reduced row echelon form using partial
2069 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
2070 Swap_Column): Instantiate from System.Generic_Array_Operations.
2071 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
2072 (Sqrt): Local function for simple computation of square root without
2073 adding dependencies on Generic_Elementary_Functions.
2074 (Swap): New subprogram to exchange floating point numbers.
2075 (Inverse): Reimplement using Jordan-Gauss elimination.
2076 (Jacobi): New procedure implementing Jacobi's method for computation
2077 of eigensystems, based on Rutishauser's implementation.
2078 (L2_Norm): Implement directly using the inner product.
2079 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
2080 decreasing eigenvalue as required by the Ada RM.
2081 (Swap_Column): New helper procedure for Sort_Eigensystem.
2082 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
2083 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
2086 2011-08-29 Thomas Quinot <quinot@adacore.com>
2088 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
2091 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2093 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
2094 than the current node.
2095 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
2096 Finalization_Master. The list headers have two fields instead of three.
2097 This should fix alignment issue but subpool allocations are now
2098 unusable. Alphabetize subprograms.
2099 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
2100 the size of the header when converting the beginning of the object to
2101 a FM_Node. Set the master's Finalize_Address attribute if not already
2103 (Deallocate_Any_Controlled): Use the offset rather than the size of the
2104 header when converting the beginning of the object to a FM_Node.
2106 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2108 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
2109 reraise when compiling for CodePeer.
2111 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2113 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
2114 now needed by a-convec.adb. Fix warning.
2116 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2118 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
2119 processing of TSS routine Finalize_Address when compiling in
2122 2011-08-29 Thomas Quinot <quinot@adacore.com>
2124 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
2125 sem_warn.adb: Minor reformatting.
2127 2011-08-29 Emmanuel Briot <briot@adacore.com>
2129 * prj-conf.adb (Get_Config_Switches): Also collect the list of
2130 languages from aggregated projects.
2132 2011-08-29 Yannick Moy <moy@adacore.com>
2134 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
2135 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2136 Traverse_Package_Declaration, Traverse_Subprogram_Body,
2137 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
2138 for stubs are traversed too when parameter is set
2139 (Traverse_All_Compilation_Units): Traverse without going inside stubs
2140 (Traverse_Declarations_Or_Statements): Do the special traversing for
2141 stubs when required.
2142 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
2143 return subprogram or package body from stub.
2144 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
2145 stubs without prior subprogram decl.
2147 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2149 * gnat_ugn.texi: Fix typo.
2151 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2153 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
2154 which accounts for size vs alignment issues and calculates the size of
2156 (Deallocate_Any_Controlled): Ditto.
2157 (Nearest_Multiple_Rounded_Up): New routine.
2159 2011-08-29 Tristan Gingold <gingold@adacore.com>
2161 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
2162 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
2163 (Set_Exception_Msg): Ditto.
2164 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
2166 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
2167 Use Save_Occurrence instead of Save_Occurrence_No_Private.
2168 (Raise_With_Msg): Remove Cleanup_Flag.
2169 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
2170 Clean_Flag and Private_Data components.
2172 2011-08-29 Yannick Moy <moy@adacore.com>
2174 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
2176 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
2177 of an explicitly declared type, so that the base types of the original
2178 type and this generated type are the same, and a "type" (not a subtype
2180 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
2181 small" in Alfa mode, like in CodePeer mode.
2182 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
2183 clauses in Alfa mode.
2185 2011-08-29 Javier Miranda <miranda@adacore.com>
2187 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
2188 function to the package spec.
2189 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
2190 internally generated bodies of null procedures locate the internally
2191 generated spec enforcing mode conformance.
2192 (Is_Interface_Conformant): Ensure that the controlling formal of the
2195 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2197 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
2198 reject the pragma if it appears to apply to a formal subprogram.
2200 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2202 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
2203 inner expression, to prevent double evaluation.
2205 2011-08-29 Tristan Gingold <gingold@adacore.com>
2207 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
2209 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
2210 * a-except-2005.adb (Propagate_Exception): Adjust spec.
2211 (Raise_Current_Excep): Adjust call.
2212 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
2214 2011-08-29 Thomas Quinot <quinot@adacore.com>
2216 * exp_disp.adb: Minor reformatting.
2218 2011-08-29 Tristan Gingold <gingold@adacore.com>
2220 * a-exexpr.adb (Setup_Exception): Removed.
2221 * a-exexpr-gcc.adb (Setup_Exception): Removed.
2222 * a-except.adb (Exception_Propagation): Removed.
2223 * a-except-2005.adb (Setup_Exception): Removed.
2224 (Reraise): Remove call to Setup_Exception.
2225 (Reraise_Occurrence): Ditto.
2226 (Reraise_Occurrence_Always): Ditto.
2227 (Reraise_Occurrence_No_Defer): Ditto.
2228 (Transfer_Occurrence): Ditto.
2229 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
2230 (Set_Exception_Msg): Ditto.
2232 2011-08-29 Robert Dewar <dewar@adacore.com>
2234 * a-convec.adb, exp_disp.adb: Minor reformatting.
2236 2011-08-29 Tristan Gingold <gingold@adacore.com>
2238 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
2240 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2242 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
2243 Exception_Handlers to No_List instead of Empty_List in the case where
2244 there are no handlers.
2246 2011-08-29 Tristan Gingold <gingold@adacore.com>
2248 * gcc-interface/gigi.h (enum standard_datatypes): Add
2249 ADT_reraise_zcx_decl
2250 (reraise_zcx_decl): New macro.
2251 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
2252 (gigi): Set reraise_zcx_decl.
2253 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
2254 (gnat_to_gnu): Handle N_Raise_Statement.
2256 2011-08-29 Robert Dewar <dewar@adacore.com>
2258 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
2259 a-undesu.adb: Minor reformatting.
2261 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2263 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
2264 table, accept an unfrozen untagged component if it is an actual for a
2265 formal incomplete type.
2266 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
2267 provide new iterator forms over vectors.
2268 Introduce type Iterator in package body to implement operations of
2269 Reversible_Iterator interface.
2270 * a-iteint.ads: Make package pure so it is usable with new container
2271 packages, that are categorized Remote_Types.
2273 2011-08-29 Robert Dewar <dewar@adacore.com>
2275 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
2277 2011-08-29 Bob Duff <duff@adacore.com>
2279 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
2280 of <>, because this is the routine that checks for dimensionality
2281 errors (for example, for a two-dimensional array, (others => <>) should
2282 be (others => (others => <>)).
2284 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2286 * impunit.adb: Add new run-time units.
2287 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
2288 s-stposu.ads, s-stposu.adb: Code clean up.
2289 Handle protected class-wide or task class-wide types
2290 Handle C/C++/CIL/Java types.
2291 * s-spsufi.adb, s-spsufi.ads: New files.
2293 2011-08-29 Yannick Moy <moy@adacore.com>
2295 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
2296 library-level subprogram.
2297 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
2299 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
2301 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
2303 * gnat_rm.texi: Update doc for Test_Case pragma.
2305 2011-08-29 Tristan Gingold <gingold@adacore.com>
2307 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2309 (GCC_Exception_Access): New type.
2310 (Unwind_DeleteException): New imported procedure
2311 (Foreign_Exception): Import it.
2312 (GNAT_GCC_Exception): Simply have the occurrence inside.
2313 (To_GCC_Exception): New function.
2314 (To_GNAT_GCC_Exception): New function.
2315 (GNAT_GCC_Exception_Cleanup): New procedure..
2316 (Propagate_GCC_Exception): New procedure.
2317 (Reraise_GCC_Exception): New procedure.
2318 (Setup_Current_Excep): New procedure.
2319 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2320 (Unwind_RaiseException): Ditto.
2321 (Unwind_ForcedUnwind): Ditto.
2323 (Begin_Handler): Change type of parameter.
2324 (End_Handler): Ditto. Now delete the exception if still present.
2325 (Setup_Key): Removed.
2326 (Is_Setup_And_Not_Propagated): Removed.
2327 (Set_Setup_And_Not_Propagated): Ditto.
2328 (Clear_Setup_And_Not_Propagated): Ditto.
2329 (Save_Occurrence_And_Private): Ditto.
2330 (EID_For): Add 'not null' constraint on parameter.
2331 (Setup_Exception): Does nothing.
2332 (Propagate_Exception): Simplified.
2333 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2334 re-raise is not expanded anymore.
2335 * s-except.ads (Foreign_Exception): New exception - placeholder for
2337 * raise-gcc.c (__gnat_setup_current_excep): Declare
2338 (CXX_EXCEPTION_CLASS): Define (not yet used)
2339 (GNAT_EXCEPTION_CLASS): Define.
2340 (is_handled_by): Handle foreign exceptions.
2341 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2343 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2345 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2347 2011-08-29 Thomas Quinot <quinot@adacore.com>
2349 * a-synbar-posix.adb: Minor reformatting.
2351 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2353 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2354 a-exetim-default.ads (Interrupt_Clocks_Supported,
2355 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2356 definitions to be compliant with AI-0171. The target systems do not
2357 support separate account for the execution time of interrupt handlers.
2359 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2361 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2362 in the barrier to put first the easiest to evaluate (and the one which
2363 will be True more often). More efficient.
2365 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2367 * s-atocou-x86.adb: Fix constraint in machine code insertion.
2369 2011-08-29 Bob Duff <duff@adacore.com>
2371 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2372 attributes that are now aspects, as specified by AI05-0229-1.
2373 * sem_ch13.adb (Analyze_Aspect_Specifications,
2374 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2375 pragmas or attribute references, as appropriate.
2377 2011-08-29 Robert Dewar <dewar@adacore.com>
2379 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2380 a-synbar-posix.ads: Minor reformatting.
2382 2011-08-29 Yannick Moy <moy@adacore.com>
2384 * snames.ads-tmpl: Add name Force.
2386 2011-08-29 Pascal Obry <obry@adacore.com>
2388 * prj-nmsc.adb: Minor reformatting.
2390 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2392 * a-exetim.ads (Interrupt_Clocks_Supported,
2393 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2394 definitions to be compliant with AI-0171.
2396 2011-08-29 Robert Dewar <dewar@adacore.com>
2398 * a-ngelfu.adb: Add comments.
2400 2011-08-29 Geert Bosch <bosch@adacore.com>
2402 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2403 the closest machine number to Pi / 2.0.
2405 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2407 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2408 package Ada.Synchronous_Barriers.
2409 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2410 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2411 default implementation using protected objects and another one
2412 a-synbar-posix using POSIX barriers as the underlying support.
2413 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2414 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2415 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2416 Clean up dependencies.
2417 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2419 2011-08-29 Robert Dewar <dewar@adacore.com>
2421 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2422 exp_dist.adb: Minor code reorganization.
2425 2011-08-29 Thomas Quinot <quinot@adacore.com>
2427 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2428 primitive operation must support external streaming if it is not a
2429 controlling access result.
2431 2011-08-29 Thomas Quinot <quinot@adacore.com>
2433 * sinfo.ads, sem_ch7.adb: Minor reformatting.
2435 2011-08-29 Bob Duff <duff@adacore.com>
2437 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2438 restriction on allocators, as required by AI05-0013-1.
2439 * restrict.ads: Minor comment fix.
2441 2011-08-29 Tristan Gingold <gingold@adacore.com>
2443 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2444 (To_Jmpbuf_Address): Ditto
2445 (builtin_longjmp): Ditto
2447 2011-08-29 Thomas Quinot <quinot@adacore.com>
2449 * sem_res.adb: Minor reformatting.
2451 2011-08-29 Vincent Celier <celier@adacore.com>
2453 * make.adb (Gnatmake): Move special processing for VM targets after the
2454 call to Get_Target_Parameters.
2456 2011-08-29 Thomas Quinot <quinot@adacore.com>
2458 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2460 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2462 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2463 where an anonymous access discriminant of a limited designated type
2464 appears in a non-immutably limited discriminated type and issue an
2465 error message. Add local variable Desig_T and replace all occurrences
2468 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2470 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2471 implementation is compliant to RM D.15(15/2) after the modification
2472 imposed by AI05-0094-1 (binding interpretation).
2474 2011-08-29 Robert Dewar <dewar@adacore.com>
2476 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
2477 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
2479 2011-08-29 Thomas Quinot <quinot@adacore.com>
2481 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
2482 the scope name, do not report a missing label as a style violation (it
2483 will be diagnosed as an illegality).
2484 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
2485 variant records: Get_Enum_Lit_From_Pos already returns a usage
2486 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
2487 on Expr in Integer_Literal case so that it can be used by
2490 2011-08-29 Tristan Gingold <gingold@adacore.com>
2492 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
2494 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
2495 (Build_Abort_Block_Handler): New function to build an Abort_Signal
2497 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
2498 Build_Abort_Block_Handler to build the exception handler. Do not
2499 undefer aborts for the Abort_Signal exception handler if back-end
2500 exception mechanism.
2501 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
2502 back_end exceptions for all others and abort_signal.
2503 * s-except.ads (ZCX_By_Default): New constant.
2504 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
2505 (Raise_Exception_Always): Ditto.
2506 (Raise_From_Signal_Handler): Ditto.
2507 (Raise_With_Location_And_Msg): Ditto.
2508 (Raise_With_Msg): Ditto.
2510 (Reraise_Occurence): Ditto.
2511 (Reraise_Occurrence_Always): Ditto.
2512 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
2513 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
2515 2011-08-29 Thomas Quinot <quinot@adacore.com>
2517 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
2519 2011-08-29 Robert Dewar <dewar@adacore.com>
2521 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
2522 Minor code reorganization.
2524 2011-08-29 Bob Duff <duff@adacore.com>
2526 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
2527 2012, not just Ada 2005.
2529 2011-08-29 Vincent Celier <celier@adacore.com>
2531 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
2532 with a project file or with gprbuid, if -gnatep= is specified, the
2533 builder may need to be invoked with -x.
2535 2011-08-29 Tristan Gingold <gingold@adacore.com>
2537 * a-exexpr-gcc.adb: Minor comment fix.
2539 2011-08-29 Robert Dewar <dewar@adacore.com>
2541 * sem_ch8.adb: Minor reformatting.
2543 2011-08-29 Bob Duff <duff@adacore.com>
2545 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
2546 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
2547 treating "some" as unreserved in earlier Ada versions. This is now
2548 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
2549 rather than Name_Some, since Tok_Some is now recognized as reserved.
2550 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
2552 * scans.ads: Minor comment fixes.
2553 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
2554 for other language versions.
2555 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
2556 treating "some" as unreserved in earlier Ada versions. This is now
2557 handled in Snames.Is_Keyword_Name.
2558 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
2560 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
2561 unreserved in earlier Ada versions. This is now handled in
2562 Snames.Is_Keyword_Name.
2563 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
2564 words as for other language versions.
2565 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
2566 Ada 2012, not just Ada 2005.
2568 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2570 * sem_ch13.adb: Additional semantic checks for aspects involved in
2573 2011-08-29 Matthew Heaney <heaney@adacore.com>
2575 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
2576 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
2577 Container parameter.
2578 (Ancestor_Find): ditto.
2580 2011-08-29 Thomas Quinot <quinot@adacore.com>
2582 * par-endh.adb: Minor reformatting.
2584 2011-08-29 Tristan Gingold <gingold@adacore.com>
2586 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
2587 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
2588 (Adjust_N_CLeanups_For): Remove.
2589 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
2591 (Propgate_Exception): Adjust.
2592 * raise-gcc.c: Add a few static/const.
2593 (Adjust_N_Cleanups_For): Remove declaration.
2594 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
2596 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2598 * sem_ch8.adb: Use type of function return when rewriting as object
2601 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2603 * sem_type.adb: Minor reformatting.
2605 2011-08-29 Robert Dewar <dewar@adacore.com>
2607 * makeutl.adb: Minor reformatting.
2609 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2611 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
2612 function call of a limited type, the expansion of the renaming is
2613 complicated by the presence of various temporaries and subtypes that
2614 capture constraints of the renamed object.
2615 Rewrite node as an object declaration, whose expansion is simpler.
2616 Given that the object is limited there is no copy involved and no
2619 2011-08-29 Robert Dewar <dewar@adacore.com>
2621 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
2622 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
2624 2011-08-29 Tristan Gingold <gingold@adacore.com>
2626 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
2627 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
2628 system-linux-hppa.ads, system-linux-s390.ads,
2629 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
2630 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
2631 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
2632 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
2633 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
2634 system-solaris-sparc.ads, system-lynxos-x86.ads,
2635 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
2636 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
2637 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
2638 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
2639 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
2640 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
2641 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
2642 * opt.ads: Adjust comment.
2643 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
2644 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
2645 * system.ads: Move GCC_ZCX_Support to obsolete entries.
2647 2011-08-29 Emmanuel Briot <briot@adacore.com>
2649 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
2650 file name is specified on the gnatmake or gprbuild command line, and
2651 before we search for that file in the project.
2653 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2655 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
2656 used to determine whether a possible interpretation for an overloadable
2657 entity is declared within the current instantiation and should be
2658 included in the candidate set.
2660 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2662 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
2664 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2666 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
2667 access subtype is access_to_subprogram, when applying checks for
2670 2011-08-29 Matthew Heaney <heaney@adacore.com>
2672 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
2673 for sibling when common parent.
2675 2011-08-29 Thomas Quinot <quinot@adacore.com>
2677 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
2680 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2682 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
2683 for the return type when in ASIS mode.
2685 2011-08-29 Vincent Celier <celier@adacore.com>
2687 * make.adb (Gnatmake): Get the default search dirs, then the target
2688 parameters after getting the Builder switches, as the Builder switches
2689 may include --RTS= and that could change the default search dirs.
2691 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2693 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
2694 Make_Final_Call. Move the processing for class-wide types before the
2695 processing for derivations from [Limited_]Controlled.
2696 (Make_Final_Call): Move the processing for class-wide types before the
2697 processing for derivations from [Limited_]Controlled.
2698 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
2699 Add code to account for alignments larger than the list header. Add a
2700 comment illustrating the structure of the allocated object + padding +
2702 (Deallocate_Any_Controlled): Add code to account for alignments larger
2703 than the list header.
2705 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2707 * sinfo.ads, sinfo.adb: New node kind
2708 N_Formal_Incomplete_Type_Definition, related flags.
2709 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
2710 Parse formal incomplete types.
2711 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
2713 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
2714 Formal incomplete types do not need completion.
2715 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
2716 Validate_Incomplete_Type_Instance): New procedures to handle formal
2718 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
2719 that corresponds to a formal incomplete type.
2720 * sprint.adb: Handle formal incomplete type declarations.
2721 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
2724 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2726 * a-fihema.ads, a-fihema.adb: Unit removed.
2727 * a-undesu.ads, a-undesu.adb: New unit implementing
2728 Ada.Unchecked_Deallocate_Subpool.
2729 * einfo.adb: Remove Associated_Collection from the node usage.
2730 Add Finalization_Master to the node usage.
2731 (Associated_Collection): Removed.
2732 (Finalization_Master): New routine.
2733 (Set_Associated_Collection): Removed.
2734 (Set_Finalization_Master): New routine.
2735 (Write_Field23_Name): Remove Associated_Collection from the output. Add
2736 Finalization_Master to the output.
2737 * einfo.ads: Remove attribute Associated_Collection and its uses in
2739 Add new attribute Finalization_Master along with its uses in entitites.
2740 (Associated_Collection): Removed along with its pragma import.
2741 (Finalization_Master): New routine along with a pragma import.
2742 (Set_Associated_Collection): Removed along with its pragma import.
2743 (Set_Finalization_Master): New routine along with a pragma import.
2744 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2745 Build_Finalization_Collection with Build_Finalization_Master.
2746 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2747 before the bodies of the predefined routines. Add comment explaining
2748 this. Replace call to Build_Finalization_Collection with
2749 Build_Finalization_Master.
2750 (Freeze_Type): Replace call to Build_Finalization_Collection with
2751 Build_Finalization_Master.
2752 (Make_Finalize_Address_Body): Comment reformatting.
2753 (Make_Predefined_Primitive_Specs): Code reformatting.
2754 (Stream_Operation_OK): Update comment mentioning finalization
2755 collections. Replace RE_Finalization_Collection with
2756 RE_Finalization_Master.
2757 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2758 Associated_Collection with Finalization_Master. Replace call to
2759 Build_Finalization_Collection with Build_Finalization_Master.
2760 (Expand_Allocator_Expression): Replace call to Associated_Collection
2761 with Finalization_Master. Replace call to Set_Associated_Collection with
2762 Set_Finalization_Master. Remove the generation of
2763 Set_Finalize_Address_Ptr.
2764 (Expand_N_Allocator): Replace call to Associated_Collection with
2765 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2766 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2767 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2768 comment on usage. Replace call to Needs_BIP_Collection with
2769 Needs_BIP_Finalization_Master Remplace BIP_Collection with
2770 BIP_Finalization_Master. Update all comments which mention finalization
2771 collections. Replace Associated_Collection with
2772 Finalization_Master. Replace Build_Finalization_Collection with
2773 Build_Finalization_Master.
2774 (BIP_Formal_Suffix): Update BIP_Collection's case.
2775 (Build_Heap_Allocator): Update the related comment. Rename local
2776 variable Collect to Fin_Mas_Id and update its occurrences. Update
2777 comments which mention finalization collections. Replace
2778 Set_Associated_Collection with Set_Finalization_Master.
2779 (Expand_Call): Update the code which detects a special piece of library
2781 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2782 Add_Collection_Actual_To_Build_In_Place_Call with
2783 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2784 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2785 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2786 Add_Collection_Actual_To_Build_In_Place_Call with
2787 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2788 (Make_Build_In_Place_Call_In_Assignment): Replace call to
2789 Add_Collection_Actual_To_Build_In_Place_Call with
2790 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2791 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2792 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2793 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2794 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2795 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2796 Replace call to Set_Associated_Collection with Set_Finalization_Master.
2797 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2798 Replace the call to Associated_Collection with Finalization_Master.
2799 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2800 Update the way finalization master names are generated. Update the
2801 retrieval of the correct access type which will carry the pool and
2803 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2804 (Make_Finalize_Address_Body): Abstract types do not need
2805 Finalize_Address. Code reformatting.
2806 (Make_Finalize_Address_Stmts): Update comment on usage.
2807 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2808 (Process_Declarations): Update comments.
2809 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2810 Build_Finalization_Master. Update associated comment.
2811 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2812 * exp_ch13.adb: Update comments which mention finalization collections.
2813 (Expand_N_Free_Statement): Replace the call to Associated_Collection
2814 with Finalization_Master.
2815 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2816 create calls to routines Allocate_Any_Controlled and
2817 Deallocate_Any_Controlled.
2818 (Find_Finalize_Address): New routine.
2819 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2821 (Requires_Cleanup_Actions): Update the comment on freeze node
2823 * exp_util.ads: Remove comment on generated code for
2824 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2825 is better to simply look in the body.
2826 * freeze.adb (Freeze_All): Update the comment of finalization
2827 collections. Replace the call to Associated_Collection with
2828 Finalization_Master. Replace the call to Build_Finalization_Collection
2829 with Build_Finalization_Master.
2830 * impunit.adb: Add a-undesu and s-stposu to the list of units.
2831 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2833 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2834 Ada.Finalization. Add processing for children of System.Storage_Pools.
2835 * rtsfind.ads: Remove the naming of second level children of
2837 Remove Ada_Finalization_Heap_Management from the list of units.
2838 Remove subtype Ada_Finalization_Child.
2839 Remove the following subprogram entities:
2843 RE_Finalization_Collection
2844 RE_Finalization_Collection_Ptr
2845 RE_Set_Finalize_Address_Ptr
2847 Add the naming of second level children of System.Storage_Pools.
2848 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2850 Add subtype System_Storage_Pools_Child.
2851 Add the following subprogram entities to System.Finalization_Masters:
2853 RE_Finalization_Master
2854 RE_Finalization_Master_Ptr
2856 Add the following subprogram entities to System.Storage_Pools.Subpools:
2858 RE_Allocate_Any_Controlled
2859 RE_Deallocate_Any_Controlled
2860 RE_Root_Storage_Pool_With_Subpools
2864 Move the following subprogram entities from
2865 Ada.Finalization.Heap_Management to System.Finalization_Masters:
2867 RE_Add_Offset_To_Address
2872 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2873 Set_Associated_Collection with Set_Finalization_Master.
2874 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2875 BIP_Finalization_Master is created.
2876 * s-finmas.adb: New unit System.Finalization_Masters.
2877 * s-finmas.ads: New unit System.Finalization_Masters.
2878 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2879 * s-stposu.ads, s-stposu.adb: New unit implementing
2880 System.Storage_Pools.Subpools.
2882 2011-08-29 Bob Duff <duff@adacore.com>
2884 * tbuild.adb: Add assertion.
2886 2011-08-29 Thomas Quinot <quinot@adacore.com>
2888 * s-pooglo.adb: Minor reformatting.
2890 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2892 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2893 an indexed component of a packed array whose element type is a record
2894 with a representation clause different from that of the right-hand
2895 side, generate a temporary to minimuze the number of bit-field
2896 operations generated.
2898 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2900 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2901 declarations, and thus are likely insertion points for actions.
2903 2011-08-29 Bob Duff <duff@adacore.com>
2905 * einfo.ads: Minor comment fix.
2907 2011-08-29 Robert Dewar <dewar@adacore.com>
2909 * frontend.adb, gnat1drv.adb: Minor reformatting.
2911 2011-08-29 Tristan Gingold <gingold@adacore.com>
2913 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2914 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
2915 space in front of the header.
2917 2011-08-29 Johannes Kanig <kanig@adacore.com>
2919 * frontend.adb (Frontend): Exit after creating Standard package when
2920 -gnatd.H is present.
2921 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2924 2011-08-29 Robert Dewar <dewar@adacore.com>
2926 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2927 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2928 snames.ads-tmpl: Minor reformatting.
2930 2011-08-29 Philippe Gil <gil@adacore.com>
2932 * prj.adb (Reset_Units_In_Table): New procedure.
2933 Reset units to avoid access to freed memory.
2935 2011-08-29 Thomas Quinot <quinot@adacore.com>
2937 * get_scos.adb: When reading a P statement SCO without a pragma name
2938 (from an older ALI file), ensure that the Pragma_Name component is set
2939 to Unknown_Pragma (not left uninitialized).
2941 2011-08-29 Vincent Celier <celier@adacore.com>
2943 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2944 modified to compute correctly the object path of a SAL project that is
2945 extending another library project.
2946 (Write_Path_File): New procedure.
2947 * makeutl.ads (Directories): New table moved from Buildgpr
2948 (Get_Directories): New procedure moved from Buildgpr
2949 (Write_Path_File): New procedure
2950 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2951 paths before binding SALs, instead of Set_Ada_Paths.
2952 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2954 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2955 (Current_Source_Path_File_Of): New function
2956 (Set_Current_Object_Path_File_Of): New procedure
2957 (Current_Source_Object_File_Of): New function
2958 (Set_Current_Object_Path_File_Of): New procedure
2959 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2960 (Current_Source_Path_File_Of): New function
2961 (Set_Current_Object_Path_File_Of): New procedure
2962 (Current_Source_Object_File_Of): New function
2963 (Set_Current_Object_Path_File_Of): New procedure
2965 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2967 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2968 packed entity, use a bit-field assignment only if there is no change of
2971 2011-08-29 Thomas Quinot <quinot@adacore.com>
2973 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2974 Is_RTU instead of using Chars comparisons.
2976 2011-08-29 Thomas Quinot <quinot@adacore.com>
2978 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2979 temporary object if the actual is constrained, and the discriminants
2980 read from the stream don't match.
2982 2011-08-29 Tristan Gingold <gingold@adacore.com>
2984 * sem_attr.adb, exp_attr.adb: Add handling of
2985 Attribute_System_Allocator_Alignment
2986 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2987 Attribute_System_Allocator_Alignment.
2988 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2989 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2990 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2991 get_target_system_allocator_alignment.
2993 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2995 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2998 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3000 * exp_ch3.adb (In_Runtime): Fix typo.
3002 2011-08-29 Bob Duff <duff@adacore.com>
3004 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
3006 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3008 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
3009 and a separate tag assignment is generated, ensure that the tag
3010 assignment is analyzed.
3012 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3014 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
3015 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
3016 of statement lists that may contain local declarations.
3017 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
3018 duplicate the triggering statements needed for the expansion of this
3019 construct, when the trigger is a dispatching call to a synchronized
3022 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3024 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
3025 * bindgen.adb: Add comments.
3026 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
3029 2011-08-29 Robert Dewar <dewar@adacore.com>
3031 * exp_attr.adb: Minor reformatting.
3032 Minor code reorganization and commenting.
3033 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
3036 2011-08-29 Thomas Quinot <quinot@adacore.com>
3038 * get_scos.adb: Ignore chaining indicators not currently supported
3041 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3043 * system.ads: Minor editing.
3045 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3047 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
3049 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
3050 Attribute_Elab_Subp_Body.
3051 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
3052 * sem_util.adb: Update comments.
3054 2011-08-29 Thomas Quinot <quinot@adacore.com>
3056 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
3057 pragma name for each SCO statement corresponding to a pragma.
3059 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3061 * opt.ads: Minor editing.
3063 2011-08-29 Yannick Moy <moy@adacore.com>
3065 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
3066 that only made sense for CodePeer mode.
3068 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3070 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
3071 which is no longer used.
3072 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
3073 handling of the 64-bit division check.
3074 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
3076 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
3079 2011-08-29 Thomas Quinot <quinot@adacore.com>
3081 * get_scos.adb: Minor reformatting.
3083 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3085 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
3086 statement list is wrapped in a block, the block is explicitly analyzed
3087 in order to properly redecorate the entities and create a servicing
3090 2011-08-29 Tristan Gingold <gingold@adacore.com>
3092 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
3093 (Set_Zero_Cost_Handling): Remove.
3095 2011-08-29 Thomas Quinot <quinot@adacore.com>
3097 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
3099 2011-08-29 Geert Bosch <bosch@adacore.com>
3101 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
3102 instruction, as the latter may produce -0.0, which is not a valid VAX
3104 (Neg_G): Likewise for VAX F float.
3106 2011-08-29 Robert Dewar <dewar@adacore.com>
3108 * exp_util.adb: Minor reformatting.
3110 2011-08-29 Yannick Moy <moy@adacore.com>
3112 * sem_ch3.adb: Minor comment update.
3114 2011-08-29 Thomas Quinot <quinot@adacore.com>
3116 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
3119 2011-08-29 Thomas Quinot <quinot@adacore.com>
3121 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
3122 current statement sequence on a generic instantiation or a subprogram
3125 2011-08-29 Robert Dewar <dewar@adacore.com>
3127 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
3130 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3132 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3133 Correct the check which involves the freeze node of a controlled or
3134 access-to-controlled type.
3136 2011-08-29 Geert Bosch <bosch@adacore.com>
3138 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
3140 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
3143 2011-08-29 Yannick Moy <moy@adacore.com>
3145 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
3146 for every index type and component type that is not a subtype_mark.
3147 (Process_Subtype): Set Etype of subtype.
3149 2011-08-29 Robert Dewar <dewar@adacore.com>
3151 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
3152 reorganization. Minor reformatting.
3154 2011-08-29 Steve Baird <baird@adacore.com>
3156 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
3157 for CodePeer and ALFA modes.
3159 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3161 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
3162 that comes from an enclosing scope if it is not the renaming of an
3163 actual, to handle properly a spurious ambiguity in an instance.
3165 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
3167 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
3168 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
3169 use it instead of the Esize of the first parameter.
3170 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
3172 <Size>: Likewise. Call it for composite types on the RM size.
3174 2011-08-29 Yannick Moy <moy@adacore.com>
3176 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
3177 * sem_util.adb (Unique_Name): Correct behaviour for names of
3180 2011-08-29 Yannick Moy <moy@adacore.com>
3182 * sem_prag.adb (Check_Precondition_Postcondition): In formal
3183 verification mode, analyze pragma expression for correctness, for
3184 pre/post on library-level subprogram, as it is not expanded later.
3186 2011-08-29 Yannick Moy <moy@adacore.com>
3188 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
3189 in formal verification.
3191 2011-08-29 Thomas Quinot <quinot@adacore.com>
3193 * sem_util.adb: Minor reformatting.
3194 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
3196 * par_sco.ads, par_sco.adb: Update comments.
3198 2011-08-29 Yannick Moy <moy@adacore.com>
3200 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
3201 associated getter/setter.
3202 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
3204 2011-08-29 Vincent Celier <celier@adacore.com>
3206 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
3207 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
3208 with declarations for Language_Kind and Dependency_Kind for Ada.
3209 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
3210 (Process_Compiler): Take into account the new attributes Dependency_Kind
3212 (Check_Configuration): Check if language kind is unit based, not if the
3213 language name is Ada.
3214 (Process_Exceptions_Unit_Based): Ditto
3215 (Add_Language): Remove default additions of language and dependency kind
3216 * prj.ads: Minor comment change
3217 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
3219 2011-08-29 Johannes Kanig <kanig@adacore.com>
3221 * debug.adb: Update comments.
3223 2011-08-24 Joseph Myers <joseph@codesourcery.com>
3225 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
3226 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
3227 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
3228 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
3229 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
3231 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3233 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
3234 (GNATLIBCFLAGS_FOR_C): Replace
3235 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
3236 (gnatlib-shared-default, gnatlib-shared-dual-win32)
3237 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
3238 (gnatlib-sjlj, gnatlib-zcx): Likewise.
3240 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
3242 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
3244 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
3246 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
3248 2011-08-05 Nicolas Roche <roche@adacore.com>
3250 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
3251 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
3253 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
3255 2011-08-05 Matthew Heaney <heaney@adacore.com>
3257 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
3258 subprogram bodies declared out-of-order.
3260 2011-08-05 Yannick Moy <moy@adacore.com>
3262 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
3263 entities directly in package Standard, otherwise skip the standard
3266 2011-08-05 Robert Dewar <dewar@adacore.com>
3268 * a-cbmutr.adb: Minor reformatting
3269 (Allocate_Node): refactor node allocation algorithm
3271 2011-08-05 Robert Dewar <dewar@adacore.com>
3273 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
3274 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
3276 (Analyze_Pragma, case Check_Policy): Ditto.
3277 * sem_prag.ads (Check_Disabled): New function
3278 * snames.ads-tmpl: Add Name_Disable.
3280 2011-08-05 Robert Dewar <dewar@adacore.com>
3282 * gnat_rm.texi: Document implementation-defined policy DISABLE for
3283 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
3285 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3287 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
3288 that appears in a generic formal part and applies to a formal
3291 2011-08-05 Robert Dewar <dewar@adacore.com>
3293 * a-cbmutr.ads: Minor reformatting.
3295 2011-08-05 Matthew Heaney <heaney@adacore.com>
3297 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
3298 to check count, check sign of value instead.
3299 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
3300 (Copy_Subtree): allocate copy of source element
3301 (Equal_Subtree): compare elements, not access objects
3303 2011-08-05 Vincent Celier <celier@adacore.com>
3305 * gnat_ugn.texi: Fix VMS alternative.
3307 2011-08-05 Thomas Quinot <quinot@adacore.com>
3309 * sem_ch11.adb: Add comment.
3311 2011-08-05 Robert Dewar <dewar@adacore.com>
3313 * exp_util.adb: Minor comment fix.
3315 2011-08-05 Robert Dewar <dewar@adacore.com>
3317 * scng.adb (Error_Unterminated_String): Improve flag position when
3320 2011-08-05 Matthew Heaney <heaney@adacore.com>
3322 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3324 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3325 multiway tree containers.
3327 2011-08-05 Robert Dewar <dewar@adacore.com>
3329 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3330 * stylesw.adb: Implement -gnatyC to control comment spacing
3331 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3333 * usage.adb: Add line for -gnatyC.
3335 2011-08-05 Robert Dewar <dewar@adacore.com>
3337 * gnat_ugn.texi: Document -gnatyC.
3338 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3339 synonym for COMMENTS2).
3341 2011-08-05 Robert Dewar <dewar@adacore.com>
3343 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3344 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3345 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3346 a-comutr.ads, lib-xref.adb: Minor reformatting.
3348 2011-08-05 Robert Dewar <dewar@adacore.com>
3350 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3351 warning if there is an exception handler present.
3353 2011-08-05 Pascal Obry <obry@adacore.com>
3355 * a-iteint.ads: Fix copyright year.
3357 2011-08-05 Thomas Quinot <quinot@adacore.com>
3359 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3360 statement SCO for a USE clause or a representation clause.
3362 2011-08-05 Yannick Moy <moy@adacore.com>
3364 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3365 between body and spec for stub.
3366 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3367 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3368 pragma precondition or postcondition, for which the enclosing
3369 subprogram or package in the AST is not the desired one, return empty.
3371 2011-08-05 Thomas Quinot <quinot@adacore.com>
3373 * g-expect.adb: Minor reformatting.
3375 2011-08-05 Bob Duff <duff@adacore.com>
3377 * a-fihema.adb: Comment out OS_Lib.
3379 2011-08-05 Matthew Heaney <heaney@adacore.com>
3381 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3382 (unbounded multiway tree containers) and a-iteint.ads.
3383 * a-comutr.ads, a-comutr.adb:
3384 This is the new Ada 2012 unit for unbounded multiway tree containers
3385 * a-cimutr.ads, a-cimutr.adb
3386 This is the new Ada 2012 unit for indefinite multiway tree containers
3387 * a-iteint.ads: New file.
3389 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3391 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
3393 2011-08-05 Bob Duff <duff@adacore.com>
3395 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3397 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3399 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3401 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3402 general indexing aspects of Ada2012. Called when analyzing indexed
3403 components when other interpretations fail.
3404 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3405 in an expression context where overloading is meaningful. This excludes
3406 the occurrence in an aspect specification (efficiency only).
3407 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3408 related to iterators can be set by an attribute specification, but
3410 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3411 Constant_Indexing and Variable_Indexing.
3412 (Check_Indexing_Functions): New procedure to perform legality checks.
3413 Additional semantic checks at end of declarations.
3415 2011-08-05 Sergey Rybin <rybin@adacore.com>
3417 * tree_io.ads: Update ASIS_Version_Number because of the change of the
3418 order of calling Tree_Write/Tree_Read routines made for aspects.
3420 2011-08-05 Bob Duff <duff@adacore.com>
3422 * a-fihema.adb (Finalize): Fix race condition.
3424 2011-08-05 Yannick Moy <moy@adacore.com>
3426 * sem_ch12.adb (Analyze_Package_Instantiation,
3427 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3430 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3432 * sem_type.adb (Specific_Type): in an instance, the type-specific
3433 operand of an equality check that involves null may have a private
3434 type. Use full view to determine legality of construct.
3436 2011-08-05 Vincent Celier <celier@adacore.com>
3438 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3439 delete or close the file when the call to gnatmake was successful.
3441 2011-08-05 Yannick Moy <moy@adacore.com>
3443 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3444 Global_Discard_Names.
3446 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3448 * sinfo.ads: comments on use of entity field for aspect specifications.
3450 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3452 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3453 node is not itself an entity but a selected component, it is a
3454 rewritten parameterless call to an en enclosing synchronized operation,
3455 and this expansion will be performed again in the instance, so there is
3456 no global information to preserve.
3458 2011-08-05 Javier Miranda <miranda@adacore.com>
3460 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3461 for renamings of predefined primitives.
3462 (In_Predef_Prims_DT): New subprogram.
3464 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3466 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3467 possible interpretation of name is a reference type, add an
3468 interpretation that is the designated type of the reference
3469 discriminant of that type.
3470 * sem_res.adb (resolve): If the interpretation imposed by context is an
3471 implicit dereference, rewrite the node as the deference of the
3472 reference discriminant.
3473 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
3474 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
3475 parent type or base type.
3476 * sem_ch4.adb (Process_Indexed_Component,
3477 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
3478 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
3479 Check for implicit dereference.
3480 (List_Operand_Interps): Indicate when an implicit dereference is
3482 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
3484 2011-08-05 Thomas Quinot <quinot@adacore.com>
3486 * scos.ads: Update documentation of SCO table. Pragma statements can now
3487 be marked as disabled (using 'p' instead of 'P' as the statement kind).
3488 * par_sco.ads, par_sco.adb: Implement the above change.
3489 (Process_Decisions_Defer): Generate a P decision for the first parameter
3490 of a dyadic pragma Debug.
3491 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
3493 * put_scos.adb: Code simplification based on above change.
3495 2011-08-05 Robert Dewar <dewar@adacore.com>
3497 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
3498 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
3499 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
3500 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
3502 2011-08-05 Bob Duff <duff@adacore.com>
3504 * a-stunau.ads, g-spipat.adb: Update comments.
3506 2011-08-05 Bob Duff <duff@adacore.com>
3508 * a-fihema.ads: Minor comment fix.
3509 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
3511 (Attach, Detach): Remove some unnecessary code.
3512 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
3514 2011-08-05 Bob Duff <duff@adacore.com>
3516 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
3517 allocation for Objects component. This simplifies the code somewhat. It
3518 is also a little more efficient in the not-so-unusual case where there
3519 are no controlled objects allocated.
3520 Make Finalization_Started flag atomic.
3521 (Finalize): Avoid unnecessary detachment of items from the list.
3522 (pcol): Minor cleanup.
3524 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3526 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
3527 package whose name is the same as that of the generic unit, or its
3530 2011-08-05 Bob Duff <duff@adacore.com>
3532 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
3533 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
3534 Minor comment fixes.
3536 2011-08-05 Arnaud Charlet <charlet@adacore.com>
3538 * make.adb (Linking_Phase): No longer need to set source search path
3539 before calling gnatlink in CodePeer mode.
3540 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
3541 gcc in CodePeer mode, since the binder generated file no longer has a
3543 * switch.ads, switch.adb (Is_Language_Switch): Removed.
3544 * switch-c.adb: Update comment.
3546 2011-08-05 Thomas Quinot <quinot@adacore.com>
3548 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
3550 2011-08-05 Nicolas Roche <roche@adacore.com>
3552 * gnat_ugn.texi: Fix minor syntax error issue.
3554 2011-08-05 Vincent Celier <celier@adacore.com>
3556 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3557 delete or close the file when the call to gnatmake returns a non
3558 successful return code.
3560 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3562 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
3563 check, indicate that the copy of the original node does not come from
3564 source, to prevent an infinite recursion of the expansion.
3566 2011-08-05 Johannes Kanig <kanig@adacore.com>
3568 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
3569 VC generation for subprogram bodies.
3571 2011-08-05 Yannick Moy <moy@adacore.com>
3574 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
3575 the base type with the smallest allowed base type.
3577 2011-08-05 Sergey Rybin <rybin@adacore.com>
3579 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
3582 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3584 * sem_ch12.ads: minor comment updates.
3586 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3588 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
3589 instantiation and a formal package the compiler generates a package
3590 renaming declaration so that the generic name within the declaration
3591 is interpreted as a renaming of the instance. At the end of a formal
3592 package declaration, this renaming must become invisible.
3594 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3596 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
3597 comparison and rely on concrete entities instead.
3599 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3601 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
3602 and discriminants, to indicate that the type has an access discriminant
3603 that supports implicit dereference.
3604 * snames.ads-tmpl: Add names of aspects and attributes related to
3605 Ada2012 iterators: constant_indexing, default_iterator,
3606 iterator_element, implicit_dereference, variable_indexing.
3607 * aspects.ads, aspects.adb: entries for iterator-related aspects.
3608 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
3609 iterator-related aspects.
3610 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
3612 2011-08-05 Sergey Rybin <rybin@adacore.com>
3614 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
3615 metrics in gnatmetric to cover new kinds of coupling mentrics.
3617 2011-08-05 Steve Baird <baird@adacore.com>
3619 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
3620 of calling the user-defined main subprogram.
3621 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
3622 is set) Call_Main_Subprogram ahead of, as opposed to
3624 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
3625 generation of a "with" of the user-defined main subprogram.
3626 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
3627 (which is now called from Gen_Main instead).
3629 2011-08-05 Emmanuel Briot <briot@adacore.com>
3631 * projects.texi: Added reference to the Makefile package.
3633 2011-08-05 Thomas Quinot <quinot@adacore.com>
3635 * exp_ch7.adb: Minor comment rewording.
3637 2011-08-05 Ed Falis <falis@adacore.com>
3639 * env.c: Fix comment.
3641 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3643 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
3644 character comparison and rely on concrete entities instead.
3646 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3648 * sem_ch3.adb: (Check_Private_Overriding): better error message,
3649 suggested by AI95-0068.
3651 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3653 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
3654 the two potential initialization calls. This accounts for any
3655 access-before-elaboration checks which may precede the initialization
3657 (Next_Suitable_Statement): New routine. Returns the next real statement
3658 after the input node while skipping generated checks.
3659 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
3660 with comment on usage.
3661 Do not generate Elaborate_All when the trigger is a finalization call
3662 coming from a type init proc.
3663 (Check_Elab_Call): Propagate the initialization procedure context to
3664 subsequent calls to Check_A_Call.
3665 (Check_Internal_Call_Continue): Propagate the initialization procedure
3666 context to subsequent calls to Check_Elab_Call.
3667 (Is_Finalization_Procedure): New routine. Returns True if the input
3668 entity denotes a [Deep_]Finalize routine.
3669 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
3670 along with comment on usage.
3672 2011-08-05 Vadim Godunko <godunko@adacore.com>
3674 * s-atocou.ads: Add list of supported platforms.
3676 2011-08-05 Yannick Moy <moy@adacore.com>
3678 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
3680 * opt.ads (Disable_ALI_File): new Boolean flag
3681 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
3683 2011-08-05 Ed Falis <falis@adacore.com>
3685 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
3686 environ is properly defined.
3688 2011-08-05 Vincent Celier <celier@adacore.com>
3690 * make.adb (Compilation_Phase): Exit immediately when all objects have
3691 been found up to date, to avoid multiple exit messages.
3692 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
3693 same project for languages with no compiler.
3694 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
3696 2011-08-05 Robert Dewar <dewar@adacore.com>
3698 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
3699 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
3700 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
3701 s-atocou-builtin.adb: Minor reformatting.
3703 2011-08-05 Yannick Moy <moy@adacore.com>
3705 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
3706 if the node to wrap is a pragma check, this node and enclosed
3707 expression are not expanded, so do not apply any transformations here.
3708 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
3709 introducing transient scopes.
3711 2011-08-05 Jose Ruiz <ruiz@adacore.com>
3713 * adaint.c (__gnat_set_writable, __gnat_set_readable,
3714 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
3715 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
3716 routine is available, so we use the default implementation of these
3718 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
3719 support for copying attributes on VxWorks 6.
3721 2011-08-05 Yannick Moy <moy@adacore.com>
3723 * debug.adb: Remove use of -gnatd.D.
3724 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
3725 * opt.ads: Simplify variables for ALFA mode, to keep one only
3726 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
3729 2011-08-05 Vincent Celier <celier@adacore.com>
3731 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
3732 Builder'Default_Switches.
3734 2011-08-05 Vincent Celier <celier@adacore.com>
3736 * makeusg.adb: Add lines for --create-map-file switches.
3738 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3740 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
3741 profile is incomplete and the full view is available, replace it with
3743 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3744 incomplete, freezing the subprogram is delayed until the full view is
3746 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3747 fixed-point multiplication operator and the predefined operator is
3748 resolved in favor of the user-defined one.
3750 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3752 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3755 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3757 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3758 whether a type lacks user-defined Read or Write operations, or has a
3759 component that lacks them.
3760 * sem_attr.adb (Check_Stream_Attribute): if restriction
3761 No_Default_Stream_Attributes is active, verify that all subcomponent
3762 types of the target have user-defined stream operations, and report
3764 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3765 * exp_strm.adb: Build_Elementary_Input_Call,
3766 Build_Elementary_Write_Call): remove checks for restriction
3767 No_Default_Stream_Attributes, now checked in semantics.
3769 2011-08-04 Vincent Celier <celier@adacore.com>
3771 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3772 switches on the command line, look for all valid --RTS switches in the
3773 Builder switches and for each language use the first runtime name found
3774 to invoke gprconfig.
3775 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3776 command line and there is no auto-configuration.
3777 (Runtime_Name_Set_For): New function.
3779 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3781 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3782 elaborate initialization expression for variable Abort when processing
3783 a package body or a declaration.
3784 (Create_Finalizer): Propagate the package context when creating the
3785 exception-related variables.
3786 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3787 For_Package along with usage comment.
3789 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3791 * gcc-interface/Makefile.in: Clean up targets.
3792 Enable new package for atomic counters and copy-on-write implementation
3793 of unbounded strings on x86 platforms.
3794 * gcc-interface/Make-lang.in: Update dependencies.
3796 2011-08-04 Robert Dewar <dewar@adacore.com>
3798 * exp_ch7.adb: Minor reformatting.
3800 2011-08-04 Robert Dewar <dewar@adacore.com>
3802 * exp_strm.adb: Minor reformatting.
3804 2011-08-04 Vadim Godunko <godunko@adacore.com>
3806 * s-atocou.adb: Replace by dummy version and use on targets where atomic
3807 operations are not supported.
3808 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3809 * s-atocou-x86.adb: New file.
3810 * Makefile.rtl: Add s-atocou.o file
3812 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3814 * make.adb (Compile): Move setting of CodePeer_Mode to ...
3815 (Compilation_Phase): ... here.
3816 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3818 2011-08-04 Thomas Quinot <quinot@adacore.com>
3820 * Make-generated.in: Fix minor typo in comment.
3822 2011-08-04 Thomas Quinot <quinot@adacore.com>
3824 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3827 2011-08-04 Robert Dewar <dewar@adacore.com>
3829 * a-coinho.adb: Minor reformatting.
3831 2011-08-04 Robert Dewar <dewar@adacore.com>
3833 * a-coinho.ads: Minor reformatting.
3835 2011-08-04 Vadim Godunko <godunko@adacore.com>
3837 * s-atocou.ads, s-atocou.adb: New files.
3838 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3839 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3840 direct use of GCC's atomic builtins and replace them by use of new
3841 atomic counter package.
3843 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3845 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3847 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3849 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3850 with a call to Get_External_Tag.
3851 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3852 subprogram usage. Remove the guard against package declarations and
3853 bodies since Build_Cleanup_Statements is no longer invoked in that
3855 (Build_Components): Initialize Tagged_Type_Stmts when the context
3856 contains at least one library-level tagged type.
3857 (Build_Finalizer): New local variables Has_Tagged_Types and
3858 Tagged_Type_Stmts along with associated comments on usage. Update the
3859 logic to include tagged type processing.
3860 (Create_Finalizer): Insert all library-level tagged type unregistration
3861 code before the jump block circuitry.
3862 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3863 (Expand_N_Package_Declaration): Remove the call to
3864 Build_Cleanup_Statements.
3865 (Process_Tagged_Type_Declaration): New routine. Generate a call to
3866 unregister the external tag of a tagged type.
3867 (Processing_Actions): Reimplemented to handle tagged types.
3868 (Process_Declarations): Detect the declaration of a library-level
3869 tagged type and carry out the appropriate actions.
3870 (Unregister_Tagged_Types): Removed. The machinery has been directly
3871 merged with Build_Finalizer.
3873 2011-08-04 Robert Dewar <dewar@adacore.com>
3875 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3876 gnatls.adb, exp_ch3.adb: Minor reformatting.
3878 2011-08-04 Marc Sango <sango@adacore.com>
3880 * sem_attr.adb (Analyze_Attribute): Replace the message
3881 "invisible attribute of}" of the spark restriction violation in
3882 attribute reference by the simple message "invisible attribute of type".
3883 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3884 two insertion characters: '&' and '}'.
3886 2011-08-04 Vadim Godunko <godunko@adacore.com>
3888 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3889 * a-coinho.ads, a-coinho.adb: New file.
3890 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3892 2011-08-04 Nicolas Roche <roche@adacore.com>
3894 * alfa_test.adb: Not all ali files are containing alfa information even
3895 if compiled with -gnatd.F. So suppress warning about missing ALFA
3898 2011-08-04 Yannick Moy <moy@adacore.com>
3900 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3902 * put_alfa.adb: Check that scope name is not empty.
3904 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3906 * exp_ch3.adb (Stream_Operation_Ok): new predicate
3907 Needs_Elementary_Stream_Operation, to determine whether user-defined
3908 Read and Write attributes are available for the elementary components
3909 of the given type. If only the predefined attributes are available,
3910 then when restriction No_Default_Stream_Attributes is active the
3911 predefined stream attributes for the composite type cannot be created.
3913 2011-08-04 Robert Dewar <dewar@adacore.com>
3915 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3916 Put routines in alpha order
3918 2011-08-04 Jose Ruiz <ruiz@adacore.com>
3920 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3921 * gcc-interface/Make-lang.in: Update dependencies.
3923 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3925 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3926 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3929 2011-08-04 Robert Dewar <dewar@adacore.com>
3931 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3932 lib-xref-alfa.adb: Minor reformatting.
3934 2011-08-04 Marc Sango <sango@adacore.com>
3936 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3937 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3938 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3941 2011-08-04 Tristan Gingold <gingold@adacore.com>
3943 * bindgen.adb (Gen_Adainit_C): Remove.
3944 (Gen_Adafinal_C): Ditto.
3945 (Gen_Elab_Externals_C): Ditto.
3946 (Gen_Elab_Calls_C): Ditto.
3947 (Gen_Elab_Order_C): Ditto.
3948 (Gen_Elab_Defs_C): Ditto.
3949 (Gen_Finalize_Library_C): Ditto.
3950 (Gen_Finalize_Library_Defs_C): Ditto.
3951 (Gen_Main_C): Ditto.
3952 (Gen_Output_File_C): Ditto.
3953 (Gen_Restrictions_C): Ditto.
3954 (Gen_Versions_C): Ditto.
3955 (Write_Info_Ada_C): Ditto.
3956 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3957 (Gen_Output_File): Do not force Ada_Bind_File anymore.
3958 Always call Gen_Output_File_Ada.
3959 * gnatlink.adb (Begin_Info): Now a constant.
3961 (Ada_Bind_File): Remove
3962 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
3963 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3964 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3965 * opt.ads (Ada_Bind_File): Remove.
3967 2011-08-04 Thomas Quinot <quinot@adacore.com>
3969 * projects.texi: Document target-specific directory in default project
3972 2011-08-04 Thomas Quinot <quinot@adacore.com>
3974 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3977 2011-08-04 Yannick Moy <moy@adacore.com>
3979 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3980 opt.ads, lib-xref.ads: Code clean up.
3982 2011-08-04 Yannick Moy <moy@adacore.com>
3984 * gnat_rm.texi: Update description of Test_Case
3985 * gnat_ugn.texi: Typo.
3987 2011-08-04 Ed Falis <falis@adacore.com>
3989 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3991 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3993 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3994 it is of type Root_Controlled. This action eliminates fields Prev and
3995 Next from type equality.
3997 2011-08-04 Yannick Moy <moy@adacore.com>
3999 * lib-xref-alfa.adb: Correct typo.
4001 2011-08-04 Matthew Heaney <heaney@adacore.com>
4003 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
4006 2011-08-04 Yannick Moy <moy@adacore.com>
4008 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
4009 (Analyze_Pragma): allow static string expression for name of Test_Case,
4010 instead of simply string literals.
4011 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
4014 2011-08-04 Vincent Celier <celier@adacore.com>
4016 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
4017 case suffixes to find truncated main sources.
4019 2011-08-04 Tristan Gingold <gingold@adacore.com>
4021 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
4022 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
4023 (Compute_Current_Task): Ditto.
4025 2011-08-04 Tristan Gingold <gingold@adacore.com>
4027 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
4029 2011-08-04 Yannick Moy <moy@adacore.com>
4031 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
4032 library-level constant.
4033 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
4034 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
4035 used as selector of parameter association, in ALFA mode.
4037 2011-08-04 Robert Dewar <dewar@adacore.com>
4039 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
4040 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
4043 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4045 * make.adb (Linking_Phase): Set source search path before calling
4046 gnatlink in CodePeer mode.
4048 2011-08-04 Javier Miranda <miranda@adacore.com>
4050 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
4051 Remove code which takes care of building TSDs.
4052 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
4053 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
4054 the accessibility check in VM targets.
4055 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
4056 (Building_Static_DT): Now returns false for VM targets.
4057 (Build_VM_TSDs): Removed.
4058 (Expand_Interface_Conversion): Generate missing runtime check for
4059 conversions to interface types whose target type is unknown at compile
4061 (Make_VM_TSD): Add missing code to disable the generation of calls to
4062 Check_TSD if the tagged type is not defined at library level, or not
4063 has a representation clause specifying its external tag, or -gnatdQ is
4065 * exp_disp.ads (Build_VM_TSDs): Removed.
4066 (Make_VM_TSDs): Spec relocated from exp_disp.adb
4067 * sem_disp.adb (Check_Dispatching_Operation): No code required to
4068 register primitives in the dispatch tables in VM targets.
4069 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
4070 initialization of class-wide interface objects in VM targets.
4071 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
4074 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4076 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
4077 when dotnet-ld cannot be found.
4079 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4081 * bindgen.adb: Simplify significantly generation of binder body file in
4083 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
4084 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
4087 2011-08-04 Yannick Moy <moy@adacore.com>
4089 * sem_prag.adb, sem.ads: Code cleanup.
4091 2011-08-04 Tristan Gingold <gingold@adacore.com>
4093 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
4094 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
4095 results if possible.
4096 * s-stusta.adb (Print): Adjust after changes in s-stausa.
4097 * gnat_ugn.texi: Update dynamic stack usage section.
4099 2011-08-04 Steve Baird <baird@adacore.com>
4101 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
4102 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
4103 contains only a call to the user-defined main subprogram.
4104 (Gen_Main_Ada) - If CodePeer_Mode is set, then
4105 call the "wrapper" subprogram instead of directly
4106 calling the user-defined main subprogram.
4108 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4110 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
4111 alternatives of a case statement for controlled objects. Rename local
4112 variable A to Dead_Alt.
4113 (Expand_N_If_Statement): Check the then and else statements of an if
4114 statement for controlled objects. Check the then statements of all
4115 elsif parts of an if statement for controlled objects.
4116 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
4118 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
4119 detects a loop associated with the expansion of an array object.
4120 Augment the processing of the loop statements to account for a possible
4121 wrap done by Process_Statements_For_Controlled_Objects.
4122 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
4123 statements and abortable part of an asynchronous select for controlled
4125 (Expand_N_Conditional_Entry_Call): Check the else statements of a
4126 conditional entry call for controlled objects.
4127 (Expand_N_Selective_Accept): Check the alternatives of a selective
4128 accept for controlled objects.
4129 (Expand_N_Timed_Entry_Call): Check the entry call and delay
4130 alternatives of a timed entry call for controlled objects.
4131 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
4132 exception handler for controlled objects.
4133 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4134 Add formal parameter Nested_Constructs along with its associated
4136 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
4137 Requires_Cleanup_Actions.
4138 (Process_Statements_For_Controlled_Objects): New routine.
4139 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
4140 routine. Inspect a node which contains a non-handled sequence of
4141 statements for controlled objects. If such an object is found, the
4142 statements are wrapped in a block.
4144 2011-08-04 Bob Duff <duff@adacore.com>
4146 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
4147 need to compare with Class_Wide_Type (T2), in order to get at the
4148 original class-wide type node.
4149 * sem_type.ads (Covers): Improve the comment.
4150 * einfo.ads (Class_Wide_Type): Improve the comment.
4151 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
4152 the type of the Deref.
4154 2011-08-04 Yannick Moy <moy@adacore.com>
4156 * gnat_rm.texi: Document that Test_Case pragma can only appear on
4157 separate declarations.
4158 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
4159 check identifier of pragma argument.
4160 (Chain_TC): check that no other test case associated to the same entity
4161 share the same name.
4162 (Check_Test_Case): disallow test case inside subprogram body
4163 (Analyze_Pragma): correct call to check identifier and not argument
4164 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
4165 function gets name from test case pragma.
4167 2011-08-04 Yannick Moy <moy@adacore.com>
4169 * gnat_rm.texi: Document new pragma and aspect.
4170 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
4171 (No_Duplicates_Allowed): new constant array defining whether duplicates
4172 aspects of each kind can appear on the same declaration.
4173 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
4174 field, which points to a node holding the previous Spec_PPC_List.
4175 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
4176 through the indirection with Contract.
4177 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
4178 * par-prag.adb (Prag): do nothing on Test_Case pragma
4179 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
4181 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
4182 component Ensures of Test_Case.
4183 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
4184 (Analyze_Generic_Subprogram_Declaration,
4185 Analyze_Subprogram_Instantiation,
4186 Analyze_Abstract_Subprogram_Declaration,
4187 Analyze_Subprogram_Body_Helper,
4188 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
4189 insert contract in subprogram node at point of definition
4191 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
4192 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
4193 corresponding pragma
4194 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
4195 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
4196 similar to the analysis of pre/post
4197 (Derive_Subprogram): insert contract in subprogram node at point of
4199 * sem_prag.adb, sem_prag.ads
4200 (Check_Arg_Is_String_Literal, Check_Identifier):
4201 new checking procedures to be called in treatment of pragmas
4202 (Check_Test_Case): new procedure to check that a Test_Case aspect or
4203 pragma is well-formed. This does not check currently that 'Result is
4204 used only in the Ensures component of a Test_Case.
4205 (Analyze_Pragma): add case for Test_Case
4206 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
4207 components of a Test_Case.
4208 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
4209 expressions in the 3rd (and 4th if present) arguments of a Test_Case
4210 pragma, treated as spec expressions.
4211 (Sig_Flags): add value -1 for Test_Case.
4212 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
4213 Get_Requires_From_Test_Case_Pragma): getters for both expression
4214 components of a Test_Case.
4215 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
4216 indirection between an entry or [generic] subprogram entity and its
4217 pre/post + test-cases.
4218 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
4219 get/set for fields of an N_Contract node.
4220 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
4221 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
4222 names and pragma for Test_Case.
4223 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
4225 2011-08-04 Vincent Celier <celier@adacore.com>
4227 * gnat_ugn.texi: Improve documentation of gnatmake switch
4228 --source-info-file=.
4230 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4232 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
4233 type). Initialize Atyp to the appropriate type which is later checked
4234 for completion. Rewrite the assertion associated with private type
4237 2011-08-04 Ed Falis <falis@adacore.com>
4239 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
4240 initialize the number of CPUs.
4242 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4244 * sem_type.adb (Disambiguate): New subsidiary routine
4245 In_Same_Declaration_List, to implement AI05-0020: a user-defined
4246 equality on an anonymous access type whose designated type is private
4247 does not lead to an ambiguity with the universal access equality
4248 operator in the body or child units of the defining package. The same
4249 is true for a multiplication operator on a private type completed with
4252 2011-08-04 Javier Miranda <miranda@adacore.com>
4254 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
4255 (Normalize_Scalars_Config): Removed.
4257 (Register_Opt_Config_Switches): Remove registering config values of
4258 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
4259 (Restore_Opt_Config_Switches): Remove code which restores the values of
4260 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4261 Init_Or_Norm_Scalars.
4262 (Save_Opt_Config_Switches): Remove code which saves values of
4263 Init_Or_Norm_Scalars and Normalize_Scalars.
4264 (Set_Opt_Config_Switches): Remove code which restores config values of
4265 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4266 Init_Or_Norm_Scalars.
4268 2011-08-04 Yannick Moy <moy@adacore.com>
4270 * frontend.adb (Frontend): remove previous patch to avoid full
4271 qualification in ALFA mode.
4272 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
4273 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
4274 unique name for an entity, which could be used to identify the entity
4275 across compilation units.
4277 2011-08-04 Thomas Quinot <quinot@adacore.com>
4280 (Initialize_Default_Project_Path): Add target specific directory
4281 ($prefix/$target/lib/gnat) in front of project path in all cases
4282 (making gnatmake's behaviour consistent with gprbuild).
4283 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
4284 Pass target name from Sdefault to project subsystem.
4285 * gnatls.adb: Show new target specific default project directory.
4287 2011-08-04 Johannes Kanig <kanig@adacore.com>
4289 * cstand.adb: Add Information to Identifier in Standard
4290 (Identifer_For): Set Entity to the corresponding entity
4292 2011-08-04 Sergey Rybin <rybin@adacore.com>
4294 * gnat_ugn.texi: Update doc on gnatcheck.
4296 2011-08-04 Yannick Moy <moy@adacore.com>
4298 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
4301 2011-08-04 Yannick Moy <moy@adacore.com>
4303 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
4304 performing expansion.
4305 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
4306 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
4307 it is not called in ALFA mode.
4309 2011-08-04 Emmanuel Briot <briot@adacore.com>
4311 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4312 after all, so removed.
4314 2011-08-04 Sergey Rybin <rybin@adacore.com>
4316 * vms_data.ads: Add missing VMS qualifiers.
4318 2011-08-04 Emmanuel Briot <briot@adacore.com>
4320 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4321 the list of files on the command line after processing it through
4324 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4326 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4327 processing for .NET/JVM. These targets can now benefit from
4328 Raise_From_Controlled_Operation and they share the same processing with
4330 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4331 These targets need transient scopes in order to properly finalize short
4332 lived controlled objects.
4333 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4334 NET/JVM. These targets can now benefit from
4335 Raise_From_Controlled_Operation and they share the same processing with
4338 2011-08-04 Geert Bosch <bosch@adacore.com>
4340 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4342 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4344 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4345 Expand_Record_Aggregate, to determine whether aggregate must be
4346 expanded into assignments. This is the case if the ancestor part is
4347 private, regarless of the setting of the flag Has_Private_Ancestor.
4349 2011-08-04 Ed Falis <falis@adacore.com>
4351 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4353 2011-08-04 Bob Duff <duff@adacore.com>
4355 * sinfo.ads: Fix comment.
4357 2011-08-04 Steve Baird <baird@adacore.com>
4359 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4360 choose a package name in much the same way as is
4361 done for JGNAT when VM_Target /= No_VM, except that
4362 a slightly more distinctive prefix string is used.
4364 2011-08-04 Emmanuel Briot <briot@adacore.com>
4366 * makeutl.adb (Complete_Mains): no longer accept unit names on the
4367 gnatmake command line.
4368 This behavior was never documented (and was supported only because of
4369 an early bug in the code). This case might lead to ambiguous cases
4370 (between unit names and truncated base names without suffixes).
4372 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4374 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4375 Remove the external tag of a tagged type from the internal hash table.
4376 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4377 expanded usage of the routine. Strenghten the check for Is_Master. Add
4378 processing for tagged types.
4379 (Build_Finalizer): Create all the necessary lists used in finalizer
4380 creation when the processed context is a package that may contain
4382 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4383 Requires_Cleanup_Actions.
4384 (Expand_N_Package_Body): Package bodies may need clean up code
4385 depending on whether they contain tagged types.
4386 (Expand_N_Package_Declaration): Package declarations may need clean up
4387 code depending on whether they contain tagged types.
4388 (Unregister_Tagged_Types): New routine. Search through a list of
4389 declarations or statements, looking for non-abstract Ada tagged types.
4390 For each such type, generate code to unregister the external tag.
4391 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4392 Requires_Cleanup_Actions.
4393 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4394 through a list of declarations or statements looking for non-abstract
4395 Ada tagged types or controlled objects.
4396 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4397 Requires_Cleanup_Actions.
4398 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4399 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4402 2011-08-04 Vincent Celier <celier@adacore.com>
4404 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4405 has Ada sources, not project Project, because if the root project
4406 Project has no sources of its own, all projects will be deemed without
4409 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4411 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4412 of the No_Param_Proc acc-to-subp type used for initialization of
4413 __gnat_finalize_library_objects so that it's declared at library level
4414 rather than nested inside of the adainit routine.
4416 2011-08-04 Javier Miranda <miranda@adacore.com>
4418 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4419 if the tagged type has a representation clause which specifies its
4422 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4424 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4425 Remove previous procedure with that name.
4426 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4428 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4429 subtype mark, the ancestor cannot have unknown discriminants.
4430 (Resolve_Record_Aggregate): if the type has invisible components
4431 because of a private ancestor, the aggregate is illegal.
4433 2011-08-04 Vincent Celier <celier@adacore.com>
4435 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4436 account switches -gnat2005, -gnat12 and -gnat2012.
4438 2011-08-04 Bob Duff <duff@adacore.com>
4440 * s-tasdeb.ads: Minor comment fix.
4442 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4444 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4446 * switch.ads, switch.adb (Is_Language_Switch): New function.
4448 2011-08-04 Vincent Celier <celier@adacore.com>
4450 * switch-c.adb: Minor comment addition.
4452 2011-08-04 Vincent Celier <celier@adacore.com>
4454 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4455 ending with '=' is followed by a space (missing file name).
4457 2011-08-04 Pascal Obry <obry@adacore.com>
4459 * g-regist.ads: Fix size of HKEY on x86_64-windows.
4461 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4463 * sem_ch12.adb (Analyze_Associations): New routine
4464 Check_Overloaded_Formal_Subprogram to reject a formal package when
4465 there is a named association or a box initialisation for an overloaded
4466 formal subprogram of the corresponding generic.
4468 2011-08-04 Yannick Moy <moy@adacore.com>
4470 * alfa.ads (ALFA_Xref_Record): add component for type of entity
4471 * get_alfa.adb, put_alfa.adb: Read and write new component of
4473 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
4475 2011-08-04 Pascal Obry <obry@adacore.com>
4477 * urealp.adb: Minor reformatting.
4479 2011-08-04 Tristan Gingold <gingold@adacore.com>
4481 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
4482 Handle the case when Cleanup_Protected_Object returns Empty.
4484 2011-08-04 Yannick Moy <moy@adacore.com>
4486 * frontend.adb (Frontend): only qualify names in non-ALFA mode
4488 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4490 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
4491 call, ignore functions.
4493 2011-08-04 Geert Bosch <bosch@adacore.com>
4495 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
4498 2011-08-04 Emmanuel Briot <briot@adacore.com>
4500 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
4501 as an index for Builder'Switches. This conforms to the documentation.
4502 * make.adb (Insert_Project_Sources): avoid duplicate code
4504 2011-08-04 Emmanuel Briot <briot@adacore.com>
4506 * makeutl.adb (Complete_Mains): if the user has passed a relative file
4507 name on the command line (for instance "../dummy"), never assume it can
4510 2011-08-04 Tristan Gingold <gingold@adacore.com>
4512 * bindgen.adb: Remove code the reference or create the
4513 Break_Start/__gnat_break_start procedure.
4514 * s-stalib.adb (Break_Start): Removed.
4516 2011-08-04 Emmanuel Briot <briot@adacore.com>
4518 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
4519 shared with gprbuild.
4521 2011-08-04 Yannick Moy <moy@adacore.com>
4523 * par-ch4.adb (P_Primary): preferentially issue an error message about
4524 a missing parenthesis arount a conditional or case expression in Ada
4525 2012 mode, if we detect that the alignment is not correct for a
4528 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4530 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
4531 tag-to-class-wide conversion as needing finalization actions.
4532 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
4533 a tag-to-class-wide conversion as needing finalization actions.
4534 (Is_Finalizable_Transient): The result of a tag-to-class-wide
4535 conversion does not need finalization actions.
4536 (Is_Tag_To_CW_Conversion): New routine.
4537 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
4538 whether an object is the result of a tag-to-class-wide conversion.
4540 2011-08-04 Yannick Moy <moy@adacore.com>
4542 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
4543 the left-hand-side and right-hand-side of a conjunct are inserted when
4544 translating a pre- or postcondition
4545 * sem_ch6.adb: Correct typo in comment
4547 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4549 * gnat_rm.texi: Ravenscar does not prohibit dependence on
4550 Unchecked_Conversion and Unchecked_Deallocation.
4552 2011-08-04 Thomas Quinot <quinot@adacore.com>
4554 * make.adb: Minor reformatting.
4556 2011-08-04 Emmanuel Briot <briot@adacore.com>
4558 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
4559 sources in the project and its imported projects, but not in the whole
4562 2011-08-04 Emmanuel Briot <briot@adacore.com>
4564 * make.adb: Remove debug trace.
4566 2011-08-04 Vincent Celier <celier@adacore.com>
4568 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
4569 path in canonical form, to be able to compare path names on platforms
4570 such as Windows or Darwin.
4572 2011-08-04 Thomas Quinot <quinot@adacore.com>
4574 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
4575 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
4576 * scos.ads: Update documentation accordingly.
4577 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
4580 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4582 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
4583 attribute only if prefix type is scalar.
4585 2011-08-04 Emmanuel Briot <briot@adacore.com>
4587 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
4588 in gnatmake for specifying mains on the command line that do not belong
4589 to the main project. These mains must currently all belong to the same
4591 (Ultimate_Extension_Of): removed, since duplicated
4592 Ultimate_Extending_Project.
4594 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4596 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
4598 (CodePeer_Mode_String): New.
4599 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
4601 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
4602 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
4603 mode, since no useful elaboration subprogram is needed by CodePeer.
4604 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
4605 In this mode, compile binder file with -gnatC and do stop after this
4608 2011-08-04 Vincent Celier <celier@adacore.com>
4610 * exp_ch7.adb: Minor comment fix.
4612 2011-08-04 Robert Dewar <dewar@adacore.com>
4614 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
4615 exp_ch4.adb, makeutl.adb: Minor reformatting.
4617 2011-08-04 Emmanuel Briot <briot@adacore.com>
4619 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4620 Create several new subprograms to move code out of Make. This makes the
4621 code more readable, removes code duplication, and is a preparation work
4622 for adding support for aggregate projects.
4624 2011-08-04 Tristan Gingold <gingold@adacore.com>
4626 * s-po32gl.ads, s-po32gl.adb: New files.
4627 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
4628 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
4629 (Build_Finalization_Collection): Use it.
4630 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
4631 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
4633 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
4634 * gcc-interface/Make-lang.in: Update dependencies.
4636 2011-08-04 Emmanuel Briot <briot@adacore.com>
4638 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
4641 2011-08-04 Emmanuel Briot <briot@adacore.com>
4643 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
4644 command line is not a file name, also check whether it could be a unit
4647 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4649 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4650 the header of the finalization routine.
4651 If the unit has no finalizer but is a body whose spec has one, then
4652 generate the decrement of the elaboration entity only.
4653 If the unit has a finalizer and is a spec, then do not generate the
4654 decrement of the elaboration entity.
4655 (Gen_Finalize_Library_C): Likewise.
4657 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4659 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
4660 (Bounds_Size_Expression): Removed.
4661 (Double_Alignment_Of): New subsidiary routine.
4662 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
4663 for a hole in the dope vector of unconstrained arrays due to different
4664 index and element alignments.
4666 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4668 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
4669 raise program_error because body has not been seen yet.
4671 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4673 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
4676 2011-08-04 Vincent Celier <celier@adacore.com>
4678 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
4680 2011-08-04 Yannick Moy <moy@adacore.com>
4682 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
4683 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
4685 2011-08-04 Thomas Quinot <quinot@adacore.com>
4687 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
4688 instantiation in RCI.
4690 2011-08-04 Emmanuel Briot <briot@adacore.com>
4692 * make.adb: Share more code with gprbuild
4694 2011-08-04 Emmanuel Briot <briot@adacore.com>
4696 * projects.texi: Added documentation for the IDE'Gnat project file
4699 2011-08-04 Nicolas Roche <roche@adacore.com>
4701 * gnat_rm.texi: Minor editing.
4703 2011-08-04 Javier Miranda <miranda@adacore.com>
4705 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
4706 and the library case for VM targets.
4707 (Gen_Adainit_Ada): Likewise.
4709 2011-08-04 Robert Dewar <dewar@adacore.com>
4711 * g-altive.ads: Minor comment updates.
4712 * prj-nmsc.adb: Minor reformatting.
4714 2011-08-04 Javier Miranda <miranda@adacore.com>
4717 (Normalize_Scalars_Config): Value of the configuration switch set by
4718 pragma Normalize_Scalars when it appears in the gnat.adc file.
4719 (Normalize_Scalars): New field for record Config_Switches_Type. Used
4720 to save and restore settings of this pragma.
4722 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
4723 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
4725 2011-08-04 Vincent Celier <celier@adacore.com>
4727 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
4729 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4731 * makeutl.adb: Minor reformatting.
4733 2011-08-04 Olivier Hainque <hainque@adacore.com>
4735 * g-altive.ads: Update comments to reflect that only the soft
4736 binding is available today.
4738 2011-08-04 Robert Dewar <dewar@adacore.com>
4740 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
4741 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4742 * gcc-interface/Make-lang.in: Update dependencies.
4744 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4746 * prj-env.adb: Remove local debug traces.
4748 2011-08-04 Yannick Moy <moy@adacore.com>
4750 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4751 was used instead of Hi_OK, which could cause a read of an uninitialized
4752 value later on. Detected while working on the new warning.
4753 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4755 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4756 in more cases, in order to detect more unreferenced values.
4757 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4758 object for expression, if any.
4760 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4762 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4763 the operand types instead of the Esize.
4765 2011-08-04 Steve Baird <baird@adacore.com>
4767 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4768 enable CodePeer_Mode.
4769 * bindusg.adb (Display): Add help message describing -P binder switch.
4770 * gnat_ugn.texi: Document -P binder switch.
4771 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4772 user-defined main program directly.
4773 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4774 user-defined main program in the context clause of the package body.
4776 2011-08-04 Yannick Moy <moy@adacore.com>
4778 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4779 duplicate of Defining_Entity
4780 (Get_Unique_Entity_For_Decl): rename function into
4781 Unique_Defining_Entity
4782 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4783 (Formal_Proof_On): remove synthesized flag
4784 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4785 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4786 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4787 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4788 Annotate (Formal_Proof)
4790 2011-08-04 Emmanuel Briot <briot@adacore.com>
4792 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4793 source files with non-standard naming schemes, in imported projects
4795 2011-08-04 Emmanuel Briot <briot@adacore.com>
4797 * makeutl.adb (Complete_Mains): when a multi-unit source file is
4798 specified on the gprbuild command line, we need to compile all units
4799 within that file, not just the first one we find
4800 Fix error message for mains that are not found.
4802 2011-08-04 Thomas Quinot <quinot@adacore.com>
4804 * sem_ch6.adb: Update comment.
4805 * sem_ch12.adb: Minor reformatting.
4807 2011-08-04 Bob Duff <duff@adacore.com>
4809 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4810 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4811 race condition whose symptom is to fail to lock Parent. That, in turn,
4812 causes Parent.Awake_Count to be accessed without locking Parent, which
4813 causes another race condition whose symptom is that Parent.Awake_Count
4814 can be off by 1 (either too high or too low). The solution is to lock
4815 Parent unconditionally, and then lock Acceptor, before reading
4816 Acceptor.Terminate_Alternative.
4818 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4820 * debug.adb: Update comment.
4822 2011-08-04 Robert Dewar <dewar@adacore.com>
4824 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4825 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4826 exp_ch6.adb: Minor reformatting.
4828 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4830 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4833 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4835 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4837 2011-08-04 Thomas Quinot <quinot@adacore.com>
4839 * sinfo.ads: Minor reformatting.
4841 2011-08-04 Emmanuel Briot <briot@adacore.com>
4843 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4844 even if there is no location.
4846 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4848 * sem_res.adb, sem_ch4.adb: move check for restriction
4849 No_Task_Hierarchy to resolve_allocator.
4851 2011-08-04 Thomas Quinot <quinot@adacore.com>
4853 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4854 This flag of N_Pragma nodes is not used, remove it as well as all of
4855 the associated circuitry.
4857 2011-08-04 Javier Miranda <miranda@adacore.com>
4859 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4860 runtime check on duplicated externa tags
4861 * debug.adb Document switch -gnatdQ.
4863 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4865 * a-fihema.ads: Minor typo fix.
4867 2011-08-04 Yannick Moy <moy@adacore.com>
4869 * sem_ch10.adb: Minor comment update.
4871 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4873 * einfo.adb: Update the node field usage to reflect the renaming of
4874 Return_Flag to Return_ Flag_Or_Transient_Decl.
4875 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4876 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4877 (Write_Field15_Name): Change Return_Flag to
4878 Return_Flag_Or_Transient_Decl.
4879 * einfo.ads: Rename node field Return_Flag to
4880 Return_Flag_Or_Transient_Decl. Update the associated comment and all
4881 occurrences in entities.
4882 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4883 associated Inline pragma.
4884 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4885 associated Inline pragma.
4886 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4888 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4889 Return_Flag and Set_Return_Flag.
4890 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4891 objects generated for controlled transients declared inside an
4892 Exception_With_Actions. Update the calls to Return_Flag.
4893 (Process_Object_Declaration): Add code to add a null guard for hook
4894 objects generated for controlled transients declared inside an
4895 Exception_With_Actions. Update related comment.
4896 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4897 objects generated for controlled transients declared inside an
4898 Exception_With_Actions. Update the calls to Return_Flag.
4899 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4901 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4903 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4904 positional aggregate.
4906 2011-08-04 Vincent Celier <celier@adacore.com>
4908 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4909 SLOC only for pragmas.
4911 2011-08-04 Emmanuel Briot <briot@adacore.com>
4913 * projects.texi: Minor typo fix.
4915 2011-08-04 Emmanuel Briot <briot@adacore.com>
4917 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4918 on case-sensitive file systems.
4920 2011-08-04 Thomas Quinot <quinot@adacore.com>
4922 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4923 nested in a disabled pragma.
4924 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4925 enclosing pragma, if any, for X decisions.
4927 2011-08-04 Thomas Quinot <quinot@adacore.com>
4929 * sem_prag.adb: Minor reformatting.
4931 2011-08-04 Vincent Celier <celier@adacore.com>
4933 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4934 allowed in no run time mode.
4936 2011-08-04 Vincent Celier <celier@adacore.com>
4938 * make.adb (Check): When -gnatc is used, check for the source file
4939 inside the ALI file with a canonical case file name.
4941 2011-08-04 Emmanuel Briot <briot@adacore.com>
4943 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4944 overriding the separator.
4946 2011-08-04 Robert Dewar <dewar@adacore.com>
4948 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4949 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4951 2011-08-04 Robert Dewar <dewar@adacore.com>
4953 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4955 2011-08-04 Yannick Moy <moy@adacore.com>
4957 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4958 'Result only appears in postcondition of function.
4960 2011-08-04 Thomas Quinot <quinot@adacore.com>
4962 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4963 external tag, include the value of the external tag in the exception
4966 2011-08-04 Yannick Moy <moy@adacore.com>
4968 * sem_attr.adb (Result): modify error message for misplaced 'Result
4970 2011-08-04 Sergey Rybin <rybin@adacore.com>
4972 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4973 clear that the second argument must be an identifier.
4975 2011-08-04 Thomas Quinot <quinot@adacore.com>
4977 * exp_ch9.adb (Build_Barrier_Function): When compiling with
4978 -fpreserve-control-flow, insert an IF statement on the barrier
4979 condition to ensure that a conditional branch instruction is generated.
4981 2011-08-04 Emmanuel Briot <briot@adacore.com>
4983 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4984 (Processing_Flags.Ignore_Missing_With): new flag.
4986 2011-08-04 Emmanuel Briot <briot@adacore.com>
4988 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4989 Source_List_File on case-insensitive systems where the file is actually
4990 on a case-sensitive file system (NFS,...).
4992 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4994 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4995 function return contains a controlled [extension] aggregate and the
4996 return statement is not part of a handled sequence of statements, wrap
4997 the return in a block. This ensures that all controlled temporaries
4998 generated during aggregate resolution will be picked up by the
4999 finalization machinery.
5001 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5003 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
5004 components, freeze type before resolution, to ensure that default
5005 initializations are present for all components.
5006 * sem_res.adb (Resolve_Actuals): the designated object of an
5007 accces-to-constant type is a legal actual in a call to an
5008 initialization procedure.
5010 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5012 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
5013 N_Unchecked_Type_Conversion to the possible containers of a renamed
5016 2011-08-04 Yannick Moy <moy@adacore.com>
5018 * par-ch13.adb (Aspect_Specifications_Present): recognize
5019 "with Identifier'Class =>" as an aspect, so that a meaningful warning
5020 is issued in Strict mode.
5021 * par.adb: Fix typos in comments.
5023 2011-08-04 Yannick Moy <moy@adacore.com>
5025 * sem_attr.adb (Result): modify error message to take into account Post
5026 aspect when compiling Ada 2012 (or newer) code.
5028 2011-08-04 Nicolas Roche <roche@adacore.com>
5030 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
5031 remove need for GCC exceptions.
5033 2011-08-04 Vincent Celier <celier@adacore.com>
5035 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
5036 project, not the source file name.
5037 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
5038 excluded, continue looking. This excluded source will only be returned
5039 if there is no other source with the same base name that is not locally
5042 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5044 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
5045 private and one of the operands is a real literal, use a qualified
5046 expression rather than a conversion which is not meaningful to the
5049 2011-08-04 Yannick Moy <moy@adacore.com>
5051 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
5052 corresponding aspect X'Class are allowed, proceed with analysis of the
5053 aspect instead of skipping it.
5055 2011-08-04 Tristan Gingold <gingold@adacore.com>
5057 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
5058 This will allow to have an Ada implementation for the subprogram.
5060 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5062 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
5063 completion and aspects are present, apply them to the entity for the
5064 type which is currently the partial view, but which is the one that
5066 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
5067 applies to a partial view, indicate that the full view has predicates
5068 and delayed aspects.
5069 (Replace_Type_Reference): Handle properly predicates that apply to the
5070 full view of a private completion.
5072 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5074 * layout.adb (Layout_Type): For composite types, do not set Esize.
5075 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
5077 (Size_Known): Look at the RM size of components instead of the Esize.
5078 (Freeze_Record_Type): Look at the RM size instead of the Esize to
5079 issue warning and activate Implicit_Packing.
5080 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
5081 if the Esize is not known.
5082 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
5083 for elementary types only.
5084 (Analyze_Record_Representation_Clause): Look at the RM size instead
5085 of the Esize to issue errors.
5086 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
5088 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
5090 Look at the RM size instead of the Esize for types if the latter is
5092 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
5094 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5096 * sem_type.adb: proper handling of equality not involving anonymous
5099 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5101 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
5102 Vis_Decls. When creating a library-level finalizer for a package spec,
5103 both the declaration and body of the finalizer are inserted either in
5104 the visible or private declarations of the package spec.
5106 2011-08-04 Javier Miranda <miranda@adacore.com>
5108 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
5109 use of the full-view of a type when invoking Is_Ancestor.
5110 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
5111 the full-view of private parents is requested, then use also the
5112 full-view of the parent of the first derivation.
5114 2011-08-04 Tristan Gingold <gingold@adacore.com>
5116 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
5117 instead of the locally imported procedure.
5118 * s-taprop-mingw.adb (Enter_Task): Ditto.
5119 * s-valrea.adb (Scan_Real): Ditto.
5120 * s-imgrea.adb (Set_Image_Real): Ditto.
5121 * s-flocon.ads: Make the package pure.
5123 2011-08-04 Thomas Quinot <quinot@adacore.com>
5125 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
5126 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
5127 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
5128 New subprogram, moved here from...
5129 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
5130 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
5131 rewriting of the last argument into a procedure call statement here...
5132 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
5135 2011-08-04 Thomas Quinot <quinot@adacore.com>
5137 * par_sco.adb: Minor reformatting.
5139 2011-08-04 Robert Dewar <dewar@adacore.com>
5141 * erroutc.adb: Minor reformatting.
5143 2011-08-04 Thomas Quinot <quinot@adacore.com>
5145 * par_sco.adb: Comment update.
5147 2011-08-04 Tristan Gingold <gingold@adacore.com>
5149 * s-flocon.ads: New file.
5150 * g-flocon.ads: Now a renaming of s-flocon.
5151 * Makefile.rtl: Add s-flocon.o
5153 2011-08-04 Javier Miranda <miranda@adacore.com>
5155 * exp_strm.adb (Build_Array_Input_Function): if the array type is
5156 constrained, do not attempt to build a subtype of it.
5158 2011-08-04 Yannick Moy <moy@adacore.com>
5160 * errout.ads Change comments: remove 'R'M as an example where quotes
5161 are needed; add ALFA as another case where quotes are not needed
5162 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
5163 case where quotes are not needed.
5164 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
5165 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
5166 Remove all occurrences of 'A'L'F'A
5168 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5170 * sem_ch13.adb: check legality of invariant pragma.
5172 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5174 * bindgen.adb: Add comments.
5176 2011-08-04 Yannick Moy <moy@adacore.com>
5178 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
5180 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
5181 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
5183 2011-08-04 Robert Dewar <dewar@adacore.com>
5185 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
5186 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
5187 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
5189 2011-08-04 Thomas Quinot <quinot@adacore.com>
5191 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
5193 2011-08-04 Thomas Quinot <quinot@adacore.com>
5196 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
5199 2011-08-04 Robert Dewar <dewar@adacore.com>
5201 * einfo.ads, exp_ch4.adb: Minor reformatting.
5203 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5205 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
5207 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5209 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
5210 type in all cases to compute list of primitive operations, because full
5211 view may be an itype that is not attached to the list of declarations.
5213 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5215 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
5216 library has already been finalized.
5217 (Gen_Adafinal_C): Likewise.
5218 (Gen_Adainit_Ada): Generate an early return if the library has
5219 already been elaborated.
5220 (Gen_Adainit_C): Likewise.
5221 (Gen_Output_File_Ada): Generate an elaboration flag.
5222 (Gen_Output_File_C): Likewise.
5224 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5226 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
5227 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
5228 built in the first place.
5229 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
5230 for CodePeer because Finalize_Address was not built to begin with.
5231 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
5233 2011-08-04 Pascal Obry <obry@adacore.com>
5235 * adaint.c (__gnat_tmp_name): Use current process id to create temp
5236 filenames, this ensures unicity of filenames across processes.
5238 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5240 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
5241 Raise_Controlled to Raise_From_Controlled_Operation. Update the
5242 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
5243 Add False as the actual to From_Abort in the generated call to
5244 Raise_From_Controlled_Operation.
5246 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5248 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
5249 so that the ali file name can be retrieved from outside of this package.
5250 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
5251 doing nothing in the general case, but used to update the object file
5252 timestamp if directly generated by the backend.
5253 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
5254 to a later time than the ali file one.
5256 2011-08-04 Yannick Moy <moy@adacore.com>
5258 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
5259 entities whose body contains an Annotate pragma which forces formal
5261 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5262 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
5263 Mark_Non_ALFA_Subprogram to pass in a message and node.
5264 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
5265 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
5266 surrounding subprogram.
5267 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
5268 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
5269 as not in ALFA is annotated with Formal_Proof being On, then an error
5270 is issued based on the additional parameters for message and node.
5271 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
5272 * gcc-interface/Make-lang.in: Update dependencies.
5274 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5276 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
5277 Finalize_Address when CodePeer is enabled.
5279 2011-08-04 Pascal Obry <obry@adacore.com>
5281 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
5282 the latter returns a pointer to a static buffer which is deallocated
5283 at the end of the routine.
5285 2011-08-04 Yannick Moy <moy@adacore.com>
5287 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
5288 after index creation; mark unconstrained base array type generated as
5289 being in/not in ALFA as well
5290 (Make_Index): mark subtype created as in/not in ALFA
5291 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
5292 over a loop as in/not in ALFA, depending on its type and form of loop
5295 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5297 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
5298 directly to False on .NET and JVM.
5300 2011-08-04 Yannick Moy <moy@adacore.com>
5302 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
5303 constraint that subtype must come from source code to be in ALFA, so
5304 that anonymous subtypes can be in ALFA too.
5306 2011-08-04 Yannick Moy <moy@adacore.com>
5308 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5309 reference for ALFA mode.
5310 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5311 procedure public so as to use it from formal verification back-end.
5313 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5315 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5316 invalid checks of the Parameter, making Remove_Switch not working
5319 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5321 * targparm.ads: Update header: no run-time exception is needed on this
5324 2011-08-04 Vincent Celier <celier@adacore.com>
5326 * a-fihema.adb: Use System.IO instead of GNAT.IO
5328 2011-08-04 Thomas Quinot <quinot@adacore.com>
5330 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5331 are forbidden in Compiler_Unit mode.
5333 2011-08-04 Robert Dewar <dewar@adacore.com>
5335 * sem_util.adb: Minor reformatting.
5337 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5339 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5340 library-level finalizers.
5341 (Gen_Finalize_Library_C): Update the import string for library-level
5343 (Gen_Finalize_Library_Defs_C): Update the definition name of a
5344 library-level finalizer.
5345 * exp_ch7.adb: Remove with and use clauses for Stringt.
5346 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5347 Spec_Decl. Add local variable Body_Id. The names of library-level
5348 finalizers are now manually fully qualified and are no longer external.
5349 A single name is now capable of servicing .NET, JVM and non-VM targets.
5350 Pragma Export is no longer required to provide visibility for the name.
5351 (Create_Finalizer_String): Removed.
5352 (New_Finalizer_Name): New routine which mimics New_..._Name.
5354 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5356 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5357 elaboration counter to Standard_Short_Integer.
5358 * sem_util.adb (Build_Elaboration_Entity): Likewise.
5359 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5360 (Gen_Elab_Externals_C): Likewise.
5362 2011-08-04 Ed Falis <falis@adacore.com>
5364 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5365 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5366 system-vxworks-mips.ads, system-vxworks-x86.ads
5367 (Always_Compatible_Rep): set to False for all VxWorks targets.
5369 2011-08-04 Robert Dewar <dewar@adacore.com>
5371 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5372 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5373 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5374 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5375 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5376 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5377 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5378 Minor reformatting and code reorganization.
5380 2011-08-04 Emmanuel Briot <briot@adacore.com>
5382 * projects.texi: Added doc for aggregate projects.
5384 2011-08-04 Emmanuel Briot <briot@adacore.com>
5386 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5387 Add support for overriding the Project_Path in aggregate projects.
5389 2011-08-04 Robert Dewar <dewar@adacore.com>
5391 * a-cofove.ads: Minor reformatting.
5393 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5395 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5396 on the generated code.
5397 (Build_Finalize_Statements): Update the comment on the generated code.
5398 (Build_Initialize_Statements): Update the comment on the generated code.
5399 (Build_Object_Declarations): Add local variable Result. The object
5400 declarations are now built in sequence.
5401 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5404 2011-08-04 Robert Dewar <dewar@adacore.com>
5406 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5408 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5410 * einfo.ads (Elaboration_Entity): Document new definition and use.
5411 (Elaboration_Entity_Required): Adjust to above change.
5412 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5413 * exp_ch12.adb: And with and use for Snames.
5414 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5415 * exp_util.adb (Set_Elaboration_Flag): Likewise.
5416 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5417 <Check_Unit_Name>: Deal with N_Expanded_Name.
5418 <Attribute_Elaborated>: Extend to all unit names.
5419 * sem_elab.adb: And with and use for Uintp.
5420 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5421 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5422 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5423 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5424 from Gen_Adainit_Ada.
5425 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5426 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
5427 case, do not call System.Standard_Library.Adafinal; instead call
5428 finalize_library if needed.
5429 (Gen_Adafinal_C): Likewise.
5430 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5431 non-main program case.
5432 (Gen_Adainit_C): Generate a couple of external declarations here.
5433 In the main program case, set SSL.Finalize_Library_Objects.
5434 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5435 (Gen_Elab_Calls_C): Likewise.
5436 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
5437 (Gen_Finalize_Library_C): Likewise. Generate a full function.
5438 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5440 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5441 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
5443 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5444 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
5445 of external declarations. Call Gen_Finalize_Library_C.
5447 2011-08-04 Emmanuel Briot <briot@adacore.com>
5449 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5450 Compute_Compilation_Phases): new subprogram.
5451 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5452 The number of mains as well as the various compilation phases that
5453 need to be run are now project tree specific, since various
5454 aggregated trees might have different requirements. In particular,
5455 they do not all require bind or link phases.
5457 2011-08-04 Emmanuel Briot <briot@adacore.com>
5459 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5460 (Project_Tree_Appdata): New type.
5461 It is now possible to associate application-specific data to a project
5462 tree. In particular, this is used in the gprbuild builder to avoid a
5463 number of global tables and htables, especially now that there can be
5464 several project trees loaded at once because of aggregate projects.
5465 (Debug_Name): new procedure.
5466 * projects.texi: Clarify syntax of "**" for Source_Dirs
5468 2011-08-03 Emmanuel Briot <briot@adacore.com>
5470 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5471 the "roots" for a main.
5472 (Fill_From_Project): add support for aggregate projects. Main units
5473 in aggregated projects are now automatically added in the list of
5474 files to build (although this fails later on in gprbuild, because
5475 these files are not using the root proejct tree, so this needs
5477 * gcc-interface/Make-lang.in: Update dependencies.
5479 2011-08-03 Yannick Moy <moy@adacore.com>
5481 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
5482 conditional expression in ALFA.
5483 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
5484 expressions as not in ALFA.
5486 2011-08-03 Robert Dewar <dewar@adacore.com>
5488 * a-cofove.adb: Minor reformatting.
5490 2011-08-03 Emmanuel Briot <briot@adacore.com>
5492 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
5493 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
5495 These packages are more logically placed in the Queue package, since
5496 they manipulate the queue. It is also likely that they can be adapted
5497 for gnatmake, thus sharing more code.
5498 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
5499 that we could move the above.
5501 2011-08-03 Emmanuel Briot <briot@adacore.com>
5503 * errutil.adb (Finalize): clean up the list of error messages on exit.
5504 Calling this subprogram multiple times will no longer show duplicate
5505 error messages on stderr.
5507 2011-08-03 Emmanuel Briot <briot@adacore.com>
5509 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
5510 Getopt_Switches when we have already define a command line
5513 2011-08-03 Yannick Moy <moy@adacore.com>
5515 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
5516 in ALFA. Instead, they are considered as assertions to prove.
5517 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
5518 nodes as not in ALFA. Instead, include conditional expressions in ALFA
5519 if they have no ELSE part, or if they occur in pre- and postconditions,
5520 where the Condition cannot have side-effects in ALFA
5521 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
5522 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
5523 Instead, include type conversion between scalar types in ALFA.
5524 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
5525 if-and-only-if its type is in ALFA.
5527 2011-08-03 Thomas Quinot <quinot@adacore.com>
5529 * scos.adb, get_scos.adb, put_scos.adb
5530 New code letter for decisions: G (entry guard)
5532 (Traverse_Subprogram_Body): Rename to...
5533 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
5534 (Traverse_Protected_Body): New subprogram
5535 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
5536 protected bodies and entry bodies.
5538 2011-08-03 Yannick Moy <moy@adacore.com>
5540 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
5541 entities with get/set subprograms, which is set on procedure entities
5542 generated by the compiler for a postcondition.
5543 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
5544 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
5545 entity for a declaration
5546 (Get_Unique_Entity_For_Decl): new function returning an entity which
5547 represents a declaration, so that matching spec and body have the same
5550 2011-08-03 Robert Dewar <dewar@adacore.com>
5552 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
5553 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
5555 2011-08-03 Yannick Moy <moy@adacore.com>
5557 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
5558 library-level because retriction No_Implicit_Dynamic_Code in the
5559 front-end prevents its definition as a local subprogram
5560 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
5561 for reuse in other contexts
5562 (Traverse_Declarations_Or_Statements,
5563 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5564 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
5565 procedures take a callback parameter to be called on all declarations
5567 (Traverse_All_Compilation_Units): new generic function to traverse a
5568 compilation unit and call a callback parameter on all declarations
5570 2011-08-03 Javier Miranda <miranda@adacore.com>
5572 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
5573 in Java since they are always enclosed in a namespace that
5574 differentiates them, and overloaded entities are supported by the VM.
5576 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5578 * checks.adb (Determine_Range): If a computed bound of an operation is
5579 outside the range of the base type of the expression, and overflow
5580 checks are enabled, the result is unknown and cannot be used for any
5581 subsequent constant folding.
5582 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
5583 unknown, so is the result of the comparison.
5585 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5587 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
5588 From_Abort. When finalization was triggered by an abort, propagate
5589 Standard'Abort_Signal rather than Program_Error.
5590 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
5592 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
5593 From_Abort. When finalization was triggered by an abort, propagate
5594 Standard'Abort_Signal rather than Program_Error.
5595 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
5597 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
5598 Abort_Id. Update the calls to Build_Object_Declarations and
5599 Build_Raise_Statement to include Abort_Id.
5600 (Build_Adjust_Statements): New local variable Abort_Id. Update the
5601 calls to Build_Object_Declarations and Build_Raise_Statement to include
5603 (Build_Finalize_Statements): New local variable Abort_Id. Update the
5604 calls to Build_Object_Declarations and Build_Raise_Statement to include
5606 (Build_Components): Create an entity for Abort_Id when exceptions are
5607 allowed on the target.
5608 (Build_Finalizer): New local variable Abort_Id.
5609 (Build_Initialize_Statements): New local variable Abort_Id. Update the
5610 calls to Build_Object_Declarations and Build_Raise_Statement to include
5612 (Build_Object_Declarations): Add new formal Abort_Id. Create the
5613 declaration of flag Abort_Id to preserve the original abort status
5614 before finalization code is executed.
5615 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
5616 runtime routine Raise_From_Controlled_Operation.
5617 (Create_Finalizer): Update the call to Build_Raise_Statement to include
5618 Abort_Id. Update the call to Build_Object_Declarations to include
5619 Abort_Id. Update the layout of the finalizer body.
5620 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
5621 (Process_Transient_Objects): New local variable Abort_Id. Remove the
5622 clunky code to create all flags and objects related to
5623 exception propagation and replace it with a call to
5624 Build_Object_Declarations. Update the call to Build_Raise_Statement to
5626 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
5627 Add new formal Abort_Id and associated comment on its use.
5628 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
5630 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
5631 Remove the clunky code to create all flags and objects related to
5632 exception propagation and replace it with a call to
5633 Build_Object_Declarations. Update the call to Build_Raise_Statement.
5635 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5637 * s-tassta.adb: Fix minor typos.
5639 2011-08-03 Robert Dewar <dewar@adacore.com>
5641 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
5642 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
5644 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5646 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
5647 to packages. This ensures that the finalizer body will not end up
5648 inside the freeze node.
5649 (Process_Declarations): Add code to detect whether a freeze node has a
5650 nested finalization collection.
5652 2011-08-03 Pascal Obry <obry@adacore.com>
5654 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
5655 (Current_Session): Return a not null access to Session_Type.
5656 (Default_Session): Likewise.
5658 2011-08-03 Robert Dewar <dewar@adacore.com>
5660 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
5661 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
5663 2011-08-03 Pascal Obry <obry@adacore.com>
5665 * g-awk.ads: Minor comment fix.
5667 2011-08-03 Sergey Rybin <rybin@adacore.com>
5669 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5670 the tree structure related to discriminant constraints.
5671 Original_Discriminant cannot be used any more for computing the
5672 defining name for the reference to a discriminant.
5674 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5676 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
5677 function is not visibly tagged, this is not a dispatching call and
5678 therfore is not Tag_Indeterminate, even if the function is marked as
5679 dispatching on result.
5681 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5683 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
5684 (Expand_N_Free_Statement): Add a guard to protect against run-times
5685 which do not support controlled types.
5686 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
5687 against run-times which do not support controlled types.
5688 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
5689 against run-times which do not support controlled types.
5690 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
5691 against run-times which do not support controlled types.
5692 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
5693 protect against run-times which do not support controlled types.
5695 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5697 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
5698 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
5700 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5702 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
5703 modified in the source, to prevent spurious warnings when compiling
5706 2011-08-03 Thomas Quinot <quinot@adacore.com>
5708 * a-except-2005.adb: Minor reformatting.
5710 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5712 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
5713 is a renaming declaration in the private part of a package, do not emit
5714 a warning that the with_clause could be moved because the renaming may
5715 be used in the body or in a child unit.
5717 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5719 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5720 Propagate the Comes_From_Source attribute from the original return
5721 object to the renaming.
5723 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5725 * exp_ch7.adb (Build_Raise_Statement): Do not call
5726 Raise_From_Controlled_Operation when this routine is not present in
5727 the run-time library.
5728 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
5729 libraries (Ravenscar), tasks are non-terminating, and protected objects
5730 and tasks can only appear at library level, so we do not want
5731 finalization of protected objects nor tasks.
5732 * exp_intr.adb: Minor clarification in comment.
5733 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
5734 Gen_Output_File_C): Remove references to finalization of library-level
5735 objects when using restricted run-time libraries.
5737 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5739 * sem_ch3.adb (Build_Discriminant_Constraints): Set
5740 Original_Discriminant only if the parent type is a generic formal.
5742 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5744 * exp_ch13.adb: Add with and use clause for Targparm;
5745 (Expand_N_Free_Statement): Prevent the generation of a custom
5746 Deallocate on .NET/JVM targets since this requires pools and address
5748 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5749 .NET/JVM targets, attach the newly allocated object to the access
5750 type's finalization collection. Do not generate a call to
5751 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5752 exist in the runtime.
5753 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5754 create a custom Allocate for object that do not require initialization.
5755 Attach a newly allocated object to the access type's finalization
5756 collection on .NET/JVM.
5757 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5758 assignment of controlled types on .NET/JVM. The two hidden pointers
5759 Prev and Next and stored and later restored after the assignment takes
5761 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5762 kludge for .NET/JVM to recognize a particular piece of code coming from
5763 Heap_Management and change the call to Finalize into Deep_Finalize.
5764 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5765 finalization collections on .NET/JVM only for types derived from
5766 Controlled. Separate the association of storage pools with a collection
5767 and only allow it on non-.NET/JVM targets.
5768 (Make_Attach_Call): New routine.
5769 (Make_Detach_Call): New routine.
5770 (Process_Object_Declarations): Suppress the generation of
5771 build-in-place return object clean up code on .NET/JVM since it uses
5773 * exp_ch7.ads (Make_Attach_Call): New routine.
5774 (Make_Detach_Call): New routine.
5775 * exp_intr.adb Add with and use clause for Targparm.
5776 (Expand_Unc_Deallocation): Detach a controlled object from a collection
5777 on .NET/JVM targets.
5778 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5779 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5780 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5781 names used in finalization.
5783 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5785 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5786 (Attach, Detach): Lock the current task when chaining an object onto a
5789 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5791 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5792 Rewritten to create the message strings when the exception is not
5793 raised by an abort during finalization.
5794 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5795 Raise_From_Controlled_Operation and update its associated comment.
5796 * a-fihema.ads, a-fihema.adb: New GNAT unit.
5797 Ada.Finalization.Heap_Management provides key functionality
5798 associated with controlled objects on the heap, their creation,
5799 finalization and reclamation. Type Finalization_Collection is
5800 effectively a wrapper which sits ontop of a storage pool and performs
5801 all necessary bookkeeping for all the objects it contains. Each
5802 access-to-controlled or access-to-class-wide type receives a collection
5803 as part of its expansion. The compiler generates buffer code and
5804 invokes Allocate / Deallocate to create and destroy allocated
5806 * a-finali.adb ("="): Removed.
5807 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5808 fields Prev and Next.
5809 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5810 A library unit with at least one controlled object on the library level
5811 has a special finalizer which is invoked by the binder. To signal this,
5812 ali files carry field PF.
5813 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5814 associated comment on field usage.
5815 * a-tags.adb (Get_RC_Offset): Removed.
5816 (Needs_Finalization): New routine.
5817 * a-tags.ads: Update the structure of the GNAT dispatch tables.
5818 Dispatch tables now carry field Needs_Finalization which provides
5819 runtime indication whether a type is controlled or has controlled
5820 components or both. Remove field RC_Offset.
5821 (Get_RC_Offset): Removed along with its associated pragma Export.
5822 Since tagged types with controlled components no longer carry hidden
5823 field _controller, the special mechanism to retrieve its location is no
5825 (Needs_Finalization): New routine.
5826 * atree.ads, atree.adb (Elist24): New routine.
5827 (Set_Elist24): New routine.
5828 * atree.h: Add a define clause for Elist24.
5829 * bindgen.adb New library-level variable Lib_Final_Built.
5830 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5831 presence of a VM target, the routine generates calls to the proper
5832 library finalization routine.
5833 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5834 targets. Set the correct library finalization routine depending on
5835 whether the library has controlled objects or this is a VM compilation.
5836 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5837 to library-level finalizers of compiled units in reverse order of
5838 elaboration. It also produces exception management code and reraises a
5839 potential exception after all units have been finalized.
5840 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5841 library-level finalizers of compiled units in reverse order of
5843 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5844 definitions of all library-level finalizers available to the compilation
5845 (Gen_Main_Ada): Directly call Adafinal which now contails all target
5847 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5848 System.Standard_Library.Adafinal directly. If the library needs
5849 finalization actions, create the sequence of finalization calls.
5850 (Gen_Output_File_Ada): Alphabetize local variables and constants.
5851 Generate a with clause for System.Soft_Links when compiling for a VM.
5852 Remove the code which imports System.Standard_Library.Adafinal as
5853 Do_Finalize. Generate the library finalization routine.
5854 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5855 If the library needs finalization actions, create all the definitions
5856 of library- level finalizers.
5857 (Has_Finalizer): New routine. Determines whether at least one compiled
5858 unit has a library-level finalizer.
5859 Add type Qualification_Mode.
5860 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5861 * einfo.adb: New usage of field 15 as Return_Flag.
5862 Remove Finalization_Chain_Entity from the usages of field 19.
5863 Remove Associated_Final_Chain from the usages of field 23.
5864 New usage of field 23 as Associated_Collection.
5865 New usage of field 24 as Finalizer.
5866 New usage of flag 252 as Is_Processed_Transient.
5867 (Associated_Final_Chain): Removed.
5868 (Associated_Collection): New routine.
5869 (Finalization_Chain_Entity): Removed.
5870 (Finalizer): New routine.
5871 (Is_Finalizer): New routine.
5872 (Is_Processed_Transient): New routine.
5873 (Return_Flag): New routine.
5874 (Set_Associated_Final_Chain): Removed.
5875 (Set_Associated_Collection): New routine.
5876 (Set_Finalization_Chain_Entity): Removed.
5877 (Set_Finalizer): New routine.
5878 (Set_Is_Processed_Transient): New routine.
5879 (Set_Return_Flag): New routine.
5880 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5882 (Write_Field8_Name): Alphabetize the output.
5883 (Write_Field11_Name): Alphabetize the output.
5884 (Write_Field12_Name): Alphabetize the output.
5885 (Write_Field13_Name): Alphabetize the output.
5886 (Write_Field14_Name): Alphabetize the output.
5887 (Write_Field15_Name): Alphabetize the output.
5888 (Write_Field16_Name): Alphabetize the output.
5889 (Write_Field17_Name): Alphabetize the output.
5890 (Write_Field18_Name): Alphabetize the output.
5891 (Write_Field19_Name): Alphabetize the output. Remove the output of
5892 Finalization_Chain_Entity.
5893 (Write_Field20_Name): Alphabetize the output.
5894 (Write_Field21_Name): Alphabetize the output.
5895 (Write_Field22_Name): Alphabetize the output.
5896 (Write_Field23_Name): Alphabetize the output. Remove the output of
5897 Associated_Final_Chain. Add output for Associated_Collection.
5898 (Write_Field24_Name): Alphabetize the output.
5899 (Write_Field25_Name): Add output for Finalizer.
5900 (Write_Field26_Name): Alphabetize the output.
5901 (Write_Field27_Name): Alphabetize the output.
5902 (Write_Field28_Name): Alphabetize the output.
5903 * einfo.ads: Add new field description for Associated_Collection and
5905 Remove Associated_Final_Chain and its uses in nodes.
5906 Remove Finalization_Chain_Entity and its uses in nodes.
5907 Add new field description for Finalizer and its uses in nodes.
5908 Add new synthesized attribute Is_Finalizer.
5909 Add new flag description for Is_Processed_Transient and its uses in
5911 Add new field description for Return_Flag and its uses in nodes.
5912 (Associated_Final_Chain): Removed along with its pragma Inline.
5913 (Associated_Collection): New routine and pragma Inline.
5914 (Finalization_Chain_Entity): Removed along with its pragma Inline.
5915 (Finalizer): New routine and pragma Inline.
5916 (Is_Finalizer): New routine and pragma Inline.
5917 (Is_Processed_Transient): New routine and pragma Inline.
5918 (Return_Flag): New routine and pragma Inline.
5919 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5920 (Set_Associated_Collection): New routine and pragma Inline.
5921 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5922 (Set_Finalizer): New routine and pragma Inline.
5923 (Set_Is_Processed_Transient): New routine and pragma Inline.
5924 (Set_Return_Flag): New routine and pragma Inline.
5925 * exp_aggr.adb: Alphabetize subprograms.
5926 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5927 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5928 associated comments. Remove local variables External_Final_List and
5930 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5931 Ancestor. Remove the retrieval of finalization lists. Update the call to
5933 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5934 lists. Update the call to Late_Expansion.
5935 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5936 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5937 (Gen_Assign): Remove the retrieval of the finalization list used to
5938 build the assignment. Update the calls to Make_Init_Call and
5940 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5941 Remove the mechanism to determine attachment levels and finalization
5942 list retrieval. Remove the processing for coextensions.
5943 (Init_Controller): Removed. Controllers no longer exist.
5944 (Late_Expansion): Remove formals Flist and Obj along with their
5945 associated comments. Update the calls to Build_Record_Aggr_Code and
5946 Build_Array_Aggr_Code.
5947 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5948 (Expand_N_Freeze_Entity): Add special processing for finalizers which
5949 appear in entry bodies, protected subprograms and task bodies.
5950 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5951 * exp_ch3.adb (Add_Final_Chain): Removed.
5952 (Build_Array_Init_Proc): Alphabetize local variables.
5953 (Build_Assignment): Alphabetize local variables. Update the call to
5955 (Build_Class_Wide_Master): Rename local variables to better reflect
5957 (Build_Discriminant_Assignments): Code reformatting.
5958 (Build_Init_Call_Thru): Code reformatting.
5959 (Build_Init_Procedure): Code reformatting. Generate a special version
5960 of Deep_Finalize which is capable of finalizing all initialized
5961 components and ignore the rest.
5962 (Build_Init_Statements): Rename local variables to better reflect their
5964 Reimplement the mechanism to include the creation and update of an index
5965 variable called a "counter". It is used as a bookmark for tracing
5966 initialized and non-initialized components.
5967 (Build_Initialization_Call): Remove local variable Controller_Typ.
5968 Alphabetize all local variables. Remove the initialization of the
5969 record controller and update the call to Make_Init_Call.
5970 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5971 New local variable Counter.
5972 (Constrain_Array): Alphabetize.
5973 (Expand_Freeze_Array_Type): Create a collection instead of a
5975 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5976 Finalize_Address which is used in conjunction with allocated controlled
5978 (Expand_N_Object_Declaration): Remove the creation of a finalization
5979 list for anonymous access types. Update the calls to Make_Init_Call and
5981 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5982 retrieval of finalization lists. Remove the expansion of the record
5983 controller. Create TSS primitive Finalize_Address used in conjunction
5984 with controlled objects on the heap. Create finalization collections
5985 for access-to-controlled record components.
5986 (Expand_Record_Controller): Removed.
5987 (Freeze_Type): Remove the freezing of record controllers. Freezing of
5988 class-wide types now requires additional processing. Create
5989 finalization collections for access-to-controlled types.
5990 (Increment_Counter): New routine.
5991 (Make_Counter): New routine.
5992 (Make_Eq_If): Remove the mention of Name_uController.
5993 (Make_Predefined_Primitive_Specs): There is no longer need to skip
5994 types coming from System.Finalization_Root.
5995 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5996 (Predefined_Primitive_Bodies): There is no longer need to skip types
5997 coming from System.Finalization_Root.
5998 (Stream_Operation_OK): Do not generate stream routines for
5999 type Ada.Finalization.Heap_Management.Finalization_Collection.
6000 * exp_ch3.ads: Alphabetize subprograms.
6001 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
6002 Add with and use clause for Lib.
6003 (Complete_Coextension_Finalization): Removed.
6004 (Complete_Controlled_Allocation): New routine. Create a finalization
6005 collection for anonymous access-to-controlled types. Create a custom
6006 Allocate which interfaces with the back end and the machinery in
6008 (Expand_Allocator_Expression): Add necessary calls to
6009 Complete_Controlled_Allocation. Remove the retrieval of finalization
6010 lists. Update the calls to Make_Adjust_Call. Generate a call to
6011 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6012 the associated collection.
6013 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
6014 Code clean up. Remove the retrieval of finalization lists and
6016 Update the call to Make_Init_Call. Generate a call to
6017 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6018 the associated collection.
6019 (Get_Allocator_Final_List): Removed. Finalization lists are not
6021 (Suitable_Element): Remove the mention of Name_uController.
6022 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
6023 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
6024 the left hand side, carry out the assignment and adjust the left hand
6026 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
6027 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
6028 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
6029 BIP_Collection and BIPcollection.
6030 (Build_Heap_Allocator): New routine used to allocate the return object
6031 of a build-in-place function onto a collection.
6032 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
6033 (Expand_Call): Do not replace direct calls to Deep routines with their
6035 (Expand_N_Extended_Return_Statement): Give all variables shorter names
6036 and update their occurrences. Add a special return flag to monitor the
6037 [ab]normal execution of the function. The flag is set right before the
6039 Rewrite the mechanism used to allocate a build-in-place return object
6040 on the heap or on a storage pool.
6041 (Is_Direct_Deep_Call): New routine.
6042 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
6043 build-in-place function call instead of a final list. Build a call to
6044 Set_Finalize_Address_Ptr to decorate the associated collection.
6045 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
6046 order to name the build-in-place function call's result for later
6047 finalization. Add a collection to a build-in-place function call
6048 instead of a final list.
6049 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
6050 build-in-place function call instead of a final list. Remove the code
6051 which moves one final list and transforms it into the actual in a
6052 nested build-in-place call.
6053 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
6054 build-in-place function call instead of a final list.
6055 (Move_Final_List): Removed.
6056 (Needs_BIP_Collection): New routine.
6057 (Needs_BIP_Final_List): Removed.
6058 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
6059 enumeration type BIP_Formal_Kind.
6060 Update the related comment.
6061 (Needs_BIP_Collection): New routine.
6062 (Needs_BIP_Final_List): Removed.
6063 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
6064 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
6065 majority of subprograms in this unit. Add Name_Finalize_Address to
6066 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
6067 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
6068 statements for an array type.
6069 (Build_Adjust_Statements): Create the adjust statements for a record
6071 (Build_Cleanup_Statements): New routine. A procedure which given any
6072 construct containing asynchronous calls, references to _master, or is a
6073 task body, a task allocation or a protected body produces the necessary
6074 runtime calls to clean up these constructs.
6075 (Build_Exception_Handler): New routine.
6076 (Build_Final_List): Removed.
6077 (Build_Finalization_Collection): New routine. A core procedure which
6078 creates a collection to service heap allocated controlled objects
6079 associated with an access-to-controlled type.
6080 (Build_Finalize_Statements): Create the finalization statements for a
6082 (Build_Finalizer): New routine. A core procedure which given any
6083 construct with declarations and/or statements detects all objects which
6084 need any type of clean up (controlled objects, protected objects) and
6085 generates all necessary code to clean up the said objects in the proper
6087 (Build_Finalizer_Call): New routine.
6088 (Build_Initialize_Statements): Create the initialization statements for
6089 an array type. The generated routine contains code to finalize partially
6091 (Build_Object_Declarations): New routine.
6092 (Build_Raise_Statement): New routine.
6093 (Clean_Simple_Protected_Objects): Removed.
6094 (Controller_Component): Removed.
6095 (Enclosing_Function): New routine.
6096 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
6097 either declarations or statements or both.
6098 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
6099 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
6101 (Find_Final_List): Removed.
6102 (Global_Flist_Ref): Removed.
6103 (In_Finalization_Root): Removed.
6104 (Insert_Actions_In_Scope_Around): Determine the range of the transient
6105 scope in terms of tree nodes. Process all transient variables within
6107 (Make_Adjust_Call): Rewritten. There is no longer an attach call
6108 generated after the adjust.
6109 (Make_Attach_Call): Removed.
6110 (Make_Call): New routine.
6111 (Make_Clean): Removed.
6112 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
6114 (Make_Deep_Proc): Rewritten to generate the new profile signature used
6116 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
6118 (Make_Final_Call): Modified to simply create a call to either
6119 Deep_Finalize or Finalize.
6120 (Make_Finalize_Address_Body): New routine.
6121 (Make_Finalize_Address_Stmts): New routine. A function which produces
6122 TSS primitive Finalize_Address used in conjunction with heap allocated
6124 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
6125 (Make_Init_Call): Rewritten. There is no longer an attach call
6126 generated after initialization.
6127 (Make_Local_Deep_Finalize): New routine.
6128 (Make_Set_Finalize_Address_Ptr_Call): New routine.
6129 (Make_Transient_Block): Remove the finalization list retrieval and
6131 (Needs_Finalization): Moved to Exp_Util.
6132 (Parent_Field_Type): New routine.
6133 (Preprocess_Components): New routine.
6134 (Process_Transient_Objects): New routine.
6135 (Wrap_HSS_In_Block): New routine.
6136 (Wrap_Transient_Declaration): Remove finalization list management and
6137 controller insertion.
6138 (Wrap_Transient_Expression): Code reformatting.
6139 (Wrap_Transient_Statement): Code reformatting.
6140 * exp_ch7.ads (Build_Final_List): Removed.
6141 (Build_Finalization_Collection): New routine.
6142 (Build_Raise_Statement): New routine.
6143 (Controller_Component): Removed.
6144 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
6145 (Find_Final_List): Removed.
6146 (In_Finalization_Root): Removed.
6147 (Is_Simple_Protected_Type): Update related comment.
6148 (Make_Adjust_Call): New parameter profile and associated comments.
6149 (Make_Attach_Call): Removed.
6150 (Make_Final_Call): New parameter profile and associated comments.
6151 (Make_Finalize_Address_Body): New routine.
6152 (Make_Init_Call): New parameter profile and associated comments.
6153 (Make_Local_Deep_Finalize): New routine.
6154 (Make_Set_Finalize_Address_Ptr_Call): New routine.
6155 (Needs_Finalization): Moved to Exp_Util.
6156 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
6157 (Expand_N_Protected_Body): Remove the handling of finalization lists.
6158 (Find_Protection_Type): Moved to Exp_Util.
6159 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
6160 (Make_DT): Update sequence of dispatch table initialization. Remove the
6161 initialization of field RC_Offset. Add initialization of field Needs_
6163 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
6164 Reimplement how an object is first finalized, then deallocated.
6165 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
6167 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
6168 Register TSS_Finalize_Address with type TSS_Names.
6169 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
6170 procedure provides the interface between an allocation / deallocation
6171 and the support machinery in Ada.Finalization.Heap_Management.
6172 (Find_Init_Call): Code reformatting.
6173 (Find_Init_Call_In_List): Code reformatting.
6174 (Find_Protection_Type): Moved from Exp_Ch9.
6175 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
6176 (Has_Controlled_Coextensions): Removed.
6177 (Has_Controlled_Objects): New routine.
6178 (In_Library_Level_Package_Body): New routine.
6179 (Insert_Action_After): New routine.
6180 (Is_Finalizable_Transient): New routine. This predicate determines
6181 whether an object declaration is one of the many variants of controlled
6183 (Is_Null_Access_BIP_Func_Call): New routine.
6184 (Is_Non_BIP_Func_Call): New routine.
6185 (Is_Related_To_Func_Return): New routine.
6186 (Needs_Finalization): Moved from Exp_Ch7.
6187 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
6188 (Find_Protection_Type): Moved from Exp_Ch9.
6189 (Has_Controlled_Coextensions): Removed.
6190 (Has_Controlled_Objects): New routine.
6191 (In_Library_Level_Package_Body): New routine.
6192 (Insert_Action_After): New routine.
6193 (Is_Finalizable_Transient): New routine.
6194 (Is_Null_Access_BIP_Func_Call): New routine.
6195 (Is_Non_BIP_Func_Call): New routine.
6196 (Is_Related_To_Func_Return): New routine.
6197 (Needs_Finalization): Moved from Exp_ch7.
6198 * expander.adb (Expand): Add a case for N_Free_Statement.
6199 * freeze.adb (Freeze_All): Replace the generation of a finalization
6200 list with a collection for access-to-controlled types.
6201 (Freeze_Entity): Code reformatting.
6202 (Freeze_Record_Type): Remove the freezing of a record controller
6204 (Freeze_Subprogram): Code reformatting.
6205 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
6207 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
6208 has a library-level finalizer.
6209 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
6210 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
6211 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
6212 files. Add a-fihema to the list of object files.
6214 Alphabetize the associations in type Is_Parameterless_Attribute.
6215 * rtsfind.ads: Ada.Finalization_List.Controller and
6216 System.Finalization_Implementation are no longer a GNAT unit.
6217 Update the range of type Ada_Finalization_Child. Remove the following
6218 recoverable entities:
6220 RE_Attach_To_Final_List
6224 RE_Finalizable_Ptr_Ptr
6225 RE_Global_Final_List
6226 RE_Limited_Record_Controller
6229 RE_Record_Controller
6230 RE_Simple_List_Controller
6232 Add the following recoverable entities:
6234 RE_Add_Offset_To_Address
6238 RE_Exception_Identity
6239 RE_Finalization_Collection
6240 RE_Finalization_Collection_Ptr
6241 RE_Needs_Finalization
6242 RE_Save_Library_Occurrence
6243 RE_Set_Finalize_Address_Ptr
6244 RE_Set_Storage_Pool_Ptr
6246 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
6248 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
6249 (First_Stored_Discriminant): Remove the mention of Name_uController.
6250 * sem_aux.ads: Comment reformatting.
6251 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
6252 to redecorate an already existing class-wide type.
6253 (Decorate_Tagged_Type): New parameter profile and associated comment.
6254 Create a "shadow class-wide type" for a shadow entity.
6255 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
6256 of the final chain along with the associated comment.
6257 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
6258 Full_Desig and set it to the full view of the designated type.
6259 Initialize the finalization collection to empty.
6260 (Build_Derived_Record_Type): Alphabetize local variables. Code
6262 (Collect_Fixed_Components): Remove the mention of Name_uController.
6263 (Create_Constrained_Components): Remove the mention of Name_uController.
6264 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
6265 class-wide type of a shadow entity.
6266 (Process_Full_View): Update the machinery which marks type
6267 Limited_Controlled's entity as limited.
6268 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
6269 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
6270 list, instead make a collection build-in-place formal.
6271 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
6272 a designated type in order to establish a match between the renaming
6273 and the renamed entity.
6274 (Find_Selected_Component): Add guard to prevent spurious exceptions
6275 from being raised on .NET/JVM.
6276 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
6277 to the list of primitive that need special processing. Update arrays
6278 C_Names and D_Names.
6279 (Replace_Types): Handle class-wide types.
6280 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
6281 different parameter profile, look at the first formal.
6282 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
6283 use clauses for Exp_Util.
6284 * sem_res.adb: Remove with and use clauses for Elists.
6285 (Propagate_Coextensions): Removed.
6286 (Resolve_Allocator): Do not propagate the list of coextensions from one
6287 allocator to another.
6288 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
6289 Deaccessed_T to Desig_Typ.
6290 (Enter_Name): Remove the mention of Name_uController.
6291 (Gather_Components): Remove the mention of Name_uController.
6292 (Incomplete_Or_Private_View): New routine.
6293 (Is_Coextension_Root): Removed.
6294 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
6295 * sem_util.ads (Incomplete_Or_Private_View): New routine.
6296 (Is_Coextension_Root): Removed.
6297 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
6298 Controlled types are now derived from a null tagged record. Remove
6299 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
6300 * sinfo.adb (Coextensions): Removed.
6301 (Set_Coextensions): Removed.
6302 * sinfo.ads: Remove Coextensions from the explanation of node fields
6303 and its uses in nodes.
6304 Update the field usage of N_Allocator.
6305 (Coextensions): Removed along with its pragma Inline.
6306 (Set_Coextensions): Removed along with its pragma Inline.
6307 * snames.ads-tmpl: Remove names
6312 Name_uLocal_Final_List
6313 Name_Finalization_Root
6320 Name_Finalize_Address
6321 * s-pooglo.adb (Allocate): Add overriding indicator.
6322 (Deallocate): Add overriding indicator.
6323 (Storage_Size): Add overriding indicator.
6324 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6325 than Finalize_Global_List.
6326 (Null_Finalize_Global_List): Removed.
6327 (Save_Library_Occurrence): New routine.
6328 * s-soflin.ads: Remove variable Finalize_Global_List along with its
6329 initialization. Add variable Finalize_Library_Objects along with its
6330 pragma Export. Add variables Library_Exception and
6331 Library_Exception_Set along with their pragma Export.
6332 (Null_Finalize_Global_List): Removed.
6333 (Save_Library_Occurrence): New routine.
6334 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6335 rather than Finalize_Global_List.
6336 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6337 of the constructed node.
6339 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6341 * link.c: Include "auto-host.h" before system headers.
6343 2011-08-03 Vincent Celier <celier@adacore.com>
6345 * make.adb (Gnatmake): Add to table Library_Projs only library projects
6346 that are not extended. Do not check if a library project that is
6347 extended should be regenerated. Do not add to table Library_Paths the
6348 libraries that are in extended projects. Link only with libraries that
6349 are in libray projects that are not extended.
6350 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6351 for a library project that is extended.
6353 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6355 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6356 conforming subprogram renamings that appear to be completions if they
6357 are not fully conformant.
6358 Such renamings are homographs but not completions.
6359 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6360 names in a subprogram renaming that appears in an instance.
6362 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6364 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6365 not immutably limited, build actual subtype from expression to provide
6366 proper bounds to caller.
6368 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6370 * sem_ch8.adb: Minor comment correction.
6372 2011-08-03 Thomas Quinot <quinot@adacore.com>
6374 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6375 returning a limited array, use an extended return statement.
6377 2011-08-03 Vincent Celier <celier@adacore.com>
6379 * make.adb (Initialize): If --subdirs= is used, but no project file is
6380 specified, attempt to create the specify subdir if it does not already
6381 exist and use it as the object directory as if -D had been specified.
6383 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6385 * s-tpopsp-vms.adb: New file.
6386 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6387 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6389 2011-08-03 Emmanuel Briot <briot@adacore.com>
6391 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6394 2011-08-03 Yannick Moy <moy@adacore.com>
6396 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6397 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6398 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6399 detect that an array has static bounds.
6401 2011-08-03 Thomas Quinot <quinot@adacore.com>
6403 * exp_dist.adb: Minor reformatting.
6405 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6407 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6408 (ATCB_Key): Removed, not always used.
6410 2011-08-03 Emmanuel Briot <briot@adacore.com>
6412 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6413 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6414 most remaining global variables.
6416 2011-08-03 Robert Dewar <dewar@adacore.com>
6418 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6419 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6422 2011-08-03 Javier Miranda <miranda@adacore.com>
6424 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6425 that must be passed by copy in VM targets.
6427 2011-08-03 Emmanuel Briot <briot@adacore.com>
6429 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6430 duplicates a similar htable now in the project tree.
6432 2011-08-03 Claire Dross <dross@adacore.com>
6434 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6435 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6436 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6437 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6438 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6439 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6440 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6443 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6445 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6446 (ATCB_Key): Removed, not always used.
6447 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6449 * s-tpopsp-tls.adb: New file.
6450 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6451 x86/x64/ia64/powerpc/sparc Linux.
6453 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6455 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6456 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6458 2011-08-03 Thomas Quinot <quinot@adacore.com>
6460 * rtsfind.ads, exp_dist.adb, exp_dist.ads
6461 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6462 Fix type selection for mapping integer types to PolyORB types.
6464 2011-08-03 Bob Duff <duff@adacore.com>
6466 * sem_ch7.adb: Minor comment clarification.
6468 2011-08-03 Bob Duff <duff@adacore.com>
6470 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6471 an error analyzing a choice, skip further processing. Further
6472 processing could cause a crash or cascade errors.
6474 2011-08-03 Emmanuel Briot <briot@adacore.com>
6476 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
6477 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
6478 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6479 prj-env.ads (Shared_Project_Tree_Data): new type
6480 An aggregate project and its aggregated trees need to share the common
6481 data structures used for lists of strings, packages,... This makes the
6482 code simpler since otherwise we have to pass the root tree (also used
6483 for the configuration file data) in addition to the current project
6484 tree. This also avoids ambiguities as to which tree should be used.
6485 And finally this saves a bit of memory.
6486 (For_Every_Project_Imported): new parameter Tree.
6487 Since aggregated projects are using a different tree, we need to let
6488 the caller know which tree to use to manipulate the returned project.
6490 2011-08-03 Robert Dewar <dewar@adacore.com>
6492 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
6493 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
6494 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
6495 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
6497 2011-08-03 Javier Miranda <miranda@adacore.com>
6499 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
6500 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
6502 2011-08-03 Bob Duff <duff@adacore.com>
6504 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
6507 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
6509 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
6510 g-sehash.ads: Fix typo. Update header.
6512 2011-08-03 Thomas Quinot <quinot@adacore.com>
6514 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
6517 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6519 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
6520 prefixes of private types along with records, since the selector may be
6522 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
6523 private types along with records, since the selector may be a
6526 2011-08-03 Emmanuel Briot <briot@adacore.com>
6528 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
6530 2011-08-03 Javier Miranda <miranda@adacore.com>
6532 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
6533 Tagged_Type_Expansion.
6535 2011-08-03 Yannick Moy <moy@adacore.com>
6537 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
6538 violation when the argument of concatenation is the name of a
6541 2011-08-03 Emmanuel Briot <briot@adacore.com>
6543 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
6544 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
6545 (Process_Declarative_Items): new parameter Child_Env.
6547 2011-08-03 Yannick Moy <moy@adacore.com>
6549 * alfa.ads: Update format of ALFA section in ALI file in order to
6550 add a mapping from bodies to specs when both are present.
6551 (ALFA_Scope_Record): Add components for spec file/scope.
6552 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
6554 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
6555 collected, fill in the spec information when relevant.
6556 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
6559 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6561 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
6562 code unit to decide whether to add internally generated subprograms.
6564 2011-08-03 Javier Miranda <miranda@adacore.com>
6566 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
6567 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
6568 be handled by copy in VM targets.
6570 2011-08-03 Emmanuel Briot <briot@adacore.com>
6572 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
6573 code with Makeutl.Get_Switches.
6574 * prj-tree.adb: Update comment.
6576 2011-08-03 Thomas Quinot <quinot@adacore.com>
6578 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
6579 subprogram with a limited formal that does not support external
6582 2011-08-03 Yannick Moy <moy@adacore.com>
6584 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
6586 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
6587 not from current unit in two phases, because it is not possible to
6588 change the table while iterating over its content.
6589 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
6591 2011-08-03 Sergey Rybin <rybin@adacore.com>
6593 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
6594 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
6596 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6598 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
6599 and the component type is composite, this is ambiguous for predefined
6600 concatenation, but if the node is not overloaded and the entity is a use
6601 -defined function its profile can be used to resolve that aggregate.
6603 2011-08-03 Robert Dewar <dewar@adacore.com>
6605 * exp_ch4.adb: Minor code cleanup.
6607 2011-08-03 Thomas Quinot <quinot@adacore.com>
6609 * exp_dist.adb: Do not generate distribution stubs if serious errors
6610 have been diagnosed.
6612 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6614 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
6615 the first formal of a primitive operation, go to the base type to
6616 handle properly an access to a derived type with constrained
6618 * sem_type.adb (Disambiguate): an immediately visible operator hides a
6619 user-defined function that is only use-visible.
6621 2011-08-03 Robert Dewar <dewar@adacore.com>
6623 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
6624 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
6625 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
6626 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
6627 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
6628 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
6629 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
6630 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
6632 2011-08-03 Robert Dewar <dewar@adacore.com>
6634 * repinfo.adb (List_Mechanism): Add handling of
6635 Convention_Ada_Pass_By_XXX.
6636 * sem_mech.adb (Set_Mechanism): Ditto.
6637 * sem_prag.adb (Process_Convention): Add entries for
6638 Convention_Ada_Pass_By_XXX.
6639 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
6641 2011-08-03 Pascal Obry <obry@adacore.com>
6643 * makeutl.adb: Minor reformatting.
6645 2011-08-03 Vincent Celier <celier@adacore.com>
6648 (Get_File_Name) If the file cannot be found when there are no config
6649 pragmas file and May_Fail is True, return No_File instead of the file
6650 name, to be consistent.
6652 2011-08-03 Pascal Obry <obry@adacore.com>
6654 * adaint.c (__gnat_is_executable_file_attr): Avoid access
6657 2011-08-03 Javier Miranda <miranda@adacore.com>
6660 (Same_Representation): In VM targets the representation of arrays with
6661 aliased components differs from arrays with non-aliased components.
6663 2011-08-03 Emmanuel Briot <briot@adacore.com>
6665 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
6666 not systematically lower case attribute indexes that contain no "."
6667 Fix definition of several Naming attributes, which take
6668 a unit name as index and therefore should be case insensitive.
6669 Minor refactoring (reduce length of variable names).
6671 2011-08-03 Emmanuel Briot <briot@adacore.com>
6673 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
6675 2011-08-03 Emmanuel Briot <briot@adacore.com>
6677 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
6678 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
6679 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
6680 prj-tree.ads (Prj.Tree.Environment): new type.
6682 2011-08-03 Emmanuel Briot <briot@adacore.com>
6684 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
6685 prj-tree.adb, prj-tree.ads (Environment): new type.
6687 2011-08-03 Emmanuel Briot <briot@adacore.com>
6689 * prj-tree.ads: Remove unused variable.
6691 2011-08-03 Yannick Moy <moy@adacore.com>
6693 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
6694 issuing messages related to SPARK restriction violation.
6696 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6698 * sem_ch6.adb: guard against error nodes in return statements.
6700 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6702 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
6703 a warning can only appear on a configuration file, so emit warning
6704 without further checks.
6706 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6708 * s-interr.ads: add overriding keyword.
6710 2011-08-03 Geert Bosch <bosch@adacore.com>
6712 * exp_attr.adb: Fix minor typo.
6714 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6716 * par-ch4.adb: improve error recovery.
6718 2011-08-03 Emmanuel Briot <briot@adacore.com>
6720 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
6721 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
6724 2011-08-03 Emmanuel Briot <briot@adacore.com>
6726 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
6727 "external" as an attribute name in aggregate projects.
6729 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6731 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
6732 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
6733 from 0, so we need to adjust.
6735 2011-08-03 Emmanuel Briot <briot@adacore.com>
6737 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
6738 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
6740 2011-08-03 Yannick Moy <moy@adacore.com>
6742 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6743 restriction on overloaded entity if the entity is not an operator.
6745 2011-08-03 Yannick Moy <moy@adacore.com>
6747 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6748 restrict.ads: Rename remaining Check_Formal_Restriction* into
6749 Check_SPARK_Restriction*.
6751 2011-08-03 Emmanuel Briot <briot@adacore.com>
6753 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6754 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6756 (Project_Empty): removed
6757 (Empty_Project): new parameter Qualifier
6758 This is used to have fields specific to aggregate projects, cleaner
6759 New field to store the list of aggregated projects.
6760 (Check_Aggregate_Project): removed
6761 (Process_Aggregated_Projects, Free): new subprograms.
6763 2011-08-03 Olivier Hainque <hainque@adacore.com>
6765 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6767 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6769 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6770 explicit dereference of an unconstrained type, create a constrained
6771 subtype for it, as is done for function calls that return an
6774 2011-08-03 Thomas Quinot <quinot@adacore.com>
6776 * g-pehage.adb (Finalize): Avoid possible double-free.
6778 2011-08-03 Steve Baird <baird@adacore.com>
6780 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6781 Elab_Spec/Body attrs in CodePeer_Mode.
6783 2011-08-03 Javier Miranda <miranda@adacore.com>
6785 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6786 low bound is not known at compile time but they have no others choice.
6787 Done because in this case the bounds can be obtained directly from the
6790 2011-08-03 Ed Falis <falis@adacore.com>
6792 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6793 on VxWorks SMP. Remove unusable constant ANY_CPU.
6795 2011-08-03 Emmanuel Briot <briot@adacore.com>
6797 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6798 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6799 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6800 Prj.Env.Initialize_Empty): new subprograms
6801 (Get_Env, Find_Project): remove parameter Target_Name.
6803 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6805 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6806 as a condition for the delayed call to Derived_Subprograms done for the
6807 case of the rewriting of a derived type that constrains the
6808 discriminants of its parent type.
6809 Avoids redundant subprogram derivations for private subtype derivations.
6811 2011-08-03 Javier Miranda <miranda@adacore.com>
6813 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6814 Build_Record_Aggr_Code.
6815 (Build_Record_Aggr_Code): Add missing support to initialize hidden
6816 discriminants in extension aggregates.
6818 2011-08-03 Emmanuel Briot <briot@adacore.com>
6820 * prj-pp.adb (Print): also output project qualifiers, since in
6821 particular "aggregate" is mandatory in an aggregate project.
6823 2011-08-03 Emmanuel Briot <briot@adacore.com>
6825 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6826 (Debug_Output): new function.
6828 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6830 * gnat_ugn.texi: Document -Wstack-usage.
6831 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6833 2011-08-03 Thomas Quinot <quinot@adacore.com>
6835 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6836 have keyword LIMITED.
6838 2011-08-03 Yannick Moy <moy@adacore.com>
6840 * alfa.adb, alfa.ads, alfa_test.adb: New files.
6841 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6842 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6843 section (does not happen in compiler, only if code directly calls
6845 * get_alfa.adb, get_alfa.ads: New files.
6846 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6848 * lib-xref-alfa.adb: New file.
6849 * lib-xref.adb, lib-xref.ads
6850 (Xref_Entry): redefine information needed in cross-references for ALFA.
6851 Push ALFA treatments in separated local package.
6852 (Enclosing_Subpragram_Or_Package): treat specially subprogram
6853 identifiers. Return entity of package body instead of spec. Return
6854 Empty for a scope with no location.
6855 (Generate_Reference): adapt to new components for ALFA information.
6856 Remove the need for D references on definitions.
6857 (Is_Local_Reference): moved to ALFA local package
6858 (Output_References): extract subfunction as Extract_Source_Name
6859 (Output_Local_References): remove procedure, replaced by filtering of
6860 cross-references in package ALFA and printing in Put_ALFA.
6861 (Write_Entity_Name): remove procedure
6862 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6863 print exact name of entity as it appears in source file
6864 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6865 * put_alfa.adb, put_alfa.ads: New files.
6866 * xref_lib.adb (Search_Xref): protect read of cross-references against
6867 reading other sections of the ALI file, in gnatxref
6868 (Search): protect read of cross-references against reading other
6869 sections of the ALI file, in gnatfind.
6870 * gcc-interface/Make-lang.in: Update dependencies.
6872 2011-08-03 Thomas Quinot <quinot@adacore.com>
6874 * sem_ch3.adb: Minor reformatting.
6876 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6878 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6879 raising an exception.
6881 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6883 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6884 type, always use 1 as the lower bound or string, even if lower bound of
6885 context is not static, to handle properly null strings in a non-static
6888 2011-08-03 Bob Duff <duff@adacore.com>
6890 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6891 always legal on the right-hand side of an assignment statement; there
6892 is always an applicable index constraint in this case. Therefore, the
6893 check for Pkind = N_Assignment_Statement is now unconditional -- it
6894 doesn't depend on whether Is_Constrained (Typ).
6896 2011-08-03 Robert Dewar <dewar@adacore.com>
6898 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6900 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6902 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6903 for an itype created within a generic unit.
6905 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6907 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6908 suppresses all inlining.
6910 2011-08-03 Robert Dewar <dewar@adacore.com>
6912 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6913 exp_aggr.adb: Minor reformatting.
6915 2011-08-03 Thomas Quinot <quinot@adacore.com>
6917 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6918 tagged assignment when discriminant checks are suppressed. This is
6919 useless and extremely costly in terms of static stack usage.
6921 2011-08-03 Bob Duff <duff@adacore.com>
6923 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6924 of generics, because this leads to the wrong entity in the wrong scope,
6925 causing (e.g.) pragma Export_Procedure to get an error if the entity is
6927 (Process_Interface_Name): Follow Alias for instances of generics, to
6928 correct for the above change.
6930 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6932 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6933 is an integer literal it is always safe to replace the reference. In
6934 addition, if the reference appears in the generated code for an object
6935 declaration it is necessary to copy because otherwise the reference
6936 might be to the uninitilized value of the discriminant of the object
6939 2011-08-03 Pascal Obry <obry@adacore.com>
6941 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6942 ACL used, in this case we want to check for ending .exe, not .exe
6943 anywhere in the path.
6945 2011-08-03 Sergey Rybin <rybin@adacore.com>
6947 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6948 the tree structure (semantic decoration of references to record
6951 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6953 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6954 choices of a named array aggregate, bail out when any choices are
6955 marked as Errors_Posted.
6957 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6959 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6960 in which entity is frozen, to handle properly loop variables in
6963 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6965 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6966 subtype is not static, compute the upper bound using attributes, to
6967 handle properly index types that are not integer types.
6969 2011-08-03 Bob Duff <duff@adacore.com>
6971 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6972 Update copyright notice.
6974 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6976 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6977 Original_Discriminant if within an instance.
6978 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6980 2011-08-03 Thomas Quinot <quinot@adacore.com>
6982 * einfo.ads: Minor reformatting.
6984 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6986 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6987 composite type with an unfrozen subcomponent, in the profile of a
6988 primitive operation.
6990 2011-08-03 Robert Dewar <dewar@adacore.com>
6992 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6994 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6996 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6997 unconstrained type with discriminants is initialized with an aggregate,
6998 use the constrained subtype of the aggregate as the type of the object,
6999 because it is immutable, and this allows the back-end to generate no
7000 code for the object declaration.
7002 2011-08-03 Robert Dewar <dewar@adacore.com>
7004 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
7005 comparison operand is variable, and turns out to be zero or negative.
7007 2011-08-03 Javier Miranda <miranda@adacore.com>
7010 (Expand_Dispatching_Constructor_Call): Disable expansion of
7011 code required for native targets. Done to avoid generating
7012 references to unavailable runtime entities in VM targets.
7014 (Expand_N_Object_Declaration): Add missing support to handle
7015 the explicit initialization of class-wide interface objects.
7018 2011-08-03 Matthew Heaney <heaney@adacore.com>
7020 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
7022 2011-08-03 Matthew Heaney <heaney@adacore.com>
7024 * a-cbdlli.adb (Splice): move source items from first to last
7026 2011-08-03 Yannick Moy <moy@adacore.com>
7028 * sem_util.ads: comment added.
7030 2011-08-03 Javier Miranda <miranda@adacore.com>
7033 (Expand_Record_Aggregate): In VM targets disable the expansion into
7034 assignments of aggregates whose type is not known at compile time.
7036 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7038 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
7039 protected entries and task entries, to build the proper renaming
7040 declaration for entry formals, used in debugging.
7041 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
7042 parameters in the same way.
7044 2011-08-02 Robert Dewar <dewar@adacore.com>
7046 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
7047 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
7048 code reorganization.
7050 2011-08-02 Robert Dewar <dewar@adacore.com>
7052 * debug.adb: Debug flag d.P to suppress length comparison optimization
7053 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
7054 comparison of Length by comparing First/Last instead.
7056 2011-08-02 Matthew Heaney <heaney@adacore.com>
7058 * a-cobove.ads: Code clean up.
7060 2011-08-02 Vincent Celier <celier@adacore.com>
7062 * adaint.c (file_names_case_sensitive_cache): New static int.
7063 (__gnat_get_file_names_case_sensitive): Cache the return value in
7064 file_names_case_sensitive_cache at the first invocation, to avoid
7065 multiple calls to getenv.
7067 2011-08-02 Bob Duff <duff@adacore.com>
7069 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
7071 2011-08-02 Yannick Moy <moy@adacore.com>
7073 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
7074 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
7075 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
7076 indicate that we are in a precondition or postcondition. This is used in
7077 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
7078 decide whether to flag the spec or body of the current subprogram as
7081 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
7083 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
7085 * a-extiin.ads: New file.
7087 2011-08-02 Bob Duff <duff@adacore.com>
7089 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
7090 now raises Name_Error instead of Use_Error in certain cases. The other
7091 parts of this AI were already implemented properly.
7093 2011-08-02 Vincent Celier <celier@adacore.com>
7095 * link.c: Only import "auto-host.h" when building the gnattools.
7097 2011-08-02 Yannick Moy <moy@adacore.com>
7099 * sem_util.adb: Inter-unit inlining does not work for a subprogram
7100 which calls a local subprogram, so extract subprogram
7101 from Mark_Non_ALFA_Subprogram_Body.
7103 2011-08-02 Javier Miranda <miranda@adacore.com>
7106 (Extract_Dispatching_Call): If the type of the dispatching object is an
7107 access type then return an explicit dereference in the Object out-mode
7110 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7112 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
7113 compatibility checks for all indexes of an array subtype, not just the
7114 first. Reset Has_Dynamic_Range_Check on the subtype before each
7115 potential check to ensure that Insert_Range_Checks will not elide any
7116 of the dynamic checks.
7118 2011-08-02 Yannick Moy <moy@adacore.com>
7120 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
7121 SPARK restriction at parsing time.
7122 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
7123 directive only if the SPARK restriction is set for this unit.
7125 2011-08-02 Yannick Moy <moy@adacore.com>
7127 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
7128 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
7129 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
7130 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
7131 Mark_Non_ALFA_Subprogram_Body.
7132 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
7135 2011-08-02 Yannick Moy <moy@adacore.com>
7137 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
7140 2011-08-02 Robert Dewar <dewar@adacore.com>
7142 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
7143 exp_ch3.adb: Minor reformatting.
7145 2011-08-02 Emmanuel Briot <briot@adacore.com>
7147 * adaint.c (__gnat_locate_exec_on_path): only returns executable
7148 files, not any regular file.
7149 (__gnat_locate_file_with_predicate): new subprogram.
7151 2011-08-02 Yannick Moy <moy@adacore.com>
7153 * sinfo.adb, sinfo.ads: Restrict the use of flags
7154 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
7155 nodes, plus N_Subtype_Declaration for the 2nd one.
7157 2011-08-02 Sergey Rybin <rybin@adacore.com>
7159 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7160 - fix bugs in the description of Source_Trace;
7161 - get rid of UNIT_NAME;
7163 2011-08-02 Javier Miranda <miranda@adacore.com>
7166 (Build_Dispatching_Requeue): Adding support for VM targets
7167 since we cannot directly reference the Tag entity.
7168 * exp_sel.adb (Build_K): Adding support for VM targets.
7169 (Build_S_Assignment): Adding support for VM targets.
7171 (Default_Prim_Op_Position): In VM targets do not restrict availability
7172 of predefined interface primitives to compiling in Ada 2005 mode.
7173 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7174 restricted to compiling in Ada 2005 mode.
7175 (Make_VM_TSD): Generate code that declares and initializes the OSD
7176 record. Needed to support dispatching calls through synchronized
7179 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7180 primitives associated with synchronized interfaces.
7181 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7182 primitives associated with synchronized interfaces.
7184 2011-08-02 Yannick Moy <moy@adacore.com>
7186 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7187 statements hidden in SPARK if preceded by the HIDE directive
7188 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7189 exception handlers as hidden in SPARK if preceded by the HIDE directive
7190 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7191 if starting with the HIDE directive
7192 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7193 starting with the HIDE directive; mark the declarations in a private
7194 part as hidden in SPARK if the private part starts with the HIDE
7196 * restrict.adb, restrict.ads
7197 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7198 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7199 argument node belongs to a part which is hidden in SPARK
7200 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7201 parts in SPARK; protect the possibly costly call to
7202 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7203 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7204 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7205 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7207 (Scan): recognize special comment starting with '#' and followed by
7208 SPARK keyword "hide" as a HIDE directive.
7210 2011-08-02 Yannick Moy <moy@adacore.com>
7212 * types.ads, erroutc.ads: Minor reformatting.
7214 2011-08-02 Vincent Celier <celier@adacore.com>
7216 * link.c: Add response file support for cross platforms.
7218 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7220 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7221 in an association, set parent field of copy before partial analysis.
7222 * sem_res.adb (Resolve_Slice): create reference to itype only when
7223 expansion is enabled.
7225 2011-08-02 Yannick Moy <moy@adacore.com>
7227 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7228 for new flag denoting which subprogram bodies are in ALFA
7229 * restrict.adb, sem_ch7.adb: Update comment
7230 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7231 sem_ch9.adb, sem_res.adb: Add calls to
7232 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7233 * sem_ch6.adb (Analyze_Function_Return): add calls to
7234 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7235 middle of the body, and extended return.
7236 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7237 False when missing return.
7238 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7239 to True for subprograms whose spec is in ALFA. Remove later on the flag
7240 on the entity used for a subprogram body when there exists a separate
7242 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7243 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7244 False, otherwise do nothing.
7246 2011-08-02 Robert Dewar <dewar@adacore.com>
7248 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7250 2011-08-02 Yannick Moy <moy@adacore.com>
7252 * sem_ch4.ads: minor formatting.
7254 2011-08-02 Yannick Moy <moy@adacore.com>
7256 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7257 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7258 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7259 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7260 opt.ads: cleanup of SPARK mode
7262 2011-08-02 Yannick Moy <moy@adacore.com>
7264 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7266 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7267 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7269 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7270 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7271 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7272 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7274 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7276 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7277 functions whose return type is not in ALFA.
7278 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7280 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7281 parameter's type is not in ALFA.
7282 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7285 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7287 * sem_ch6 (Analyze_Expression_Function): treat the function as
7288 Inline_Always, and introduce a subprogram declaration for it when it is
7290 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7291 expression functions, so that the back-end can determine whether they
7292 can in fact be inlined.
7293 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7294 a function body comes from an expression function.
7296 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7298 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7299 null exclusions to test Can_Never_Be_Null on the anonymous access types
7300 of the formals rather than testing the formals themselves. Exclude this
7301 check in cases where the Old_Formal is marked as a controlling formal,
7302 to avoid issuing spurious errors for bodies completing dispatching
7303 operations (due to the flag not getting set on controlling access
7304 formals in body specs).
7305 (Find_Corresponding_Spec): When checking full and subtype conformance of
7306 subprogram bodies in instances, pass Designated and E in that order, for
7307 consistency with the expected order of the formals (New_Id followed by
7310 2011-08-02 Robert Dewar <dewar@adacore.com>
7312 * sem_ch8.adb: Minor reformatting.
7314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7316 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7317 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7318 primitive operations of class-wide actuals.
7320 2011-08-02 Javier Miranda <miranda@adacore.com>
7322 * exp_atag.ads, exp_atag.adb
7323 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7324 since its value is implicitly passed in argument Typ.
7325 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7326 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7327 Build_Common_Dispatching_Select_Statements.
7329 2011-08-02 Robert Dewar <dewar@adacore.com>
7331 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7332 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7335 2011-08-02 Robert Dewar <dewar@adacore.com>
7337 * sem_res.adb: Minor reformatting.
7338 * sem_prag.adb: Minor reformatting.
7340 2011-08-02 Javier Miranda <miranda@adacore.com>
7342 * exp_atag.adb, exp_atags.ads
7343 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7344 by the tagged type Entity. Required to use this routine in the VM
7345 targets since we do not have available the Tag entity in the VM
7348 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7349 Ada.Tags has not been previously loaded.
7351 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7352 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7354 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7355 view of enclosing scopes. Required to handle enclosing scopes that
7356 are synchronized types whose full view is a task type.
7358 (Build_VM_TSDs): Minor code improvement to avoid generating and
7359 analyzing lists with empty nodes.
7360 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7361 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7362 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7363 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7364 (Make_Select_Specific_Data_Table): Add support for VM targets.
7365 (Make_VM_TSD): Generate code to initialize the SSD structure of
7368 2011-08-02 Yannick Moy <moy@adacore.com>
7370 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7371 cross-references section in ALI.
7372 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7373 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7375 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7376 subprogram or package entity of a node
7377 (Is_Local_Reference_Type): new function returns True for references
7378 selected in local cross-references.
7379 (Lt): function extracted from Lt in Output_References
7380 (Write_Entity_Name): function extracted from Output_References
7381 (Generate_Definition): generate reference with type 'D' for definition
7382 of objects (object declaration and parameter specification), with
7383 appropriate locations and units, for use in local cross-references.
7384 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7385 references of type 'I' for initialization in object definition.
7386 (Output_References): move part of function Lt and procedure
7387 Write_Entity_Name outside of the body. Ignore references of types 'D'
7388 and 'I' introduced for local cross-references.
7389 (Output_Local_References): new procedure to output the local
7390 cross-references sections.
7391 (Lref_Entity_Status): new array defining whether an entity is a local
7392 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7393 with 'I' type when initialization expression is present.
7394 * get_scos.adb, get_scos.ads: Correct comments and typos
7396 2011-08-02 Javier Miranda <miranda@adacore.com>
7398 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7400 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7402 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7405 2011-08-02 Vincent Celier <celier@adacore.com>
7407 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7408 (No_Space_Img): New function
7409 (Find_Excluded_Sources): When reading from a file, record the file name
7410 and the line number for each excluded source.
7411 (Mark_Excluded_Sources): When reporting an error, if the excluded
7412 sources were read from a file, include file name and line number in
7415 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7417 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7419 2011-08-02 Robert Dewar <dewar@adacore.com>
7421 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7423 2011-08-02 Javier Miranda <miranda@adacore.com>
7425 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7426 generation of TSDs to the DOTNET compiler.
7427 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7428 generation of TSDs to the DOTNET compiler.
7430 2011-08-02 Javier Miranda <miranda@adacore.com>
7432 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7433 record of all the tagged types declared inside library level package
7434 declarations, library level package bodies or library level subprograms.
7435 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7436 associated with a given tagged type.
7437 (Build_VM_TSDs): New subprogram.
7438 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7439 compilation units that are subprograms.
7440 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7441 compilation units that are package bodies.
7442 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7443 units that are a package declaration or a package instantiation.
7444 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7445 reorganization to improve the error generated by the frontend when the
7446 function Ada.Tags.Secondary_Tag is not available.
7447 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7448 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7450 2011-08-02 Javier Miranda <miranda@adacore.com>
7452 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7454 2011-08-02 Robert Dewar <dewar@adacore.com>
7456 * s-imenne.ads: Minor reformatting.
7458 2011-08-02 Robert Dewar <dewar@adacore.com>
7460 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7461 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7462 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7464 2011-08-02 Robert Dewar <dewar@adacore.com>
7466 * einfo.ads (Materialize_Entity): Document this is only for renamings
7467 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7468 required debug information in the case where we transform the object
7469 declaration into a renaming declaration.
7470 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7472 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7475 2011-08-02 Robert Dewar <dewar@adacore.com>
7477 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7478 Suppress_Init_Procs.
7479 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7480 Suppress_Initialization/Initialization_Suppressed.
7481 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7482 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7483 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7484 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7486 2011-08-02 Robert Dewar <dewar@adacore.com>
7488 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7491 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7493 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7494 only have inheritable classwide pre/postconditions.
7496 2011-08-02 Javier Miranda <miranda@adacore.com>
7498 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7499 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7500 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7501 checks if the external tag of a type is the same as the external tag
7502 of some other declaration.
7504 2011-08-02 Thomas Quinot <quinot@adacore.com>
7506 * s-taskin.ads: Minor reformatting.
7508 2011-08-02 Emmanuel Briot <briot@adacore.com>
7510 * g-comlin.adb (Display_Help): swap the order in which it prints the
7511 short help and the general usage.
7513 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7515 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7516 the aspect declarations and attach them to the generic copy for
7517 subsequent analysis.
7518 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7519 declarations of the generic tree to the new subprogram declarations.
7520 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7521 conditions that apply to a subprogram instance.
7523 2011-08-02 Robert Dewar <dewar@adacore.com>
7525 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7527 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7529 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7530 private type with a tagged full view is not derived in the immediate
7531 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7533 2011-08-02 Robert Dewar <dewar@adacore.com>
7535 * exp_ch4.adb: Minor reformatting.
7537 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7539 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7540 Ada2012 iterator, the loop will be rewritten during expansion into a
7541 while loop with a cursor and an element declaration. Do not analyze the
7542 body in this case, because if the container is for indefinite types the
7543 actual subtype of the elements will only be determined when the cursor
7544 declaration is analyzed.
7546 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7548 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7549 size/alignment related attributes in CodePeer_Mode.
7551 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7553 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7554 Prepend_Element, since this can result in the operation getting the
7555 wrong slot in the full type's dispatch table if the full type has
7556 inherited operations. The incomplete type's operation will get added
7557 to the proper position in the full type's primitives
7558 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7559 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7560 dispatching operations, since there are cases where nonprimitive
7561 subprograms can get added to the list of incomplete dependents (such
7562 as subprograms in nested packages).
7563 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7564 private part when determining whether to add a primitive with a
7565 parameter of a tagged incomplete type to the Private_Dependents list.
7566 Such primitives can also occur in the visible part, and should not have
7567 been excluded from being private dependents.
7568 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7569 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7570 list of a Taft-amendment incomplete type is a primitive before issuing
7571 an error that the full type must appear in the same unit. There are
7572 cases where nonprimitives can be in the list (such as subprograms in
7574 * sem_disp.adb (Derives_From): Use correct condition for checking that
7575 a formal's type is derived from the type of the corresponding formal in
7576 the parent subprogram (the condition was completely wrong). Add
7577 checking that was missing for controlling result types being derived
7578 from the result type of the parent operation.
7580 2011-08-02 Yannick Moy <moy@adacore.com>
7582 * errout.adb (First_Node): minor renaming
7583 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7586 2011-08-02 Yannick Moy <moy@adacore.com>
7588 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7589 before accessing operands.
7590 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7591 decide whether an initialization expression respects SPARK rules, as
7592 the plain node is the expanded one. This allows for more valid warnings
7594 * gnat_rm.texi: Minor update.
7596 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7598 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7601 2011-08-02 Robert Dewar <dewar@adacore.com>
7603 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7605 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7607 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7608 loop statements and the element renaming declaration with a block when
7609 the element type is controlled.
7611 2011-08-02 Yannick Moy <moy@adacore.com>
7613 * sinfo.ads: Minor formatting.
7615 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7617 * sem_aggr.adb (Add_Association): if the association has a box and no
7618 expression, use the Sloc of the aggregate itself for the new
7620 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7623 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7625 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7626 When a container is provided via a function call, generate a renaming
7627 of the function result. This avoids the creation of a transient scope
7628 and the premature finalization of the container.
7629 * exp_ch7.adb (Is_Container_Cursor): Removed.
7630 (Wrap_Transient_Declaration): Remove the supression of the finalization
7631 of the list controller when the declaration denotes a container cursor,
7634 2011-08-02 Yannick Moy <moy@adacore.com>
7636 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7637 node is from source, instead of the original node being from source.
7639 (Resolve_Array_Aggregate): refine the check for a static expression, to
7640 recognize also static ranges
7641 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7642 Array_Type_Declaration): postpone the test for the type being a subtype
7643 mark after the type has been resolved, so that component-selection and
7644 expanded-name are discriminated.
7645 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7646 to distinguish the case of an iteration scheme, so that an error is
7647 issed on a non-static range in SPARK except in an iteration scheme.
7648 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7649 In_Iter_Schm = True.
7650 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7651 user-defined operators so that they are allowed in renaming
7653 (Find_Selected_Component): refine the check for prefixing of operators
7654 so that they are allowed in renaming. Move the checks for restrictions
7655 on selector name after analysis discriminated between
7656 component-selection and expanded-name.
7657 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7658 concatenation argument of string type if it is static.
7659 * sem_util.adb, sem_util.ads
7660 (Check_Later_Vs_Basic_Declarations): add a new function
7661 Is_Later_Declarative_Item to decice which declarations are allowed as
7662 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7663 mode, add that renamings are considered as later items.
7664 (Enclosing_Package): new function to return the enclosing package
7665 (Enter_Name): correct the rule for homonyms in SPARK
7666 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7667 from source (result of expansion) to avoid issuing wrong warnings.
7669 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7671 * errout.adb: On anything but an expression First_Node returns its
7674 2011-08-02 Pascal Obry <obry@adacore.com>
7676 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7678 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7680 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7681 Set the associated loop as the related expression of internally
7683 * exp_ch7.adb (Is_Container_Cursor): New routine.
7684 (Wrap_Transient_Declaration): Supress the finalization of the list
7685 controller when the declaration denotes a container cursor.
7687 2011-08-02 Yannick Moy <moy@adacore.com>
7689 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7691 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7692 expression is a simple expression. This check cannot be performed in
7693 the semantics, so just drop it.
7694 (P_Index_Or_Discriminant_Constraint): move check that the index or
7695 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7696 semantics. Other cases were previously checked in the semantics.
7697 * par-ch4.adb (P_Name): move checks that a selector name is not
7698 character literal or an operator symbol to Find_Selected_Component in
7700 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7701 declarations are not placed after later declarations in a separate
7702 procedure in Sem_Util (possibly not the best choice?), to be used both
7703 during parsing, for Ada 83 mode, and during semantic analysis, for
7705 * par-endh.adb (Check_End): move check that end label is not missing
7706 to Process_End_Label in the semantics
7707 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7708 the special case for SPARK restriction
7709 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7710 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7711 parameter Force to issue the error message even on internal node (used
7712 for generated end label). Call Check_Restriction to check when an error
7713 must be issued. In SPARK mode, issue an error message even if the
7714 restriction is not set.
7715 (Check_Restriction): new procedure with an additional out parameter to
7716 inform the caller that a message has been issued
7717 * sem_aggr.adb: Minor modification of message
7718 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7719 instead of issuing an error message directly
7720 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7721 declarations are not placed after later declarations, by calling
7722 Check_Later_Vs_Basic_Declarations
7723 (Analyze_Subtype_Declaration): move here the check that an index or
7724 discriminant constraint must be a subtype mark. Change the check that
7725 a subtype of String must start at one so that it works on subtype marks.
7726 * sem_ch4.adb (Analyze_Call): move here the check that a named
7727 association cannot follow a positional one in a call
7728 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7729 instead of issuing an error message directly
7730 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7731 selector name is not a character literal or an operator symbol. Move
7732 here the check that the prefix of an expanded name cannot be a
7733 subprogram or a loop statement.
7734 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7735 procedure called from parsing and semantics to check that basic
7736 declarations are not placed after later declarations
7737 (Process_End_Label): move here the check that end label is not missing
7739 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7741 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7742 representation clause in codepeer mode, since it confuses CodePeer and
7743 does not bring useful info.
7745 2011-08-02 Ed Falis <falis@adacore.com>
7747 * init.c: initialize fp hw on MILS.
7749 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7751 * errout.adb (First_Node): for bodies, return the node itself (small
7752 optimization). For other nodes, do not check source_unit if the node
7753 comes from Standard.
7755 2011-08-02 Robert Dewar <dewar@adacore.com>
7757 * exp_ch3.adb: Minor comment additions.
7758 * sem_ch13.adb: Minor reformatting.
7760 2011-08-02 Pascal Obry <obry@adacore.com>
7762 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7764 2011-08-02 Robert Dewar <dewar@adacore.com>
7766 * sem_attr.adb: Minor reformatting.
7768 2011-08-02 Robert Dewar <dewar@adacore.com>
7770 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7771 (Has_Default_Component_Value): Removed
7772 * einfo.ads Comment updates
7773 (Has_Default_Aspect): Replaces Has_Default_Value
7774 (Has_Default_Component_Value): Removed
7776 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7778 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7779 (Get_Simple_Init_Val): Handle Default_Value aspect
7780 (Needs_Simple_Initialization): Handle Default_Value aspect
7781 * exp_ch3.ads: Needs_Simple_Initialization
7782 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7783 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7785 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7786 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7787 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7789 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7791 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7792 package containing iteration primitives.
7793 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7797 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7798 "of", pre-analyze expression in case it is a function call with
7799 finalization actions that must be placed ahead of the loop.
7800 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7801 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7803 2011-08-02 Geert Bosch <bosch@adacore.com>
7805 * cstand.adb (Create_Float_Types): Only consider C's long double for
7806 Long_Long_Float, in addition to double.
7808 2011-08-02 Robert Dewar <dewar@adacore.com>
7810 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7811 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7812 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7815 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7817 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7820 2011-08-02 Javier Miranda <miranda@adacore.com>
7822 * einfo.ads, einfo.adb
7823 (Original_Access_Type): Move this attribute to Node26 since there was
7824 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7825 which causes conflicts and breaks the generation of the .NET compiler.
7826 (Interface_Name): Add missing documentation on JGNAT only uses of
7829 2011-08-02 Geert Bosch <bosch@adacore.com>
7831 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7832 (Find_Back_End_Float_Type): Likewise
7833 (Create_Back_End_Float_Types): Likewise
7834 (Create_Float_Types): Likewise
7835 (Register_Float_Type): Likewise
7836 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7837 Nlist and split out type selection in new local Find_Base_Type function.
7838 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7840 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7842 2011-08-02 Robert Dewar <dewar@adacore.com>
7844 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7846 * opt.ads: Minor comment change.
7847 * sem_ch12.adb: Minor code reorganization.
7849 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7851 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7852 subtype's list of rep items to the list on the full subtype in the case
7853 where the lists are the same.
7855 2011-08-02 Geert Bosch <bosch@adacore.com>
7857 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7858 using the one from System.Strings, which also deallocates all strings.
7860 2011-08-02 Geert Bosch <bosch@adacore.com>
7862 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7864 * gcc-interface/Make-lang.in: Update dependencies.
7866 2011-08-02 Olivier Hainque <hainque@adacore.com>
7868 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7871 2011-08-02 Javier Miranda <miranda@adacore.com>
7873 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7874 associated with anonymous access to subprograms.
7876 2011-08-02 Geert Bosch <bosch@adacore.com>
7879 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7880 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7881 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7882 (Add_Symbol_Definition): Move to switch-c.adb
7883 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7884 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7885 (Add_Symbol_Definition): Move to switch-c.adb.
7886 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7888 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7890 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7891 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7893 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7894 (Add_Symbol_Definition): Moved from Prepcomp.
7895 * switch-c.ads: Update copyright notice. Use String_List instead of
7896 Argument_List, removing dependency on System.OS_Lib.
7898 2011-08-02 Yannick Moy <moy@adacore.com>
7900 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7901 mode on initialization expression which does not respect SPARK
7903 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7904 if the tree referenced by its argument represents an initialization
7905 expression in SPARK, suitable for initializing an object in an object
7908 2011-08-02 Javier Miranda <miranda@adacore.com>
7910 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7911 internally generated access to subprogram with its associated protected
7913 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7915 2011-08-02 Geert Bosch <bosch@adacore.com>
7917 * cstand.adb (Register_Float_Type): Print information about type to
7918 register, if the Debug_Flag_Dot_B is set.
7919 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7920 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7921 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7922 with a requested precision of more than Max_Digits digits and no more
7923 than Max_Base_Digits digits, if a range specification is present and the
7924 Predefined_Float_Types list has a suitable type to derive from.
7925 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7926 case of type completion with pragma Import
7928 (Process_Import_Predefined_Type): Processing to complete a type
7929 with pragma Import. Currently supports floating point types only.
7930 (Set_Convention_From_Pragma): Do nothing without underlying type.
7931 (Process_Convention): Guard against absence of underlying type,
7932 which may happen when importing incomplete types.
7933 (Process_Import_Or_Interface): Handle case of importing predefined
7934 types. Tweak error message.
7936 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7938 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7939 functions to previous change. Reorganize code slightly.
7941 2011-08-02 Geert Bosch <bosch@adacore.com>
7943 * back_end.ads (Register_Type_Proc): New call back procedure type for
7944 allowing the back end to provide information about available types.
7945 (Register_Back_End_Types): New procedure to register back end types.
7946 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7948 * cstand.adb (Back_End_Float_Types): New list for floating point types
7949 supported by the back end.
7950 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7951 (Copy_Float_Type): New procedure to make new copies of predefined types.
7952 (Register_Float_Type): New call back procedure to populate the BEFT list
7953 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7954 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7955 (Create_Float_Types): New procedure to create entities for floating
7956 point types predefined in Standard, and put these and any remaining
7957 BEFTs on the Predefined_Float_Types list.
7958 * stand.ads (Predefined_Float_Types): New list for predefined floating
7959 point types that do not have declarations in package Standard.
7961 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7963 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7964 entity node for the unit containing the parameter.
7965 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7966 (Add_Inlined_Subprogram): Likewise.
7967 * gcc-interface/Make-lang.in: Update dependencies.
7969 2011-08-02 Thomas Quinot <quinot@adacore.com>
7971 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7974 2011-08-02 Geert Bosch <bosch@adacore.com>
7976 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7978 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7980 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7981 computed value of Base_Type.
7983 2011-08-02 Yannick Moy <moy@adacore.com>
7985 * restrict.adb (Check_Restriction): issue an error for any use of
7986 class-wide, even if the No_Dispatch restriction is not set.
7987 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7988 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7989 when completing a private extension, the type named in the private part
7990 is not the same as that named in the visible part.
7991 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7992 of an inherited primitive operations of a tagged type or type extension
7993 that returns the tagged type.
7994 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7995 function which returns True for an implicit operation inherited by the
7996 derived type declaration for the argument type.
7997 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8002 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8003 Process_Bounds, to perform analysis with expansion of a range or an
8004 expression that is the iteration scheme for a loop.
8005 (Analyze_Iterator_Specification): If domain of iteration is given by a
8006 function call with a controlled result, as is the case if call returns
8007 a predefined container, ensure that finalization actions are properly
8009 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8011 2011-08-02 Javier Miranda <miranda@adacore.com>
8013 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8014 * gcc-interface/Make-lang.in: Update dependencies.
8016 2011-08-02 Javier Miranda <miranda@adacore.com>
8018 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8019 determine if the analysis is performed using N or Original_Node (N).
8020 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8021 functionality of routine Is_Variable avoids code duplication.
8022 * checks.adb (Determine_Range): Handle temporaries generated by
8023 Remove_Side_Effects.
8025 2011-08-02 Javier Miranda <miranda@adacore.com>
8027 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8028 expansion of the condition. Required since the previous analysis was
8029 done with expansion disabled (see Resolve_Quantified_Expression) and
8030 hence checks were not inserted and record comparisons have not been
8033 2011-08-02 Ed Falis <falis@adacore.com>
8035 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8038 2011-08-02 Bob Duff <duff@adacore.com>
8040 * opt.ads: Minor comment fix.
8042 2011-08-02 Bob Duff <duff@adacore.com>
8044 * sem_ch12.adb (Analyze_Package_Instantiation,
8045 Analyze_Subprogram_Instantiation): Turn off style checking while
8046 analyzing an instance. Whatever style checks that apply to the generic
8047 unit should apply, so it makes no sense to apply them in an instance.
8048 This was causing trouble when compiling an instance of a runtime
8049 unit that violates the -gnatyO switch.
8050 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8051 one of the two case statements, causing spurious errors.
8053 2011-08-02 Robert Dewar <dewar@adacore.com>
8055 * uname.adb: Minor reformatting.
8056 * gnatcmd.adb: Minor reformatting.
8057 * exp_attr.adb: Minor reformatting.
8059 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8061 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8062 No_Dispatching_Calls, do not look for the Assign primitive, because
8063 predefined primitives are not created in this case.
8065 2011-08-02 Bob Duff <duff@adacore.com>
8067 * stylesw.ads: Minor comment fixes.
8069 2011-08-02 Robert Dewar <dewar@adacore.com>
8071 * freeze.adb (Add_To_Result): New procedure.
8073 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8075 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8076 time, if the specific run-time routines for handling streams of strings
8077 are not available, use the default mechanism.
8079 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8081 * s-regpat.ads: Fix typo.
8083 2011-08-02 Vincent Celier <celier@adacore.com>
8085 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8086 not null, call it to create the in memory config project file without
8087 parsing an existing default config project file.
8089 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8091 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8093 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8095 * sem_elim.adb: an abstract subprogram does not need an eliminate
8096 pragma for its descendant to be eliminable.
8098 2011-08-02 Ed Falis <falis@adacore.com>
8100 * init.c: revert to handling before previous checkin for VxWorks
8101 * s-intman-vxworks.adb: delete unnecessary declarations related to
8102 using Ada interrupt facilities for handling signals.
8103 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8104 * s-intman-vxworks.ads: Import __gnat_install_handler as
8105 Initialize_Interrupts.
8106 * s-taprop-vxworks.adb: Delete Signal_Mask.
8107 (Abort_Handler): change construction of mask to unblock exception
8110 2011-08-02 Jerome Guitton <guitton@adacore.com>
8112 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8113 Debug_Raise_Exception before propagation starts.
8115 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8117 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8118 to Restriction_Check_Required.
8119 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8120 * sem_res.adb (Resolve_Call): Likewise.
8121 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8123 2011-08-02 Bob Duff <duff@adacore.com>
8125 * stylesw.ads: Update comment.
8126 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8127 * errout.ads: Remove obsolete comment.
8129 2011-08-02 Javier Miranda <miranda@adacore.com>
8131 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8132 (Set_Is_Safe_To_Reevaluate): new procedure.
8133 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8134 assignment is allowed on safe-to-reevaluate variables.
8135 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8136 temporary created to remove side effects in expressions that use
8137 the secondary stack as safe-to-reevaluate.
8138 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8139 variables that are not true constants.
8141 2011-08-02 Robert Dewar <dewar@adacore.com>
8143 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8144 sem_res.adb, sem_ch6.adb: Minor reformatting.
8146 2011-08-02 Jerome Guitton <guitton@adacore.com>
8148 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8150 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8152 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8153 not set Overridden_Operation if subprogram is an initialization
8156 2011-08-02 Yannick Moy <moy@adacore.com>
8158 * par-ch6.adb: Correct obsolete name in comments
8159 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8160 which takes two message arguments (existing function takes one), with
8161 second message used for continuation.
8162 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8163 block statements that originate from a source block statement, not
8164 generated block statements
8165 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8166 symmetry with procedure case
8167 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8168 function to issue an error in formal mode if a package specification
8169 contains more than one tagged type or type extension.
8170 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8171 parameters matching formals of tagged types are objects (or ancestor
8172 type conversions of objects), not general expressions. Issue an error
8173 on view conversions that are not involving ancestor conversion of an
8175 (Resolve_Type_Conversion): in formal mode, issue an error on the
8176 operand of an ancestor type conversion which is not an object
8177 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8178 procedure so that it works also for actuals of function calls
8179 (Is_Actual_Tagged_Parameter): new function which determines if its
8180 argument is an actual parameter of a formal of tagged type in a
8182 (Is_SPARK_Object_Reference): new function which determines if the tree
8183 referenced by its argument represents an object in SPARK
8185 2011-08-02 Robert Dewar <dewar@adacore.com>
8187 * sem_ch3.adb: Minor reformatting
8188 Minor comment addition
8189 Minor error msg text change
8191 2011-08-02 Javier Miranda <miranda@adacore.com>
8193 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8194 function. Used to be more precise when we generate a variable plus one
8195 assignment to remove side effects in the evaluation of the Bound
8197 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8198 of the bound expression to force its re-analysis and thus expand the
8199 associated transient scope (if required). Code cleanup replacing the
8200 previous code that declared the constant entity by an invocation to
8201 routine Force_Evaluation which centralizes this work in the frontend.
8203 2011-08-02 Robert Dewar <dewar@adacore.com>
8205 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8206 (Base_Type): Now uses improved Is_Base_Type function
8207 * einfo.ads (Base_Type): Inline this function
8209 2011-08-02 Robert Dewar <dewar@adacore.com>
8211 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8212 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8214 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8216 * gcc-interface/Make-lang.in: Update dependencies.
8217 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8220 2011-08-02 Yannick Moy <moy@adacore.com>
8222 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8223 non-simple expression used in delta constraint
8224 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8225 index constraint which is not a subtype mark
8226 * par.adb: With and use Restrict
8227 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8228 mode on component type which is not a subtype mark and default
8229 expression on component
8230 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8231 of string which does not have a lower index bound equal to 1
8232 (Array_Type_Declaration): issue an error in formal mode on index or
8233 component type which is not a subtype mark, and on aliased keyword on
8235 (Derived_Type_Declaration): issue an error in formal mode on interface,
8236 limited or abstract type
8237 (Record_Type_Declaration): issue an error in formal mode on interface
8238 (Record_Type_Definition): issue an error in formal mode on tagged types
8239 and type extensions not declared in the specification of a library unit
8240 package; on null non-tagged record; on variant part
8242 2011-08-02 Vincent Celier <celier@adacore.com>
8244 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8245 not declared for qualified library project when Library_Name is not
8246 declared, but Library_Dir is.
8248 2011-08-02 Robert Dewar <dewar@adacore.com>
8250 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8251 pragmas (affects aspects [Component_]Default_Value
8252 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8253 component type for the resolution
8255 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8257 * einfo.adb (Base_Type): Tune implementation for speed.
8259 2011-08-02 Robert Dewar <dewar@adacore.com>
8261 * freeze.adb: Minor reformatting.
8263 2011-08-02 Thomas Quinot <quinot@adacore.com>
8265 * scos.ads: Update comments.
8267 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8269 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8270 base type, because the parent may be a subtype of a private type whose
8271 convention is established in a private part.
8273 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8275 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8276 statement in a block when the expansion of the return expression has
8277 created a finalization chain.
8278 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8279 with the parent node.
8280 Add N_Extended_Return_Statement to handle the case where a transient
8281 object declaration appears in the Return_Object_Declarations list of
8282 an extended return statement.
8284 2011-08-02 Matthew Gingell <gingell@adacore.com>
8286 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8287 unused parameter 'name'.
8289 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8291 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8292 inherited operation, check whether its alias, which is the source
8293 operastion that it renames, has been marked eliminated.
8295 2011-08-02 Javier Miranda <miranda@adacore.com>
8297 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8298 in-mode parameter whose type is an access type since it can be used to
8299 modify its designated object. Enforce code that handles as safe an
8300 access type that is not access-to-constant but it is the result of a
8301 previous removal of side-effects.
8302 (Remove_Side_Effects): Minor code reorganization of cases which require
8303 no action. Done to incorporate documentation on new cases uncovered
8304 working in this ticket: no action needed if this routine was invoked
8305 too early and the nodes are not yet decorated.
8306 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8307 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8308 were issued with actuals that are implicitly provided by
8311 2011-08-02 Robert Dewar <dewar@adacore.com>
8313 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8315 2011-08-02 Yannick Moy <moy@adacore.com>
8317 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8318 to issue an error in formal mode on attribute not supported in this mode
8319 (Analyze_Attribute): issue errors on standard attributes not supported
8321 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8322 comment, and issue error in formal mode on modulus which is not a power
8324 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8326 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8328 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8329 operator on modular type (except 'not').
8331 2011-08-02 Robert Dewar <dewar@adacore.com>
8333 * gnat_rm.texi: Minor reformatting.
8335 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8337 * s-osinte-linux.ads: Minor comment update and reformatting.
8338 * i-cexten.ads: Make this unit pure, as for its parent.
8339 Will allow its usage in more contexts if needed.
8341 2011-08-02 Robert Dewar <dewar@adacore.com>
8343 * s-utf_32.ads: Minor comment fix.
8345 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8347 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8348 operation of a tagged synchronized type, handle the case where the
8349 controlling argument is overloaded.
8351 2011-08-02 Yannick Moy <moy@adacore.com>
8353 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8354 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8355 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8356 SPARK mode and formal verification mode on processing SPARK restriction
8357 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8358 requiring consistency checking.
8360 2011-08-02 Robert Dewar <dewar@adacore.com>
8362 * sem_res.adb: Minor reformatting.
8364 2011-08-02 Robert Dewar <dewar@adacore.com>
8366 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8367 a-cforse.ads: Remove unneeded with of Ada.Containers
8368 Remove commented out pragma Inline's
8369 Move specifications of new subprograms to the actual specs
8371 2011-08-02 Yannick Moy <moy@adacore.com>
8373 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8374 a-cforse.ads: Update comments.
8376 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8378 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8380 2011-08-02 Robert Dewar <dewar@adacore.com>
8382 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8383 a-cforse.ads, a-cofove.ads: Minor reformatting.
8385 2011-08-02 Claire Dross <dross@adacore.com>
8387 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8388 a-cofove.ads: Add comments.
8390 2011-08-02 Yannick Moy <moy@adacore.com>
8392 * gnat_rm.texi: Document formal containers.
8394 2011-08-02 Emmanuel Briot <briot@adacore.com>
8396 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8399 2011-08-02 Robert Dewar <dewar@adacore.com>
8401 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8404 2011-08-02 Robert Dewar <dewar@adacore.com>
8406 * aspects.adb: New aspects Default_Value and Default_Component_Value
8407 New format of Aspect_Names table checks for omitted entries
8408 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8409 handling of boolean aspects for derived types.
8410 New aspects Default_Value and Default_Component_Value
8411 New format of Aspect_Names table checks for omitted entries
8412 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8413 (Has_Default_Value): New flag
8414 (Has_Default_Component_Value): New flag
8415 (Has_Default_Value): New flag
8416 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8418 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8419 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8420 Default_Value and Default_Component_Value
8421 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8422 New aspects Default_Value and Default_Component_Value
8423 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8424 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8426 2011-08-02 Vincent Celier <celier@adacore.com>
8428 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8429 inherit library kind.
8431 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8433 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8436 2011-08-02 Robert Dewar <dewar@adacore.com>
8438 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8440 2011-08-02 Yannick Moy <moy@adacore.com>
8442 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8444 2011-08-02 Robert Dewar <dewar@adacore.com>
8446 * impunit.adb: Add comment.
8448 2011-08-02 Yannick Moy <moy@adacore.com>
8450 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8451 qualification of aggregates in formal mode
8452 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8454 (Resolve_Aggregate): complete the test that an aggregate is adequately
8455 qualified in formal mode
8457 2011-08-02 Pascal Obry <obry@adacore.com>
8459 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8460 * mlib-prj.adb: Supress warning when compiling binder generated file.
8461 (Build_Library): Supress all warnings when compiling the binder
8464 2011-08-02 Yannick Moy <moy@adacore.com>
8466 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8468 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8469 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8470 Add with/use clauses to make Check_Formal_Restriction visible
8472 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8474 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8475 in-parameters when type of the generic formal is private in the generic
8476 spec and non-private in the body.
8478 2011-08-02 Claire Dross <dross@adacore.com>
8480 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8481 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8482 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8483 * impunit.adb, Makefile.rtl: Take new files into account.
8485 2011-08-02 Robert Dewar <dewar@adacore.com>
8487 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8488 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8490 2011-08-02 Yannick Moy <moy@adacore.com>
8492 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8494 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8495 matching static array bounds, taking into account the special case of
8497 * sem_ch3.adb: Typo in comment.
8499 2011-08-02 Yannick Moy <moy@adacore.com>
8501 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8502 which issues an error in formal mode if its argument node is originally
8504 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8505 has a discriminant specification so that it does not include the case
8507 (Derived_Type_Declaration): move here the test that a derived type has a
8508 discriminant specification
8509 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8510 first element of a component association before accessing its choices
8511 (presence of component association is not enough)
8512 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8513 declaration is a library item before accessing the next element in a
8514 list, as library items are not member of lists
8515 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8516 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8517 Check_Formal_Restriction whenever possible.
8519 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8521 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8522 reference when needed.
8524 2011-08-02 Bob Duff <duff@adacore.com>
8526 * gnat_ugn.texi: Fix typo.
8528 2011-08-02 Vincent Celier <celier@adacore.com>
8530 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8531 archive file name. Do not use the full path name of archives for Open
8534 2011-08-02 Robert Dewar <dewar@adacore.com>
8536 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8537 Analyze_Aspect_Specifications
8539 (Analyze_Aspect_Specifications): New handling for boolean aspects
8540 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8541 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8542 sequence for Analyze_Aspect_Specifications
8543 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8544 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8546 2011-08-02 Robert Dewar <dewar@adacore.com>
8548 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8549 aspects, since these no longer exist.
8551 2011-08-02 Robert Dewar <dewar@adacore.com>
8553 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8554 semicolon, do not try to see if there are aspects following it.
8555 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8558 2011-08-02 Robert Dewar <dewar@adacore.com>
8560 * sem_ch8.adb, aspects.ads: Minor reformatting.
8562 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8564 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8565 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8567 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8569 2011-08-02 Yannick Moy <moy@adacore.com>
8571 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8572 mode on subprogram declaration outside of package specification, unless
8573 it is followed by a pragma Import
8574 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8575 Access_Type_Declaration): issue error in formal mode on access type
8576 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8578 (Analyze_Object_Declaration): issue error in formal mode on object
8579 declaration which does not respect SPARK restrictions
8580 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8581 declaration which does not respect SPARK restrictions
8582 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8583 error in formal mode on digits or delta constraint
8584 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8585 decimal fixed point type
8586 (Derived_Type_Declaration): issue error in formal mode on derived type
8587 other than type extensions of tagged record types
8588 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8589 with check on access definition
8590 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8591 mode on protected definition.
8592 (Analyze_Task_Definition): issue error in formal mode on task definition
8594 2011-08-02 Robert Dewar <dewar@adacore.com>
8596 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8598 2011-08-02 Javier Miranda <miranda@adacore.com>
8600 * sem_ch6.adb (Can_Override_Operator): New function.
8601 (Verify_Overriding_Indicator): Add missing code to check overriding
8602 indicator in operators. Fixes regression.
8603 (Check_Overriding_Indicator): Minor reformating after replacing the
8604 code that evaluates if the subprogram can override an operator by
8605 invocations to the above new function.
8607 (Write_Field26_Name): Add missing code to ensure that, following
8608 the documentation in einfo.ads, this field is not shown as attribute
8609 "Static_Initialization" on non-dispatching functions.
8611 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8613 * sem_res.adb (Resolve_Call): A call to
8614 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8615 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8616 i.e., when the second parameter is of type Time_Span.
8618 2011-08-02 Vincent Celier <celier@adacore.com>
8620 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8621 with an archive instead of -L<library dir> -l<library name>.
8623 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8625 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8626 mark the base types In_Use in addition to making the operations
8629 2011-08-02 Ed Falis <falis@adacore.com>
8631 * init.c: add and setup __gnat_signal_mask for the exception signals
8632 * s-inmaop-vxworks.adb: new file.
8633 * s-intman-vxworks.adb: remove unnecessary initializations and
8635 * s-intman-vxworks.ads: remove unnecessary variable
8636 * s-taprop-vxworks.adb: simplify signal initialization
8638 2011-08-02 Robert Dewar <dewar@adacore.com>
8640 * sem_ch8.adb: Minor code reorganization, comment updates.
8642 2011-08-02 Robert Dewar <dewar@adacore.com>
8644 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8645 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8647 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8648 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8650 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8652 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8653 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8654 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8655 use_type_clauses, to handle more efficiently use_type and use_all_type
8657 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8658 Ada2012 Use_All_Type clause.
8659 (Use_Class_Wide_Operations): new procedure.
8661 2011-08-02 Robert Dewar <dewar@adacore.com>
8663 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8664 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8665 expression to expression function.
8667 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8669 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8670 if types are compatible.
8672 2011-08-02 Yannick Moy <moy@adacore.com>
8674 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8675 returns True if its argument array types have same dimension and same
8676 static bounds at each index.
8677 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8678 OUT or IN OUT paramaters which are not view conversions in SPARK.
8679 (Resolve_Arithmetic_Op): issue an error in formal mode on
8680 multiplication or division with operands of fixed point types which are
8681 not qualified or explicitly converted.
8682 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8683 Boolean or array type (except String) operands.
8684 (Resolve_Equality_Op): issue an error in formal mode on equality
8685 operators for array types other than String with non-matching static
8687 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8688 for array types with non-matching static bounds. Factorize the code in
8689 Matching_Static_Array_Bounds.
8690 (Resolve_Qualified_Expression): issue an error in formal mode on
8691 qualified expressions for array types with non-matching static bounds.
8692 (Resolve_Type_Conversion): issue an error in formal mode on type
8693 conversion for array types with non-matching static bounds
8695 2011-08-02 Robert Dewar <dewar@adacore.com>
8697 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8699 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8701 * par-ch9.adb: save location of entry for proper error message.
8703 2011-08-02 Javier Miranda <miranda@adacore.com>
8705 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8706 (Use_Full_View) which permits this routine to climb through the
8707 ancestors using the full-view of private parents.
8708 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8709 Use_Full_View to true in calls to Is_Ancestor.
8710 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8711 true in call to Is_Ancestor.
8712 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8713 Use_Full_View to true in call to Is_Ancestor.
8714 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8715 call to Is_Ancestor.
8716 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8717 Use_Full_View to true in calls to Is_Ancestor.
8718 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8719 Make_Select_Specific_Data_Table, Register_Primitive,
8720 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8721 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8722 to true in call to Is_Ancestor.
8723 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8724 Use_Full_View to true in calls to Is_Ancestor.
8726 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8727 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8729 2011-08-02 Robert Dewar <dewar@adacore.com>
8731 * gnat_rm.texi: Minor reformatting.
8732 * sem_prag.adb: Minor reformatting.
8734 2011-08-02 Tristan Gingold <gingold@adacore.com>
8736 * vms_data.ads: Add VMS qualifier for -gnateP.
8738 2011-08-02 Robert Dewar <dewar@adacore.com>
8740 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8741 * par-ch7.adb (P_Package): Proper placement of aspects for package
8743 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8744 (End_Statements): Add Is_Sloc parameterr
8745 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8746 (Check_End): Ad Is_Sloc parameter
8747 (End_Statements): Add Is_Sloc parameterr
8749 2011-08-02 Vincent Celier <celier@adacore.com>
8751 * ug_words: Add VMS qualifier equivalent to -gnateP:
8752 /SYMBOL_PREPROCESSING.
8754 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8756 * gnat-style.texi: For hexadecimal numeric literals the typical
8757 grouping of digits is 4 to represent 2 bytes.
8758 A procedure spec which is split into several lines is indented two
8761 2011-08-02 Yannick Moy <moy@adacore.com>
8763 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8764 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8765 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8767 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8768 choice in array aggregate
8769 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8771 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8772 positional and named aggregate for record, or others in record
8773 aggregate, or multiple choice in record aggregate
8774 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8775 array operands to logical operations AND, OR and XOR do not have the
8776 same static lower and higher bounds
8777 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8779 2011-08-01 Robert Dewar <dewar@adacore.com>
8781 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8782 Replaces Last_Source_Node_In_Sequence.
8783 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8784 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8785 parens and blank in string (this was inconsistently implemented).
8787 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8788 blank in string (this was inconsistently implemented).
8790 (Set_Global_Switches): Set formal mode switches appropriately
8791 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8793 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8794 call Set_Error_Msg_Lang to set "spark" as language name.
8795 * par.adb: Remove unnecessary call to set formal language for errout
8796 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8797 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8799 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8800 calls to it, moved after resolution so that types are known
8801 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8802 result of concatenation is not of type String
8803 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8804 concatenation is not properly restricted
8805 * gnat_rm.texi: Add doc on pragma Spark_95.
8806 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8807 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8808 * gcc-interface/Make-lang.in: Update dependencies.
8810 2011-08-01 Javier Miranda <miranda@adacore.com>
8812 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8813 condition that detects if the overridden operation must replace an
8816 2011-08-01 Javier Miranda <miranda@adacore.com>
8818 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8819 code declarations inserted by Insert_Actions in each alternative of the
8820 N_Case_Expression node.
8822 2011-08-01 Robert Dewar <dewar@adacore.com>
8824 * sem_ch6.adb: Minor code reorganization.
8825 * sem_util.adb: Minor reformatting.
8827 2011-08-01 Pascal Obry <obry@adacore.com>
8829 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8830 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8832 2011-08-01 Yannick Moy <moy@adacore.com>
8834 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8835 literal or operator symbol which is prefixed
8836 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8837 mode on access attributes.
8838 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8839 that concatenation operands are properly restricted in formal mode
8840 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8841 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8842 result of the concatenation has a type different from String.
8843 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8844 Analyze_Quantified_Expression, Analyze_Slice,
8845 Analyze_Null): issue an error in formal mode on unsupported constructs
8847 (Analyze_Block_Statement): only issue error on source block statement
8848 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8849 function which returns the last node in a list of nodes for which
8850 Comes_From_Source returns True, if any
8851 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8852 Last_Source_Node_In_Sequence
8853 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8854 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8855 mode on unsupported constructs
8856 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8857 rest of the actions may be needed later on since the error is marked as
8859 * sinfo.ads: Typos in comments.
8861 2011-08-01 Pascal Obry <obry@adacore.com>
8863 * projects.texi: Minor editing.
8865 2011-08-01 Yannick Moy <moy@adacore.com>
8867 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8868 insertion character ~~
8869 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8870 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8871 with insertion character ~~
8872 (Set_Msg_Text): treat insertion character ~~
8873 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8874 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8875 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8876 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8877 errors related to the formal language restriction not serious
8878 (insertion character |).
8879 * par.adb (Par): set formal language for error messages if needed
8880 * sem_ch6.adb (Check_Missing_Return): take into account possible
8881 generated statements at the end of the function
8882 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8883 enumeration value to define a new pragma SPARK_95
8884 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8885 SPARK_Version): new type and variables to store the SPARK version
8887 (SPARK_Mode): return True when SPARK_Version is set
8888 * par-prag.adb: Correct indentation
8889 (Prag): take Pragma_SPARK_95 into account
8890 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8893 2011-08-01 Robert Dewar <dewar@adacore.com>
8895 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8896 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8897 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8899 2011-08-01 Pascal Obry <obry@adacore.com>
8901 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8902 Target_Name to Get_Path call.
8903 (Parse_Single_Project): Likewise.
8904 (Post_Parse_Context_Clause): Likewise.
8905 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8906 Call Initialise_Project_Path with the proper Target_Name.
8907 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8909 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8910 with the proper Target_Name.
8911 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8913 (Parse_Project_And_Apply_Config): Likewise.
8914 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8915 This is fine as this part of the code is supporting only native
8917 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8918 is fine as this part of the code is supporting only native compilation.
8920 2011-08-01 Yannick Moy <moy@adacore.com>
8922 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8923 of homonym, unless the homonym is one of the cases allowed in SPARK
8924 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8925 package declaration occurring after a body.
8927 2011-08-01 Robert Dewar <dewar@adacore.com>
8929 * checks.adb, exp_ch4.adb: Minor reformatting.
8931 2011-08-01 Javier Miranda <miranda@adacore.com>
8933 * einfo.ads (Access_Disp_Table): Fix documentation.
8934 (Dispatch_Table_Wrappers): Fix documentation.
8936 2011-08-01 Pascal Obry <obry@adacore.com>
8938 * prj-env.adb, prj-env.ads: Minor reformatting.
8940 2011-08-01 Yannick Moy <moy@adacore.com>
8942 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8943 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8944 procedures out of these packages.
8945 * errout.ads, errout.adb
8946 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8947 procedures in of this package
8948 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8949 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8950 on misplaced later vs initial declarations, like in Ada 83
8951 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8952 formal mode on attribute of private type whose full type declaration
8954 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8955 package declaration inside a package specification
8956 (Analyze_Full_Type_Declaration): issue error in formal mode on
8957 controlled type or discriminant type
8958 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8959 user-defined operator means that it should come from the source
8960 (New_Overloaded_Entity): issue error in formal mode on overloaded
8962 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8964 2011-08-01 Thomas Quinot <quinot@adacore.com>
8966 * atree.adb: Minor reformatting.
8967 * checks.adb: Minor reformatting.
8969 2011-08-01 Vincent Celier <celier@adacore.com>
8971 * s-parame-vms-ia64.ads: Fix typo in comment
8973 * s-parame-vms-restrict.ads: Removed, unused.
8975 2011-08-01 Javier Miranda <miranda@adacore.com>
8978 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8980 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8981 * sem_ch3.ads, sem_ch3.adb
8982 (Is_Constant_Bound): New extended version of the subprogram that was
8983 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8984 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8985 * sem_aux.ads (Constant_Value): Fix typo in comment.
8986 * checks.adb (Generate_Index_Checks): New implementation which, for
8987 array objects with constant bounds, generates the runtime check
8988 referencing the bounds of the array type. For other cases this routine
8989 provides its previous behavior obtaining such values from the array
8991 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8993 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8994 we cannot have semantic interpretations of the new node.
8996 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8998 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9001 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9003 * sem_ch8.adb: Minor code editing.
9004 * s-vxwext.adb: Remove trailing space.
9005 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9006 consistency with other files.
9008 2011-08-01 Thomas Quinot <quinot@adacore.com>
9010 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9012 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9014 * par-ch10.adb: reject parameterized expressions as compilation unit.
9015 * sem_ch4.adb: handle properly conditional expression with overloaded
9016 then_clause and no else_clause.
9018 2011-08-01 Tristan Gingold <gingold@adacore.com>
9020 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9021 like done by System.Aux_DEC.
9022 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9024 2011-08-01 Yannick Moy <moy@adacore.com>
9026 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9027 missing label at end of declaration (subprogram or package)
9028 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9029 of positional and named parameter association
9030 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9031 Error_Msg_SP which adds a prefix to the error message giving the name
9032 of the formal language analyzed
9033 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9034 access result type in subprogram, unconstrained array as result type,.
9035 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9037 * sem_ch8.adb: Code clean up.
9039 2011-08-01 Javier Miranda <miranda@adacore.com>
9041 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9042 * einfo.ads (Access_Disp_Table): Fix documentation.
9043 (Dispatch_Table_Wrappers): Fix documentation.
9044 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9045 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9046 to enforce the documentation of this attribute.
9047 (Set_Is_Interface): Cleanup the assertion.
9048 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9049 the Underlying_Type entity before reading attribute Access_Disp_Table.
9050 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9051 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9052 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9053 the Underlying_Type entity before reading attribute Access_Disp_Table.
9054 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9055 Locate the Underlying_Type entity before reading attribute
9058 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9060 * s-poosiz.ads: Additional overriding indicators.
9062 2011-08-01 Yannick Moy <moy@adacore.com>
9064 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9066 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9067 parameter specification does not include a subtype mark.
9068 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9069 formal mode on abstract subprogram.
9070 (Analyze_Subprogram_Specification): issue error in formal mode on
9071 user-defined operator.
9072 (Process_Formals): issue error in formal mode on access parameter and
9074 * sem_ch9.adb (Analyze_Abort_Statement,
9075 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9076 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9077 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9078 Analyze_Requeue, Analyze_Selective_Accept,
9079 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9080 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9081 issue error in formal mode on user-defined raise statement.
9083 2011-08-01 Thomas Quinot <quinot@adacore.com>
9085 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9086 declaration being hidden when overriding an implicit inherited
9088 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9089 (-gnats), do not complain about a source file that contains only a
9092 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9094 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9095 variable if already set.
9097 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9099 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9100 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9101 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9102 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9103 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9104 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9105 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9106 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9107 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9108 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9109 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9110 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9111 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9112 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9113 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9114 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9115 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9116 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9117 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9118 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9119 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9120 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9121 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9122 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9123 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9124 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9125 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9126 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9127 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9128 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9129 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9130 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9131 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9132 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9133 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9134 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9135 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9136 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9137 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9138 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9139 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9140 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9141 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9142 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9143 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9144 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9145 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9146 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9147 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9148 Use GNAT instead of GNARL.
9150 2011-08-01 Bob Duff <duff@adacore.com>
9152 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9153 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9154 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9157 2011-08-01 Yannick Moy <moy@adacore.com>
9159 * debug.adb (d.D) reverve flag for the SPARK mode
9160 (d.E) reverve flag for SPARK generation mode
9161 (d.F) reverve flag for Why generation mode
9162 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9163 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9164 functions which return True when the corresponding modes are set
9165 (Formal_Language): return "spark" or "alfa" when in formal verification
9167 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9168 Error_Msg to prefix the error message with a tag giving the formal
9170 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9171 message with a tag giving the formal language
9172 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9174 (Analyze_Case_Statement): issue error in formal mode on case statement
9175 with a single "others" case alternative
9176 (Analyze_Exit_Statement): issue errors in formal mode on exit
9177 statements which do not respect SPARK restrictions
9178 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9179 (Check_Unreachable_Code): always issue an error (not a warning) in
9180 formal mode on unreachable code (concerns both code after an infinite
9181 loop and after an unconditional jump, both not allowed in SPARK)
9182 * sem_ch6.adb (Analyze_Return_Statement): add call to
9183 Set_Return_Present for a procedure containing a return statement
9184 (already done for functions in Analyze_Function_Return)
9185 (Analyze_Function_Return): issue error in formal mode on extended
9186 return or if return is not last statement in function
9187 (Check_Missing_Return): issue error in formal mode if function does
9188 not end with return or if procedure contains a return
9189 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9190 function to detect if there is an inner scope of its parameter S which
9193 2011-08-01 Thomas Quinot <quinot@adacore.com>
9195 * sem_ch6.ads: Minor reformatting.
9197 2011-08-01 Javier Miranda <miranda@adacore.com>
9199 * sem_util.adb (Abstract_Interface_List): Complete condition when
9200 processing private type declarations to avoid reading unavailable
9202 (Is_Synchronized_Tagged_Type): Complete condition when processing
9203 private extension declaration nodes to avoid reading unavailable
9206 2011-08-01 Thomas Quinot <quinot@adacore.com>
9208 * sem_ch3.adb: Minor reformatting.
9210 2011-08-01 Thomas Quinot <quinot@adacore.com>
9212 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9213 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9214 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9215 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9216 for VMS, instead parametrize the common implementation with
9217 System.Parameters declarations.
9219 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9221 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9223 2011-08-01 Tristan Gingold <gingold@adacore.com>
9225 * seh_init.c: Fix SEH handler installation on win64.
9227 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9229 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9230 double analysis of an anonymous access to subprogram, because it can
9231 lead to improper sharing of profiles and a back-end crash.
9233 2011-08-01 Robert Dewar <dewar@adacore.com>
9235 * make.adb, sem_ch4.adb: Minor reformatting.
9236 * gcc-interface/Make-lang.in: Update dependencies.
9237 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9239 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9241 * gnat_rm.texi: Fix definition of Long_Integer.
9243 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9245 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9246 to prevent storage exhaustion.
9247 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9248 finalized is a function body, insert the cleanup code before the final
9249 return statement, to prevent spurious warnings.
9250 * s-pooglo.ads: add overriding indicator.
9252 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9254 * sem_ch4.adb (Operator_Check): improve error message when both a
9255 with_clause and a use_clause are needed to make operator usage legal.
9256 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9257 determine whether a compilation unit is visible within an other,
9258 either through a with_clause in the current unit, or a with_clause in
9259 its library unit or one one of its parents.
9261 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9263 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9264 over an arbitrary expression of an array or container type.
9265 * lib-xref.adb: clarify comment.
9267 2011-08-01 Bob Duff <duff@adacore.com>
9269 * einfo.ads: Minor reformatting.
9270 * debug.adb: Minor comment improvement.
9272 2011-08-01 Javier Miranda <miranda@adacore.com>
9274 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9275 consider hidden subprograms as valid candidates.
9277 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9279 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9281 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9283 * gnat_ugn.texi: Fix typo.
9285 2011-08-01 Robert Dewar <dewar@adacore.com>
9287 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9288 lib-xref.adb: Minor reformatting
9290 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9292 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9293 when to generate a call to Move_Final_List.
9294 (Has_Controlled_Parts): Remove this function.
9296 2011-08-01 Geert Bosch <bosch@adacore.com>
9298 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9301 2011-08-01 Thomas Quinot <quinot@adacore.com>
9303 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9304 explicit raise of a predefined exception as Comes_From_Source if the
9305 original N_Raise_Statement comes from source.
9307 2011-08-01 Robert Dewar <dewar@adacore.com>
9309 * sinfo.ads: Add comment.
9310 * sem_ch6.adb: Minor reformatting.
9312 2011-08-01 Robert Dewar <dewar@adacore.com>
9314 * freeze.adb (Freeze_Entity): Refine check for bad component size
9315 clause to avoid rejecting confirming clause when atomic/aliased present.
9317 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9319 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9320 better determine whether an entity reference is a write.
9321 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9323 * lib-xref.adb (Output_References): Do no suppress a read reference at
9324 the same location as an immediately preceeding modify-reference, to
9325 handle properly in-out actuals.
9327 2011-08-01 Tristan Gingold <gingold@adacore.com>
9329 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9331 2011-08-01 Quentin Ochem <ochem@adacore.com>
9333 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9334 heap to compute the result.
9336 2011-08-01 Robert Dewar <dewar@adacore.com>
9338 * atree.ads: Minor reformatting.
9340 2011-08-01 Emmanuel Briot <briot@adacore.com>
9342 * g-expect.adb (Get_Command_Output): Fix memory leak.
9344 2011-08-01 Geert Bosch <bosch@adacore.com>
9346 * cstand.adb (P_Float_Type): New procedure to print the definition of
9347 predefined fpt types.
9348 (P_Mixed_Name): New procedure to print a name using mixed case
9349 (Print_Standard): Use P_Float_Type for printing floating point types
9350 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9351 precision IEEE float.
9353 2011-08-01 Thomas Quinot <quinot@adacore.com>
9355 * sem_ch3.adb: Minor reformatting.
9357 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9359 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9360 the completion of a generic function, insert the new body rather than
9361 rewriting the original.
9363 2011-08-01 Yannick Moy <moy@adacore.com>
9365 * sinfo.ads, errout.ads: Typos in comments.
9367 2011-08-01 Robert Dewar <dewar@adacore.com>
9369 * par-endh.adb: Minor reformatting.
9371 2011-08-01 Robert Dewar <dewar@adacore.com>
9373 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9374 (Pre_Post_Aspects): New subtype.
9375 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9376 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9377 * par-ch7.adb (P_Package): Remove Decl parameter
9378 (P_Package): Handle new syntax for aspects (before IS)
9379 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9381 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9382 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9383 (P_Package): Remove Decl parameter
9384 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9386 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9388 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9389 * sinfo.ads: Document new syntax for aspects in packages etc.
9390 * sprint.adb: Handle new syntax of aspects before IS in package
9392 2011-08-01 Thomas Quinot <quinot@adacore.com>
9394 * atree.ads: Minor reformatting.
9395 * sem_prag.adb: Minor reformatting.
9397 2011-08-01 Robert Dewar <dewar@adacore.com>
9399 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9400 case expr alternative.
9402 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9404 * sem_ch12.adb: Fix typo.
9406 2011-08-01 Geert Bosch <bosch@adacore.com>
9408 * sem_prag.adb (Check_No_Link_Name): New procedure.
9409 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9410 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9411 instead of Standard_Long_Long_Float_Size global. Preparation for
9412 eventual removal of per type constants.
9413 * exp_util.ads (Get_Stream_Size): New function returning the stream
9414 size value of subtype E.
9415 * exp_util.adb (Get_Stream_Size): Implement new function.
9416 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9418 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9420 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9422 2011-08-01 Geert Bosch <bosch@adacore.com>
9424 * cstand.adb: Fix comments.
9425 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9428 2011-08-01 Robert Dewar <dewar@adacore.com>
9430 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9432 2011-08-01 Geert Bosch <bosch@adacore.com>
9434 * atree.ads: Fix comment.
9436 2011-08-01 Robert Dewar <dewar@adacore.com>
9438 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9439 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9440 * par.adb: Add with for Namet.Sp.
9441 * par-tchk.adb: Minor reformatting.
9443 2011-08-01 Vincent Celier <celier@adacore.com>
9445 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9446 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9447 of the init procedure of a SAL.
9448 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9451 2011-08-01 Thomas Quinot <quinot@adacore.com>
9453 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9456 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9458 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9460 2011-08-01 Thomas Quinot <quinot@adacore.com>
9462 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9463 conformant with its spec (return True only for types that have
9464 an overriding Initialize primitive operation that prevents them from
9465 having preelaborable initialization).
9466 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9467 initialization for controlled types in Ada 2005 or later mode.
9469 2011-08-01 Robert Dewar <dewar@adacore.com>
9471 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9473 (Same_Aspect): New function.
9474 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9475 Type_Invariant, Precondition, Postcondition.
9476 * snames.ads-tmpl: Add Name_Type_Invariant.
9478 2011-08-01 Robert Dewar <dewar@adacore.com>
9480 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9482 (Freeze_All_Ent): Fix error in handling inherited aspects.
9483 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9484 already analyzed, but don't skip entire processing of a declaration,
9485 that's wrong in some cases of declarations being rewritten.
9486 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9487 Don't delay for integer, string literals
9488 Treat predicates in usual manner for delay, remove special case code,
9490 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9491 (Build_Predicate_Function): Update saved expression in aspect
9492 (Build_Invariant_Procedure): Update saved expression in aspect
9493 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9494 of replacement of discriminant references if the reference is simple.
9496 2011-08-01 Robert Dewar <dewar@adacore.com>
9498 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9499 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9500 Static_Predicate and Dynamic_Predicate.
9501 (Build_Predicate_Function): Add processing for Static_Predicate
9502 and Dynamic_Predicate.
9503 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9504 (From_Static_Predicate): New flag
9505 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9507 2011-08-01 Robert Dewar <dewar@adacore.com>
9509 * usage.adb: Documentation cleanup for Ada version modes in usage.
9510 * expander.adb: Minor reformatting.
9512 2011-08-01 Robert Dewar <dewar@adacore.com>
9514 * atree.ads: Minor comment fix.
9515 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9516 a-witeio.ads, sem_prag.adb: Minor reformatting.
9518 2011-08-01 Doug Rupp <rupp@adacore.com>
9520 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9521 pointers. Use descrip.h header file for convenience. Add some
9524 2011-08-01 Robert Dewar <dewar@adacore.com>
9526 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9527 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9528 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9530 (Check_Aspect_At_End_Of_Declarations): New procedure
9531 (Analye_Aspect_Specification): Minor changes for above procedures
9532 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9533 specification node as well.
9535 2011-08-01 Pascal Obry <obry@adacore.com>
9537 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9538 Windows files. Use GetFilesAttributes() in this case to check for file
9539 existence instead of returning with an error code.
9541 2011-08-01 Vincent Celier <celier@adacore.com>
9543 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9544 High is above Source length.
9546 2011-08-01 Robert Dewar <dewar@adacore.com>
9548 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9550 2011-08-01 Robert Dewar <dewar@adacore.com>
9552 * aspects.ads (Boolean_Aspects): New subtype.
9553 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9554 for derived types in cases where the parent type and derived type have
9556 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9557 with aspects when parent type also has aspects.
9558 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9559 boolean expression at this point).
9560 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9561 accordance with final decision on the Ada 2012 feature.
9562 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9564 2011-08-01 Matthew Heaney <heaney@adacore.com>
9566 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9568 2011-08-01 Pascal Obry <obry@adacore.com>
9570 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9571 Fix Replace_Slice when High is above current string size.
9572 (Replace_Slice): Fix DL computation when High is above current
9575 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9577 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9579 2011-08-01 Matthew Heaney <heaney@adacore.com>
9581 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9584 2011-08-01 Pascal Obry <obry@adacore.com>
9586 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9589 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9591 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9592 access to protected subprograms in generic bodies.
9593 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9594 protected type, indicate that the convention of the subprogram is
9595 Convention_Protected, because it may be used in subsequent declarations
9596 within the protected declaration.
9598 2011-08-01 Vincent Celier <celier@adacore.com>
9600 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9601 and "final" procedures when the name of the library is "ada", to avoid
9602 duplicate symbols "adainit" and "adafinal" in executables.
9604 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9606 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9607 quantified expression that appears within a postcondition and uses the
9608 Ada2012 'Result attribute.
9610 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9612 * init.c (__gnat_error_handler): Cast reason to int.
9613 (__gnat_install_handler): Explain sa_sigaction use.
9615 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9617 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9618 subprogram has copy-in copy-out parameters, try to promote the mode of
9619 the return type if it is passed in registers.
9621 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9623 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9624 left operand as addressable.
9626 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9628 * gcc-interface/gigi.h (build_function_stub): Remove.
9629 (build_return_expr): Likewise.
9630 (convert_vms_descriptor): Declare.
9631 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9632 (build_function_stub): Move to...
9633 * gcc-interface/utils2.c (build_return_expr): Move to...
9634 * gcc-interface/trans.c (build_function_stub): ...here.
9635 (build_return_expr): ...here.
9636 (Subprogram_Body_to_gnu): Add local variable for language_function.
9637 Disconnect the parameter attributes cache, if any, once done with it.
9638 Call end_subprog_body only after setting the end_locus.
9639 Build the stub associated with the function, if any, at the very end.
9640 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9641 variables and streamline control flow.
9643 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9646 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9649 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9652 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9653 Assign to act.sa_sigaction.
9654 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9655 current->return_address to char * before arithmetic.
9657 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9659 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9660 Correct argument types.
9661 Extract code from reason.
9662 (__gnat_install_handler): Assign to act.sa_sigaction.
9664 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9666 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9667 (GNAT1_OBJS): ...here.
9669 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9672 * g-socthi-mingw.adb (Fill): Fix formatting.
9674 * gcc-interface/gigi.h: Move around comment.
9676 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9679 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9681 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9684 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9686 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9688 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9689 range comparison if Pmode is SImode.
9691 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9692 Eric Botcazou <ebotcazou@adacore.com>
9694 * adadecode.c: Wrap up in extern "C" block.
9695 * adadecode.h: Likewise.
9696 * adaint.c: Likewise. Remove 'const' keyword.
9697 * adaint.h: Likewise.
9699 * atree.h: Likewise.
9701 * cstreams.c: Likewise.
9705 * final.c: Likewise.
9707 * initialize.c: Likewise.
9709 * namet.h: Likewise.
9710 * nlists.h: Likewise.
9711 * raise.c: Likewise.
9712 * raise.h: Likewise.
9713 * repinfo.h: Likewise.
9714 * seh_init.c: Likewise.
9715 * targext.c: Likewise.
9716 * tracebak.c: Likewise.
9717 * uintp.h: Likewise.
9718 * urealp.h: Likewise.
9719 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9720 * xsinfo.adb: Likewise.
9721 * xsnamest.adb: Likewise.
9722 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9723 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9724 * gcc-interface/misc.c: Likewise.
9725 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9726 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9727 ada/targext.o here...
9728 (GNAT_ADA_OBJS): ...and not here.
9729 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9730 (GNATBIND_OBJS): Reorder.
9732 2011-07-07 Richard Henderson <rth@redhat.com>
9734 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9735 dwarf2out_frame_init.
9737 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9739 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9741 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9744 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9746 2011-07-06 Richard Guenther <rguenther@suse.de>
9748 * gcc-interface/misc.c (gnat_init): Merge calls to
9749 build_common_tree_nodes and build_common_tree_nodes_2.
9750 Re-initialize boolean_false_node.
9752 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9753 Olivier Hainque <hainque@adacore.com>
9754 Nicolas Setton <setton@adacore.com>
9756 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9757 the type according to the ARTIFICIAL_P parameter.
9758 (create_type_decl): Likewise.
9759 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9761 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9763 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9764 (gnatbind): Likewise.
9766 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9768 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9770 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9772 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9773 local variable throughout. Remove useless call to Base_Type.
9774 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9775 Take it also into account for the volatileness of the field. Set the
9776 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9778 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9780 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9781 on a dereference built for a by-ref object if it has an address clause.
9783 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9785 * einfo.ads (Address_Taken): Document use for the second argument of
9786 Asm_Input and Asm_Output attributes.
9787 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9788 argument is an entity name, then set Address_Taken on it.
9789 <Attribute_Asm_Output>: Likewise.
9790 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9791 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9792 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9793 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9795 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9798 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9800 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9802 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9803 (ada/utils.o): Update dependencies.
9804 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9805 ../../../libcpp/libcpp.a.
9806 * gcc-interface/utils.c: Include common/common-target.h.
9807 (process_attributes): Use targetm_common.have_named_sections.
9809 2011-06-07 Richard Guenther <rguenther@suse.de>
9811 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9814 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9816 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9817 TREE_THIS_NOTRAP flag.
9819 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9821 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9824 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9826 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9827 constants whose full view has discriminants specially.
9829 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9831 * gcc-interface/utils.c: Include diagnostic.h.
9832 (gnat_write_global_declarations): Output debug information for all
9833 global type declarations before finalizing the compilation unit.
9834 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9836 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9838 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9840 2011-05-25 Kai Tietz <ktietz@redhat.com>
9842 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9843 initialization instead of const/none-const pointer assignment.
9845 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9847 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9848 $(EXTRA_GNAT1_OBJS).
9849 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9850 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9851 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9852 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9853 libcommon-target.a instead of prefix.o.
9855 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9858 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9860 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9862 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9863 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9864 instead of version.o.
9866 2011-05-18 Kai Tietz <ktietz@redhat.com>
9868 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9869 boolean_false_node instead of integer_zero_node.
9870 (convert_with_check): Likewise.
9871 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9873 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9875 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9876 type of the parameter is an unconstrained array, convert the actual to
9877 the type of the formal in the In Out and Out cases as well.
9879 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9881 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9882 call build_function_type_array or build_varargs_function_type_array
9884 (create_subprog_type): Don't call build_function_type; call
9885 build_function_type_vec instead.
9887 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9889 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9890 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9891 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9893 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9895 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9897 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9898 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9900 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9902 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9904 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9906 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9907 instead of accessing TYPE_ARG_TYPES directly.
9908 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9910 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9913 * gcc-interface/gigi.h (get_variant_part): Declare.
9914 * gcc-interface/decl.c (get_variant_part): Make global.
9915 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9916 types have the same constant size, are record types and T1 has a
9917 variant part while T2 doesn't.
9919 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9921 * gcc-interface/utils.c (begin_subprog_body): Do not call
9923 (end_subprog_body): Likewise.
9925 2011-05-04 Richard Guenther <rguenther@suse.de>
9927 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9929 (pos_to_constructor): Likewise.
9931 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9932 Eric Botcazou <ebotcazou@adacore.com>
9934 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9935 of build_function_type. Adjust calls to...
9936 (build_raise_check): ...this. Do not take a void_tree parameter.
9937 Call build_function_type_list instead of build_function_type.
9938 Fix head comment and swap couple of conditional blocks.
9940 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9942 * gnatvsn.ads (Library_Version): Bump to 4.7.
9943 (Current_Year): Bump to 2011.
9945 2011-04-29 Michael Matz <matz@suse.de>
9947 * gcc-interface/misc.c (gnat_handle_option): Set
9948 warn_maybe_uninitialized.
9950 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9952 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9953 the Watson/McCabe paper.
9955 2011-04-23 Jim Meyering <meyering@redhat.com>
9957 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9959 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9961 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9964 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9966 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9968 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9969 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9970 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9971 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9972 <all>: Do not set flags on the reused DECL node coming from an alias.
9973 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9974 don't need debug info here...
9975 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9976 (gigi): Adjust calls to create_subprog_decl.
9977 (build_raise_check): Likewise.
9978 (establish_gnat_vms_condition_handler): Likewise.
9979 (Compilation_Unit_to_gnu): Likewise.
9980 (gnat_to_gnu): Likewise.
9982 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9984 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9985 (NO_REORDER_ADAFLAGS): New variable.
9986 (EXTRA_GNATTOOLS): Always define.
9987 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9988 Clean up and adjust list of files compiled with special options.
9989 * gcc-interface/Make-lang.in: Likewise.
9990 (ada/decl.o): Cosmetical change.
9991 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9993 2011-04-20 Jim Meyering <meyering@redhat.com>
9995 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9997 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9999 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10000 $(CFLAGS) on the link line.
10002 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10004 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10005 padded type built for the return type if it is unconstrained.
10007 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10009 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10011 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10013 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10014 before calling TREE_CHAIN.
10015 * gcc-interface/misc.c (gnat_init_ts): New function.
10016 (LANG_HOOKS_INIT_TS): Define.
10018 2011-04-12 Martin Jambor <mjambor@suse.cz>
10020 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10021 instead of cgraph_node.
10023 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10025 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10026 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10029 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10031 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10032 of aggregate types that contain a placeholder.
10034 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10036 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10038 (handle_type_generic_attribute): Likewise.
10040 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10043 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10045 2011-04-04 Kai Tietz <ktietz@redhat.com>
10048 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10051 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10053 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10054 type case, do not strip a padding type around the array type.
10056 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10058 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10061 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10063 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10064 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10065 code for -feliminate-unused-debug-types.
10066 (gnat_post_options): Likewise.
10068 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10070 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10071 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10074 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10076 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10077 DECL_ARTIFICIAL flag on enumeration types.
10079 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10081 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10082 fat pointer types artificial unconditionally.
10083 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10086 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10088 * gcc-interface/gigi.h (get_dummy_type): Declare.
10089 (build_dummy_unc_pointer_types): Likewise.
10090 (finish_fat_pointer_type): Likewise.
10091 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10092 fat pointer type has been built, complete it in place.
10093 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10094 and thin pointers. Remove useless variable.
10095 (finish_fat_pointer_type): Make global and move to...
10096 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10097 (get_dummy_type): New function.
10098 (build_dummy_unc_pointer_types): Likewise.
10099 (gnat_pushdecl): Propage the name to the anonymous variants only.
10100 (update_pointer_to): Only adjust the pointer types in the unconstrained
10103 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10105 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10106 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10107 if this is a Taft amendment type and the full declaration is available.
10108 * gcc-interface/trans.c (process_type): Likewise.
10109 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10110 (process_freeze_entity): Likewise.
10111 * gcc-interface/utils.c (dummy_global): New static variable.
10112 (gnat_write_global_declarations): If there are types declared as used
10113 at the global level, insert them in the global hash table.
10115 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10117 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10118 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10119 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10121 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10122 flag of the type accordingly.
10123 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10125 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10127 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10128 finalizing types when updating the pointers to the designated type.
10129 <all>: Finalize the deferred types even if we didn't defer processing
10130 of incomplete types in this invocation.
10132 2011-04-01 Olivier Hainque <hainque@adacore.com>
10133 Nicolas Setton <setton@adacore.com>
10134 Eric Botcazou <ebotcazou@adacore.com>
10136 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10137 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10139 2011-03-28 Kai Tietz <ktietz@redhat.com>
10141 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10143 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10144 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10146 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10148 2011-03-28 Tristan Gingold <gingold@adacore.com>
10151 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10152 Use ada output of gnatbind.
10153 (ada/b_gnatb.adb): Ditto.
10154 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10155 (ada.mostlyclean, ada.stage1)
10156 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10157 (ada.stagefeedback): Adjust.
10158 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10159 Use ada output of gnatbind.
10160 (b_gnatm.adb): Ditto.
10161 (b_gnatl.o, b_gnatm.o): New rules.
10163 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10165 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10166 for the padded type built to support a specified size or alignment.
10168 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10170 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10171 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10172 unconditionally to the end of the unit when the designated type is
10174 <all>: Rename local variable. Attempt to un-defer types only and do it
10175 for limited_with'ed types as well.
10176 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10177 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10178 consistently and remove redundant call to finalize_from_with_types.
10180 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10182 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10183 subprograms without a previous spec declared in the same unit.
10184 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10185 subprograms at the end of the unit instead of at the beginning.
10186 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10187 isn't public for the special handling of non-inline functions nested
10188 inside inline external functions.
10190 2011-03-25 Jeff Law <law@redhat.com>
10192 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10194 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10196 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10197 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10198 to compute Set_Size_Depends_On_Discriminant.
10199 (Layout_Type): Call it on array types in back-end layout mode.
10200 * sem_util.adb (Requires_Transient_Scope): Return true for array
10201 types only if the size depends on the value of discriminants.
10202 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10203 type if the RHS is a call to a function that returns an unconstrained
10204 type with default discriminant.
10206 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10208 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10209 non-conversion to the nominal result type at the end.
10211 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10213 * gcc-interface/trans.c (create_temporary): New function taken from...
10214 (create_init_temporary): ...here. Call it.
10215 (call_to_gnu): Create the temporary for the return value early, if any.
10216 Create it for a function with copy-in/copy-out parameters if there is
10217 no target; in other cases of copy-in/copy-out, use another temporary.
10218 Push the new binding level lazily. Add and rename local variables.
10220 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10222 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10224 (set_rm_size): Likewise.
10226 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10228 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10229 for the padded type built in order to support a specified alignment.
10230 Fix incorrect formatting.
10232 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10235 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10237 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10239 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10240 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10241 to the end of the list. Adjust recursive call. Rename local variable.
10242 If REORDER is true, reorder components of the record type.
10243 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10244 components_to_record and adjust the parameter list.
10246 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10248 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10249 disabled, use the variable for bounds of loop iteration scheme.
10251 2011-03-21 Kai Tietz <ktietz@redhat.com>
10254 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10256 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10258 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10259 out whether the expression is read-only. Short-circuit placeholder
10260 case and rename a couple of local variables.
10262 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10264 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10265 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10266 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10267 (convert): Deal with conversions from a smaller form type specially.
10269 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10271 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10272 its argument, except for the special -I- switch.
10274 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10276 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10279 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10281 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10283 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10285 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10287 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10288 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10289 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10290 Do not generate the check directly, instead instantiate the template
10291 check present in the descriptor.
10292 (make_descriptor_field): Move around.
10293 (build_vms_descriptor32): Build a template check in the POINTER field.
10294 (build_vms_descriptor): Remove useless suffixes.
10295 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10297 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10300 * targext.c: Include target files if IN_RTS is defined.
10302 2011-01-26 Richard Guenther <rguenther@suse.de>
10305 * targext.c: Include config.h.
10306 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10309 2011-01-04 Pascal Obry <obry@adacore.com>
10310 Eric Botcazou <ebotcazou@adacore.com>
10312 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10314 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10316 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10317 end-of-case on the end label and its associated gotos, if any.
10319 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10321 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10322 expressions of the parameter cache within the statement group of
10323 the CICO mechanism.
10325 2011-01-04 Olivier Hainque <hainque@adacore.com>
10326 Eric Botcazou <ebotcazou@adacore.com>
10328 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10329 (set_end_locus_from_node): New function.
10330 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10331 make and the function end_locus.
10332 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10333 for the elaboration subprogram.
10334 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10335 set the end_locus of the expression as well.
10337 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10340 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10341 variables that are referenced in exception handlers volatile.
10345 Copyright (C) 2011 Free Software Foundation, Inc.
10347 Copying and distribution of this file, with or without modification,
10348 are permitted in any medium without royalty provided the copyright
10349 notice and this notice are preserved.
10351 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10352 - fix bugs in the description of Source_Trace;
10353 - get rid of UNIT_NAME;
10355 2011-08-02 Javier Miranda <miranda@adacore.com>
10358 (Build_Dispatching_Requeue): Adding support for VM targets
10359 since we cannot directly reference the Tag entity.
10360 * exp_sel.adb (Build_K): Adding support for VM targets.
10361 (Build_S_Assignment): Adding support for VM targets.
10363 (Default_Prim_Op_Position): In VM targets do not restrict availability
10364 of predefined interface primitives to compiling in Ada 2005 mode.
10365 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10366 restricted to compiling in Ada 2005 mode.
10367 (Make_VM_TSD): Generate code that declares and initializes the OSD
10368 record. Needed to support dispatching calls through synchronized
10371 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10372 primitives associated with synchronized interfaces.
10373 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10374 primitives associated with synchronized interfaces.
10376 2011-08-02 Yannick Moy <moy@adacore.com>
10378 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10379 statements hidden in SPARK if preceded by the HIDE directive
10380 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10381 exception handlers as hidden in SPARK if preceded by the HIDE directive
10382 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10383 if starting with the HIDE directive
10384 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10385 starting with the HIDE directive; mark the declarations in a private
10386 part as hidden in SPARK if the private part starts with the HIDE
10388 * restrict.adb, restrict.ads
10389 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10390 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10391 argument node belongs to a part which is hidden in SPARK
10392 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10393 parts in SPARK; protect the possibly costly call to
10394 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10395 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10396 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10397 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10399 (Scan): recognize special comment starting with '#' and followed by
10400 SPARK keyword "hide" as a HIDE directive.
10402 2011-08-02 Yannick Moy <moy@adacore.com>
10404 * types.ads, erroutc.ads: Minor reformatting.
10406 2011-08-02 Vincent Celier <celier@adacore.com>
10408 * link.c: Add response file support for cross platforms.
10410 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10412 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10413 in an association, set parent field of copy before partial analysis.
10414 * sem_res.adb (Resolve_Slice): create reference to itype only when
10415 expansion is enabled.
10417 2011-08-02 Yannick Moy <moy@adacore.com>
10419 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10420 for new flag denoting which subprogram bodies are in ALFA
10421 * restrict.adb, sem_ch7.adb: Update comment
10422 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10423 sem_ch9.adb, sem_res.adb: Add calls to
10424 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10425 * sem_ch6.adb (Analyze_Function_Return): add calls to
10426 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10427 middle of the body, and extended return.
10428 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10429 False when missing return.
10430 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10431 to True for subprograms whose spec is in ALFA. Remove later on the flag
10432 on the entity used for a subprogram body when there exists a separate
10434 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10435 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10436 False, otherwise do nothing.
10438 2011-08-02 Robert Dewar <dewar@adacore.com>
10440 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10442 2011-08-02 Yannick Moy <moy@adacore.com>
10444 * sem_ch4.ads: minor formatting.
10446 2011-08-02 Yannick Moy <moy@adacore.com>
10448 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10449 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10450 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10451 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10452 opt.ads: cleanup of SPARK mode
10454 2011-08-02 Yannick Moy <moy@adacore.com>
10456 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10458 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10459 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10461 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10462 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10463 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10464 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10466 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10468 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10469 functions whose return type is not in ALFA.
10470 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10472 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10473 parameter's type is not in ALFA.
10474 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10477 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10479 * sem_ch6 (Analyze_Expression_Function): treat the function as
10480 Inline_Always, and introduce a subprogram declaration for it when it is
10482 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10483 expression functions, so that the back-end can determine whether they
10484 can in fact be inlined.
10485 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10486 a function body comes from an expression function.
10488 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10490 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10491 null exclusions to test Can_Never_Be_Null on the anonymous access types
10492 of the formals rather than testing the formals themselves. Exclude this
10493 check in cases where the Old_Formal is marked as a controlling formal,
10494 to avoid issuing spurious errors for bodies completing dispatching
10495 operations (due to the flag not getting set on controlling access
10496 formals in body specs).
10497 (Find_Corresponding_Spec): When checking full and subtype conformance of
10498 subprogram bodies in instances, pass Designated and E in that order, for
10499 consistency with the expected order of the formals (New_Id followed by
10502 2011-08-02 Robert Dewar <dewar@adacore.com>
10504 * sem_ch8.adb: Minor reformatting.
10506 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10508 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10509 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10510 primitive operations of class-wide actuals.
10512 2011-08-02 Javier Miranda <miranda@adacore.com>
10514 * exp_atag.ads, exp_atag.adb
10515 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10516 since its value is implicitly passed in argument Typ.
10517 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10518 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10519 Build_Common_Dispatching_Select_Statements.
10521 2011-08-02 Robert Dewar <dewar@adacore.com>
10523 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10524 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10525 Minor reformatting.
10527 2011-08-02 Robert Dewar <dewar@adacore.com>
10529 * sem_res.adb: Minor reformatting.
10530 * sem_prag.adb: Minor reformatting.
10532 2011-08-02 Javier Miranda <miranda@adacore.com>
10534 * exp_atag.adb, exp_atags.ads
10535 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10536 by the tagged type Entity. Required to use this routine in the VM
10537 targets since we do not have available the Tag entity in the VM
10540 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10541 Ada.Tags has not been previously loaded.
10543 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10544 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10546 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10547 view of enclosing scopes. Required to handle enclosing scopes that
10548 are synchronized types whose full view is a task type.
10550 (Build_VM_TSDs): Minor code improvement to avoid generating and
10551 analyzing lists with empty nodes.
10552 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10553 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10554 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10555 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10556 (Make_Select_Specific_Data_Table): Add support for VM targets.
10557 (Make_VM_TSD): Generate code to initialize the SSD structure of
10560 2011-08-02 Yannick Moy <moy@adacore.com>
10562 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10563 cross-references section in ALI.
10564 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10565 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10567 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10568 subprogram or package entity of a node
10569 (Is_Local_Reference_Type): new function returns True for references
10570 selected in local cross-references.
10571 (Lt): function extracted from Lt in Output_References
10572 (Write_Entity_Name): function extracted from Output_References
10573 (Generate_Definition): generate reference with type 'D' for definition
10574 of objects (object declaration and parameter specification), with
10575 appropriate locations and units, for use in local cross-references.
10576 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10577 references of type 'I' for initialization in object definition.
10578 (Output_References): move part of function Lt and procedure
10579 Write_Entity_Name outside of the body. Ignore references of types 'D'
10580 and 'I' introduced for local cross-references.
10581 (Output_Local_References): new procedure to output the local
10582 cross-references sections.
10583 (Lref_Entity_Status): new array defining whether an entity is a local
10584 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10585 with 'I' type when initialization expression is present.
10586 * get_scos.adb, get_scos.ads: Correct comments and typos
10588 2011-08-02 Javier Miranda <miranda@adacore.com>
10590 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10592 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10594 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10597 2011-08-02 Vincent Celier <celier@adacore.com>
10599 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10600 (No_Space_Img): New function
10601 (Find_Excluded_Sources): When reading from a file, record the file name
10602 and the line number for each excluded source.
10603 (Mark_Excluded_Sources): When reporting an error, if the excluded
10604 sources were read from a file, include file name and line number in
10607 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10609 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10611 2011-08-02 Robert Dewar <dewar@adacore.com>
10613 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10615 2011-08-02 Javier Miranda <miranda@adacore.com>
10617 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10618 generation of TSDs to the DOTNET compiler.
10619 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10620 generation of TSDs to the DOTNET compiler.
10622 2011-08-02 Javier Miranda <miranda@adacore.com>
10624 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10625 record of all the tagged types declared inside library level package
10626 declarations, library level package bodies or library level subprograms.
10627 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10628 associated with a given tagged type.
10629 (Build_VM_TSDs): New subprogram.
10630 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10631 compilation units that are subprograms.
10632 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10633 compilation units that are package bodies.
10634 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10635 units that are a package declaration or a package instantiation.
10636 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10637 reorganization to improve the error generated by the frontend when the
10638 function Ada.Tags.Secondary_Tag is not available.
10639 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10640 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10642 2011-08-02 Javier Miranda <miranda@adacore.com>
10644 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10646 2011-08-02 Robert Dewar <dewar@adacore.com>
10648 * s-imenne.ads: Minor reformatting.
10650 2011-08-02 Robert Dewar <dewar@adacore.com>
10652 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10653 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10654 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10656 2011-08-02 Robert Dewar <dewar@adacore.com>
10658 * einfo.ads (Materialize_Entity): Document this is only for renamings
10659 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10660 required debug information in the case where we transform the object
10661 declaration into a renaming declaration.
10662 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10664 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10665 Materialize_Entity.
10667 2011-08-02 Robert Dewar <dewar@adacore.com>
10669 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10670 Suppress_Init_Procs.
10671 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10672 Suppress_Initialization/Initialization_Suppressed.
10673 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10674 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10675 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10676 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10678 2011-08-02 Robert Dewar <dewar@adacore.com>
10680 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10681 Minor reformatting.
10683 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10685 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10686 only have inheritable classwide pre/postconditions.
10688 2011-08-02 Javier Miranda <miranda@adacore.com>
10690 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10691 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10692 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10693 checks if the external tag of a type is the same as the external tag
10694 of some other declaration.
10696 2011-08-02 Thomas Quinot <quinot@adacore.com>
10698 * s-taskin.ads: Minor reformatting.
10700 2011-08-02 Emmanuel Briot <briot@adacore.com>
10702 * g-comlin.adb (Display_Help): swap the order in which it prints the
10703 short help and the general usage.
10705 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10707 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10708 the aspect declarations and attach them to the generic copy for
10709 subsequent analysis.
10710 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10711 declarations of the generic tree to the new subprogram declarations.
10712 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10713 conditions that apply to a subprogram instance.
10715 2011-08-02 Robert Dewar <dewar@adacore.com>
10717 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10719 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10721 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10722 private type with a tagged full view is not derived in the immediate
10723 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10725 2011-08-02 Robert Dewar <dewar@adacore.com>
10727 * exp_ch4.adb: Minor reformatting.
10729 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10731 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10732 Ada2012 iterator, the loop will be rewritten during expansion into a
10733 while loop with a cursor and an element declaration. Do not analyze the
10734 body in this case, because if the container is for indefinite types the
10735 actual subtype of the elements will only be determined when the cursor
10736 declaration is analyzed.
10738 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10740 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10741 size/alignment related attributes in CodePeer_Mode.
10743 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10745 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10746 Prepend_Element, since this can result in the operation getting the
10747 wrong slot in the full type's dispatch table if the full type has
10748 inherited operations. The incomplete type's operation will get added
10749 to the proper position in the full type's primitives
10750 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10751 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10752 dispatching operations, since there are cases where nonprimitive
10753 subprograms can get added to the list of incomplete dependents (such
10754 as subprograms in nested packages).
10755 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10756 private part when determining whether to add a primitive with a
10757 parameter of a tagged incomplete type to the Private_Dependents list.
10758 Such primitives can also occur in the visible part, and should not have
10759 been excluded from being private dependents.
10760 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10761 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10762 list of a Taft-amendment incomplete type is a primitive before issuing
10763 an error that the full type must appear in the same unit. There are
10764 cases where nonprimitives can be in the list (such as subprograms in
10766 * sem_disp.adb (Derives_From): Use correct condition for checking that
10767 a formal's type is derived from the type of the corresponding formal in
10768 the parent subprogram (the condition was completely wrong). Add
10769 checking that was missing for controlling result types being derived
10770 from the result type of the parent operation.
10772 2011-08-02 Yannick Moy <moy@adacore.com>
10774 * errout.adb (First_Node): minor renaming
10775 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10778 2011-08-02 Yannick Moy <moy@adacore.com>
10780 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10781 before accessing operands.
10782 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10783 decide whether an initialization expression respects SPARK rules, as
10784 the plain node is the expanded one. This allows for more valid warnings
10786 * gnat_rm.texi: Minor update.
10788 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10790 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10793 2011-08-02 Robert Dewar <dewar@adacore.com>
10795 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10797 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10799 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10800 loop statements and the element renaming declaration with a block when
10801 the element type is controlled.
10803 2011-08-02 Yannick Moy <moy@adacore.com>
10805 * sinfo.ads: Minor formatting.
10807 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10809 * sem_aggr.adb (Add_Association): if the association has a box and no
10810 expression, use the Sloc of the aggregate itself for the new
10812 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10815 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10817 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10818 When a container is provided via a function call, generate a renaming
10819 of the function result. This avoids the creation of a transient scope
10820 and the premature finalization of the container.
10821 * exp_ch7.adb (Is_Container_Cursor): Removed.
10822 (Wrap_Transient_Declaration): Remove the supression of the finalization
10823 of the list controller when the declaration denotes a container cursor,
10826 2011-08-02 Yannick Moy <moy@adacore.com>
10828 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10829 node is from source, instead of the original node being from source.
10831 (Resolve_Array_Aggregate): refine the check for a static expression, to
10832 recognize also static ranges
10833 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10834 Array_Type_Declaration): postpone the test for the type being a subtype
10835 mark after the type has been resolved, so that component-selection and
10836 expanded-name are discriminated.
10837 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10838 to distinguish the case of an iteration scheme, so that an error is
10839 issed on a non-static range in SPARK except in an iteration scheme.
10840 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10841 In_Iter_Schm = True.
10842 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10843 user-defined operators so that they are allowed in renaming
10845 (Find_Selected_Component): refine the check for prefixing of operators
10846 so that they are allowed in renaming. Move the checks for restrictions
10847 on selector name after analysis discriminated between
10848 component-selection and expanded-name.
10849 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10850 concatenation argument of string type if it is static.
10851 * sem_util.adb, sem_util.ads
10852 (Check_Later_Vs_Basic_Declarations): add a new function
10853 Is_Later_Declarative_Item to decice which declarations are allowed as
10854 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10855 mode, add that renamings are considered as later items.
10856 (Enclosing_Package): new function to return the enclosing package
10857 (Enter_Name): correct the rule for homonyms in SPARK
10858 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10859 from source (result of expansion) to avoid issuing wrong warnings.
10861 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10863 * errout.adb: On anything but an expression First_Node returns its
10866 2011-08-02 Pascal Obry <obry@adacore.com>
10868 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10870 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10872 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10873 Set the associated loop as the related expression of internally
10875 * exp_ch7.adb (Is_Container_Cursor): New routine.
10876 (Wrap_Transient_Declaration): Supress the finalization of the list
10877 controller when the declaration denotes a container cursor.
10879 2011-08-02 Yannick Moy <moy@adacore.com>
10881 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10883 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10884 expression is a simple expression. This check cannot be performed in
10885 the semantics, so just drop it.
10886 (P_Index_Or_Discriminant_Constraint): move check that the index or
10887 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10888 semantics. Other cases were previously checked in the semantics.
10889 * par-ch4.adb (P_Name): move checks that a selector name is not
10890 character literal or an operator symbol to Find_Selected_Component in
10892 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10893 declarations are not placed after later declarations in a separate
10894 procedure in Sem_Util (possibly not the best choice?), to be used both
10895 during parsing, for Ada 83 mode, and during semantic analysis, for
10897 * par-endh.adb (Check_End): move check that end label is not missing
10898 to Process_End_Label in the semantics
10899 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10900 the special case for SPARK restriction
10901 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10902 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10903 parameter Force to issue the error message even on internal node (used
10904 for generated end label). Call Check_Restriction to check when an error
10905 must be issued. In SPARK mode, issue an error message even if the
10906 restriction is not set.
10907 (Check_Restriction): new procedure with an additional out parameter to
10908 inform the caller that a message has been issued
10909 * sem_aggr.adb: Minor modification of message
10910 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10911 instead of issuing an error message directly
10912 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10913 declarations are not placed after later declarations, by calling
10914 Check_Later_Vs_Basic_Declarations
10915 (Analyze_Subtype_Declaration): move here the check that an index or
10916 discriminant constraint must be a subtype mark. Change the check that
10917 a subtype of String must start at one so that it works on subtype marks.
10918 * sem_ch4.adb (Analyze_Call): move here the check that a named
10919 association cannot follow a positional one in a call
10920 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10921 instead of issuing an error message directly
10922 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10923 selector name is not a character literal or an operator symbol. Move
10924 here the check that the prefix of an expanded name cannot be a
10925 subprogram or a loop statement.
10926 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10927 procedure called from parsing and semantics to check that basic
10928 declarations are not placed after later declarations
10929 (Process_End_Label): move here the check that end label is not missing
10931 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10933 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10934 representation clause in codepeer mode, since it confuses CodePeer and
10935 does not bring useful info.
10937 2011-08-02 Ed Falis <falis@adacore.com>
10939 * init.c: initialize fp hw on MILS.
10941 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10943 * errout.adb (First_Node): for bodies, return the node itself (small
10944 optimization). For other nodes, do not check source_unit if the node
10945 comes from Standard.
10947 2011-08-02 Robert Dewar <dewar@adacore.com>
10949 * exp_ch3.adb: Minor comment additions.
10950 * sem_ch13.adb: Minor reformatting.
10952 2011-08-02 Pascal Obry <obry@adacore.com>
10954 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10956 2011-08-02 Robert Dewar <dewar@adacore.com>
10958 * sem_attr.adb: Minor reformatting.
10960 2011-08-02 Robert Dewar <dewar@adacore.com>
10962 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10963 (Has_Default_Component_Value): Removed
10964 * einfo.ads Comment updates
10965 (Has_Default_Aspect): Replaces Has_Default_Value
10966 (Has_Default_Component_Value): Removed
10968 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10970 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10971 (Get_Simple_Init_Val): Handle Default_Value aspect
10972 (Needs_Simple_Initialization): Handle Default_Value aspect
10973 * exp_ch3.ads: Needs_Simple_Initialization
10974 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10975 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10977 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10978 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10979 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10981 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10983 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10984 package containing iteration primitives.
10985 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10989 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10990 "of", pre-analyze expression in case it is a function call with
10991 finalization actions that must be placed ahead of the loop.
10992 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10993 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10995 2011-08-02 Geert Bosch <bosch@adacore.com>
10997 * cstand.adb (Create_Float_Types): Only consider C's long double for
10998 Long_Long_Float, in addition to double.
11000 2011-08-02 Robert Dewar <dewar@adacore.com>
11002 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11003 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11004 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11005 Minor reformatting.
11007 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11009 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11012 2011-08-02 Javier Miranda <miranda@adacore.com>
11014 * einfo.ads, einfo.adb
11015 (Original_Access_Type): Move this attribute to Node26 since there was
11016 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11017 which causes conflicts and breaks the generation of the .NET compiler.
11018 (Interface_Name): Add missing documentation on JGNAT only uses of
11021 2011-08-02 Geert Bosch <bosch@adacore.com>
11023 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11024 (Find_Back_End_Float_Type): Likewise
11025 (Create_Back_End_Float_Types): Likewise
11026 (Create_Float_Types): Likewise
11027 (Register_Float_Type): Likewise
11028 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11029 Nlist and split out type selection in new local Find_Base_Type function.
11030 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11032 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11034 2011-08-02 Robert Dewar <dewar@adacore.com>
11036 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11038 * opt.ads: Minor comment change.
11039 * sem_ch12.adb: Minor code reorganization.
11041 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11043 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11044 subtype's list of rep items to the list on the full subtype in the case
11045 where the lists are the same.
11047 2011-08-02 Geert Bosch <bosch@adacore.com>
11049 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11050 using the one from System.Strings, which also deallocates all strings.
11052 2011-08-02 Geert Bosch <bosch@adacore.com>
11054 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11056 * gcc-interface/Make-lang.in: Update dependencies.
11058 2011-08-02 Olivier Hainque <hainque@adacore.com>
11060 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11063 2011-08-02 Javier Miranda <miranda@adacore.com>
11065 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11066 associated with anonymous access to subprograms.
11068 2011-08-02 Geert Bosch <bosch@adacore.com>
11071 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11072 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11073 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11074 (Add_Symbol_Definition): Move to switch-c.adb
11075 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11076 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11077 (Add_Symbol_Definition): Move to switch-c.adb.
11078 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11080 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11081 Move to warnsw.adb.
11082 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11083 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11084 Move to warnsw.adb.
11085 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11086 (Add_Symbol_Definition): Moved from Prepcomp.
11087 * switch-c.ads: Update copyright notice. Use String_List instead of
11088 Argument_List, removing dependency on System.OS_Lib.
11090 2011-08-02 Yannick Moy <moy@adacore.com>
11092 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11093 mode on initialization expression which does not respect SPARK
11095 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11096 if the tree referenced by its argument represents an initialization
11097 expression in SPARK, suitable for initializing an object in an object
11100 2011-08-02 Javier Miranda <miranda@adacore.com>
11102 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11103 internally generated access to subprogram with its associated protected
11105 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11107 2011-08-02 Geert Bosch <bosch@adacore.com>
11109 * cstand.adb (Register_Float_Type): Print information about type to
11110 register, if the Debug_Flag_Dot_B is set.
11111 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11112 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11113 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11114 with a requested precision of more than Max_Digits digits and no more
11115 than Max_Base_Digits digits, if a range specification is present and the
11116 Predefined_Float_Types list has a suitable type to derive from.
11117 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11118 case of type completion with pragma Import
11120 (Process_Import_Predefined_Type): Processing to complete a type
11121 with pragma Import. Currently supports floating point types only.
11122 (Set_Convention_From_Pragma): Do nothing without underlying type.
11123 (Process_Convention): Guard against absence of underlying type,
11124 which may happen when importing incomplete types.
11125 (Process_Import_Or_Interface): Handle case of importing predefined
11126 types. Tweak error message.
11128 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11130 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11131 functions to previous change. Reorganize code slightly.
11133 2011-08-02 Geert Bosch <bosch@adacore.com>
11135 * back_end.ads (Register_Type_Proc): New call back procedure type for
11136 allowing the back end to provide information about available types.
11137 (Register_Back_End_Types): New procedure to register back end types.
11138 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11140 * cstand.adb (Back_End_Float_Types): New list for floating point types
11141 supported by the back end.
11142 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11143 (Copy_Float_Type): New procedure to make new copies of predefined types.
11144 (Register_Float_Type): New call back procedure to populate the BEFT list
11145 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11146 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11147 (Create_Float_Types): New procedure to create entities for floating
11148 point types predefined in Standard, and put these and any remaining
11149 BEFTs on the Predefined_Float_Types list.
11150 * stand.ads (Predefined_Float_Types): New list for predefined floating
11151 point types that do not have declarations in package Standard.
11153 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11155 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
11156 entity node for the unit containing the parameter.
11157 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11158 (Add_Inlined_Subprogram): Likewise.
11159 * gcc-interface/Make-lang.in: Update dependencies.
11161 2011-08-02 Thomas Quinot <quinot@adacore.com>
11163 * s-stusta.adb (Print): Make sure Pos is always initialized to a
11166 2011-08-02 Geert Bosch <bosch@adacore.com>
11168 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11170 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11172 * sem_type.adb (Covers): Move trivial case to the top and reuse the
11173 computed value of Base_Type.
11175 2011-08-02 Yannick Moy <moy@adacore.com>
11177 * restrict.adb (Check_Restriction): issue an error for any use of
11178 class-wide, even if the No_Dispatch restriction is not set.
11179 * sem_aggr.adb: Correct typos in comments and messages in formal mode
11180 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11181 when completing a private extension, the type named in the private part
11182 is not the same as that named in the visible part.
11183 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11184 of an inherited primitive operations of a tagged type or type extension
11185 that returns the tagged type.
11186 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11187 function which returns True for an implicit operation inherited by the
11188 derived type declaration for the argument type.
11189 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11194 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11195 Process_Bounds, to perform analysis with expansion of a range or an
11196 expression that is the iteration scheme for a loop.
11197 (Analyze_Iterator_Specification): If domain of iteration is given by a
11198 function call with a controlled result, as is the case if call returns
11199 a predefined container, ensure that finalization actions are properly
11201 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11203 2011-08-02 Javier Miranda <miranda@adacore.com>
11205 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11206 * gcc-interface/Make-lang.in: Update dependencies.
11208 2011-08-02 Javier Miranda <miranda@adacore.com>
11210 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11211 determine if the analysis is performed using N or Original_Node (N).
11212 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11213 functionality of routine Is_Variable avoids code duplication.
11214 * checks.adb (Determine_Range): Handle temporaries generated by
11215 Remove_Side_Effects.
11217 2011-08-02 Javier Miranda <miranda@adacore.com>
11219 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11220 expansion of the condition. Required since the previous analysis was
11221 done with expansion disabled (see Resolve_Quantified_Expression) and
11222 hence checks were not inserted and record comparisons have not been
11225 2011-08-02 Ed Falis <falis@adacore.com>
11227 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11230 2011-08-02 Bob Duff <duff@adacore.com>
11232 * opt.ads: Minor comment fix.
11234 2011-08-02 Bob Duff <duff@adacore.com>
11236 * sem_ch12.adb (Analyze_Package_Instantiation,
11237 Analyze_Subprogram_Instantiation): Turn off style checking while
11238 analyzing an instance. Whatever style checks that apply to the generic
11239 unit should apply, so it makes no sense to apply them in an instance.
11240 This was causing trouble when compiling an instance of a runtime
11241 unit that violates the -gnatyO switch.
11242 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11243 one of the two case statements, causing spurious errors.
11245 2011-08-02 Robert Dewar <dewar@adacore.com>
11247 * uname.adb: Minor reformatting.
11248 * gnatcmd.adb: Minor reformatting.
11249 * exp_attr.adb: Minor reformatting.
11251 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11253 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11254 No_Dispatching_Calls, do not look for the Assign primitive, because
11255 predefined primitives are not created in this case.
11257 2011-08-02 Bob Duff <duff@adacore.com>
11259 * stylesw.ads: Minor comment fixes.
11261 2011-08-02 Robert Dewar <dewar@adacore.com>
11263 * freeze.adb (Add_To_Result): New procedure.
11265 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11267 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11268 time, if the specific run-time routines for handling streams of strings
11269 are not available, use the default mechanism.
11271 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11273 * s-regpat.ads: Fix typo.
11275 2011-08-02 Vincent Celier <celier@adacore.com>
11277 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11278 not null, call it to create the in memory config project file without
11279 parsing an existing default config project file.
11281 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11283 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11285 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11287 * sem_elim.adb: an abstract subprogram does not need an eliminate
11288 pragma for its descendant to be eliminable.
11290 2011-08-02 Ed Falis <falis@adacore.com>
11292 * init.c: revert to handling before previous checkin for VxWorks
11293 * s-intman-vxworks.adb: delete unnecessary declarations related to
11294 using Ada interrupt facilities for handling signals.
11295 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11296 * s-intman-vxworks.ads: Import __gnat_install_handler as
11297 Initialize_Interrupts.
11298 * s-taprop-vxworks.adb: Delete Signal_Mask.
11299 (Abort_Handler): change construction of mask to unblock exception
11302 2011-08-02 Jerome Guitton <guitton@adacore.com>
11304 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11305 Debug_Raise_Exception before propagation starts.
11307 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11309 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11310 to Restriction_Check_Required.
11311 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11312 * sem_res.adb (Resolve_Call): Likewise.
11313 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11315 2011-08-02 Bob Duff <duff@adacore.com>
11317 * stylesw.ads: Update comment.
11318 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11319 * errout.ads: Remove obsolete comment.
11321 2011-08-02 Javier Miranda <miranda@adacore.com>
11323 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11324 (Set_Is_Safe_To_Reevaluate): new procedure.
11325 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11326 assignment is allowed on safe-to-reevaluate variables.
11327 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11328 temporary created to remove side effects in expressions that use
11329 the secondary stack as safe-to-reevaluate.
11330 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11331 variables that are not true constants.
11333 2011-08-02 Robert Dewar <dewar@adacore.com>
11335 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11336 sem_res.adb, sem_ch6.adb: Minor reformatting.
11338 2011-08-02 Jerome Guitton <guitton@adacore.com>
11340 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11342 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11344 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11345 not set Overridden_Operation if subprogram is an initialization
11348 2011-08-02 Yannick Moy <moy@adacore.com>
11350 * par-ch6.adb: Correct obsolete name in comments
11351 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11352 which takes two message arguments (existing function takes one), with
11353 second message used for continuation.
11354 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11355 block statements that originate from a source block statement, not
11356 generated block statements
11357 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11358 symmetry with procedure case
11359 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11360 function to issue an error in formal mode if a package specification
11361 contains more than one tagged type or type extension.
11362 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11363 parameters matching formals of tagged types are objects (or ancestor
11364 type conversions of objects), not general expressions. Issue an error
11365 on view conversions that are not involving ancestor conversion of an
11367 (Resolve_Type_Conversion): in formal mode, issue an error on the
11368 operand of an ancestor type conversion which is not an object
11369 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11370 procedure so that it works also for actuals of function calls
11371 (Is_Actual_Tagged_Parameter): new function which determines if its
11372 argument is an actual parameter of a formal of tagged type in a
11374 (Is_SPARK_Object_Reference): new function which determines if the tree
11375 referenced by its argument represents an object in SPARK
11377 2011-08-02 Robert Dewar <dewar@adacore.com>
11379 * sem_ch3.adb: Minor reformatting
11380 Minor comment addition
11381 Minor error msg text change
11383 2011-08-02 Javier Miranda <miranda@adacore.com>
11385 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11386 function. Used to be more precise when we generate a variable plus one
11387 assignment to remove side effects in the evaluation of the Bound
11389 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11390 of the bound expression to force its re-analysis and thus expand the
11391 associated transient scope (if required). Code cleanup replacing the
11392 previous code that declared the constant entity by an invocation to
11393 routine Force_Evaluation which centralizes this work in the frontend.
11395 2011-08-02 Robert Dewar <dewar@adacore.com>
11397 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11398 (Base_Type): Now uses improved Is_Base_Type function
11399 * einfo.ads (Base_Type): Inline this function
11401 2011-08-02 Robert Dewar <dewar@adacore.com>
11403 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11404 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11406 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11408 * gcc-interface/Make-lang.in: Update dependencies.
11409 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11412 2011-08-02 Yannick Moy <moy@adacore.com>
11414 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11415 non-simple expression used in delta constraint
11416 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11417 index constraint which is not a subtype mark
11418 * par.adb: With and use Restrict
11419 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11420 mode on component type which is not a subtype mark and default
11421 expression on component
11422 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11423 of string which does not have a lower index bound equal to 1
11424 (Array_Type_Declaration): issue an error in formal mode on index or
11425 component type which is not a subtype mark, and on aliased keyword on
11427 (Derived_Type_Declaration): issue an error in formal mode on interface,
11428 limited or abstract type
11429 (Record_Type_Declaration): issue an error in formal mode on interface
11430 (Record_Type_Definition): issue an error in formal mode on tagged types
11431 and type extensions not declared in the specification of a library unit
11432 package; on null non-tagged record; on variant part
11434 2011-08-02 Vincent Celier <celier@adacore.com>
11436 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11437 not declared for qualified library project when Library_Name is not
11438 declared, but Library_Dir is.
11440 2011-08-02 Robert Dewar <dewar@adacore.com>
11442 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11443 pragmas (affects aspects [Component_]Default_Value
11444 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11445 component type for the resolution
11447 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11449 * einfo.adb (Base_Type): Tune implementation for speed.
11451 2011-08-02 Robert Dewar <dewar@adacore.com>
11453 * freeze.adb: Minor reformatting.
11455 2011-08-02 Thomas Quinot <quinot@adacore.com>
11457 * scos.ads: Update comments.
11459 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11461 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11462 base type, because the parent may be a subtype of a private type whose
11463 convention is established in a private part.
11465 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11467 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11468 statement in a block when the expansion of the return expression has
11469 created a finalization chain.
11470 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11471 with the parent node.
11472 Add N_Extended_Return_Statement to handle the case where a transient
11473 object declaration appears in the Return_Object_Declarations list of
11474 an extended return statement.
11476 2011-08-02 Matthew Gingell <gingell@adacore.com>
11478 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11479 unused parameter 'name'.
11481 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11483 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11484 inherited operation, check whether its alias, which is the source
11485 operastion that it renames, has been marked eliminated.
11487 2011-08-02 Javier Miranda <miranda@adacore.com>
11489 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11490 in-mode parameter whose type is an access type since it can be used to
11491 modify its designated object. Enforce code that handles as safe an
11492 access type that is not access-to-constant but it is the result of a
11493 previous removal of side-effects.
11494 (Remove_Side_Effects): Minor code reorganization of cases which require
11495 no action. Done to incorporate documentation on new cases uncovered
11496 working in this ticket: no action needed if this routine was invoked
11497 too early and the nodes are not yet decorated.
11498 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11499 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11500 were issued with actuals that are implicitly provided by
11503 2011-08-02 Robert Dewar <dewar@adacore.com>
11505 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11507 2011-08-02 Yannick Moy <moy@adacore.com>
11509 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11510 to issue an error in formal mode on attribute not supported in this mode
11511 (Analyze_Attribute): issue errors on standard attributes not supported
11513 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11514 comment, and issue error in formal mode on modulus which is not a power
11516 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11518 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11520 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11521 operator on modular type (except 'not').
11523 2011-08-02 Robert Dewar <dewar@adacore.com>
11525 * gnat_rm.texi: Minor reformatting.
11527 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11529 * s-osinte-linux.ads: Minor comment update and reformatting.
11530 * i-cexten.ads: Make this unit pure, as for its parent.
11531 Will allow its usage in more contexts if needed.
11533 2011-08-02 Robert Dewar <dewar@adacore.com>
11535 * s-utf_32.ads: Minor comment fix.
11537 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11539 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11540 operation of a tagged synchronized type, handle the case where the
11541 controlling argument is overloaded.
11543 2011-08-02 Yannick Moy <moy@adacore.com>
11545 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11546 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11547 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11548 SPARK mode and formal verification mode on processing SPARK restriction
11549 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11550 requiring consistency checking.
11552 2011-08-02 Robert Dewar <dewar@adacore.com>
11554 * sem_res.adb: Minor reformatting.
11556 2011-08-02 Robert Dewar <dewar@adacore.com>
11558 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11559 a-cforse.ads: Remove unneeded with of Ada.Containers
11560 Remove commented out pragma Inline's
11561 Move specifications of new subprograms to the actual specs
11563 2011-08-02 Yannick Moy <moy@adacore.com>
11565 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11566 a-cforse.ads: Update comments.
11568 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11570 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11572 2011-08-02 Robert Dewar <dewar@adacore.com>
11574 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11575 a-cforse.ads, a-cofove.ads: Minor reformatting.
11577 2011-08-02 Claire Dross <dross@adacore.com>
11579 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11580 a-cofove.ads: Add comments.
11582 2011-08-02 Yannick Moy <moy@adacore.com>
11584 * gnat_rm.texi: Document formal containers.
11586 2011-08-02 Emmanuel Briot <briot@adacore.com>
11588 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11589 are empty sections.
11591 2011-08-02 Robert Dewar <dewar@adacore.com>
11593 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11596 2011-08-02 Robert Dewar <dewar@adacore.com>
11598 * aspects.adb: New aspects Default_Value and Default_Component_Value
11599 New format of Aspect_Names table checks for omitted entries
11600 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11601 handling of boolean aspects for derived types.
11602 New aspects Default_Value and Default_Component_Value
11603 New format of Aspect_Names table checks for omitted entries
11604 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11605 (Has_Default_Value): New flag
11606 (Has_Default_Component_Value): New flag
11607 (Has_Default_Value): New flag
11608 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11610 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11611 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11612 Default_Value and Default_Component_Value
11613 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11614 New aspects Default_Value and Default_Component_Value
11615 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11616 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11618 2011-08-02 Vincent Celier <celier@adacore.com>
11620 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11621 inherit library kind.
11623 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11625 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11626 Minor reformatting.
11628 2011-08-02 Robert Dewar <dewar@adacore.com>
11630 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11632 2011-08-02 Yannick Moy <moy@adacore.com>
11634 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11636 2011-08-02 Robert Dewar <dewar@adacore.com>
11638 * impunit.adb: Add comment.
11640 2011-08-02 Yannick Moy <moy@adacore.com>
11642 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11643 qualification of aggregates in formal mode
11644 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11646 (Resolve_Aggregate): complete the test that an aggregate is adequately
11647 qualified in formal mode
11649 2011-08-02 Pascal Obry <obry@adacore.com>
11651 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11652 * mlib-prj.adb: Supress warning when compiling binder generated file.
11653 (Build_Library): Supress all warnings when compiling the binder
11656 2011-08-02 Yannick Moy <moy@adacore.com>
11658 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11660 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11661 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11662 Add with/use clauses to make Check_Formal_Restriction visible
11664 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11666 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11667 in-parameters when type of the generic formal is private in the generic
11668 spec and non-private in the body.
11670 2011-08-02 Claire Dross <dross@adacore.com>
11672 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11673 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11674 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11675 * impunit.adb, Makefile.rtl: Take new files into account.
11677 2011-08-02 Robert Dewar <dewar@adacore.com>
11679 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11680 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11682 2011-08-02 Yannick Moy <moy@adacore.com>
11684 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11686 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11687 matching static array bounds, taking into account the special case of
11689 * sem_ch3.adb: Typo in comment.
11691 2011-08-02 Yannick Moy <moy@adacore.com>
11693 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11694 which issues an error in formal mode if its argument node is originally
11696 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11697 has a discriminant specification so that it does not include the case
11699 (Derived_Type_Declaration): move here the test that a derived type has a
11700 discriminant specification
11701 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11702 first element of a component association before accessing its choices
11703 (presence of component association is not enough)
11704 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11705 declaration is a library item before accessing the next element in a
11706 list, as library items are not member of lists
11707 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11708 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11709 Check_Formal_Restriction whenever possible.
11711 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11713 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11714 reference when needed.
11716 2011-08-02 Bob Duff <duff@adacore.com>
11718 * gnat_ugn.texi: Fix typo.
11720 2011-08-02 Vincent Celier <celier@adacore.com>
11722 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11723 archive file name. Do not use the full path name of archives for Open
11726 2011-08-02 Robert Dewar <dewar@adacore.com>
11728 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11729 Analyze_Aspect_Specifications
11731 (Analyze_Aspect_Specifications): New handling for boolean aspects
11732 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11733 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11734 sequence for Analyze_Aspect_Specifications
11735 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11736 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11738 2011-08-02 Robert Dewar <dewar@adacore.com>
11740 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11741 aspects, since these no longer exist.
11743 2011-08-02 Robert Dewar <dewar@adacore.com>
11745 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11746 semicolon, do not try to see if there are aspects following it.
11747 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11750 2011-08-02 Robert Dewar <dewar@adacore.com>
11752 * sem_ch8.adb, aspects.ads: Minor reformatting.
11754 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11756 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11757 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11759 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11761 2011-08-02 Yannick Moy <moy@adacore.com>
11763 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11764 mode on subprogram declaration outside of package specification, unless
11765 it is followed by a pragma Import
11766 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11767 Access_Type_Declaration): issue error in formal mode on access type
11768 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11770 (Analyze_Object_Declaration): issue error in formal mode on object
11771 declaration which does not respect SPARK restrictions
11772 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11773 declaration which does not respect SPARK restrictions
11774 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11775 error in formal mode on digits or delta constraint
11776 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11777 decimal fixed point type
11778 (Derived_Type_Declaration): issue error in formal mode on derived type
11779 other than type extensions of tagged record types
11780 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11781 with check on access definition
11782 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11783 mode on protected definition.
11784 (Analyze_Task_Definition): issue error in formal mode on task definition
11786 2011-08-02 Robert Dewar <dewar@adacore.com>
11788 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11790 2011-08-02 Javier Miranda <miranda@adacore.com>
11792 * sem_ch6.adb (Can_Override_Operator): New function.
11793 (Verify_Overriding_Indicator): Add missing code to check overriding
11794 indicator in operators. Fixes regression.
11795 (Check_Overriding_Indicator): Minor reformating after replacing the
11796 code that evaluates if the subprogram can override an operator by
11797 invocations to the above new function.
11799 (Write_Field26_Name): Add missing code to ensure that, following
11800 the documentation in einfo.ads, this field is not shown as attribute
11801 "Static_Initialization" on non-dispatching functions.
11803 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11805 * sem_res.adb (Resolve_Call): A call to
11806 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11807 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11808 i.e., when the second parameter is of type Time_Span.
11810 2011-08-02 Vincent Celier <celier@adacore.com>
11812 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11813 with an archive instead of -L<library dir> -l<library name>.
11815 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11817 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11818 mark the base types In_Use in addition to making the operations
11821 2011-08-02 Ed Falis <falis@adacore.com>
11823 * init.c: add and setup __gnat_signal_mask for the exception signals
11824 * s-inmaop-vxworks.adb: new file.
11825 * s-intman-vxworks.adb: remove unnecessary initializations and
11827 * s-intman-vxworks.ads: remove unnecessary variable
11828 * s-taprop-vxworks.adb: simplify signal initialization
11830 2011-08-02 Robert Dewar <dewar@adacore.com>
11832 * sem_ch8.adb: Minor code reorganization, comment updates.
11834 2011-08-02 Robert Dewar <dewar@adacore.com>
11836 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11837 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11839 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11840 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11844 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11845 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11846 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11847 use_type_clauses, to handle more efficiently use_type and use_all_type
11849 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11850 Ada2012 Use_All_Type clause.
11851 (Use_Class_Wide_Operations): new procedure.
11853 2011-08-02 Robert Dewar <dewar@adacore.com>
11855 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11856 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11857 expression to expression function.
11859 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11861 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11862 if types are compatible.
11864 2011-08-02 Yannick Moy <moy@adacore.com>
11866 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11867 returns True if its argument array types have same dimension and same
11868 static bounds at each index.
11869 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11870 OUT or IN OUT paramaters which are not view conversions in SPARK.
11871 (Resolve_Arithmetic_Op): issue an error in formal mode on
11872 multiplication or division with operands of fixed point types which are
11873 not qualified or explicitly converted.
11874 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11875 Boolean or array type (except String) operands.
11876 (Resolve_Equality_Op): issue an error in formal mode on equality
11877 operators for array types other than String with non-matching static
11879 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11880 for array types with non-matching static bounds. Factorize the code in
11881 Matching_Static_Array_Bounds.
11882 (Resolve_Qualified_Expression): issue an error in formal mode on
11883 qualified expressions for array types with non-matching static bounds.
11884 (Resolve_Type_Conversion): issue an error in formal mode on type
11885 conversion for array types with non-matching static bounds
11887 2011-08-02 Robert Dewar <dewar@adacore.com>
11889 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11891 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11893 * par-ch9.adb: save location of entry for proper error message.
11895 2011-08-02 Javier Miranda <miranda@adacore.com>
11897 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11898 (Use_Full_View) which permits this routine to climb through the
11899 ancestors using the full-view of private parents.
11900 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11901 Use_Full_View to true in calls to Is_Ancestor.
11902 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11903 true in call to Is_Ancestor.
11904 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11905 Use_Full_View to true in call to Is_Ancestor.
11906 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11907 call to Is_Ancestor.
11908 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11909 Use_Full_View to true in calls to Is_Ancestor.
11910 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11911 Make_Select_Specific_Data_Table, Register_Primitive,
11912 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11913 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11914 to true in call to Is_Ancestor.
11915 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11916 Use_Full_View to true in calls to Is_Ancestor.
11918 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11919 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11921 2011-08-02 Robert Dewar <dewar@adacore.com>
11923 * gnat_rm.texi: Minor reformatting.
11924 * sem_prag.adb: Minor reformatting.
11926 2011-08-02 Tristan Gingold <gingold@adacore.com>
11928 * vms_data.ads: Add VMS qualifier for -gnateP.
11930 2011-08-02 Robert Dewar <dewar@adacore.com>
11932 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11933 * par-ch7.adb (P_Package): Proper placement of aspects for package
11934 decl/instantiation.
11935 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11936 (End_Statements): Add Is_Sloc parameterr
11937 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11938 (Check_End): Ad Is_Sloc parameter
11939 (End_Statements): Add Is_Sloc parameterr
11941 2011-08-02 Vincent Celier <celier@adacore.com>
11943 * ug_words: Add VMS qualifier equivalent to -gnateP:
11944 /SYMBOL_PREPROCESSING.
11946 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11948 * gnat-style.texi: For hexadecimal numeric literals the typical
11949 grouping of digits is 4 to represent 2 bytes.
11950 A procedure spec which is split into several lines is indented two
11953 2011-08-02 Yannick Moy <moy@adacore.com>
11955 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11956 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11957 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11959 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11960 choice in array aggregate
11961 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11963 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11964 positional and named aggregate for record, or others in record
11965 aggregate, or multiple choice in record aggregate
11966 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11967 array operands to logical operations AND, OR and XOR do not have the
11968 same static lower and higher bounds
11969 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11971 2011-08-01 Robert Dewar <dewar@adacore.com>
11973 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11974 Replaces Last_Source_Node_In_Sequence.
11975 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11976 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11977 parens and blank in string (this was inconsistently implemented).
11979 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11980 blank in string (this was inconsistently implemented).
11982 (Set_Global_Switches): Set formal mode switches appropriately
11983 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11985 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11986 call Set_Error_Msg_Lang to set "spark" as language name.
11987 * par.adb: Remove unnecessary call to set formal language for errout
11988 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11989 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11991 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11992 calls to it, moved after resolution so that types are known
11993 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11994 result of concatenation is not of type String
11995 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11996 concatenation is not properly restricted
11997 * gnat_rm.texi: Add doc on pragma Spark_95.
11998 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11999 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12000 * gcc-interface/Make-lang.in: Update dependencies.
12002 2011-08-01 Javier Miranda <miranda@adacore.com>
12004 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12005 condition that detects if the overridden operation must replace an
12008 2011-08-01 Javier Miranda <miranda@adacore.com>
12010 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12011 code declarations inserted by Insert_Actions in each alternative of the
12012 N_Case_Expression node.
12014 2011-08-01 Robert Dewar <dewar@adacore.com>
12016 * sem_ch6.adb: Minor code reorganization.
12017 * sem_util.adb: Minor reformatting.
12019 2011-08-01 Pascal Obry <obry@adacore.com>
12021 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12022 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12024 2011-08-01 Yannick Moy <moy@adacore.com>
12026 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12027 literal or operator symbol which is prefixed
12028 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12029 mode on access attributes.
12030 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12031 that concatenation operands are properly restricted in formal mode
12032 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12033 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12034 result of the concatenation has a type different from String.
12035 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12036 Analyze_Quantified_Expression, Analyze_Slice,
12037 Analyze_Null): issue an error in formal mode on unsupported constructs
12039 (Analyze_Block_Statement): only issue error on source block statement
12040 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12041 function which returns the last node in a list of nodes for which
12042 Comes_From_Source returns True, if any
12043 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12044 Last_Source_Node_In_Sequence
12045 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12046 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12047 mode on unsupported constructs
12048 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12049 rest of the actions may be needed later on since the error is marked as
12051 * sinfo.ads: Typos in comments.
12053 2011-08-01 Pascal Obry <obry@adacore.com>
12055 * projects.texi: Minor editing.
12057 2011-08-01 Yannick Moy <moy@adacore.com>
12059 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12060 insertion character ~~
12061 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12062 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12063 with insertion character ~~
12064 (Set_Msg_Text): treat insertion character ~~
12065 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12066 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12067 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12068 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12069 errors related to the formal language restriction not serious
12070 (insertion character |).
12071 * par.adb (Par): set formal language for error messages if needed
12072 * sem_ch6.adb (Check_Missing_Return): take into account possible
12073 generated statements at the end of the function
12074 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12075 enumeration value to define a new pragma SPARK_95
12076 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12077 SPARK_Version): new type and variables to store the SPARK version
12079 (SPARK_Mode): return True when SPARK_Version is set
12080 * par-prag.adb: Correct indentation
12081 (Prag): take Pragma_SPARK_95 into account
12082 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12085 2011-08-01 Robert Dewar <dewar@adacore.com>
12087 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12088 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12089 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12091 2011-08-01 Pascal Obry <obry@adacore.com>
12093 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12094 Target_Name to Get_Path call.
12095 (Parse_Single_Project): Likewise.
12096 (Post_Parse_Context_Clause): Likewise.
12097 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12098 Call Initialise_Project_Path with the proper Target_Name.
12099 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12101 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12102 with the proper Target_Name.
12103 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12104 Part.Parse routine.
12105 (Parse_Project_And_Apply_Config): Likewise.
12106 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12107 This is fine as this part of the code is supporting only native
12109 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12110 is fine as this part of the code is supporting only native compilation.
12112 2011-08-01 Yannick Moy <moy@adacore.com>
12114 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12115 of homonym, unless the homonym is one of the cases allowed in SPARK
12116 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12117 package declaration occurring after a body.
12119 2011-08-01 Robert Dewar <dewar@adacore.com>
12121 * checks.adb, exp_ch4.adb: Minor reformatting.
12123 2011-08-01 Javier Miranda <miranda@adacore.com>
12125 * einfo.ads (Access_Disp_Table): Fix documentation.
12126 (Dispatch_Table_Wrappers): Fix documentation.
12128 2011-08-01 Pascal Obry <obry@adacore.com>
12130 * prj-env.adb, prj-env.ads: Minor reformatting.
12132 2011-08-01 Yannick Moy <moy@adacore.com>
12134 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12135 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12136 procedures out of these packages.
12137 * errout.ads, errout.adb
12138 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12139 procedures in of this package
12140 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12141 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12142 on misplaced later vs initial declarations, like in Ada 83
12143 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12144 formal mode on attribute of private type whose full type declaration
12146 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12147 package declaration inside a package specification
12148 (Analyze_Full_Type_Declaration): issue error in formal mode on
12149 controlled type or discriminant type
12150 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12151 user-defined operator means that it should come from the source
12152 (New_Overloaded_Entity): issue error in formal mode on overloaded
12154 * sem_ch6.ads, sem_ch13.ads: typos in comments.
12156 2011-08-01 Thomas Quinot <quinot@adacore.com>
12158 * atree.adb: Minor reformatting.
12159 * checks.adb: Minor reformatting.
12161 2011-08-01 Vincent Celier <celier@adacore.com>
12163 * s-parame-vms-ia64.ads: Fix typo in comment
12165 * s-parame-vms-restrict.ads: Removed, unused.
12167 2011-08-01 Javier Miranda <miranda@adacore.com>
12170 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12172 (Constrain_Index): Remove side effects in the evaluation of the bounds.
12173 * sem_ch3.ads, sem_ch3.adb
12174 (Is_Constant_Bound): New extended version of the subprogram that was
12175 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12176 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12177 * sem_aux.ads (Constant_Value): Fix typo in comment.
12178 * checks.adb (Generate_Index_Checks): New implementation which, for
12179 array objects with constant bounds, generates the runtime check
12180 referencing the bounds of the array type. For other cases this routine
12181 provides its previous behavior obtaining such values from the array
12183 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12185 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12186 we cannot have semantic interpretations of the new node.
12188 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12190 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12193 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12195 * sem_ch8.adb: Minor code editing.
12196 * s-vxwext.adb: Remove trailing space.
12197 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12198 consistency with other files.
12200 2011-08-01 Thomas Quinot <quinot@adacore.com>
12202 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12204 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12206 * par-ch10.adb: reject parameterized expressions as compilation unit.
12207 * sem_ch4.adb: handle properly conditional expression with overloaded
12208 then_clause and no else_clause.
12210 2011-08-01 Tristan Gingold <gingold@adacore.com>
12212 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12213 like done by System.Aux_DEC.
12214 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12216 2011-08-01 Yannick Moy <moy@adacore.com>
12218 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12219 missing label at end of declaration (subprogram or package)
12220 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12221 of positional and named parameter association
12222 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12223 Error_Msg_SP which adds a prefix to the error message giving the name
12224 of the formal language analyzed
12225 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12226 access result type in subprogram, unconstrained array as result type,.
12227 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12229 * sem_ch8.adb: Code clean up.
12231 2011-08-01 Javier Miranda <miranda@adacore.com>
12233 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12234 * einfo.ads (Access_Disp_Table): Fix documentation.
12235 (Dispatch_Table_Wrappers): Fix documentation.
12236 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12237 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12238 to enforce the documentation of this attribute.
12239 (Set_Is_Interface): Cleanup the assertion.
12240 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12241 the Underlying_Type entity before reading attribute Access_Disp_Table.
12242 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12243 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12244 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12245 the Underlying_Type entity before reading attribute Access_Disp_Table.
12246 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12247 Locate the Underlying_Type entity before reading attribute
12250 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12252 * s-poosiz.ads: Additional overriding indicators.
12254 2011-08-01 Yannick Moy <moy@adacore.com>
12256 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12258 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12259 parameter specification does not include a subtype mark.
12260 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12261 formal mode on abstract subprogram.
12262 (Analyze_Subprogram_Specification): issue error in formal mode on
12263 user-defined operator.
12264 (Process_Formals): issue error in formal mode on access parameter and
12265 default expression.
12266 * sem_ch9.adb (Analyze_Abort_Statement,
12267 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12268 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12269 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12270 Analyze_Requeue, Analyze_Selective_Accept,
12271 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12272 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12273 issue error in formal mode on user-defined raise statement.
12275 2011-08-01 Thomas Quinot <quinot@adacore.com>
12277 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12278 declaration being hidden when overriding an implicit inherited
12280 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12281 (-gnats), do not complain about a source file that contains only a
12284 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12286 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12287 variable if already set.
12289 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12291 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12292 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12293 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12294 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12295 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12296 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12297 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12298 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12299 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12300 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12301 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12302 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12303 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12304 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12305 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12306 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12307 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12308 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12309 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12310 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12311 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12312 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12313 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12314 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12315 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12316 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12317 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12318 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12319 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12320 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12321 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12322 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12323 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12324 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12325 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12326 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12327 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12328 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12329 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12330 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12331 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12332 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12333 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12334 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12335 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12336 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12337 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12338 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12339 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12340 Use GNAT instead of GNARL.
12342 2011-08-01 Bob Duff <duff@adacore.com>
12344 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12345 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12346 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12349 2011-08-01 Yannick Moy <moy@adacore.com>
12351 * debug.adb (d.D) reverve flag for the SPARK mode
12352 (d.E) reverve flag for SPARK generation mode
12353 (d.F) reverve flag for Why generation mode
12354 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12355 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12356 functions which return True when the corresponding modes are set
12357 (Formal_Language): return "spark" or "alfa" when in formal verification
12359 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12360 Error_Msg to prefix the error message with a tag giving the formal
12362 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12363 message with a tag giving the formal language
12364 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12366 (Analyze_Case_Statement): issue error in formal mode on case statement
12367 with a single "others" case alternative
12368 (Analyze_Exit_Statement): issue errors in formal mode on exit
12369 statements which do not respect SPARK restrictions
12370 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12371 (Check_Unreachable_Code): always issue an error (not a warning) in
12372 formal mode on unreachable code (concerns both code after an infinite
12373 loop and after an unconditional jump, both not allowed in SPARK)
12374 * sem_ch6.adb (Analyze_Return_Statement): add call to
12375 Set_Return_Present for a procedure containing a return statement
12376 (already done for functions in Analyze_Function_Return)
12377 (Analyze_Function_Return): issue error in formal mode on extended
12378 return or if return is not last statement in function
12379 (Check_Missing_Return): issue error in formal mode if function does
12380 not end with return or if procedure contains a return
12381 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12382 function to detect if there is an inner scope of its parameter S which
12385 2011-08-01 Thomas Quinot <quinot@adacore.com>
12387 * sem_ch6.ads: Minor reformatting.
12389 2011-08-01 Javier Miranda <miranda@adacore.com>
12391 * sem_util.adb (Abstract_Interface_List): Complete condition when
12392 processing private type declarations to avoid reading unavailable
12394 (Is_Synchronized_Tagged_Type): Complete condition when processing
12395 private extension declaration nodes to avoid reading unavailable
12398 2011-08-01 Thomas Quinot <quinot@adacore.com>
12400 * sem_ch3.adb: Minor reformatting.
12402 2011-08-01 Thomas Quinot <quinot@adacore.com>
12404 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12405 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12406 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12407 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12408 for VMS, instead parametrize the common implementation with
12409 System.Parameters declarations.
12411 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12413 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12415 2011-08-01 Tristan Gingold <gingold@adacore.com>
12417 * seh_init.c: Fix SEH handler installation on win64.
12419 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12421 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12422 double analysis of an anonymous access to subprogram, because it can
12423 lead to improper sharing of profiles and a back-end crash.
12425 2011-08-01 Robert Dewar <dewar@adacore.com>
12427 * make.adb, sem_ch4.adb: Minor reformatting.
12428 * gcc-interface/Make-lang.in: Update dependencies.
12429 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12431 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12433 * gnat_rm.texi: Fix definition of Long_Integer.
12435 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12437 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12438 to prevent storage exhaustion.
12439 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12440 finalized is a function body, insert the cleanup code before the final
12441 return statement, to prevent spurious warnings.
12442 * s-pooglo.ads: add overriding indicator.
12444 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12446 * sem_ch4.adb (Operator_Check): improve error message when both a
12447 with_clause and a use_clause are needed to make operator usage legal.
12448 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12449 determine whether a compilation unit is visible within an other,
12450 either through a with_clause in the current unit, or a with_clause in
12451 its library unit or one one of its parents.
12453 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12455 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12456 over an arbitrary expression of an array or container type.
12457 * lib-xref.adb: clarify comment.
12459 2011-08-01 Bob Duff <duff@adacore.com>
12461 * einfo.ads: Minor reformatting.
12462 * debug.adb: Minor comment improvement.
12464 2011-08-01 Javier Miranda <miranda@adacore.com>
12466 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12467 consider hidden subprograms as valid candidates.
12469 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12471 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12473 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12475 * gnat_ugn.texi: Fix typo.
12477 2011-08-01 Robert Dewar <dewar@adacore.com>
12479 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12480 lib-xref.adb: Minor reformatting
12482 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12484 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12485 when to generate a call to Move_Final_List.
12486 (Has_Controlled_Parts): Remove this function.
12488 2011-08-01 Geert Bosch <bosch@adacore.com>
12490 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12491 "," in choice list.
12493 2011-08-01 Thomas Quinot <quinot@adacore.com>
12495 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12496 explicit raise of a predefined exception as Comes_From_Source if the
12497 original N_Raise_Statement comes from source.
12499 2011-08-01 Robert Dewar <dewar@adacore.com>
12501 * sinfo.ads: Add comment.
12502 * sem_ch6.adb: Minor reformatting.
12504 2011-08-01 Robert Dewar <dewar@adacore.com>
12506 * freeze.adb (Freeze_Entity): Refine check for bad component size
12507 clause to avoid rejecting confirming clause when atomic/aliased present.
12509 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12511 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12512 better determine whether an entity reference is a write.
12513 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12515 * lib-xref.adb (Output_References): Do no suppress a read reference at
12516 the same location as an immediately preceeding modify-reference, to
12517 handle properly in-out actuals.
12519 2011-08-01 Tristan Gingold <gingold@adacore.com>
12521 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12523 2011-08-01 Quentin Ochem <ochem@adacore.com>
12525 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12526 heap to compute the result.
12528 2011-08-01 Robert Dewar <dewar@adacore.com>
12530 * atree.ads: Minor reformatting.
12532 2011-08-01 Emmanuel Briot <briot@adacore.com>
12534 * g-expect.adb (Get_Command_Output): Fix memory leak.
12536 2011-08-01 Geert Bosch <bosch@adacore.com>
12538 * cstand.adb (P_Float_Type): New procedure to print the definition of
12539 predefined fpt types.
12540 (P_Mixed_Name): New procedure to print a name using mixed case
12541 (Print_Standard): Use P_Float_Type for printing floating point types
12542 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12543 precision IEEE float.
12545 2011-08-01 Thomas Quinot <quinot@adacore.com>
12547 * sem_ch3.adb: Minor reformatting.
12549 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12551 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12552 the completion of a generic function, insert the new body rather than
12553 rewriting the original.
12555 2011-08-01 Yannick Moy <moy@adacore.com>
12557 * sinfo.ads, errout.ads: Typos in comments.
12559 2011-08-01 Robert Dewar <dewar@adacore.com>
12561 * par-endh.adb: Minor reformatting.
12563 2011-08-01 Robert Dewar <dewar@adacore.com>
12565 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12566 (Pre_Post_Aspects): New subtype.
12567 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12568 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12569 * par-ch7.adb (P_Package): Remove Decl parameter
12570 (P_Package): Handle new syntax for aspects (before IS)
12571 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12573 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12574 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12575 (P_Package): Remove Decl parameter
12576 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12578 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12580 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12581 * sinfo.ads: Document new syntax for aspects in packages etc.
12582 * sprint.adb: Handle new syntax of aspects before IS in package
12584 2011-08-01 Thomas Quinot <quinot@adacore.com>
12586 * atree.ads: Minor reformatting.
12587 * sem_prag.adb: Minor reformatting.
12589 2011-08-01 Robert Dewar <dewar@adacore.com>
12591 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12592 case expr alternative.
12594 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12596 * sem_ch12.adb: Fix typo.
12598 2011-08-01 Geert Bosch <bosch@adacore.com>
12600 * sem_prag.adb (Check_No_Link_Name): New procedure.
12601 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12602 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12603 instead of Standard_Long_Long_Float_Size global. Preparation for
12604 eventual removal of per type constants.
12605 * exp_util.ads (Get_Stream_Size): New function returning the stream
12606 size value of subtype E.
12607 * exp_util.adb (Get_Stream_Size): Implement new function.
12608 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12610 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12612 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12614 2011-08-01 Geert Bosch <bosch@adacore.com>
12616 * cstand.adb: Fix comments.
12617 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12618 count of arguments.
12620 2011-08-01 Robert Dewar <dewar@adacore.com>
12622 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12624 2011-08-01 Geert Bosch <bosch@adacore.com>
12626 * atree.ads: Fix comment.
12628 2011-08-01 Robert Dewar <dewar@adacore.com>
12630 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12631 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12632 * par.adb: Add with for Namet.Sp.
12633 * par-tchk.adb: Minor reformatting.
12635 2011-08-01 Vincent Celier <celier@adacore.com>
12637 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12638 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12639 of the init procedure of a SAL.
12640 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12643 2011-08-01 Thomas Quinot <quinot@adacore.com>
12645 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12648 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12650 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12652 2011-08-01 Thomas Quinot <quinot@adacore.com>
12654 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12655 conformant with its spec (return True only for types that have
12656 an overriding Initialize primitive operation that prevents them from
12657 having preelaborable initialization).
12658 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12659 initialization for controlled types in Ada 2005 or later mode.
12661 2011-08-01 Robert Dewar <dewar@adacore.com>
12663 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12665 (Same_Aspect): New function.
12666 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12667 Type_Invariant, Precondition, Postcondition.
12668 * snames.ads-tmpl: Add Name_Type_Invariant.
12670 2011-08-01 Robert Dewar <dewar@adacore.com>
12672 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12674 (Freeze_All_Ent): Fix error in handling inherited aspects.
12675 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12676 already analyzed, but don't skip entire processing of a declaration,
12677 that's wrong in some cases of declarations being rewritten.
12678 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12679 Don't delay for integer, string literals
12680 Treat predicates in usual manner for delay, remove special case code,
12682 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12683 (Build_Predicate_Function): Update saved expression in aspect
12684 (Build_Invariant_Procedure): Update saved expression in aspect
12685 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12686 of replacement of discriminant references if the reference is simple.
12688 2011-08-01 Robert Dewar <dewar@adacore.com>
12690 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12691 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12692 Static_Predicate and Dynamic_Predicate.
12693 (Build_Predicate_Function): Add processing for Static_Predicate
12694 and Dynamic_Predicate.
12695 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12696 (From_Static_Predicate): New flag
12697 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12699 2011-08-01 Robert Dewar <dewar@adacore.com>
12701 * usage.adb: Documentation cleanup for Ada version modes in usage.
12702 * expander.adb: Minor reformatting.
12704 2011-08-01 Robert Dewar <dewar@adacore.com>
12706 * atree.ads: Minor comment fix.
12707 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12708 a-witeio.ads, sem_prag.adb: Minor reformatting.
12710 2011-08-01 Doug Rupp <rupp@adacore.com>
12712 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12713 pointers. Use descrip.h header file for convenience. Add some
12716 2011-08-01 Robert Dewar <dewar@adacore.com>
12718 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12719 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12720 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12722 (Check_Aspect_At_End_Of_Declarations): New procedure
12723 (Analye_Aspect_Specification): Minor changes for above procedures
12724 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12725 specification node as well.
12727 2011-08-01 Pascal Obry <obry@adacore.com>
12729 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12730 Windows files. Use GetFilesAttributes() in this case to check for file
12731 existence instead of returning with an error code.
12733 2011-08-01 Vincent Celier <celier@adacore.com>
12735 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12736 High is above Source length.
12738 2011-08-01 Robert Dewar <dewar@adacore.com>
12740 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12742 2011-08-01 Robert Dewar <dewar@adacore.com>
12744 * aspects.ads (Boolean_Aspects): New subtype.
12745 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12746 for derived types in cases where the parent type and derived type have
12748 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12749 with aspects when parent type also has aspects.
12750 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12751 boolean expression at this point).
12752 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12753 accordance with final decision on the Ada 2012 feature.
12754 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12756 2011-08-01 Matthew Heaney <heaney@adacore.com>
12758 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12760 2011-08-01 Pascal Obry <obry@adacore.com>
12762 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12763 Fix Replace_Slice when High is above current string size.
12764 (Replace_Slice): Fix DL computation when High is above current
12767 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12769 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12771 2011-08-01 Matthew Heaney <heaney@adacore.com>
12773 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12776 2011-08-01 Pascal Obry <obry@adacore.com>
12778 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12781 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12783 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12784 access to protected subprograms in generic bodies.
12785 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12786 protected type, indicate that the convention of the subprogram is
12787 Convention_Protected, because it may be used in subsequent declarations
12788 within the protected declaration.
12790 2011-08-01 Vincent Celier <celier@adacore.com>
12792 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12793 and "final" procedures when the name of the library is "ada", to avoid
12794 duplicate symbols "adainit" and "adafinal" in executables.
12796 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12798 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12799 quantified expression that appears within a postcondition and uses the
12800 Ada2012 'Result attribute.
12802 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12804 * init.c (__gnat_error_handler): Cast reason to int.
12805 (__gnat_install_handler): Explain sa_sigaction use.
12807 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12809 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12810 subprogram has copy-in copy-out parameters, try to promote the mode of
12811 the return type if it is passed in registers.
12813 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12815 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12816 left operand as addressable.
12818 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12820 * gcc-interface/gigi.h (build_function_stub): Remove.
12821 (build_return_expr): Likewise.
12822 (convert_vms_descriptor): Declare.
12823 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12824 (build_function_stub): Move to...
12825 * gcc-interface/utils2.c (build_return_expr): Move to...
12826 * gcc-interface/trans.c (build_function_stub): ...here.
12827 (build_return_expr): ...here.
12828 (Subprogram_Body_to_gnu): Add local variable for language_function.
12829 Disconnect the parameter attributes cache, if any, once done with it.
12830 Call end_subprog_body only after setting the end_locus.
12831 Build the stub associated with the function, if any, at the very end.
12832 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12833 variables and streamline control flow.
12835 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12838 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12839 g-trasym-dwarf.adb.
12841 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12844 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12845 Assign to act.sa_sigaction.
12846 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12847 current->return_address to char * before arithmetic.
12849 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12851 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12852 Correct argument types.
12853 Extract code from reason.
12854 (__gnat_install_handler): Assign to act.sa_sigaction.
12856 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12858 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12859 (GNAT1_OBJS): ...here.
12861 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12864 * g-socthi-mingw.adb (Fill): Fix formatting.
12866 * gcc-interface/gigi.h: Move around comment.
12868 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12871 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12873 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12876 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12878 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12880 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12881 range comparison if Pmode is SImode.
12883 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12884 Eric Botcazou <ebotcazou@adacore.com>
12886 * adadecode.c: Wrap up in extern "C" block.
12887 * adadecode.h: Likewise.
12888 * adaint.c: Likewise. Remove 'const' keyword.
12889 * adaint.h: Likewise.
12890 * argv.c: Likewise.
12891 * atree.h: Likewise.
12893 * cstreams.c: Likewise.
12895 * exit.c: Likewise.
12897 * final.c: Likewise.
12898 * init.c: Likewise.
12899 * initialize.c: Likewise.
12900 * link.c: Likewise.
12901 * namet.h: Likewise.
12902 * nlists.h: Likewise.
12903 * raise.c: Likewise.
12904 * raise.h: Likewise.
12905 * repinfo.h: Likewise.
12906 * seh_init.c: Likewise.
12907 * targext.c: Likewise.
12908 * tracebak.c: Likewise.
12909 * uintp.h: Likewise.
12910 * urealp.h: Likewise.
12911 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12912 * xsinfo.adb: Likewise.
12913 * xsnamest.adb: Likewise.
12914 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12915 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12916 * gcc-interface/misc.c: Likewise.
12917 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12918 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12919 ada/targext.o here...
12920 (GNAT_ADA_OBJS): ...and not here.
12921 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12922 (GNATBIND_OBJS): Reorder.
12924 2011-07-07 Richard Henderson <rth@redhat.com>
12926 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12927 dwarf2out_frame_init.
12929 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12931 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12933 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12936 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12938 2011-07-06 Richard Guenther <rguenther@suse.de>
12940 * gcc-interface/misc.c (gnat_init): Merge calls to
12941 build_common_tree_nodes and build_common_tree_nodes_2.
12942 Re-initialize boolean_false_node.
12944 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12945 Olivier Hainque <hainque@adacore.com>
12946 Nicolas Setton <setton@adacore.com>
12948 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12949 the type according to the ARTIFICIAL_P parameter.
12950 (create_type_decl): Likewise.
12951 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12953 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12955 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12956 (gnatbind): Likewise.
12958 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12960 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12962 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12964 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12965 local variable throughout. Remove useless call to Base_Type.
12966 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12967 Take it also into account for the volatileness of the field. Set the
12968 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12970 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12972 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12973 on a dereference built for a by-ref object if it has an address clause.
12975 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12977 * einfo.ads (Address_Taken): Document use for the second argument of
12978 Asm_Input and Asm_Output attributes.
12979 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12980 argument is an entity name, then set Address_Taken on it.
12981 <Attribute_Asm_Output>: Likewise.
12982 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12983 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12984 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12985 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12987 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12989 PR middle-end/46500
12990 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12992 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12994 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12995 (ada/utils.o): Update dependencies.
12996 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12997 ../../../libcpp/libcpp.a.
12998 * gcc-interface/utils.c: Include common/common-target.h.
12999 (process_attributes): Use targetm_common.have_named_sections.
13001 2011-06-07 Richard Guenther <rguenther@suse.de>
13003 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13006 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13008 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13009 TREE_THIS_NOTRAP flag.
13011 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13013 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13016 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13018 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13019 constants whose full view has discriminants specially.
13021 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13023 * gcc-interface/utils.c: Include diagnostic.h.
13024 (gnat_write_global_declarations): Output debug information for all
13025 global type declarations before finalizing the compilation unit.
13026 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13028 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13030 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13032 2011-05-25 Kai Tietz <ktietz@redhat.com>
13034 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13035 initialization instead of const/none-const pointer assignment.
13037 2011-05-24 Joseph Myers <joseph@codesourcery.com>
13039 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13040 $(EXTRA_GNAT1_OBJS).
13041 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13042 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13043 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13044 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13045 libcommon-target.a instead of prefix.o.
13047 2011-05-21 Joseph Myers <joseph@codesourcery.com>
13050 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13052 2011-05-20 Joseph Myers <joseph@codesourcery.com>
13054 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13055 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13056 instead of version.o.
13058 2011-05-18 Kai Tietz <ktietz@redhat.com>
13060 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13061 boolean_false_node instead of integer_zero_node.
13062 (convert_with_check): Likewise.
13063 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13065 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13067 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13068 type of the parameter is an unconstrained array, convert the actual to
13069 the type of the formal in the In Out and Out cases as well.
13071 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13073 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13074 call build_function_type_array or build_varargs_function_type_array
13076 (create_subprog_type): Don't call build_function_type; call
13077 build_function_type_vec instead.
13079 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13081 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13082 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13083 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13085 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13087 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13089 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13090 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13092 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13094 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13096 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13098 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13099 instead of accessing TYPE_ARG_TYPES directly.
13100 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13102 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13105 * gcc-interface/gigi.h (get_variant_part): Declare.
13106 * gcc-interface/decl.c (get_variant_part): Make global.
13107 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13108 types have the same constant size, are record types and T1 has a
13109 variant part while T2 doesn't.
13111 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13113 * gcc-interface/utils.c (begin_subprog_body): Do not call
13115 (end_subprog_body): Likewise.
13117 2011-05-04 Richard Guenther <rguenther@suse.de>
13119 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13121 (pos_to_constructor): Likewise.
13123 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
13124 Eric Botcazou <ebotcazou@adacore.com>
13126 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13127 of build_function_type. Adjust calls to...
13128 (build_raise_check): ...this. Do not take a void_tree parameter.
13129 Call build_function_type_list instead of build_function_type.
13130 Fix head comment and swap couple of conditional blocks.
13132 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13134 * gnatvsn.ads (Library_Version): Bump to 4.7.
13135 (Current_Year): Bump to 2011.
13137 2011-04-29 Michael Matz <matz@suse.de>
13139 * gcc-interface/misc.c (gnat_handle_option): Set
13140 warn_maybe_uninitialized.
13142 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13144 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13145 the Watson/McCabe paper.
13147 2011-04-23 Jim Meyering <meyering@redhat.com>
13149 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13151 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13153 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13156 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13158 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13160 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
13161 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13162 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13163 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13164 <all>: Do not set flags on the reused DECL node coming from an alias.
13165 Set DECL_IGNORED_P on the DECL node built for subprograms if they
13166 don't need debug info here...
13167 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13168 (gigi): Adjust calls to create_subprog_decl.
13169 (build_raise_check): Likewise.
13170 (establish_gnat_vms_condition_handler): Likewise.
13171 (Compilation_Unit_to_gnu): Likewise.
13172 (gnat_to_gnu): Likewise.
13174 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
13176 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13177 (NO_REORDER_ADAFLAGS): New variable.
13178 (EXTRA_GNATTOOLS): Always define.
13179 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13180 Clean up and adjust list of files compiled with special options.
13181 * gcc-interface/Make-lang.in: Likewise.
13182 (ada/decl.o): Cosmetical change.
13183 (ada/misc.o): Remove dependency on $(PLUGIN_H).
13185 2011-04-20 Jim Meyering <meyering@redhat.com>
13187 * initialize.c (__gnat_initialize): Remove useless if-before-free.
13189 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13191 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13192 $(CFLAGS) on the link line.
13194 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13196 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13197 padded type built for the return type if it is unconstrained.
13199 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13201 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13203 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13205 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13206 before calling TREE_CHAIN.
13207 * gcc-interface/misc.c (gnat_init_ts): New function.
13208 (LANG_HOOKS_INIT_TS): Define.
13210 2011-04-12 Martin Jambor <mjambor@suse.cz>
13212 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13213 instead of cgraph_node.
13215 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13217 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13218 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13221 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13223 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13224 of aggregate types that contain a placeholder.
13226 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13228 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13230 (handle_type_generic_attribute): Likewise.
13232 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13235 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13237 2011-04-04 Kai Tietz <ktietz@redhat.com>
13240 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13243 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13245 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13246 type case, do not strip a padding type around the array type.
13248 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13250 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13253 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13255 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13256 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13257 code for -feliminate-unused-debug-types.
13258 (gnat_post_options): Likewise.
13260 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13262 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13263 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13266 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13268 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13269 DECL_ARTIFICIAL flag on enumeration types.
13271 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13273 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13274 fat pointer types artificial unconditionally.
13275 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13278 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13280 * gcc-interface/gigi.h (get_dummy_type): Declare.
13281 (build_dummy_unc_pointer_types): Likewise.
13282 (finish_fat_pointer_type): Likewise.
13283 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13284 fat pointer type has been built, complete it in place.
13285 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13286 and thin pointers. Remove useless variable.
13287 (finish_fat_pointer_type): Make global and move to...
13288 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13289 (get_dummy_type): New function.
13290 (build_dummy_unc_pointer_types): Likewise.
13291 (gnat_pushdecl): Propage the name to the anonymous variants only.
13292 (update_pointer_to): Only adjust the pointer types in the unconstrained
13295 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13297 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13298 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13299 if this is a Taft amendment type and the full declaration is available.
13300 * gcc-interface/trans.c (process_type): Likewise.
13301 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13302 (process_freeze_entity): Likewise.
13303 * gcc-interface/utils.c (dummy_global): New static variable.
13304 (gnat_write_global_declarations): If there are types declared as used
13305 at the global level, insert them in the global hash table.
13307 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13309 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13310 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13311 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13313 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13314 flag of the type accordingly.
13315 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13317 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13319 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13320 finalizing types when updating the pointers to the designated type.
13321 <all>: Finalize the deferred types even if we didn't defer processing
13322 of incomplete types in this invocation.
13324 2011-04-01 Olivier Hainque <hainque@adacore.com>
13325 Nicolas Setton <setton@adacore.com>
13326 Eric Botcazou <ebotcazou@adacore.com>
13328 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13329 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13331 2011-03-28 Kai Tietz <ktietz@redhat.com>
13333 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13335 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13336 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13338 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13340 2011-03-28 Tristan Gingold <gingold@adacore.com>
13343 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13344 Use ada output of gnatbind.
13345 (ada/b_gnatb.adb): Ditto.
13346 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13347 (ada.mostlyclean, ada.stage1)
13348 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13349 (ada.stagefeedback): Adjust.
13350 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13351 Use ada output of gnatbind.
13352 (b_gnatm.adb): Ditto.
13353 (b_gnatl.o, b_gnatm.o): New rules.
13355 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13357 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13358 for the padded type built to support a specified size or alignment.
13360 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13362 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13363 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13364 unconditionally to the end of the unit when the designated type is
13366 <all>: Rename local variable. Attempt to un-defer types only and do it
13367 for limited_with'ed types as well.
13368 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13369 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13370 consistently and remove redundant call to finalize_from_with_types.
13372 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13374 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13375 subprograms without a previous spec declared in the same unit.
13376 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13377 subprograms at the end of the unit instead of at the beginning.
13378 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13379 isn't public for the special handling of non-inline functions nested
13380 inside inline external functions.
13382 2011-03-25 Jeff Law <law@redhat.com>
13384 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13386 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13388 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13389 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13390 to compute Set_Size_Depends_On_Discriminant.
13391 (Layout_Type): Call it on array types in back-end layout mode.
13392 * sem_util.adb (Requires_Transient_Scope): Return true for array
13393 types only if the size depends on the value of discriminants.
13394 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13395 type if the RHS is a call to a function that returns an unconstrained
13396 type with default discriminant.
13398 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13400 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13401 non-conversion to the nominal result type at the end.
13403 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13405 * gcc-interface/trans.c (create_temporary): New function taken from...
13406 (create_init_temporary): ...here. Call it.
13407 (call_to_gnu): Create the temporary for the return value early, if any.
13408 Create it for a function with copy-in/copy-out parameters if there is
13409 no target; in other cases of copy-in/copy-out, use another temporary.
13410 Push the new binding level lazily. Add and rename local variables.
13412 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13414 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13416 (set_rm_size): Likewise.
13418 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13420 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13421 for the padded type built in order to support a specified alignment.
13422 Fix incorrect formatting.
13424 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13427 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13429 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13431 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13432 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13433 to the end of the list. Adjust recursive call. Rename local variable.
13434 If REORDER is true, reorder components of the record type.
13435 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13436 components_to_record and adjust the parameter list.
13438 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13440 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13441 disabled, use the variable for bounds of loop iteration scheme.
13443 2011-03-21 Kai Tietz <ktietz@redhat.com>
13446 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13448 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13450 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13451 out whether the expression is read-only. Short-circuit placeholder
13452 case and rename a couple of local variables.
13454 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13456 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13457 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13458 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13459 (convert): Deal with conversions from a smaller form type specially.
13461 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13463 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13464 its argument, except for the special -I- switch.
13466 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13468 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13471 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13473 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13475 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13477 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13479 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13480 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13481 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13482 Do not generate the check directly, instead instantiate the template
13483 check present in the descriptor.
13484 (make_descriptor_field): Move around.
13485 (build_vms_descriptor32): Build a template check in the POINTER field.
13486 (build_vms_descriptor): Remove useless suffixes.
13487 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13489 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13492 * targext.c: Include target files if IN_RTS is defined.
13494 2011-01-26 Richard Guenther <rguenther@suse.de>
13497 * targext.c: Include config.h.
13498 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13501 2011-01-04 Pascal Obry <obry@adacore.com>
13502 Eric Botcazou <ebotcazou@adacore.com>
13504 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13506 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13508 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13509 end-of-case on the end label and its associated gotos, if any.
13511 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13513 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13514 expressions of the parameter cache within the statement group of
13515 the CICO mechanism.
13517 2011-01-04 Olivier Hainque <hainque@adacore.com>
13518 Eric Botcazou <ebotcazou@adacore.com>
13520 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13521 (set_end_locus_from_node): New function.
13522 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13523 make and the function end_locus.
13524 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13525 for the elaboration subprogram.
13526 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13527 set the end_locus of the expression as well.
13529 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13532 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13533 variables that are referenced in exception handlers volatile.
13537 Copyright (C) 2011 Free Software Foundation, Inc.
13539 Copying and distribution of this file, with or without modification,
13540 are permitted in any medium without royalty provided the copyright
13541 notice and this notice are preserved.