1 2011-09-19 Steve Baird <baird@adacore.com>
3 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
4 configuration pragma names so that Is_Configuration_Pragma_Name
5 will return True for Name_Annotate. Make corresponding change in
6 Pragma_Id enumeration type. This is needed to allow an Annotate
7 pragma to occur in a configuration pragma file (typically,
9 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
10 * gnat_rm.texi: Note that pragma Annotate may be used as a
13 2011-09-19 Ed Schonberg <schonberg@adacore.com>
15 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
16 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
18 2011-09-19 Yannick Moy <moy@adacore.com>
20 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
21 for expansion of set membership.
22 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
23 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
24 visible for use in Alfa expansion.
25 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
26 variable in Alfa mode.
28 2011-09-19 Thomas Quinot <quinot@adacore.com>
30 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
32 2011-09-19 Thomas Quinot <quinot@adacore.com>
34 * exp_ch9.adb: Minor reformatting.
36 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
38 * freeze.adb (Build_Renamed_Body): Generic subprograms
39 instantiations cannot be poperly inlined by the compiler, do
40 not set the Body_To_Inline attribute in such cases.
41 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
42 inlining-related flags from the generic subprogram declaration.
44 2011-09-19 Thomas Quinot <quinot@adacore.com>
46 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
47 (Build_Stub_Type): Remove, instead copy components from
48 System.Partition_Interface.RACW_Stub_Type.
49 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
50 (Copy_Component_List): New subprogram.
52 2011-09-19 Yannick Moy <moy@adacore.com>
54 * lib-xref.adb (Generate_Reference): Ignore references to
55 constants in Standard.
57 2011-09-19 Robert Dewar <dewar@adacore.com>
59 * err_vars.ads, errout.ads: Minor reformatting.
61 2011-09-19 Robert Dewar <dewar@adacore.com>
63 * aspects.ads (Impl_Defined_Aspects): New array
64 * lib-writ.adb (No_Dependences): New name for No_Dependence
65 * restrict.adb (No_Dependences): New name for No_Dependence
66 (Check_Restriction_No_Specification_Of_Aspect): New
68 (Set_Restriction_No_Specification_Of_Aspect): New procedure
69 (Restricted_Profile_Result): New variable
70 (No_Specification_Of_Aspects): New variable
71 (No_Specification_Of_Aspect_Warning): New variable
72 * restrict.ads (No_Dependences): New name for No_Dependence
73 (Check_Restriction_No_Specification_Of_Aspect): New procedure
74 (Set_Restriction_No_Specification_Of_Aspect): New procedure
75 * s-rident.ads: Add restriction
76 No_Implementation_Aspect_Specifications, this is also added to
77 the No_Implementation_Extensions profile.
78 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
79 No_Implementation_Defined_Aspects
80 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
81 * sem_prag.adb (Analyze_Aspect_Specifications): Check
82 No_Implementation_Aspects
83 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
84 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
86 2011-09-19 Yannick Moy <moy@adacore.com>
88 * lib-xref.adb (Generate_Reference): Take into account multiple
89 renamings for Alfa refs.
91 2011-09-19 Thomas Quinot <quinot@adacore.com>
93 * g-socthi-mingw.adb: Minor reformatting.
95 2011-09-19 Yannick Moy <moy@adacore.com>
97 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
98 expansion to False in mode Alfa
100 2011-09-19 Pascal Obry <obry@adacore.com>
102 * mingw32.h: Remove obsolete code needed for old versions
105 2011-09-19 Robert Dewar <dewar@adacore.com>
107 * errout.ads: Minor reformatting.
109 2011-09-19 Ed Schonberg <schonberg@adacore.com>
111 * sem_ch6.adb (Analyze_Expression_Function): When the expression
112 function is transformed into a declaration and a body, insert
113 body at the end of the declarative part, to prevent premature
114 freeze actions, and preserve original specification in the
115 subprogram declaration.
117 2011-09-19 Vincent Celier <celier@adacore.com>
119 * projects.texi: Minor editing.
121 2011-09-19 Robert Dewar <dewar@adacore.com>
123 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
124 exp_aggr.adb: Minor reformatting.
126 2011-09-19 Yannick Moy <moy@adacore.com>
128 * lib-xref.adb (Generate_Reference): Change entity referenced
129 to underlying object if any, or else reference to the HEAP.
131 2011-09-15 Arnaud Charlet <charlet@adacore.com>
133 * gcc-interface/Make-lang.in: Update dependencies.
135 2011-09-15 Robert Dewar <dewar@adacore.com>
137 * tree_io.ads: Minor reformatting.
138 * a-intnam.ads: Fix bad header.
140 2011-09-15 Thomas Quinot <quinot@adacore.com>
142 * a-exexpr-gcc.adb: Minor reformatting.
144 2011-09-15 Yannick Moy <moy@adacore.com>
146 * sem_ch6.adb: Propagate information that an expression function comes
147 from source (otherwise references to this entity are not stored).
149 2011-09-15 Robert Dewar <dewar@adacore.com>
151 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
152 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
153 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
155 2011-09-15 Ed Schonberg <schonberg@adacore.com>
157 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
158 if the expression function is not a completion, create a
159 new specification for the generated declaration, and keep the
160 original specification in the generated body. Shorter code also
161 ensures that proper warnings are generated for unused formals
164 2011-09-15 Sergey Rybin <rybin@adacore.com>
166 * tree_io.ads: Update ASIS_Version_Number because of the changes
167 in the tree structures for expression functions.
169 2011-09-15 Arnaud Charlet <charlet@adacore.com>
171 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
172 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
173 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
174 (CLOCK_REALTIME): Fix wrong value on some OSes.
175 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
177 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
179 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
180 to unconstrained array case, deal with each branch of a COND_EXPR.
181 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
182 a COND_EXPR in the initializer, if present.
184 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
186 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
187 of an addressable type.
188 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
189 Deal with those cases for which creating a temporary is mandatory.
191 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
193 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
194 this is a real formal parameter before testing whether it is by ref.
196 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
198 * gcc-interface/gigi.h (build_call_0_expr): Delete.
199 (build_call_1_expr): Likewise.
200 (build_call_2_expr): Likewise.
201 (build_call_n_expr): New prototype.
202 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
203 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
204 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
205 (Exception_Handler_to_gnu_zcx): Likewise.
206 (gnat_to_gnu): Likewise.
207 (build_binary_op_trapv): Likewise.
208 * gcc-interface/utils2.c (build_call_0_expr): Delete.
209 (build_call_1_expr): Likewise.
210 (build_call_2_expr): Likewise.
211 (build_call_n_expr): New function.
212 (build_call_raise): Use build_call_n_expr.
213 (build_call_raise_range): Likewise.
214 (build_call_raise_column): Likewise.
215 (build_call_alloc_dealloc_proc): Likewise.
216 (maybe_wrap_malloc): Likewise.
217 (maybe_wrap_free): Likewise.
219 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
221 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
223 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
224 the result type is null if ENABLE_CHECKING. Set operation_type at the
225 end unconditionally if not set in the previous cases.
226 Use build2 and void_type_node for MODIFY_EXPR.
227 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
229 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
231 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
232 precision when converting to or from an integral type whose precision
233 is not equal to its size.
235 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
237 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
239 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
241 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
243 * system-darwin-ppc64.ads: New file.
245 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
247 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
250 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
252 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
253 size switches to the link phase for shared libs.
255 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
257 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
258 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
260 2011-09-06 Arnaud Charlet <charlet@adacore.com>
262 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
263 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
264 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
266 (TOOLS_FLAGS_TO_PASS): New.
267 (../stamp-tools): Reintroduce, to avoid merge conflicts.
269 2011-09-06 Robert Dewar <dewar@adacore.com>
271 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
272 name for Is_RM_Defined_Unit. Also several fixes to this unit.
274 2011-09-06 Robert Dewar <dewar@adacore.com>
276 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
277 * s-rident.ads: New restriction No_Implementation_Units
278 (this restriction is also part of the profile
279 No_Implementation_Extensions)
280 * sem_ch10.adb (Analyze_With_Clause): Add check for
281 No_Implementation_Units restriction.
283 2011-09-06 Jerome Guitton <guitton@adacore.com>
285 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
288 2011-09-06 Thomas Quinot <quinot@adacore.com>
290 * s-solita.adb: Minor reformatting.
292 2011-09-06 Ed Schonberg <schonberg@adacore.com>
294 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
295 is a rewriting of an expression function does not freeze previous
298 2011-09-06 Robert Dewar <dewar@adacore.com>
300 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
302 2011-09-06 Tristan Gingold <gingold@adacore.com>
304 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
305 powerpc-wrs-vxworksae.
307 2011-09-06 Thomas Quinot <quinot@adacore.com>
309 * s-os_lib.ads (Spawn): Minor documentation clarification,
310 Success is True for a zero exit status.
312 2011-09-06 Ed Schonberg <schonberg@adacore.com>
314 * sem_ch5.adb: Add message for common iterator error.
316 2011-09-06 Ed Schonberg <schonberg@adacore.com>
318 * exp_ch3.adb (Build_Initialization_Call): If the target is a
319 selected component discriminated by a current instance, replace
320 the constraint with a reference to the target object, regardless
321 of whether the context is an init_proc.
323 2011-09-06 Robert Dewar <dewar@adacore.com>
325 * exp_attr.adb: Descriptor_Size is never static.
327 2011-09-06 Robert Dewar <dewar@adacore.com>
329 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
331 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
333 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
336 2011-09-06 Ed Schonberg <schonberg@adacore.com>
338 * sem_res.adb (Resolve): An expression that is the body of an
339 expression function does not freeze.
341 2011-09-06 Matthew Heaney <heaney@adacore.com>
343 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
344 a-cuprqu.adb: Changed copyright notice to indicate current
347 2011-09-06 Vincent Celier <celier@adacore.com>
349 * prj.adb: Minor spelling error fix in comment
350 * sem_res.adb: Minor reformatting
352 2011-09-06 Pascal Obry <obry@adacore.com>
354 * sysdep.c (winflush_nt): Removed as not needed anymore.
355 (winflush_95): Likewise.
356 (winflush_init): Likewise.
357 (winflush_function): Likewise.
358 (getc_immediate_common): Remove call to winflush_function.
360 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
362 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
363 processing for Descriptor_Size.
364 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
365 to account for its broader usage.
366 * sem_attr.adb (Analyze_Attribute): Change the error detection
367 circuitry for Descriptor_Size as the attribute is now applicable
370 2011-09-06 Robert Dewar <dewar@adacore.com>
372 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
374 2011-09-06 Ed Schonberg <schonberg@adacore.com>
376 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
377 in a parameter association must not set the Referenced flag on
379 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
381 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
383 * gnat_rm.texi: Add a section on attribute Descriptor_Size
385 2011-09-06 Arnaud Charlet <charlet@adacore.com>
387 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
388 gnatlink-re): Speed up by using -j0.
390 2011-09-06 Yannick Moy <moy@adacore.com>
392 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
393 Set_Corresponding_Aspect when creating pragma from aspect.
394 (Add_Predicates): Use new field Corresponding_Aspect.
395 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
396 name when present, for the purpose of issuing error messages;
397 remove local procedure Error_Pragma_Arg_Alternate_Name.
398 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
400 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
403 2011-09-06 Robert Dewar <dewar@adacore.com>
405 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
407 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
409 * exp_ch6.adb (Build_Heap_Allocator): Add new
410 local variable Desig_Typ. Code and comment reformatting. Add
411 machinery to ensure that the allocation uses a fat pointer when
412 the type of the return object is a constrained array and the
413 function return type is an unconstrained array.
415 2011-09-06 Vincent Celier <celier@adacore.com>
417 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
418 parameters in subprograms.
420 2011-09-06 Arnaud Charlet <charlet@adacore.com>
422 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
424 2011-09-06 Thomas Quinot <quinot@adacore.com>
426 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
427 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
429 (System.Tasking.Primitive_Operations.Specific.Set): If argument
430 is null, destroy task specific data, to make API consistent with
431 other platforms, and thus compatible with the shared version
433 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
434 Document the above assumption.
436 2011-09-06 Ed Schonberg <schonberg@adacore.com>
438 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
439 variable for type of return value when return type is
440 unconstrained and context is an assignment.
442 2011-09-06 Ed Schonberg <schonberg@adacore.com>
444 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
445 class-wide operation if expansion is not enabled.
447 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
449 * checks.adb (Apply_Scalar_Range_Check): Deal with access
452 2011-09-06 Yannick Moy <moy@adacore.com>
454 * sem_ch13.adb (Analyze_Aspect_Specifications, case
455 Aspect_Invariant): Do not issue error at this point on illegal
456 pragma placement, as this is checked later on when analyzing
457 the corresponding pragma.
458 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
459 similar to Error_Pragma_Arg, except the source name of the
460 aspect/pragma to use in warnings may be equal to parameter
461 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
462 message to distinguish source name of pragma/aspect, and whether
463 the illegality resides in the type being public, or being private
464 without a public declaration
466 2011-09-06 Thomas Quinot <quinot@adacore.com>
468 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
469 size check (fd_set is implemented differently on that platform).
471 2011-09-06 Thomas Quinot <quinot@adacore.com>
473 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
474 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
475 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
476 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
477 (ATCB_Allocation): New subpackage of
478 System.Tasking.Primitive_Operations, shared across all targets
479 with full tasking runtime.
480 (ATCB_Allocation.New_ATCB): Moved there (from target specific
482 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
483 taking care of establishing a local temporary ATCB if the one
484 being deallocated is Self, to avoid a reference to the freed
485 ATCB in Abort_Undefer.
487 2011-09-06 Thomas Quinot <quinot@adacore.com>
489 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
490 terminated, mark it for deallocation upon termination.
491 (Terminate_Task): Call Free_Task again if the task is marked
492 for automatic deallocation upon termination.
494 2011-09-06 Robert Dewar <dewar@adacore.com>
496 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
497 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
498 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
499 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
500 a-intnam-solaris.ads, a-intnam-tru64.ads,
501 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
502 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
503 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
504 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
505 * s-rident.ads: Add new restriction No_Implementation_Identifiers
506 Add new profile No_Implementation_Extensions
507 * sem_prag.adb: Implement pragma Implementation_Defined Implement
508 profile No_Implementation_Extensions
509 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
510 Check violation of restriction No_Implementation_Identifiers
511 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
512 Add entry for Name_No_Implementation_Extensions
514 2011-09-06 Robert Dewar <dewar@adacore.com>
516 * impunit.ads: Minor reformatting.
518 2011-09-06 Robert Dewar <dewar@adacore.com>
520 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
522 2011-09-06 Pascal Obry <obry@adacore.com>
524 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
527 2011-09-06 Robert Dewar <dewar@adacore.com>
529 * g-socket.adb: Minor reformatting
531 2011-09-06 Javier Miranda <miranda@adacore.com>
533 * ali.adb (Scan_ALI): Add missing support to load references of
534 entities imported from other languages.
535 * ali.ads (Xref_Record): Adding new fields to store the language and
536 name of an imported entity.
537 * lib-xref.adb (Output_Import_Export_Info): Fix typo
540 2011-09-06 Ed Schonberg <schonberg@adacore.com>
542 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
543 is allowed on a full type declaration if it is the completion of
544 a private declarations.
545 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
546 aspect is allowed on a full type declaration in the private part
549 2011-09-06 Robert Dewar <dewar@adacore.com>
551 * sem_ch8.ads: Minor reformatting
553 2011-09-06 Thomas Quinot <quinot@adacore.com>
555 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
556 Guard against socket values that are not in [0;FD_SETSIZE[
558 2011-09-06 Robert Dewar <dewar@adacore.com>
560 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
563 2011-09-06 Arnaud Charlet <charlet@adacore.com>
565 * s-linux-alpha.ads: Minor reformatting
566 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
567 Use sizeof instead of corresponding C defines in s-oscons template.
569 2011-09-06 Vadim Godunko <godunko@adacore.com>
571 * a-convec.ads, a-iteint.ads: Minor reformatting.
573 2011-09-06 Vincent Celier <celier@adacore.com>
575 * projects.texi: Add menus and @node lines.
577 2011-09-06 Ed Schonberg <schonberg@adacore.com>
579 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
580 where the return type is an unconstrained array and the context
581 is an assignment. Optimize the case when the target of the
582 assignment is a selected component.
584 2011-09-06 Arnaud Charlet <charlet@adacore.com>
586 * s-solita.adb: Update comments.
588 2011-09-06 Pascal Obry <obry@adacore.com>
590 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
591 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
592 * s-oscons-tmplt.c: Add support for generating pthread related
593 types size on GNU/Linux as done for Darwin.
594 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
596 2011-09-06 Robert Dewar <dewar@adacore.com>
598 * exp_ch6.adb: Fix minor typo.
600 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
602 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
603 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
604 (Double_Size_Of): Alphabetized. Update the comment on usage.
605 (Make_Finalize_Address_Stmts): Update comments and reformat code.
606 (Nearest_Multiple_Rounded_Up): New routine.
607 (Size_Of): Update comment on usage. The generated expression now
608 accounts for alignment gaps by rounding the size of the type to the
609 nearest multiple rounded up of the type's alignment.
611 2011-09-06 Robert Dewar <dewar@adacore.com>
613 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
615 2011-09-06 Steve Baird <baird@adacore.com>
617 * exp_ch4.adb (Expand_Allocator_Expression): Look through
618 derived subprograms in checking for presence of an
619 Extra_Accessibility_Of_Result formal parameter.
620 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
621 checking for presence of an Extra_Accessibility_Of_Result formal
623 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
624 case where the Parameter_Associatiations attribute is already set,
625 but set to an empty list.
626 (Needs_Result_Accessibility_Level):
627 Unconditionally return False. This is a temporary
628 change, disabling the Extra_Accessibility_Of_Result
630 (Expand_Simple_Function_Return): Check for
631 Extra_Accessibility_Of_Result parameter's presence instead of
632 testing Ada_Version when generating a runtime accessibility
633 check which makes use of the parameter.
635 2011-09-06 Ed Schonberg <schonberg@adacore.com>
637 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
638 expression in a given case alternative must be attached to the
639 statement list of the ccrresponding case statement alternative
640 They cannot be propagated ahead of the case statement, because
641 the validity of the expression that generated the action may
642 hold only for that alternative.
644 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
646 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
647 (Alignment_Of): Remove the code for strict alignment targets.
648 (Double_Alignment_Of): Removed.
649 (Double_Size_Of): New routine.
650 (Make_Finalize_Address_Stmts): Change the
651 calculation of the dope's size. Update relevant comments.
652 (Size_Of): New routine.
654 2011-09-06 Steve Baird <baird@adacore.com>
656 * einfo.ads (Extra_Accessibility): Update associated comment to use
657 the term "present" correctly ("present" just means that it is not
658 an error to query the value of the attribute - it does not imply
659 that the value must be non-null).
660 (Extra_Constrained): Ditto.
661 (Is_Visible_Formal): Ditto.
662 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
663 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
664 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
665 * exp_ch6.adb (Expand_Call): The callee may require an
666 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
667 < Ada_2012. This can occur if the callee is exported from a Gnat
668 runtimes unit. Also improve a comment.
670 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
672 * exp_ch7.adb: Add with and use clauses for Get_Targ.
673 (Alignment_Of): Rename formal parameter Some_Typ
674 to Typ, update related comment. Use the allocator alignment on
675 strict alignment targets such as SPARC.
676 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
679 2011-09-06 Gary Dismukes <dismukes@adacore.com>
681 * sem_ch9.adb (Check_Interfaces): Test
682 Is_Limited_Type rather than Is_Limited_Record when checking that
683 the partial view of a synchronized full view must be limited.
685 2011-09-06 Emmanuel Briot <briot@adacore.com>
687 * g-comlin.adb (Free): Fix memory leak.
689 2011-09-06 Robert Dewar <dewar@adacore.com>
691 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
693 2011-09-06 Steve Baird <baird@adacore.com>
695 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
696 (Ada2012) cases described in AI05-0234 where the accessibility
697 level of a function result is "determined by the point of
698 call", an implicit parameter representing that accessibility
699 level is passed in. Extra_Accessibilty_Of_Result yields this
700 additional formal parameter. Extra_Accessibility_Of_Result
701 is analogous to the existing Extra_Accessibility
702 function used in the implementation of access parameters.
703 (Set_Extra_Accessibility_Of_Result): New procedure; sets
704 Extra_Accessibility_Of_Result attribute.
705 * einfo.adb (Extra_Accessibility_Of_Result): New function.
706 (Set_Extra_Accessibility_Of_Result): New procedure.
707 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
708 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
709 an accessibility level literal to Natural; introduce a nested
710 function, Make_Level_Literal, to do this.
711 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
712 determines whether a given function (or access-to-function
713 type) needs to have an implicitly-declared accessibility-level
714 parameter added to its profile.
715 (Add_Extra_Actual_To_Call): Export an existing procedure which was
716 previously declared in the body of Exp_Ch6.
717 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
719 (Has_Unconstrained_Access_Discriminants): New Function; a
720 predicate on subtype entities which returns True if the given
721 subtype is unconstrained and has one or more access discriminants.
722 (Expand_Call): When expanding a call to a function which takes an
723 Extra_Accessibility_Of_Result parameter, pass in the appropriate
724 actual parameter value. In the case of a function call which is
725 used to initialize an allocator, this may not be possible because
726 the Etype of the allocator may not have been set yet. In this
727 case, we defer passing in the parameter and handle it later in
728 Expand_Allocator_Expression.
729 (Expand_Simple_Function_Return): When returning from a function which
730 returns an unconstrained subtype having at least one access
731 discriminant, generate the accessibility check needed to ensure that
732 the function result will not outlive any objects designated by its
734 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
736 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
737 is used to initialize an allocator, we may need to pass in "the
738 accessibility level determined by the point of call" (AI05-0234)
739 to the function. Expand_Call, where such actual parameters are
740 usually generated, is too early in this case because the Etype of
741 the allocator (which is used in determining the level to be passed
742 in) may not have been set yet when Expand_Call executes. Instead,
743 we generate code to pass in the appropriate actual parameter
744 in Expand_Allocator_Expression.
745 * sem_ch6.adb (Create_Extra_Formals): Create
746 the new Extra_Accessibility_Of_Result formal if
747 Needs_Result_Accessibility_Level returns True. This includes the
748 introduction of a nested procedure, Check_Against_Result_Level.
750 2011-09-06 Arnaud Charlet <charlet@adacore.com>
752 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
755 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
757 * s-finmas.adb (Set_Finalize_Address): Explain the reason
758 for the synchronization. Move the test for null from
759 s-stposu.Allocate_Any_Controlled to this routine since the check
760 needs to be protected too.
761 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
762 synchronization code.
763 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
764 explaining the context in which this routine is used.
765 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
766 to s-finmas.Set_Finalize_Address.
768 2011-09-05 Ed Schonberg <schonberg@adacore.com>
770 * einfo.ads: Document that itypes have no parent field.
772 2011-09-05 Robert Dewar <dewar@adacore.com>
774 * rtsfind.adb (Check_CRT): Check for overloaded entity
775 * rtsfind.ads: Document that entities to be found by rtsfind
777 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
778 (Lock_Entries_With_Status): New name for Lock_Entries with two
779 arguments (changed to meet rtsfind no overloading rule).
781 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
783 * s-finmas.adb (Set_Finalize_Address (Address,
784 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
785 (Set_Finalize_Address (in out Finalization_Master,
786 Finalize_Address_Ptr): Add synchronization code.
787 * s-finmas.ads (Set_Finalize_Address (Address,
788 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
789 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
790 Set_Finalize_Address for the heterogeneous case.
792 2011-09-05 Ed Schonberg <schonberg@adacore.com>
794 * sem_ch3.adb: Undo previous change, not suitable after all.
796 2011-09-05 Robert Dewar <dewar@adacore.com>
798 * einfo.ads: Minor comment clarification.
800 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
802 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
803 no longer needs to search through the entities of the return
804 statement scope to find the _chain.
805 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
806 (Analyze_Block_Statement): Add local variable
807 Is_BIP_Return_Statement. Add machinery to install all entities
808 produced by the expansion of the return object declaration.
809 (Install_Return_Entities): New routine.
810 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
812 2011-09-05 Ed Schonberg <schonberg@adacore.com>
814 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
815 of subunit is incomplete.
816 (Analyze_Proper_Body): If parent spec is not available, do not
819 2011-09-05 Ed Schonberg <schonberg@adacore.com>
821 * sem_disp.adb (Find_Controlling_Arg): Add checks for
822 interface type conversions, that are expanded into dereferences.
824 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
826 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
827 Examine the parameter and return profile of a subprogram and swap
828 any incomplete types coming from a limited context with their
829 corresponding non-limited views.
830 (Exchange_Limited_Views): New routine.
832 2011-09-05 Ed Schonberg <schonberg@adacore.com>
834 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
835 of internal entity to the subtype declaration, so that when
836 entities are subsequently exchanged in a package body, the tree
837 remains properly formatted for ASIS.
839 2011-09-05 Johannes Kanig <kanig@adacore.com>
841 * g-comlin.adb (Set_Usage): Additional optional argument to set help
843 (Display_Help): display the user given help message, if available.
845 2011-09-05 Ed Schonberg <schonberg@adacore.com>
847 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
848 is legal if the original node is an identifier that is a
849 parameterless function call.
851 2011-09-05 Pascal Obry <obry@adacore.com>
853 * prj-nmsc.adb: Minor reformatting.
854 Add support for standalone aggregate library.
855 (Check_Stand_Alone_Library): Handle standalone aggregate library.
856 * projects.texi: Fix documentation for aggregate library projects.
858 2011-09-05 Robert Dewar <dewar@adacore.com>
860 * sem_ch6.adb: Minor reformatting.
862 2011-09-05 Matthew Gingell <gingell@adacore.com>
864 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
865 stack guard page on PPC Linux. This patch ensures the 64K guard page at
866 the bottom of the stack is not overwritten.
868 2011-09-05 Thomas Quinot <quinot@adacore.com>
870 * exp_intr.adb, s-tasini.adb: Minor reformatting.
872 2011-09-05 Ed Schonberg <schonberg@adacore.com>
874 * sem_ch3.adb (Access_Definition): If an access type declaration
875 appears in a child unit, the scope of whatever anonymous type
876 may be generated is the child unit itself.
878 2011-09-05 Ed Schonberg <schonberg@adacore.com>
880 * sem_ch6.adb (Analyze_Expression_Function): Do not set
881 Comes_From_Source on rewritten body.
882 (Analyze_Subprogram_Body_Helper): Check that the original node for
883 the body comes from source, when determining whether expansion
884 of a protected operation is needed.
886 2011-09-05 Ed Schonberg <schonberg@adacore.com>
888 * exp_aggr.adb (Replace_Type): If the target of the assignment is
889 a selected component and the right-hand side is a self-referential
890 access, the proper prefix of the rewritten attribute is a copy
891 of the left-hand side, not of its prefix.
893 2011-09-05 Robert Dewar <dewar@adacore.com>
895 * sem_ch5.adb: Minor reformatting.
896 * sem_ch3.adb: Minor code clean up.
898 2011-09-05 Jose Ruiz <ruiz@adacore.com>
900 * exp_ch9.adb (Make_Initialize_Protection): The fact that
901 restriction No_Dynamic_Attachment is in effect or not should
902 not influence the default priority associated to a protected
903 object. With this change, when the restriction is in effect (as
904 is the case for the Ravenscar profile) the default priority of
905 a protected object with an interrupt handler is in the range of
906 interrupt priorities (Default_Interrupt_Priority) as required
909 2011-09-05 Arnaud Charlet <charlet@adacore.com>
911 * a-iteint.ads: Fix header.
913 2011-09-05 Vincent Celier <celier@adacore.com>
915 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
916 with a directory separator to avoid output such as:
917 "/path/to/objauto.cgpr" has been deleted.
919 2011-09-05 Robert Dewar <dewar@adacore.com>
921 * sem_ch3.adb: Minor reformatting.
923 2011-09-05 Ed Schonberg <schonberg@adacore.com>
925 * sem_ch5.adb: Better error message.
927 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
929 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
930 (Expand_Array_Aggregate): Detect a special case of an aggregate
931 which contains tasks in the context of an unexpanded return
932 statement of a build-in-place function.
933 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
934 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
935 which contains tasks and expand it now that the original simple
936 return statement has been rewritten.
937 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
938 reformatting. Do not create a chain for an extended return
939 statement if one is already available.
940 (Has_Activation_Chain): New routine.
942 2011-09-05 Marc Sango <sango@adacore.com>
944 * sem_ch3.adb (Analyze_Object_Declaration): Remove
945 the wrong test and add the correct test to detect the violation
946 of illegal use of unconstrained string type in SPARK mode.
948 2011-09-05 Ed Schonberg <schonberg@adacore.com>
950 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
951 message on an iterator over an array.
953 2011-09-05 Robert Dewar <dewar@adacore.com>
955 * lib-xref-alfa.adb: Minor reformatting.
957 2011-09-05 Robert Dewar <dewar@adacore.com>
959 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
960 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
962 2011-09-05 Gary Dismukes <dismukes@adacore.com>
964 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
966 2011-09-05 Johannes Kanig <kanig@adacore.com>
968 * lib-xref-alfa.adb: Update comments.
970 2011-09-05 Thomas Quinot <quinot@adacore.com>
972 * sem_res.adb: Minor reformatting
974 2011-09-05 Ed Schonberg <schonberg@adacore.com>
976 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
977 present, create them now. Needed in case the return type was
978 a limited view in the function declaration.
979 (Make_Build_In_Place_Call_In_Allocator): If return type contains
980 tasks, build the activation chain for it. Pass a reference to
981 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
982 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
983 with build_in_place calls.
984 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
985 incomplete, inatialize its Corresponding_Record_Type component.
986 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
989 2011-09-05 Johannes Kanig <kanig@adacore.com>
991 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
994 2011-09-05 Ed Schonberg <schonberg@adacore.com>
996 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
997 appears within a package specification and the token after "IS"
998 is not a parenthesis, assume that this is an unparenthesized
999 expression function, even if the token appears in a line by
1001 * par.adb: Clarify use of Labl field of scope stack in error
1004 2011-09-05 Bob Duff <duff@adacore.com>
1006 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
1007 conversions instead of normal type conversions in all cases where a
1008 type conversion would be illegal. In particular, use unchecked
1009 conversions when the operand types are private.
1011 2011-09-05 Johannes Kanig <kanig@adacore.com>
1013 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
1014 objects of task type or protected type.
1016 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1018 * sem_ch6.adb (Analyze_Expression_Function): If the expression
1019 function comes from source, indicate that so does its rewriting,
1020 so it is compatible with any subsequent expansion of the
1021 subprogram body (e.g. when it is a protected operation).
1022 * sem_ch4.adb: minor reformatting
1024 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1026 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
1027 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
1028 may lead to wrong ancestor package in the case of instantiated subunit
1029 bodies. If a subunit is instantiated, follow the chain of instantiations
1030 rather than the stub structure.
1032 2011-09-02 Robert Dewar <dewar@adacore.com>
1034 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1035 * gcc-interface/Make-lang.in: Update dependencies.
1037 2011-09-02 Marc Sango <sango@adacore.com>
1039 * sem_ch3.adb (Analyze_Object_Declaration): Change
1040 comment and add additional check to differentiate constant of
1041 type string from others unconstrained type.
1043 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1045 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
1046 present in incomplete type declarations to refine the error
1047 message the full declaration is in the same unit.
1048 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
1049 an incomplete type, set the Premature_Use for additional message.
1050 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
1051 and Premature_Use is set, place additional information at the
1052 point of premature use.
1054 2011-09-02 Bob Duff <duff@adacore.com>
1056 * sem_ch6.adb: (Check_Post_State): Suppress warning
1057 "postcondition refers only to pre-state" when the expression has not
1058 yet been analyzed, because it causes false alarms. This can happen when
1059 the postcondition contains a quantified expression, because those are
1060 analyzed later. This is a temporary/partial fix.
1061 (Process_Post_Conditions): Minor: change wording of warning.
1063 2011-09-02 Marc Sango <sango@adacore.com>
1065 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
1066 illegal use of unconstrained string type in SPARK mode.
1067 * sem_res.adb (Analyze_Operator_Symbol): Set the
1068 right place where the string operand of concatenation should be
1069 violate in SPARK mode.
1071 2011-09-02 Robert Dewar <dewar@adacore.com>
1073 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
1074 exp_ch3.adb: Minor reformatting.
1076 2011-09-02 Vincent Celier <celier@adacore.com>
1078 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
1079 as the compiler driver so Is_Compilable returns True for sources.
1080 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
1083 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1085 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
1086 condition, a reference to a controlling formal must be interpreted
1087 as having the class-wide type (or an access to such) so that the
1088 inherited condition can be properly applied to any overriding
1089 operation (see ARM12 6.6.1 (7)).
1091 2011-09-02 Tristan Gingold <gingold@adacore.com>
1093 * init.c (__gnat_is_vms_v7): Fix case and add prototype
1096 2011-09-02 Javier Miranda <miranda@adacore.com>
1098 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
1099 initializing expression of a class-wide interface object declaration
1100 if its type is limited.
1102 2011-09-02 Johannes Kanig <kanig@adacore.com>
1104 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
1105 literals, take into account the type name; the type is *not*
1106 the scope for an enumeration literal.
1108 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1110 * sem_ch6.adb (Check_Overriding_Indicator): add special check
1111 to reject an overriding indicator on a user-defined Adjust
1112 subprogram for a limited controlled type.
1114 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1116 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
1117 for an actual that is a function call returning an unconstrained
1118 limited controlled type.
1120 2011-09-02 Tristan Gingold <gingold@adacore.com>
1122 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
1124 2011-09-02 Johannes Kanig <kanig@adacore.com>
1126 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
1127 from "HEAP" to __HEAP Change comment that refers to that variable
1128 * put_alfa.adb: Change comment that refers to that variable
1130 2011-09-02 Robert Dewar <dewar@adacore.com>
1132 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
1134 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1136 * exp_util.adb (Extract_Renamed_Object): Renamed to
1137 Find_Renamed_Object. This routine has been reimplemented and now uses
1138 tree traversal to locate a renamed object.
1139 (Is_Aliased): Replace call to Extract_Renamed_Object with
1140 Find_Renamed_Object.
1142 2011-09-02 Tristan Gingold <gingold@adacore.com>
1144 * init.c: (__gnat_is_vms_v7): New function.
1146 2011-09-02 Olivier Hainque <hainque@adacore.com>
1148 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
1149 that have a misaligned backchain, necessarily bogus.
1151 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1153 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
1154 TSS routine Finalize_Address when compiling in Alfa mode.
1155 (Expand_Freeze_Record_Type): Do not create TSS routine
1156 Finalize_Address when compiling in Alfa mode.
1157 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
1158 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
1160 (Expand_N_Allocator): Do not produce a call to
1161 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
1162 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
1163 produce a call to primitive Set_Finalize_Address in Alfa mode because
1164 Finalize_Address is not built.
1165 * exp_ch7.adb (Build_Finalization_Master): Do not create
1166 finalization masters in Afa mode since they are not needed.
1167 (Build_Finalizer): Do not create scope and library-level
1168 finalizers in Alfa mode since they are not needed.
1169 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
1170 "new" and "free" when applied to controlled objects in Alfa mode since
1173 2011-09-02 Vincent Celier <celier@adacore.com>
1175 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
1176 only library names with the syntax of Ada identifiers, to avoid errors
1177 when compiling the binder generated files.
1178 * projects.texi: Document restriction on SAL library names
1180 2011-09-02 Thomas Quinot <quinot@adacore.com>
1182 * a-chtgbo.adb: Minor comment fix.
1184 2011-09-02 Robert Dewar <dewar@adacore.com>
1186 * lib-xref.adb: Minor reformatting
1188 2011-09-02 Vincent Celier <celier@adacore.com>
1190 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
1191 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
1192 --version and --help in usage.
1193 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
1195 2011-09-02 Bob Duff <duff@adacore.com>
1197 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
1198 compilers don't understand it.
1200 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1202 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
1203 underlying subtype rather than its base type on the call to
1204 Build_Record_Or_Elementary_Input_Function, so that any
1205 constraints on a discriminated subtype will be available for
1206 doing the check required by AI05-0192.
1207 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1208 If the prefix subtype of the 'Input attribute is a constrained
1209 discriminated subtype, then check each constrained discriminant value
1210 against the corresponding value read from the stream.
1212 2011-09-02 Yannick Moy <moy@adacore.com>
1214 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
1215 warnings on suspicious contracts, and enable them with -gnatwa.
1217 2011-09-02 Robert Dewar <dewar@adacore.com>
1219 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
1222 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1224 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
1225 which ensure that restriction No_Dynamic_Attachment has not been
1227 (Make_Initialize_Protection): Protected types with attach or
1228 interrupt handlers must not violate restriction No_Dynamic_Attachment.
1229 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
1230 which ensures that restriction No_Dynamic_Attachment has not been
1232 * sem_attr.adb: (Eval_Attribute): Transform
1233 VAX_Float_Type'First and 'Last into references to
1234 the temporaries which store the corresponding bounds. The
1235 transformation is needed since the back end cannot evaluate
1236 'First and 'Last on VAX.
1237 (Is_VAX_Float): New routine.
1239 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1241 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
1242 generic unit is not intrinsic and has an explicit convention,
1243 the instance inherits it.
1245 2011-09-02 Robert Dewar <dewar@adacore.com>
1247 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
1248 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
1250 2011-09-02 Thomas Quinot <quinot@adacore.com>
1252 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
1253 Guard against a prefix that is an N_Has_Entity but has no
1256 2011-09-02 Yannick Moy <moy@adacore.com>
1258 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
1261 2011-09-02 Yannick Moy <moy@adacore.com>
1263 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
1264 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
1266 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
1267 procedure looking for suspicious postconditions.
1268 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
1269 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
1270 options -gnatw.t and -gnatw.T.
1272 2011-09-02 Pascal Obry <obry@adacore.com>
1274 * prj.adb: Minor code refactoring. Move check for null project in
1276 * projects.texi: Fix minor typos.
1278 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1280 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1281 of iteration is an expression, its value must be captured in a
1282 renaming declaration, so that modification of the elements is
1283 propagated to the original container.
1285 2011-09-02 Pascal Obry <obry@adacore.com>
1287 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
1288 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
1289 prj-tree.adb: Minor reformatting and style fixes.
1291 2011-09-02 Robert Dewar <dewar@adacore.com>
1293 * s-rident.ads: Add new restriction No_Implicit_Aliasing
1294 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
1295 No_Implicit_Aliasing
1296 (Analyze_Attribute, case Address): ditto
1297 (Analyze_Attribute, case Unrestricted_Access): ditto
1298 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
1299 No_Implicit_Aliasing restriction.
1300 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
1302 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1304 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
1305 is an unchecked conversion, apply test to its expression.
1307 2011-09-02 Javier Miranda <miranda@adacore.com>
1309 * sem_ch3.adb (Check_Abstract_Overriding): When
1310 traversing the chain of aliased subprograms avoid reporting a
1311 redundant error on the current entity.
1313 2011-09-02 Sergey Rybin <rybin@adacore.com>
1315 * gnat_ugn.texi: Minor clean up.
1317 2011-09-02 Bob Duff <duff@adacore.com>
1319 * s-htable.adb (Set_If_Not_Present): Use renaming
1320 instead of ":=", because the type Key is limited in the generic (even
1321 if not in the instances).
1323 2011-09-02 Robert Dewar <dewar@adacore.com>
1325 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
1326 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
1329 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1331 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
1332 inherited component with the enclosing derived type. Code reformatting.
1334 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1336 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
1337 return done when overflow checks are enabled, since comparisons against
1338 Lor and Hir should not be done when OK1 is False.
1340 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1342 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1343 Add new formal Master_Exp. When present, add that expression to the
1344 call as an extra actual.
1345 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
1346 Fmaster_Actual and in the case of a BIP call initializing a return
1347 object of an enclosing BIP function set it to a
1348 new reference to the implicit finalization master
1349 formal of the enclosing function. Fmaster_Actual is
1350 then passed to the new formal Master_Exp on the call to
1351 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
1352 initializations of Enclosing_Func to its declaration.
1354 2011-09-02 Thomas Quinot <quinot@adacore.com>
1356 * csets.ads: Minor reformatting
1358 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1360 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
1361 the full view of a private type coming from an instantiation.
1362 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
1363 loop to iterate over the declarations rather than use the
1364 First_Entity / Next_Entity scheme.
1366 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1368 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
1369 X'range (N) into X'First (N) .. X'Last (N), do not share the
1370 dimension indicator N, if present. Even though it is a static
1371 constant, its source location may be modified when printing
1372 expanded code under -gnatDL, and node sharing will lead to chaos
1373 in Sprint on large files, by generating a sloc value that does
1374 not correspond to any source file.
1376 2011-09-02 Bob Duff <duff@adacore.com>
1378 * einfo.adb: (Has_Xref_Entry): Do not call
1379 Implementation_Base_Type. Lib.Xref has been
1380 rewritten to avoid the need for it, and it was costly.
1381 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
1382 functions in support of efficient xref.
1383 * lib-xref-alfa.adb: Misc changes related to Key component of
1385 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
1386 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
1387 no longer does. This is the one place where it is needed.
1389 2011-09-02 Johannes Kanig <kanig@adacore.com>
1391 * g-comlin.adb (Getopt): New optional argument Concatenate to have
1392 similar interface as the other Getopt function.
1394 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1396 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
1397 a call to Set_Finalize_Address if there is no allocator available.
1398 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
1399 a case of allocator expansion where the allocator is not expanded but
1400 needs a custom allocate routine. Code reformatting.
1401 (Is_Finalizable_Transient): Remove local variables Has_Rens and
1402 Ren_Obj. Code reformatting.
1403 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
1404 through the use of 'reference.
1405 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
1406 as part of build-in-place expansion. They are intentionally marked as
1407 coming from source, but their parents are not.
1409 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1411 * sem_ch10.adb (Analyze_With_Clause): If the library unit
1412 is the generated subprogram declaration for a child unit body
1413 that acts as spec, use the original body in the with_clause,
1414 to prevent binding errors.
1416 2011-09-02 Vincent Celier <celier@adacore.com>
1418 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
1419 qualifier /MULTI_UNIT_INDEX=
1421 2011-09-02 Johannes Kanig <kanig@adacore.com>
1423 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
1424 instead of calling the callback function
1426 2011-09-02 Robert Dewar <dewar@adacore.com>
1428 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
1429 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
1431 2011-09-02 Vincent Celier <celier@adacore.com>
1433 * prj-nmsc.adb: (Find_Sources): When the list of sources is
1434 explicitly declared in an extending project, do not warn if a source
1435 for an inherited naming exception is not found.
1437 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1439 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
1440 expansion is inactive.
1442 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1444 * sem_util.adb (Note_Possible_Modification): If the entity
1445 being modified is the renaming generated for an Ada2012 iterator
1446 element, the enclosing container or array is modified as well.
1448 2011-09-02 Jose Ruiz <ruiz@adacore.com>
1450 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
1451 Initialize): Define and initialize the
1452 mutex attributes and condition variable attributes locally.
1454 2011-09-02 Vincent Celier <celier@adacore.com>
1456 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
1457 exception replaced in an extending project.
1458 (Check_Object): No error when the other source is locally removed.
1460 2011-09-02 Yannick Moy <moy@adacore.com>
1462 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
1465 2011-08-31 Arnaud Charlet <charlet@adacore.com>
1467 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
1469 * gcc-interface/Make-lang.in: Update dependencies.
1471 2011-09-01 Robert Dewar <dewar@adacore.com>
1473 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
1475 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1477 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
1478 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
1479 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
1480 specific for systems where their glibc version does not define the
1481 routines to handle dynamically allocated CPU sets.
1483 2011-09-01 Vincent Celier <celier@adacore.com>
1485 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
1486 prj-env.adb: Implement inheritance of naming exceptions in extending
1489 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
1491 * gnatls.adb: Display simple message instead of content of
1494 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1496 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
1497 access discriminant and anonymous access component scopes.
1498 (Inherit_Component): Reuse the itype of an access discriminant
1499 or anonymous access component by copying it in order to set the proper
1500 scope. This is done only when the parent and the derived type
1501 are in different scopes.
1502 (Set_Anonymous_Etype): New routine.
1504 2011-09-01 Robert Dewar <dewar@adacore.com>
1506 * a-convec.adb: Minor reformatting throughout.
1508 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1510 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
1511 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
1512 CPU_ALLOC_SIZE and CPU_FREE linux macros.
1513 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
1514 CPU_SET_S respectively because we are now using dynamically allocated
1515 CPU sets which are more portable across different glibc versions.
1516 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
1517 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
1518 masks dynamically according to the number of processors in the target
1520 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
1521 respectively, so we need to pass the size of the masks as
1523 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
1524 created cpu_set_t masks
1525 with the number of processors available in the target platform,
1526 instead of static bit arrays. It enhances portability because
1527 it uses the information from the target platform.
1528 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
1529 are using a restricted run-time library, use the flag
1530 Configurable_Run_Time_Mode instead of Restricted_Profile.
1532 2011-09-01 Vincent Celier <celier@adacore.com>
1534 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
1535 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
1537 2011-09-01 Nicolas Roche <roche@adacore.com>
1539 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
1540 on VxWorks in kernel mode.
1542 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1544 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
1545 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
1546 directly the bit array.
1547 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
1548 the linux macros with the same name.
1549 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
1550 wrappers around the CPU_ZERO and CPU_SET linux macros.
1552 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1554 * exp_ch7.adb (Find_Insertion_List): Removed.
1555 (Process_Transient_Objects): Insert the declarations of the hook
1556 access type and the hook object before the associated transient object.
1558 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1560 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
1561 package System.Aux_Dec when using restricted run-time libraries which
1562 do not have this package.
1564 2011-09-01 Tristan Gingold <gingold@adacore.com>
1566 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
1568 2011-09-01 Bob Duff <duff@adacore.com>
1570 * sem_attr.adb (Analyze_Access_Attribute): Do not call
1571 Kill_Current_Values for P'Unrestricted_Access, where P is library level
1573 2011-09-01 Thomas Quinot <quinot@adacore.com>
1575 * exp_ch5.adb: Minor reformatting
1576 * gnat_ugn.texi: Fix minor typos.
1577 * gcc-interface/Make-lang.in: Update dependencies.
1579 2011-09-01 Robert Dewar <dewar@adacore.com>
1581 * inline.adb, sem_aggr.adb: Minor reformatting.
1583 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1585 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
1587 2011-09-01 Robert Dewar <dewar@adacore.com>
1589 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
1591 2011-09-01 Bob Duff <duff@adacore.com>
1593 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
1594 body" the same as "in inlined body", because visibility shouldn't
1597 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
1599 * inline.adb (Add_Inlined_Body): Refine previous change.
1601 2011-09-01 Gary Dismukes <dismukes@adacore.com>
1603 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
1604 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1605 Test for case where call
1606 initializes an object of a return statement before testing for
1607 a constrained call, to ensure that all such cases get handled
1608 by simply passing on the caller's parameters. Also, in that
1609 case call Needs_BIP_Alloc_Form to determine whether to pass on
1610 the BIP_Alloc_Form parameter of the enclosing function rather
1611 than testing Is_Constrained. Add similar tests for the return
1612 of a BIP call to later processing to ensure consistent handling.
1613 (Needs_BIP_Alloc_Form): New utility function.
1614 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
1615 a BIP_Alloc_Form formal with call to new utility function
1616 Needs_BIP_Alloc_Form.
1618 2011-09-01 Pascal Obry <obry@adacore.com>
1620 * prj-part.adb: Minor reformatting.
1622 2011-09-01 Vincent Celier <celier@adacore.com>
1624 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
1625 half character in the unit name.
1627 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1629 * exp_ch4.adb: Minor code and comment reformatting.
1631 2011-09-01 Thomas Quinot <quinot@adacore.com>
1633 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
1634 for Is_Limited_Type and Is_Tagged_Type in condition checking
1635 for by-reference type.
1636 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
1637 subprograms may have a completion because of a previous
1638 Inline_Always clause, but the enclosing package must be marked
1639 inlined for the subprogram body to become visible to the backend.
1641 2011-09-01 Thomas Quinot <quinot@adacore.com>
1643 * sem_aux.adb, exp_ch4.adb: Minor reformatting
1645 2011-09-01 Pascal Obry <obry@adacore.com>
1647 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
1649 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1651 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
1652 the formals of a subprogram stub that acts as a spec.
1654 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1656 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
1657 type, declare a renaming for it, not an object declaration.
1659 2011-09-01 Yannick Moy <moy@adacore.com>
1661 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
1662 Ignore_Errors to ignore failures to read ALI files when True.
1664 2011-09-01 Javier Miranda <miranda@adacore.com>
1666 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
1667 constructor calls associated with non-tagged record types.
1669 2011-09-01 Robert Dewar <dewar@adacore.com>
1671 * g-socthi-vms.adb: Minor reformatting.
1673 2011-09-01 Nicolas Roche <roche@adacore.com>
1675 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
1676 in order to avoid impact of imcompatible changes.
1677 * cstreams.c: Likewise
1679 * aux-io.c: Likewise
1681 2011-09-01 Yannick Moy <moy@adacore.com>
1683 * lib-writ.adb (Write_With_Lines): Always output complete information
1684 on "with" line in Alfa mode, as this is required by formal verification
1687 2011-09-01 Tristan Gingold <gingold@adacore.com>
1689 * g-socthi-vms.adb: Add comments.
1691 2011-09-01 Pascal Obry <obry@adacore.com>
1693 * prj.ads: Minor reformatting.
1695 2011-09-01 Vincent Celier <celier@adacore.com>
1697 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
1698 exceptions in the config pragmas file.
1700 2011-09-01 Tristan Gingold <gingold@adacore.com>
1702 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
1704 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1706 * exp_ch7.adb (Find_Insertion_List): New routine.
1707 (Process_Transient_Objects): Add code to handle the abnormal
1708 finalization of a controlled transient associated with a subprogram
1709 call. Since transients are cleaned up right after the associated
1710 context, an exception raised during a subprogram call may bypass the
1713 2011-09-01 Robert Dewar <dewar@adacore.com>
1715 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
1718 2011-09-01 Robert Dewar <dewar@adacore.com>
1720 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
1722 2011-09-01 Robert Dewar <dewar@adacore.com>
1724 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
1726 2011-09-01 Thomas Quinot <quinot@adacore.com>
1728 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
1729 GNATRTL_NONTASKING_OBJS.
1731 2011-09-01 Robert Dewar <dewar@adacore.com>
1733 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
1734 possibility of this flag being set for formals in Ada 2012 mode.
1735 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
1737 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
1739 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
1741 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
1744 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1746 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
1747 insertion node in a tree of nested Expression_With_Actions nodes.
1748 (Process_Transient_Object): In the case where a complex if statement
1749 has been converted into nested Expression_With_Actions nodes, the
1750 "hook" object and the associated access type must be inserted before
1751 the top most Expression_With_Actions.
1753 2011-09-01 Robert Dewar <dewar@adacore.com>
1755 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
1756 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
1758 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1760 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
1762 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1764 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
1766 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
1767 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
1768 in a similar way as we do for the Priority or Dispatching_Domain aspect.
1769 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
1770 Dispatching_Domains_Frozen): Move this local data to package
1771 System.Tasking because with the CPU aspect we need to have access
1772 to this data when creating the task in System.Tasking.Stages.Create_Task
1773 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
1774 Move these variables from the body of
1775 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
1776 we need to have access to this data when creating the task in
1777 System.Tasking.Stages.Create_Task.
1778 * s-taskin.adb (Initialize): Signal the allocation of the environment
1779 task to a CPU, if any, so that we know whether the CPU can be
1780 transferred to a different dispatching domain.
1781 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
1782 is being allocated belongs to the dispatching domain where the task
1783 lives. Signal the allocation of the task to a CPU, if any, so that we
1784 know whether the CPU can be transferred to a different dispatching
1787 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1789 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
1790 attributes Same_Storage and Overlaps_Storage.
1792 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1794 * exp_strm.adb: Remove with and use clause for Opt.
1795 (Build_Array_Input_Function): Remove the version-dependent generation
1796 of the return statement. The Ada 2005 tree is now the default.
1798 2011-09-01 Yannick Moy <moy@adacore.com>
1800 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
1801 it is never empty when compiling in Alfa mode.
1803 2011-09-01 Robert Dewar <dewar@adacore.com>
1805 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
1806 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
1807 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
1808 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
1810 2011-09-01 Matthew Heaney <heaney@adacore.com>
1812 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
1813 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
1814 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
1815 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
1816 unbounded queue container.
1817 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
1818 bounded queue container.
1819 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
1820 unbounded priority queue container.
1821 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
1822 bounded priority queue container.
1824 2011-08-31 Pascal Obry <obry@adacore.com>
1826 * a-direct.adb: Do not try to create an UNC path on Windows.
1827 (Create_Path): Skip leading computer name in UNC path if any.
1829 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1831 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
1832 version-dependent generation of the return statement. The Ada 2005 tree
1835 2011-08-31 Thomas Quinot <quinot@adacore.com>
1837 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
1838 types Stream_Element_Offset and Storage_Offset have a different native
1839 type depending on whether the platform is 32 or 64 bits. When
1840 exchanging them, always convert to 64 bits.
1842 2011-08-31 Yannick Moy <moy@adacore.com>
1844 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
1845 --force-alfa to gnat2why.
1847 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1849 * sem_ch12.adb (Save_References): If the node has aspects, save
1850 references within the corresponding expressions in a separate step,
1851 because the aspects are not directly in the tree for the declaration
1852 to which they belong.
1854 2011-08-31 Arnaud Charlet <charlet@adacore.com>
1856 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
1857 in CodePeer mode, since representation clauses are partially ignored.
1858 * gcc-interface/Make-lang.in: Update dependencies.
1860 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1862 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1863 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
1864 to any dispatching domain.
1866 2011-08-31 Thomas Quinot <quinot@adacore.com>
1868 * exp_ch4.adb: Minor reformatting.
1870 2011-08-31 Bob Duff <duff@adacore.com>
1872 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
1873 on nodes for which it is not defined.
1874 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
1877 2011-08-31 Bob Duff <duff@adacore.com>
1879 * sem_ch3.adb (Process_Full_View): Disable legality check if
1880 In_Instance, to avoid spurious errors.
1881 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
1882 if In_Instance, to avoid spurious errors.
1884 2011-08-31 Pascal Obry <obry@adacore.com>
1886 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
1887 directory speparators.
1888 (Compose): Use Dir_Seps to handle both forms.
1889 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
1891 (Extension): Use Dir_Seps to handle both forms.
1893 2011-08-31 Pascal Obry <obry@adacore.com>
1895 * prj-conf.adb: Minor reformatting.
1897 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1899 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
1900 dispatching domain aspect.
1901 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
1903 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
1904 Dispatching_Domain aspect in a similar way as we do for the Priority
1906 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
1907 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
1909 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
1910 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
1911 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
1912 Dispatching_Domain and add it to the task definition.
1913 (Sig_Flags): Add Pragma_Dispatching_Domain.
1914 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
1915 support to find the types Dispatching_Domain and
1916 Dispatching_Domain_Access.
1917 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
1918 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
1919 query the availability of a pragma Dispatching_Domain.
1920 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
1921 the expander to pass the Dispatching_Domain when creating a task.
1922 (Name_Dispatching_Domain): Add this new name for a pragma.
1923 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
1924 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
1925 task has been allocated at creation time.
1926 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
1927 Ravenscar is always null.
1928 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
1929 the task has been allocated at creation time.
1930 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
1931 a specific dispatching domain.
1932 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
1933 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
1934 and CPU are specified for the task, and the CPU value is not contained
1935 within the range of processors for the domain.
1937 2011-08-31 Vincent Celier <celier@adacore.com>
1939 * make.adb (Original_Gcc) : New constant String_Access.
1940 (Gnatmake): For VM targets, do not use VM version of the compiler if
1941 --GCC= has been specified.
1943 2011-08-31 Thomas Quinot <quinot@adacore.com>
1945 * sem_ch5.adb: Minor reformatting.
1947 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1949 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
1952 2011-08-31 Bob Duff <duff@adacore.com>
1954 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
1955 the access type is private; we don't care about privacy in expansion.
1957 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1959 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
1960 subcomponents tnat may be limited, because they originate in view
1961 conflicts. If the original aggregate is legal and the actuals are
1962 legal, the aggregate itself is legal.
1964 2011-08-31 Matthew Heaney <heaney@adacore.com>
1966 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
1969 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1971 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
1974 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1976 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
1977 Interrupt_Priority aspects, force the analysis of the aspect expression
1978 (when building the equivalent pragma). Otherwise, its analysis is done
1979 too late, after the task or protected object has been created.
1980 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
1981 Analyze_Single_Task_Declaration): Remove the code to move the aspects
1982 to the object declaration because they are needed in the type
1985 2011-08-31 Robert Dewar <dewar@adacore.com>
1987 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
1988 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
1991 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1993 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
1994 if the corresponding type is malformed due to restriction violations.
1996 2011-08-31 Robert Dewar <dewar@adacore.com>
1998 * s-ransee.ads, s-ransee.adb: Minor reformatting.
2000 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2002 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
2003 would cause the generation of Set_Finalize_Address if the target is a
2004 VM and the designated type is not derived from [Limited_]Controlled.
2006 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2008 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
2010 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
2011 case of a compilation error.
2013 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2015 * init.c (__gnat_error_handler): Standardize the stack overflow or
2016 erroneous memory access message.
2017 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
2018 or erroneous memory access message.
2020 2011-08-31 Robert Dewar <dewar@adacore.com>
2022 * sem_ch4.adb: Minor reformatting.
2023 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
2025 2011-08-31 Thomas Quinot <quinot@adacore.com>
2027 * scos.ads: Minor documentation clarification.
2028 * put_scos.adb: Do not generate SCO unit header line for a unit that
2031 2011-08-31 Robert Dewar <dewar@adacore.com>
2033 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
2035 2011-08-31 Tristan Gingold <gingold@adacore.com>
2037 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
2038 hold variables between these following subprograms.
2039 (Build_Exception_Handler, Build_Object_Declarations,
2040 Build_Raise_Statement): Use the above type as parameter.
2041 Make the above adjustments.
2042 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
2044 2011-08-31 Pascal Obry <obry@adacore.com>
2046 * projects.texi: Minor reformatting.
2048 2011-08-31 Tristan Gingold <gingold@adacore.com>
2050 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
2051 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
2053 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2055 * exp_ch5.adb: Minor code cleanup.
2056 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
2057 prevent cascaded errors.
2058 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
2059 variable of an iterator specification in current scope.
2060 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
2061 postconditions on the stack, as they contain no return statements.
2063 2011-08-31 Yannick Moy <moy@adacore.com>
2065 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
2066 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
2067 call Qualify_Entity_Names.
2068 (Expand_Alfa): call Qualify_Entity_Names in more cases
2069 * lib-xref-alfa.adb: Take into account system package.
2070 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
2071 CodePeer mode in which we are interested in finding bugs even if
2072 compiler cannot compile source.
2073 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
2076 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2078 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
2079 denoted by the subtype mark to ensure getting the concurrent type in
2080 the case where the subtype mark denotes a private subtype of a
2081 concurrent type (needed when using -gnatc).
2082 (Process_Subtype): For the processing specific to type kinds, case on
2083 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
2084 subtype denotes a private subtype whose base type is nonprivate (needed
2085 for subtypes of private fulfilled by task types when compiling with
2088 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2090 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
2091 late primitives that override interface operations when the full
2092 expander is not active, to avoid blowups in Register_Primitive when
2093 types don't have associated secondary dispatch tables.
2095 2011-08-31 Yannick Moy <moy@adacore.com>
2097 * alfa_test.adb: Code clean up.
2099 2011-08-31 Marc Sango <sango@adacore.com>
2101 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
2102 by Comes_From_Source (Original_Node (N)) in order to treat also the
2103 nodes which have been rewritten.
2104 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
2105 explicit dereference and slice violation in spark mode on the nodes
2106 coming only from the source code.
2108 2011-08-31 Robert Dewar <dewar@adacore.com>
2110 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
2111 lib-xref-alfa.adb: Minor reformatting.
2113 2011-08-31 Matthew Heaney <heaney@adacore.com>
2115 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
2117 2011-08-31 Javier Miranda <miranda@adacore.com>
2119 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
2120 only for class-wide subprograms conflicting with entities of concurrent
2123 2011-08-31 Matthew Heaney <heaney@adacore.com>
2125 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
2128 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2130 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
2131 general description of the routine.
2133 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2135 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
2136 doubly-linked lists.
2138 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2140 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
2141 check is needed for a left-hand side that is a dereference, and the
2142 base type is private without discriminants (whereas the full type does
2143 have discriminants), an extra retrieval of the underlying type may be
2144 needed in the case where the subtype is a record subtype whose base
2145 type is private. Update comments.
2147 2011-08-31 Javier Miranda <miranda@adacore.com>
2149 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
2150 found check if there is a class-wide subprogram covering the primitive.
2152 2011-08-31 Yannick Moy <moy@adacore.com>
2154 * sem_res.adb: Further cases where full expansion test is needed,
2155 rather than expansion test.
2157 2011-08-31 Pascal Obry <obry@adacore.com>
2159 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
2161 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2163 * exp_ch5.adb: Handle iterators over derived container types.
2165 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2167 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
2168 (Has_Anonymous_Master): New routine.
2169 (Set_Has_Anonymous_Master): New routine.
2170 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
2171 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
2172 (Current_Anonymous_Master): New routine.
2173 (Current_Unit_First_Declaration): Removed.
2174 (Current_Unit_Scope): Removed.
2175 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
2176 their objects on a per-unit heterogeneous finalization master.
2178 2011-08-31 Matthew Heaney <heaney@adacore.com>
2180 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
2183 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2185 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
2188 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2190 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
2191 where the actual is an unexpanded call to 'Input.
2193 2011-08-31 Yannick Moy <moy@adacore.com>
2195 * sem_ch4.adb: Code clean up.
2197 2011-08-31 Yannick Moy <moy@adacore.com>
2199 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
2201 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2203 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
2204 and TSS primitive Finalize_Address if finalization is suppressed.
2205 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
2206 primitive Finalize_Address if finalization is suppressed.
2208 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2210 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
2211 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
2212 sure that the underlying task has already been created before trying
2213 to change its affinity.
2214 (Set_CPU): Use the term processor instead of CPU, as we do in
2217 2011-08-31 Vincent Celier <celier@adacore.com>
2219 * prj-attr.adb: New Compiler attribute Source_File_Switches.
2220 * prj-nmsc.adb (Process_Compiler): Process attribute
2221 Source_File_Switches.
2222 * prj.ads (Language_Config): New name list component
2223 Name_Source_File_Switches.
2224 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
2226 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2228 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
2229 discriminated component of an actual, expand at once to prevent
2230 ouf-of-order references with generated subtypes.
2232 2011-08-31 Yannick Moy <moy@adacore.com>
2234 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
2235 reference to operator in Alfa xrefs.
2237 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2239 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
2240 where the parent instance was frozen before the current instance due to
2241 the presence of a source body. Update calls to Insert_After_Last_Decl.
2242 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
2243 Update the comment which illustrates the purpose of the routine.
2244 Package instances are now frozen by source bodies which appear after
2245 the instance. This ensures that entities coming from within the
2246 instance are available for use in the said bodies.
2247 (Install_Body): Add code to handle the case where the parent instance
2248 was frozen before the current instance due to the presence of a source
2249 body. Update calls to Insert_After_Last_Decl.
2251 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2253 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
2255 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
2257 2011-08-31 Yannick Moy <moy@adacore.com>
2259 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
2261 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
2262 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
2263 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
2264 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
2265 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
2266 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
2267 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
2268 ALFA in Alfa (we dropped acronym).
2269 * einfo.adb (Primitive_Operations): Correctly return list of primitive
2270 operations in a case where it returned previously No_Elist.
2272 2011-08-31 Robert Dewar <dewar@adacore.com>
2274 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
2275 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
2276 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2277 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
2278 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
2279 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
2282 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2284 * sem_ch12 (Check_Private_View): Revert previous change.
2285 * sem_res.adb (Conversion_Check): Do not emit the error message if the
2286 conversion is in a generic instance.
2288 2011-08-31 Matthew Heaney <heaney@adacore.com>
2290 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
2291 * a-chtgbo.adb (Free): Allow 0 as index value.
2293 2011-08-31 Matthew Heaney <heaney@adacore.com>
2295 * a-cborma.adb (Insert): Add comment to explain why no element
2298 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2300 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
2301 spec discriminant is already a concurrent type, in which case just use
2302 it, otherwise fetch the Corresponding_Concurrent_Type as before.
2304 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2306 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
2307 system-linux-mips.ads, system-linux-mipsel.ads,
2308 system-linux-mips64el.ads, system-linux-ppc64.ads,
2309 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
2311 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2313 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
2314 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
2315 (build_unary_op): Likewise.
2317 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2319 * raise-gcc.c: Do not include coretypes.h and tm.h.
2320 (setup_to_install): Remove test for compiler macro.
2321 * targext.c: Document use for the library.
2322 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
2324 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2326 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
2327 the expression to the nominal type if the latter is a record type with
2328 a variant part and the type of the former is a record type without one.
2330 2011-08-30 Yannick Moy <moy@adacore.com>
2332 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2333 expansion in Alfa mode.
2334 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
2335 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
2337 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
2338 * sem_res.adb: Ditto.
2339 * gcc-interface/Make-lang.in: Update dependencies.
2341 2011-08-30 Thomas Quinot <quinot@adacore.com>
2343 * g-socket.ads: Minor documentation adjustment.
2345 2011-08-30 Robert Dewar <dewar@adacore.com>
2347 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
2349 2011-08-30 Yannick Moy <moy@adacore.com>
2351 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
2352 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
2353 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
2354 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
2355 Revert change which introduced files for "light"
2356 expansion, to be replaced by a single file for Alfa expansion.
2358 2011-08-30 Robert Dewar <dewar@adacore.com>
2360 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
2361 Minor code reorg/reformatting.
2363 2011-08-30 Yannick Moy <moy@adacore.com>
2365 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
2366 common shorthand for (Expander_Active and not ALFA_Mode) that can be
2367 used for testing full expansion, that is active expansion not in the
2368 reduced mode for Alfa
2369 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
2370 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
2371 of the verbose (Expander_Active and not ALFA_Mode)
2373 2011-08-30 Tristan Gingold <gingold@adacore.com>
2375 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
2376 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
2377 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
2378 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
2380 2011-08-30 Gary Dismukes <dismukes@adacore.com>
2382 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
2383 access conversions to check that the conversion is a rewritten node,
2384 rather than just having Comes_From_Source set to False, which wasn't
2387 2011-08-30 Robert Dewar <dewar@adacore.com>
2389 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
2390 g-socket.ads: Minor reformatting.
2392 2011-08-30 Thomas Quinot <quinot@adacore.com>
2394 * sem_util.adb: Minor reformatting.
2396 2011-08-30 Tristan Gingold <gingold@adacore.com>
2398 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
2399 to be compliant with the ABI.
2401 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2403 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
2404 of a designated type when the related access type is an actual in an
2405 instance. This ensures that the full view of designated type is
2406 available when inside the body of the instance.
2408 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2410 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
2411 in a position to be modified, a slice is treated like an indexed
2414 2011-08-30 Thomas Quinot <quinot@adacore.com>
2416 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
2417 field tv_sec in struct timeval.
2419 2011-08-30 Yannick Moy <moy@adacore.com>
2421 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
2422 blocks of code doing full expansion, previously only guarded by
2423 Expander_Active, by anding the test that ALFA_Mode is not set
2425 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2427 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
2428 add the function to the list of private dependents, for subsequent
2429 legality check on Taft amendment types.
2430 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
2431 Private_Dependents, as for other incomplete types.
2432 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
2433 Taft-amendment type is used as the return type of a function.
2435 2011-08-30 Javier Miranda <miranda@adacore.com>
2437 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
2438 which emits an error by a call to a new routine which report the error.
2439 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
2440 entity does not cover an existing interface.
2441 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
2443 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
2444 protected procedures or entries whose mode is not conformant.
2445 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
2446 an error by a call to a new routine which report the error.
2448 2011-08-30 Robert Dewar <dewar@adacore.com>
2450 * gnat_rm.texi: Minor change.
2451 * exp_attr_light.adb: Minor reformatting.
2453 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2455 * sem_ch3.adb: Patch inheritance of aspects in
2456 Complete_Private_Subtype, to avoid infinite loop.
2458 2011-08-30 Javier Miranda <miranda@adacore.com>
2460 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
2461 been reported and a subprogram covering an interface primitive is not
2462 found then skip generating the internal entity. Done to avoid crashing
2464 (Check_Abstract_Overriding): Change text of error of wrong formal of
2465 protected subprogram or entry. Done for consistency to emit exactly the
2466 same error reported by Check_Synchronized_Overriding. In addition, the
2467 error is restricted to protected types (bug found working on AI05-0090)
2469 2011-08-30 Yannick Moy <moy@adacore.com>
2471 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2472 expansion in Alfa mode.
2473 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
2474 * exp_light.adb, exp_light.ads: New package defining light expansion.
2475 * expander.adb (Expand): Call light expansion in Alfa mode
2476 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
2478 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
2480 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
2481 * gnat1drv.adb (Adjust_Global_Switches): Comment
2483 2011-08-30 Yannick Moy <moy@adacore.com>
2485 * lib-xref-alfa.adb: Minor refactoring.
2487 2011-08-30 Yannick Moy <moy@adacore.com>
2489 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
2491 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
2492 expansion in Alfa mode.
2493 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
2496 2011-08-30 Robert Dewar <dewar@adacore.com>
2498 * debug_a.adb: Update comment.
2500 2011-08-30 Robert Dewar <dewar@adacore.com>
2502 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
2503 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
2504 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
2505 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
2507 2011-08-30 Robert Dewar <dewar@adacore.com>
2509 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
2512 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2514 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
2515 Build_Finalization_Master by supplying an insertion node and enclosing
2516 scope. In its old version, the call did not generate a finalization
2518 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
2519 recognize anonymous access-to-controlled components. Rewrite the
2520 machinery which creates finalization masters to service anonymous
2521 access-to-controlled components of a record type. In its current state,
2522 only one heterogeneous master is necessary to handle multiple anonymous
2524 (Freeze_Type): Comment reformatting.
2525 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
2527 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
2528 associates TSS primitive Finalize_Address with either the master itself
2529 or with the internal hash table depending on the mode of operation of
2532 2011-08-30 Javier Miranda <miranda@adacore.com>
2534 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
2535 interface type then do not generate code to compare this component.
2536 Required since they have no components and their equality operator is
2539 2011-08-30 Steve Baird <baird@adacore.com>
2541 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
2542 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
2543 returns the (static) accessibility level of the object. Otherwise, the
2544 same as Type_Access_Level.
2545 (Dynamic_Accessibility_Level): New function; given an expression which
2546 could occur as the rhs of an assignment to a saooaaat (i.e., an
2547 expression of an access-to-object type), return the new value for the
2548 saooaaat's associated Extra_Accessibility object.
2549 (Effective_Extra_Accessibility): New function; same as
2550 Einfo.Extra_Accessibility except that object renames are looked through.
2552 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
2553 (Dynamic_Accessibility_Level): New function; see sem_util.ads
2555 (Effective_Extra_Accessibility): New function; see sem_util.ads
2557 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
2558 (Extra_Accessibility): Update comments.
2559 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
2560 except RM_Size field (which is only for types) is unaffected.
2562 (Extra_Accessibility): Expand domain to allow objects, not just formals.
2563 (Set_Extra_Accessibility): Expand domain to allow objects, not just
2565 (Init_Size): Add assertion that we are not trashing the
2566 Extra_Accessibility attribute of an object.
2567 (Init_Size_Align): Add assertion that we are not trashing the
2568 Extra_Accessibility attribute of an object.
2569 (Init_Object_Size_Align): New procedure; see einfo.ads description.
2570 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
2571 differently for the type of a (non-library-level) saooaaat depending
2572 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
2573 is queried in this set of changes - everything else (in particular,
2574 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
2575 driven off of the setting of the Is_Local_Anonymous_Access attribute.
2576 The special treatment of library-level saooaaats is an optimization,
2577 not required for correctnesss. This is based on the observation that the
2578 Ada2012 rules (static and dynamic) for saooaaats turn out to be
2579 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
2581 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
2582 false for the type of a saooaaat, declare and initialize its
2583 accessibility level object and set the Extra_Accessibility attribute
2584 of the saooaaat to refer to this object.
2585 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
2586 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
2587 calls to Effective_Extra_Accessibility in order to support
2588 renames of saooaaats.
2589 (Expand_N_Type_Conversion): Add new local function,
2590 Has_Extra_Accessibility, and call it when determining whether an
2591 accessibility check is needed.
2592 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
2593 evaluate to True (without raising an exception).
2595 (Expand_N_Assignment_Statement): When assigning to an Ada2012
2596 saooaaat, update its associated Extra_Accessibility object (if
2597 it has one). This includes an accessibility check.
2598 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
2599 a saooaaat, update its Extra_Accessibility object too (if it
2601 (Expand_Call): Replace a couple of calls to Type_Access_Level
2602 with calls to Dynamic_Access_Level to handle cases where
2603 passing a literal (any literal) is incorrect.
2604 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
2605 checks associated with "Saooaat := Some_Object'Access;"; this must
2606 be rejected if Some_Object is declared in a more nested scope
2608 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
2609 assignment to a saooaaat even if Is_Local_Anonymous_Access
2610 returns False for its type (indicating a 2012-style saooaaat).
2612 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
2613 (which is only appropriate for objects, not types) with a call
2614 of Init_Object_Size_Align in order to avoid trashing the
2615 Extra_Accessibility attribute of a rename (the two attributes
2618 (Valid_Conversion) Replace six calls to Type_Access_Level with
2619 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
2620 Ada2012 non-library-level saooaaat, the former returns library level
2621 while the latter returns the (static) accessibility level of the
2622 saooaaat. A type conversion to the anonymous type of a saooaaat
2623 can only occur as part of an assignment to the saooaaat, so we
2624 know that such a conversion must be in a lhs context, so Deepest
2625 yields the result that we need. If such a conversion could occur,
2626 say, as the operand of an equality operator, then this might not
2627 be right. Also add a test so that static accessibilty checks are
2628 performed for converting to a saooaaat's type even if
2629 Is_Local_Anonymous_Access yields False for the type.
2631 2011-08-30 Javier Miranda <miranda@adacore.com>
2633 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
2634 controls generation of a warning associated with late declaration of
2635 dispatching functions. Required to avoid generating spurious
2638 2011-08-30 Gary Dismukes <dismukes@adacore.com>
2640 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
2641 return object has an anonymous access type and the function's type is
2642 a named access type.
2643 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
2644 conversions on implicit conversions, since such conversions can occur
2645 for anonymous access cases due to expansion. Issue error for attempt
2646 to rename an anonymous expression as an object of a named access type.
2647 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
2648 to indicate whether this function should report errors on invalid
2650 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
2651 the expression is of an anonymous access type and the expected type is
2652 a named general access type, rewrite the expression as a type
2653 conversion, unless this is an expression of a membership test.
2654 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
2655 calling of Error_Msg_N on new formal Report_Errs.
2656 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
2657 calling of Error_Msg_NE on new formal Report_Errs.
2658 (Valid_Conversion): Move declaration of this function to the package
2659 spec, to allow calls from membership test processing. For Ada 2012,
2660 enforce legality restrictions on implicit conversions of anonymous
2661 access values to general access types, disallowing such conversions in
2662 cases where the expression has a dynamic accessibility level (access
2663 parameters, stand-alone anonymous access objects, or a component of a
2664 dereference of one of the first two cases).
2665 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
2666 in the context of a named general access expected type.
2667 * exp_ch4.adb Add with and use of Exp_Ch2.
2668 (Expand_N_In): Add processing for membership tests applied to
2669 expressions of an anonymous access type. First, Valid_Conversion is
2670 called to check whether the test is statically False, and then the
2671 conversion is expanded to test that the expression's accessibility
2672 level is no deeper than that of the tested type. In the case of
2673 anonymous access-to-tagged types, a tagged membership test is applied
2675 (Tagged_Membership): Extend to handle access type cases, applying the
2676 test to the designated types.
2677 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
2678 accessibility level, and the actual is a 'Access applied to a current
2679 instance, pass the accessibility level of the type of the current
2680 instance rather than applying Object_Access_Level to the prefix. Add a
2681 ??? comment, since this level isn't quite right either (will eventually
2682 need to pass an implicit level parameter to init procs).
2684 2011-08-30 Bob Duff <duff@adacore.com>
2686 * s-taskin.ads: Minor comment fix.
2688 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2690 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
2691 component and the selector is a dispatching operation, check if it is
2692 a prefixed call before rewriting as a parameterless function call.
2694 2011-08-29 Jakub Jelinek <jakub@redhat.com>
2696 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
2697 tsystem.h into $(RTSDIR) instead of rts.
2699 2011-08-29 Robert Dewar <dewar@adacore.com>
2701 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
2703 * gcc-interface/Make-lang.in: Update dependencies.
2705 2011-08-29 Yannick Moy <moy@adacore.com>
2707 * alfa.ads (Name_Of_Heap_Variable): New constant name.
2708 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
2709 table to hold dereferences.
2710 (Add_ALFA_Xrefs): Take into account dereferences as special
2711 reads/writes to the variable "HEAP".
2712 (Enclosing_Subprogram_Or_Package): Move subprogram here.
2713 (Generate_Dereference): New procedure to store a read/write dereferencew
2715 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
2716 the special "HEAP" var.
2717 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
2719 * sem_util.adb (Note_Possible_Modification): Store write dereference
2722 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2724 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
2725 ensures that the level of the subpool access type is not deeper than
2726 that of the pool object.
2727 * sem_util.adb (Object_Access_Level): Expand to handle defining
2729 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
2730 subpool handle name of a rewritten allocator.
2732 2011-08-29 Robert Dewar <dewar@adacore.com>
2734 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
2736 2011-08-29 Thomas Quinot <quinot@adacore.com>
2738 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
2739 values, we generate multiple triples of parameters in the TypeCode.
2740 Bump Choice_Index for each such triple so that a subsequent default
2741 choice is associated with the correct index in the typecode.
2743 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2745 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
2747 (First, Last): Handle properly an iterator over a null container.
2749 2011-08-29 Bob Duff <duff@adacore.com>
2751 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
2752 processing if we run across a node with no Scope. This can happen if
2753 we're with-ing an library-level instance, and that instance got errors
2754 that caused "instantiation abandoned".
2755 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
2756 an exception instead of using Assert, so it won't go into an infinite
2757 loop, even when assertions are turned off.
2759 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2761 * a-coorse.adb: Proper handling of empty ordered sets.
2763 2011-08-29 Johannes Kanig <kanig@adacore.com>
2765 * debug.adb: Add comments.
2767 2011-08-29 Thomas Quinot <quinot@adacore.com>
2769 * a-except.adb, a-except-2005.adb: Minor comment rewording and
2772 2011-08-29 Yannick Moy <moy@adacore.com>
2774 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
2775 declaration for Itypes in Alfa mode.
2777 2011-08-29 Robert Dewar <dewar@adacore.com>
2779 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
2780 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
2781 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
2784 2011-08-29 Tristan Gingold <gingold@adacore.com>
2786 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
2788 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
2789 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
2792 2011-08-29 Robert Dewar <dewar@adacore.com>
2794 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
2796 2011-08-29 Javier Miranda <miranda@adacore.com>
2798 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
2799 renamings of formal subprograms when the actual for a formal type is
2802 2011-08-29 Matthew Heaney <heaney@adacore.com>
2804 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
2807 2011-08-29 Matthew Heaney <heaney@adacore.com>
2809 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
2810 components of record type.
2811 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
2814 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2816 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
2817 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
2820 2011-08-29 Robert Dewar <dewar@adacore.com>
2822 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
2825 2011-08-29 Matthew Heaney <heaney@adacore.com>
2827 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
2828 components of record type.
2830 2011-08-29 Bob Duff <duff@adacore.com>
2832 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
2833 by the termination handler.
2835 2011-08-29 Yannick Moy <moy@adacore.com>
2837 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
2838 created in Alfa mode, instead of inserting artificial declarations of
2839 non-Itypes in the tree.
2840 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
2841 know if an Itype has a corresponding declaration, as defined in
2844 2011-08-29 Yannick Moy <moy@adacore.com>
2846 * gnat1drv.adb: Minor rewrite.
2848 2011-08-29 Bob Duff <duff@adacore.com>
2850 * s-tasuti.adb (Make_Passive): Work around race condition in
2851 Make_Independent, which can cause Wait_Count to be zero. So instead of
2852 asserting that Wait_Count > 0, and then decrementing it, decrement it
2853 only if Wait_Count > 0.
2854 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
2855 should be nonnegative, so declare them Natural instead of Integer.
2857 2011-08-29 Robert Dewar <dewar@adacore.com>
2859 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
2860 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
2861 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
2862 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
2863 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
2865 2011-08-29 Tristan Gingold <gingold@adacore.com>
2867 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
2869 2011-08-29 Vadim Godunko <godunko@adacore.com>
2871 * s-parint.ads: Minor comment clarification.
2873 2011-08-29 Vincent Celier <celier@adacore.com>
2875 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
2876 may be used as identifiers.
2878 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2880 * a-coinho.ads: Minor reformating.
2882 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2884 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
2885 container of a derived type.
2887 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2889 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
2890 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
2892 2011-08-29 Pascal Obry <obry@adacore.com>
2894 * exp_disp.adb: Minor comment fix.
2895 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
2896 to avoid warnings when compiling with -Wall.
2897 (Make_Disp_Conditional_Select_Body): Likewise.
2898 (Make_Disp_Timed_Select_Body): Likewise.
2900 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2902 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
2903 an entity name, generate reference for it.
2905 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2907 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
2909 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
2910 the class-wide type.
2911 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
2913 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2915 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
2916 subtype for an object whose type is an unconstrained union.
2918 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2920 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
2921 is allowed in a component definition, by AI95-406.
2923 2011-08-29 Matthew Heaney <heaney@adacore.com>
2925 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
2927 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2929 * a-except-2005.adb: Alphabetize all routines.
2930 (Triggered_By_Abort): New routine.
2931 * a-except-2005.ads (Triggered_By_Abort): New routine.
2932 * a-except.adb Alphabetize all routines.
2933 (Triggered_By_Abort): New routine.
2934 * a-except.ads (Triggered_By_Abort): New routine.
2935 * exp_ch7.adb: Update all comments involving the detection of aborts in
2937 (Build_Object_Declarations): Do not generate code to detect the
2938 presence of an abort at the start of finalization code, use a runtime
2940 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
2942 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
2943 allocate a task on a subpool.
2944 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
2945 The flag disables all actions related to the maintenance of
2946 Finalize_Address_Table when subpools are not in use.
2947 (Allocate_Any_Controlled): Signal the machinery that subpools are in
2949 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
2950 performs costly task locking when subpools are not in use.
2952 2011-08-29 Yannick Moy <moy@adacore.com>
2954 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
2955 types and dispatching calls in Alfa mode.
2956 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
2957 correspondance between body and spec scopes, to reuse utility functions
2958 (Traverse_Declarations_Or_Statements): Protect access to body for stub
2959 by testing the presence of the library unit for the body
2960 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
2961 mode the expansion of accept statements is skipped
2962 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
2963 the unique entity corresponding to the one returned by
2964 Unique_Defining_Entity applied to the enclosing declaration of the
2967 2011-08-29 Bob Duff <duff@adacore.com>
2969 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
2970 gdb when x is not a node (it can be a node list, name_id, etc). pp is
2971 an alias for pn. ppp is an alias for pt.
2973 2011-08-29 Javier Miranda <miranda@adacore.com>
2975 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
2976 aggregate to take a consistent decision on the need to convert into
2977 assignments aggregates that initialize constant objects.
2979 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2981 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
2982 Build_Allocate_Deallocate_Proc in order to handle allocation of
2983 non-controlled objects on subpools.
2984 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
2985 to be end-user visible.
2986 * s-finmas.adb: Add with and use clause for System.HTable.
2987 Add an instantiation of Simple_HTable which provides a mapping between
2988 the address of a controlled object and the corresponding
2989 Finalize_Address used to clean up the object. The table is used when a
2990 master is operating in heterogeneous mode.
2991 (Attach): Explain why the input node is not verified on being already
2993 (Delete_Finalize_Address): New routine.
2994 (Detach): Add pragma Assert which ensures that a node is already
2996 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
2997 since nodes are no longer removed on traversal. Explain why node
2998 detachment is undesirable in this case.
2999 (Get_Finalize_Address): New routine.
3000 (Hash): New routine.
3001 (Is_Empty_List): Removed.
3002 (pm): Renamed to Print_Master. Add output for discriminant
3004 Comment reformatting.
3005 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3006 * s-finmas.ads: Various comments additions / improvements.
3007 Type Finalization_Master has a discriminant which determines the mode of
3009 (Delete_Finalize_Address): New routine.
3010 (Get_Finalize_Address): New routine.
3011 (pm): Renamed to Print_Master.
3012 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3013 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
3014 use clause for System.IO.
3015 (Allocate_Any_Controlled): Add machinery to set TSS primitive
3016 Finalize_Address depending on the mode of allocation and the mode of
3018 (Deallocate_Any_Controlled): Remove the relation pair object -
3019 Finalize_Address regardless of the master mode. Add comment explaining
3021 (Detach): Ensure that fields Prev and Next are null after detachment.
3022 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
3023 scheme to check whether the list of subpools is empty. There is no
3024 longer need to store the next subpool or advance the current pointer.
3025 (Is_Empty_List): New routine.
3026 (Print_Pool): New routine.
3027 (Print_Subpool): New routine.
3028 * s-stposu.ads: Various comments additions / improvements.
3029 Field Master of type Root_Subpool is now a heterogeneous collection.
3030 (Print_Pool): New routine.
3031 (Print_Subpool): New routine.
3033 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3035 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
3036 forms, using aspects of container types.
3037 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
3038 Has_Implicit_Dereference flags, that may be set on the partial view.
3039 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
3040 container type with an indexing aspect.
3041 (Analyze_Quantified_Expression): Analyze construct with expansion
3042 disabled, because it will be rewritten as a loop during expansion.
3043 (Try_Container_Indexing): The prefix itself may be a container type
3044 with an indexing aspect, as with a vector of vectors.
3045 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
3046 the original doamin of iteration, for name capture.
3047 (Analyze_Iterator_Specification): If the domain is an expression that
3048 needs finalization, create a separate declaration for it.
3049 For an iterator with "of" retrieve default iterator info from aspect of
3050 container type. For "in" iterator, retrieve type of Iterate function.
3051 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
3052 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
3053 analysis, to prevent spurious errors about late attributes.
3054 * sprint.adb: Handle quantified expression with either loop or iterator
3056 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
3059 2011-08-29 Vincent Celier <celier@adacore.com>
3061 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
3062 Binder or Linker of the main project file.
3064 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3066 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
3069 2011-08-29 Yannick Moy <moy@adacore.com>
3071 * exp_ch9.adb: Partial revert of previous change for Alfa mode
3073 2011-08-29 Yannick Moy <moy@adacore.com>
3075 * exp_ch11.adb: Minor expansion of comment.
3077 2011-08-29 Yannick Moy <moy@adacore.com>
3079 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
3081 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3083 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
3084 interpretation, set the type before resolving the operands, because
3085 legality checks on an exponention operand need to know the type of the
3088 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3090 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
3091 cleanups on a master if the instance is within a generic unit.
3092 Complement to the corresponding fix to inline.adb for K520-030.
3094 2011-08-29 Tristan Gingold <gingold@adacore.com>
3096 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
3098 * exp_intr.adb: Minor comment fix.
3100 2011-08-29 Bob Duff <duff@adacore.com>
3102 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
3103 Delay_Required was used as an uninitialized variable.
3105 2011-08-29 Robert Dewar <dewar@adacore.com>
3107 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
3108 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
3109 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
3111 2011-08-29 Thomas Quinot <quinot@adacore.com>
3113 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
3114 Remove unused variables.
3116 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3118 * sem_res.adb: Remove Build_Explicit_Dereference.
3119 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
3120 from sem_res.adb, used in analysis of additional constructs.
3121 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
3122 expansion of iterators.
3123 (Is_Object_Reference): Recognize variables rewritten as explicit
3124 dereferences in Ada2012.
3125 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
3126 Reversible_Iterator names, for expansion of Ada2012 iterators.
3127 * aspects.ads, aspects.adb (Find_Aspect): Utility.
3128 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
3129 linked list container.
3130 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
3131 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
3133 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3135 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
3138 2011-08-29 Vincent Celier <celier@adacore.com>
3140 * make.adb (Gnatmake): Get the maximum number of simultaneous
3141 compilation processes after the Builder switches has been scanned, as
3142 there may include -jnn.
3144 2011-08-29 Matthew Heaney <heaney@adacore.com>
3146 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
3148 2011-08-29 Tristan Gingold <gingold@adacore.com>
3150 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
3151 GNAT_DRIVER_COMMAND_LINE to 255.
3153 2011-08-29 Pascal Obry <obry@adacore.com>
3155 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
3156 reformatting and style fix (class attribute casing).
3158 2011-08-29 Yannick Moy <moy@adacore.com>
3160 * exp_ch11.adb: Yet another case where expansion should be common
3161 between CodePeer and Alfa.
3163 2011-08-29 Yannick Moy <moy@adacore.com>
3165 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
3167 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3169 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
3170 incomplete type and its completion match.
3172 2011-08-29 Yannick Moy <moy@adacore.com>
3174 * exp_ch13.adb: Adjust previous change.
3176 2011-08-29 Robert Dewar <dewar@adacore.com>
3178 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
3179 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
3182 2011-08-29 Emmanuel Briot <briot@adacore.com>
3184 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
3185 initialize aggregated projects.
3187 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3189 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
3190 depth of candidates to resolve a potentially spurious ambiguity between
3191 two visible subprograms.
3193 2011-08-29 Yannick Moy <moy@adacore.com>
3195 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
3197 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
3198 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
3201 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3203 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
3206 2011-08-29 Thomas Quinot <quinot@adacore.com>
3208 * sem_res.adb: Minor reformatting.
3210 2011-08-29 Johannes Kanig <kanig@adacore.com>
3212 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
3214 * gnat1drv.adb (Adjust_Global_Switches): Set
3215 Use_Expressions_With_Actions to False in ALFA mode.
3216 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
3219 2011-08-29 Yannick Moy <moy@adacore.com>
3221 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
3222 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
3223 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
3224 tagged types and dispatching calls in Alfa mode.
3226 2011-08-29 Javier Miranda <miranda@adacore.com>
3228 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
3229 we do not report an error on an Empty node.
3231 2011-08-29 Geert Bosch <bosch@adacore.com>
3233 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
3234 a-nlrear.o and a-nurear.o.
3236 2011-08-29 Robert Dewar <dewar@adacore.com>
3238 * freeze.adb: Minor code reorganization.
3240 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
3241 sem_ch6.adb: Minor reformatting
3243 2011-08-29 Tristan Gingold <gingold@adacore.com>
3245 * s-except.ads, s-except.adb: Provide dummy body.
3247 2011-08-29 Yannick Moy <moy@adacore.com>
3249 * sem_warn.adb (Within_Postcondition): Take into account the case of
3250 an Ensures component in a Test_Case.
3252 2011-08-29 Tristan Gingold <gingold@adacore.com>
3254 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
3255 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
3256 System_Exceptions_Debug
3257 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
3258 * a-except.adb: With and use System.Exceptions_Debug instead of
3260 * a-except-2005.adb: Likewise.
3261 * s-assert.adb: Likewise.
3262 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
3263 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
3264 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
3265 s-excdeb. Update dependencies.
3266 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
3267 as these no longer need external libraries.
3269 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3271 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
3272 exponentiation operator on universal values in a context that requires
3275 2011-08-29 Tristan Gingold <gingold@adacore.com>
3277 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
3278 before calling notify_handled_exception.
3279 * a-exextr.adb: Fix comment.
3281 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3283 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
3284 Finalize_Address of the access type's finalization master.
3285 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
3286 access type's finalization master. Add a guard to prevent
3287 Associated_Storage_Pool from being set on .NET/JVM.
3288 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
3289 attribute Finalize_Address of the access type's finalization master.
3290 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
3291 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
3292 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
3294 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
3295 use clause for System.IO
3296 (Detach): Relax the assertion, to be reinstated later.
3297 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
3298 Relax the assertion on Finalize_Address, to be reinstated later.
3299 (Is_Empty_List): New routine.
3300 (pm): New debug routine.
3301 (Set_Finalize_Address): New routine.
3302 * s-finmas.ads (pm): New debug routine.
3303 (Set_Finalize_Address): New routine.
3304 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
3306 2011-08-29 Tristan Gingold <gingold@adacore.com>
3308 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
3309 Remove convention C.
3311 2011-08-29 Tristan Gingold <gingold@adacore.com>
3313 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
3314 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
3315 (Finalize_TCB): Remove its finalization.
3316 (Initialize): Remove assignment of GET_Exc_Stack_Addr
3317 * s-soflin.adb (NT_Exc_Stack): Remove
3318 (Get_Exc_Stack_Addr_NT): Likewise.
3319 (Get_Exc_Stack_Addr_Soft): Likewise.
3320 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
3321 (Get_Exc_Stack_Addr): Likewise.
3322 (Get_Exc_Stack_Addr_Soft): Likewise
3323 * s-taspri-vms.ads (Exc_Stack_T): Remove.
3324 (Exc_Stack_Ptr_T): Likewise.
3325 (Private_Data): Remove Exc_Stack_Ptr component.
3327 2011-08-29 Tristan Gingold <gingold@adacore.com>
3329 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
3331 2011-08-29 Tristan Gingold <gingold@adacore.com>
3333 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
3335 2011-08-29 Geert Bosch <bosch@adacore.com>
3337 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
3338 L2_Norm, Swap_Column): New generic subprograms
3339 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
3340 L2_Norm, Swap_Column): Implement new subprograms in order to
3341 eliminate dependency on BLAS and LAPACK libraries in
3342 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
3343 version. Forward_Eliminate/Back_Substitute can be used to put a
3344 matrix in row echelon or reduced row echelon form using partial
3346 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
3347 Swap_Column): Instantiate from System.Generic_Array_Operations.
3348 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
3349 (Sqrt): Local function for simple computation of square root without
3350 adding dependencies on Generic_Elementary_Functions.
3351 (Swap): New subprogram to exchange floating point numbers.
3352 (Inverse): Reimplement using Jordan-Gauss elimination.
3353 (Jacobi): New procedure implementing Jacobi's method for computation
3354 of eigensystems, based on Rutishauser's implementation.
3355 (L2_Norm): Implement directly using the inner product.
3356 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
3357 decreasing eigenvalue as required by the Ada RM.
3358 (Swap_Column): New helper procedure for Sort_Eigensystem.
3359 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
3360 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
3363 2011-08-29 Thomas Quinot <quinot@adacore.com>
3365 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
3368 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3370 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
3371 than the current node.
3372 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
3373 Finalization_Master. The list headers have two fields instead of three.
3374 This should fix alignment issue but subpool allocations are now
3375 unusable. Alphabetize subprograms.
3376 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
3377 the size of the header when converting the beginning of the object to
3378 a FM_Node. Set the master's Finalize_Address attribute if not already
3380 (Deallocate_Any_Controlled): Use the offset rather than the size of the
3381 header when converting the beginning of the object to a FM_Node.
3383 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3385 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
3386 reraise when compiling for CodePeer.
3388 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3390 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
3391 now needed by a-convec.adb. Fix warning.
3393 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3395 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
3396 processing of TSS routine Finalize_Address when compiling in
3399 2011-08-29 Thomas Quinot <quinot@adacore.com>
3401 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
3402 sem_warn.adb: Minor reformatting.
3404 2011-08-29 Emmanuel Briot <briot@adacore.com>
3406 * prj-conf.adb (Get_Config_Switches): Also collect the list of
3407 languages from aggregated projects.
3409 2011-08-29 Yannick Moy <moy@adacore.com>
3411 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
3412 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3413 Traverse_Package_Declaration, Traverse_Subprogram_Body,
3414 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
3415 for stubs are traversed too when parameter is set
3416 (Traverse_All_Compilation_Units): Traverse without going inside stubs
3417 (Traverse_Declarations_Or_Statements): Do the special traversing for
3418 stubs when required.
3419 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
3420 return subprogram or package body from stub.
3421 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
3422 stubs without prior subprogram decl.
3424 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3426 * gnat_ugn.texi: Fix typo.
3428 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3430 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
3431 which accounts for size vs alignment issues and calculates the size of
3433 (Deallocate_Any_Controlled): Ditto.
3434 (Nearest_Multiple_Rounded_Up): New routine.
3436 2011-08-29 Tristan Gingold <gingold@adacore.com>
3438 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
3439 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
3440 (Set_Exception_Msg): Ditto.
3441 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
3443 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
3444 Use Save_Occurrence instead of Save_Occurrence_No_Private.
3445 (Raise_With_Msg): Remove Cleanup_Flag.
3446 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
3447 Clean_Flag and Private_Data components.
3449 2011-08-29 Yannick Moy <moy@adacore.com>
3451 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
3453 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
3454 of an explicitly declared type, so that the base types of the original
3455 type and this generated type are the same, and a "type" (not a subtype
3457 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
3458 small" in Alfa mode, like in CodePeer mode.
3459 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
3460 clauses in Alfa mode.
3462 2011-08-29 Javier Miranda <miranda@adacore.com>
3464 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
3465 function to the package spec.
3466 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
3467 internally generated bodies of null procedures locate the internally
3468 generated spec enforcing mode conformance.
3469 (Is_Interface_Conformant): Ensure that the controlling formal of the
3472 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3474 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
3475 reject the pragma if it appears to apply to a formal subprogram.
3477 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3479 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
3480 inner expression, to prevent double evaluation.
3482 2011-08-29 Tristan Gingold <gingold@adacore.com>
3484 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
3486 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
3487 * a-except-2005.adb (Propagate_Exception): Adjust spec.
3488 (Raise_Current_Excep): Adjust call.
3489 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
3491 2011-08-29 Thomas Quinot <quinot@adacore.com>
3493 * exp_disp.adb: Minor reformatting.
3495 2011-08-29 Tristan Gingold <gingold@adacore.com>
3497 * a-exexpr.adb (Setup_Exception): Removed.
3498 * a-exexpr-gcc.adb (Setup_Exception): Removed.
3499 * a-except.adb (Exception_Propagation): Removed.
3500 * a-except-2005.adb (Setup_Exception): Removed.
3501 (Reraise): Remove call to Setup_Exception.
3502 (Reraise_Occurrence): Ditto.
3503 (Reraise_Occurrence_Always): Ditto.
3504 (Reraise_Occurrence_No_Defer): Ditto.
3505 (Transfer_Occurrence): Ditto.
3506 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
3507 (Set_Exception_Msg): Ditto.
3509 2011-08-29 Robert Dewar <dewar@adacore.com>
3511 * a-convec.adb, exp_disp.adb: Minor reformatting.
3513 2011-08-29 Tristan Gingold <gingold@adacore.com>
3515 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
3517 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3519 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
3520 Exception_Handlers to No_List instead of Empty_List in the case where
3521 there are no handlers.
3523 2011-08-29 Tristan Gingold <gingold@adacore.com>
3525 * gcc-interface/gigi.h (enum standard_datatypes): Add
3526 ADT_reraise_zcx_decl
3527 (reraise_zcx_decl): New macro.
3528 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
3529 (gigi): Set reraise_zcx_decl.
3530 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
3531 (gnat_to_gnu): Handle N_Raise_Statement.
3533 2011-08-29 Robert Dewar <dewar@adacore.com>
3535 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
3536 a-undesu.adb: Minor reformatting.
3538 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3540 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
3541 table, accept an unfrozen untagged component if it is an actual for a
3542 formal incomplete type.
3543 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
3544 provide new iterator forms over vectors.
3545 Introduce type Iterator in package body to implement operations of
3546 Reversible_Iterator interface.
3547 * a-iteint.ads: Make package pure so it is usable with new container
3548 packages, that are categorized Remote_Types.
3550 2011-08-29 Robert Dewar <dewar@adacore.com>
3552 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
3554 2011-08-29 Bob Duff <duff@adacore.com>
3556 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
3557 of <>, because this is the routine that checks for dimensionality
3558 errors (for example, for a two-dimensional array, (others => <>) should
3559 be (others => (others => <>)).
3561 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3563 * impunit.adb: Add new run-time units.
3564 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
3565 s-stposu.ads, s-stposu.adb: Code clean up.
3566 Handle protected class-wide or task class-wide types
3567 Handle C/C++/CIL/Java types.
3568 * s-spsufi.adb, s-spsufi.ads: New files.
3570 2011-08-29 Yannick Moy <moy@adacore.com>
3572 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
3573 library-level subprogram.
3574 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
3576 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
3578 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
3580 * gnat_rm.texi: Update doc for Test_Case pragma.
3582 2011-08-29 Tristan Gingold <gingold@adacore.com>
3584 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
3586 (GCC_Exception_Access): New type.
3587 (Unwind_DeleteException): New imported procedure
3588 (Foreign_Exception): Import it.
3589 (GNAT_GCC_Exception): Simply have the occurrence inside.
3590 (To_GCC_Exception): New function.
3591 (To_GNAT_GCC_Exception): New function.
3592 (GNAT_GCC_Exception_Cleanup): New procedure..
3593 (Propagate_GCC_Exception): New procedure.
3594 (Reraise_GCC_Exception): New procedure.
3595 (Setup_Current_Excep): New procedure.
3596 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
3597 (Unwind_RaiseException): Ditto.
3598 (Unwind_ForcedUnwind): Ditto.
3600 (Begin_Handler): Change type of parameter.
3601 (End_Handler): Ditto. Now delete the exception if still present.
3602 (Setup_Key): Removed.
3603 (Is_Setup_And_Not_Propagated): Removed.
3604 (Set_Setup_And_Not_Propagated): Ditto.
3605 (Clear_Setup_And_Not_Propagated): Ditto.
3606 (Save_Occurrence_And_Private): Ditto.
3607 (EID_For): Add 'not null' constraint on parameter.
3608 (Setup_Exception): Does nothing.
3609 (Propagate_Exception): Simplified.
3610 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
3611 re-raise is not expanded anymore.
3612 * s-except.ads (Foreign_Exception): New exception - placeholder for
3614 * raise-gcc.c (__gnat_setup_current_excep): Declare
3615 (CXX_EXCEPTION_CLASS): Define (not yet used)
3616 (GNAT_EXCEPTION_CLASS): Define.
3617 (is_handled_by): Handle foreign exceptions.
3618 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
3620 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3622 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
3624 2011-08-29 Thomas Quinot <quinot@adacore.com>
3626 * a-synbar-posix.adb: Minor reformatting.
3628 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3630 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
3631 a-exetim-default.ads (Interrupt_Clocks_Supported,
3632 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
3633 definitions to be compliant with AI-0171. The target systems do not
3634 support separate account for the execution time of interrupt handlers.
3636 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3638 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
3639 in the barrier to put first the easiest to evaluate (and the one which
3640 will be True more often). More efficient.
3642 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
3644 * s-atocou-x86.adb: Fix constraint in machine code insertion.
3646 2011-08-29 Bob Duff <duff@adacore.com>
3648 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
3649 attributes that are now aspects, as specified by AI05-0229-1.
3650 * sem_ch13.adb (Analyze_Aspect_Specifications,
3651 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
3652 pragmas or attribute references, as appropriate.
3654 2011-08-29 Robert Dewar <dewar@adacore.com>
3656 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
3657 a-synbar-posix.ads: Minor reformatting.
3659 2011-08-29 Yannick Moy <moy@adacore.com>
3661 * snames.ads-tmpl: Add name Force.
3663 2011-08-29 Pascal Obry <obry@adacore.com>
3665 * prj-nmsc.adb: Minor reformatting.
3667 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3669 * a-exetim.ads (Interrupt_Clocks_Supported,
3670 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
3671 definitions to be compliant with AI-0171.
3673 2011-08-29 Robert Dewar <dewar@adacore.com>
3675 * a-ngelfu.adb: Add comments.
3677 2011-08-29 Geert Bosch <bosch@adacore.com>
3679 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
3680 the closest machine number to Pi / 2.0.
3682 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3684 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
3685 package Ada.Synchronous_Barriers.
3686 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
3687 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
3688 default implementation using protected objects and another one
3689 a-synbar-posix using POSIX barriers as the underlying support.
3690 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
3691 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
3692 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
3693 Clean up dependencies.
3694 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
3696 2011-08-29 Robert Dewar <dewar@adacore.com>
3698 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
3699 exp_dist.adb: Minor code reorganization.
3702 2011-08-29 Thomas Quinot <quinot@adacore.com>
3704 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
3705 primitive operation must support external streaming if it is not a
3706 controlling access result.
3708 2011-08-29 Thomas Quinot <quinot@adacore.com>
3710 * sinfo.ads, sem_ch7.adb: Minor reformatting.
3712 2011-08-29 Bob Duff <duff@adacore.com>
3714 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
3715 restriction on allocators, as required by AI05-0013-1.
3716 * restrict.ads: Minor comment fix.
3718 2011-08-29 Tristan Gingold <gingold@adacore.com>
3720 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
3721 (To_Jmpbuf_Address): Ditto
3722 (builtin_longjmp): Ditto
3724 2011-08-29 Thomas Quinot <quinot@adacore.com>
3726 * sem_res.adb: Minor reformatting.
3728 2011-08-29 Vincent Celier <celier@adacore.com>
3730 * make.adb (Gnatmake): Move special processing for VM targets after the
3731 call to Get_Target_Parameters.
3733 2011-08-29 Thomas Quinot <quinot@adacore.com>
3735 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
3737 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3739 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
3740 where an anonymous access discriminant of a limited designated type
3741 appears in a non-immutably limited discriminated type and issue an
3742 error message. Add local variable Desig_T and replace all occurrences
3745 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3747 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
3748 implementation is compliant to RM D.15(15/2) after the modification
3749 imposed by AI05-0094-1 (binding interpretation).
3751 2011-08-29 Robert Dewar <dewar@adacore.com>
3753 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
3754 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
3756 2011-08-29 Thomas Quinot <quinot@adacore.com>
3758 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
3759 the scope name, do not report a missing label as a style violation (it
3760 will be diagnosed as an illegality).
3761 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
3762 variant records: Get_Enum_Lit_From_Pos already returns a usage
3763 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
3764 on Expr in Integer_Literal case so that it can be used by
3767 2011-08-29 Tristan Gingold <gingold@adacore.com>
3769 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
3771 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
3772 (Build_Abort_Block_Handler): New function to build an Abort_Signal
3774 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
3775 Build_Abort_Block_Handler to build the exception handler. Do not
3776 undefer aborts for the Abort_Signal exception handler if back-end
3777 exception mechanism.
3778 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
3779 back_end exceptions for all others and abort_signal.
3780 * s-except.ads (ZCX_By_Default): New constant.
3781 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
3782 (Raise_Exception_Always): Ditto.
3783 (Raise_From_Signal_Handler): Ditto.
3784 (Raise_With_Location_And_Msg): Ditto.
3785 (Raise_With_Msg): Ditto.
3787 (Reraise_Occurence): Ditto.
3788 (Reraise_Occurrence_Always): Ditto.
3789 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
3790 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
3792 2011-08-29 Thomas Quinot <quinot@adacore.com>
3794 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
3796 2011-08-29 Robert Dewar <dewar@adacore.com>
3798 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
3799 Minor code reorganization.
3801 2011-08-29 Bob Duff <duff@adacore.com>
3803 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
3804 2012, not just Ada 2005.
3806 2011-08-29 Vincent Celier <celier@adacore.com>
3808 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
3809 with a project file or with gprbuid, if -gnatep= is specified, the
3810 builder may need to be invoked with -x.
3812 2011-08-29 Tristan Gingold <gingold@adacore.com>
3814 * a-exexpr-gcc.adb: Minor comment fix.
3816 2011-08-29 Robert Dewar <dewar@adacore.com>
3818 * sem_ch8.adb: Minor reformatting.
3820 2011-08-29 Bob Duff <duff@adacore.com>
3822 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
3823 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
3824 treating "some" as unreserved in earlier Ada versions. This is now
3825 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
3826 rather than Name_Some, since Tok_Some is now recognized as reserved.
3827 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
3829 * scans.ads: Minor comment fixes.
3830 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
3831 for other language versions.
3832 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
3833 treating "some" as unreserved in earlier Ada versions. This is now
3834 handled in Snames.Is_Keyword_Name.
3835 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
3837 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
3838 unreserved in earlier Ada versions. This is now handled in
3839 Snames.Is_Keyword_Name.
3840 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
3841 words as for other language versions.
3842 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
3843 Ada 2012, not just Ada 2005.
3845 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3847 * sem_ch13.adb: Additional semantic checks for aspects involved in
3850 2011-08-29 Matthew Heaney <heaney@adacore.com>
3852 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
3853 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
3854 Container parameter.
3855 (Ancestor_Find): ditto.
3857 2011-08-29 Thomas Quinot <quinot@adacore.com>
3859 * par-endh.adb: Minor reformatting.
3861 2011-08-29 Tristan Gingold <gingold@adacore.com>
3863 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
3864 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
3865 (Adjust_N_CLeanups_For): Remove.
3866 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
3868 (Propgate_Exception): Adjust.
3869 * raise-gcc.c: Add a few static/const.
3870 (Adjust_N_Cleanups_For): Remove declaration.
3871 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
3873 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3875 * sem_ch8.adb: Use type of function return when rewriting as object
3878 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3880 * sem_type.adb: Minor reformatting.
3882 2011-08-29 Robert Dewar <dewar@adacore.com>
3884 * makeutl.adb: Minor reformatting.
3886 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3888 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
3889 function call of a limited type, the expansion of the renaming is
3890 complicated by the presence of various temporaries and subtypes that
3891 capture constraints of the renamed object.
3892 Rewrite node as an object declaration, whose expansion is simpler.
3893 Given that the object is limited there is no copy involved and no
3896 2011-08-29 Robert Dewar <dewar@adacore.com>
3898 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
3899 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
3901 2011-08-29 Tristan Gingold <gingold@adacore.com>
3903 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
3904 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
3905 system-linux-hppa.ads, system-linux-s390.ads,
3906 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
3907 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
3908 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
3909 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
3910 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
3911 system-solaris-sparc.ads, system-lynxos-x86.ads,
3912 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
3913 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
3914 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
3915 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
3916 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
3917 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
3918 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
3919 * opt.ads: Adjust comment.
3920 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
3921 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
3922 * system.ads: Move GCC_ZCX_Support to obsolete entries.
3924 2011-08-29 Emmanuel Briot <briot@adacore.com>
3926 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
3927 file name is specified on the gnatmake or gprbuild command line, and
3928 before we search for that file in the project.
3930 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3932 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
3933 used to determine whether a possible interpretation for an overloadable
3934 entity is declared within the current instantiation and should be
3935 included in the candidate set.
3937 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3939 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
3941 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3943 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
3944 access subtype is access_to_subprogram, when applying checks for
3947 2011-08-29 Matthew Heaney <heaney@adacore.com>
3949 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
3950 for sibling when common parent.
3952 2011-08-29 Thomas Quinot <quinot@adacore.com>
3954 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
3957 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3959 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
3960 for the return type when in ASIS mode.
3962 2011-08-29 Vincent Celier <celier@adacore.com>
3964 * make.adb (Gnatmake): Get the default search dirs, then the target
3965 parameters after getting the Builder switches, as the Builder switches
3966 may include --RTS= and that could change the default search dirs.
3968 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3970 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
3971 Make_Final_Call. Move the processing for class-wide types before the
3972 processing for derivations from [Limited_]Controlled.
3973 (Make_Final_Call): Move the processing for class-wide types before the
3974 processing for derivations from [Limited_]Controlled.
3975 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
3976 Add code to account for alignments larger than the list header. Add a
3977 comment illustrating the structure of the allocated object + padding +
3979 (Deallocate_Any_Controlled): Add code to account for alignments larger
3980 than the list header.
3982 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3984 * sinfo.ads, sinfo.adb: New node kind
3985 N_Formal_Incomplete_Type_Definition, related flags.
3986 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
3987 Parse formal incomplete types.
3988 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
3990 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
3991 Formal incomplete types do not need completion.
3992 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
3993 Validate_Incomplete_Type_Instance): New procedures to handle formal
3995 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
3996 that corresponds to a formal incomplete type.
3997 * sprint.adb: Handle formal incomplete type declarations.
3998 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
4001 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4003 * a-fihema.ads, a-fihema.adb: Unit removed.
4004 * a-undesu.ads, a-undesu.adb: New unit implementing
4005 Ada.Unchecked_Deallocate_Subpool.
4006 * einfo.adb: Remove Associated_Collection from the node usage.
4007 Add Finalization_Master to the node usage.
4008 (Associated_Collection): Removed.
4009 (Finalization_Master): New routine.
4010 (Set_Associated_Collection): Removed.
4011 (Set_Finalization_Master): New routine.
4012 (Write_Field23_Name): Remove Associated_Collection from the output. Add
4013 Finalization_Master to the output.
4014 * einfo.ads: Remove attribute Associated_Collection and its uses in
4016 Add new attribute Finalization_Master along with its uses in entitites.
4017 (Associated_Collection): Removed along with its pragma import.
4018 (Finalization_Master): New routine along with a pragma import.
4019 (Set_Associated_Collection): Removed along with its pragma import.
4020 (Set_Finalization_Master): New routine along with a pragma import.
4021 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
4022 Build_Finalization_Collection with Build_Finalization_Master.
4023 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
4024 before the bodies of the predefined routines. Add comment explaining
4025 this. Replace call to Build_Finalization_Collection with
4026 Build_Finalization_Master.
4027 (Freeze_Type): Replace call to Build_Finalization_Collection with
4028 Build_Finalization_Master.
4029 (Make_Finalize_Address_Body): Comment reformatting.
4030 (Make_Predefined_Primitive_Specs): Code reformatting.
4031 (Stream_Operation_OK): Update comment mentioning finalization
4032 collections. Replace RE_Finalization_Collection with
4033 RE_Finalization_Master.
4034 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
4035 Associated_Collection with Finalization_Master. Replace call to
4036 Build_Finalization_Collection with Build_Finalization_Master.
4037 (Expand_Allocator_Expression): Replace call to Associated_Collection
4038 with Finalization_Master. Replace call to Set_Associated_Collection with
4039 Set_Finalization_Master. Remove the generation of
4040 Set_Finalize_Address_Ptr.
4041 (Expand_N_Allocator): Replace call to Associated_Collection with
4042 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
4043 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
4044 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
4045 comment on usage. Replace call to Needs_BIP_Collection with
4046 Needs_BIP_Finalization_Master Remplace BIP_Collection with
4047 BIP_Finalization_Master. Update all comments which mention finalization
4048 collections. Replace Associated_Collection with
4049 Finalization_Master. Replace Build_Finalization_Collection with
4050 Build_Finalization_Master.
4051 (BIP_Formal_Suffix): Update BIP_Collection's case.
4052 (Build_Heap_Allocator): Update the related comment. Rename local
4053 variable Collect to Fin_Mas_Id and update its occurrences. Update
4054 comments which mention finalization collections. Replace
4055 Set_Associated_Collection with Set_Finalization_Master.
4056 (Expand_Call): Update the code which detects a special piece of library
4058 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
4059 Add_Collection_Actual_To_Build_In_Place_Call with
4060 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
4061 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
4062 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
4063 Add_Collection_Actual_To_Build_In_Place_Call with
4064 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4065 (Make_Build_In_Place_Call_In_Assignment): Replace call to
4066 Add_Collection_Actual_To_Build_In_Place_Call with
4067 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4068 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4069 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
4070 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4071 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
4072 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
4073 Replace call to Set_Associated_Collection with Set_Finalization_Master.
4074 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
4075 Replace the call to Associated_Collection with Finalization_Master.
4076 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
4077 Update the way finalization master names are generated. Update the
4078 retrieval of the correct access type which will carry the pool and
4080 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
4081 (Make_Finalize_Address_Body): Abstract types do not need
4082 Finalize_Address. Code reformatting.
4083 (Make_Finalize_Address_Stmts): Update comment on usage.
4084 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4085 (Process_Declarations): Update comments.
4086 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
4087 Build_Finalization_Master. Update associated comment.
4088 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4089 * exp_ch13.adb: Update comments which mention finalization collections.
4090 (Expand_N_Free_Statement): Replace the call to Associated_Collection
4091 with Finalization_Master.
4092 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
4093 create calls to routines Allocate_Any_Controlled and
4094 Deallocate_Any_Controlled.
4095 (Find_Finalize_Address): New routine.
4096 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
4098 (Requires_Cleanup_Actions): Update the comment on freeze node
4100 * exp_util.ads: Remove comment on generated code for
4101 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
4102 is better to simply look in the body.
4103 * freeze.adb (Freeze_All): Update the comment of finalization
4104 collections. Replace the call to Associated_Collection with
4105 Finalization_Master. Replace the call to Build_Finalization_Collection
4106 with Build_Finalization_Master.
4107 * impunit.adb: Add a-undesu and s-stposu to the list of units.
4108 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
4110 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
4111 Ada.Finalization. Add processing for children of System.Storage_Pools.
4112 * rtsfind.ads: Remove the naming of second level children of
4114 Remove Ada_Finalization_Heap_Management from the list of units.
4115 Remove subtype Ada_Finalization_Child.
4116 Remove the following subprogram entities:
4120 RE_Finalization_Collection
4121 RE_Finalization_Collection_Ptr
4122 RE_Set_Finalize_Address_Ptr
4124 Add the naming of second level children of System.Storage_Pools.
4125 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
4127 Add subtype System_Storage_Pools_Child.
4128 Add the following subprogram entities to System.Finalization_Masters:
4130 RE_Finalization_Master
4131 RE_Finalization_Master_Ptr
4133 Add the following subprogram entities to System.Storage_Pools.Subpools:
4135 RE_Allocate_Any_Controlled
4136 RE_Deallocate_Any_Controlled
4137 RE_Root_Storage_Pool_With_Subpools
4141 Move the following subprogram entities from
4142 Ada.Finalization.Heap_Management to System.Finalization_Masters:
4144 RE_Add_Offset_To_Address
4149 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
4150 Set_Associated_Collection with Set_Finalization_Master.
4151 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
4152 BIP_Finalization_Master is created.
4153 * s-finmas.adb: New unit System.Finalization_Masters.
4154 * s-finmas.ads: New unit System.Finalization_Masters.
4155 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
4156 * s-stposu.ads, s-stposu.adb: New unit implementing
4157 System.Storage_Pools.Subpools.
4159 2011-08-29 Bob Duff <duff@adacore.com>
4161 * tbuild.adb: Add assertion.
4163 2011-08-29 Thomas Quinot <quinot@adacore.com>
4165 * s-pooglo.adb: Minor reformatting.
4167 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4169 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
4170 an indexed component of a packed array whose element type is a record
4171 with a representation clause different from that of the right-hand
4172 side, generate a temporary to minimuze the number of bit-field
4173 operations generated.
4175 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4177 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
4178 declarations, and thus are likely insertion points for actions.
4180 2011-08-29 Bob Duff <duff@adacore.com>
4182 * einfo.ads: Minor comment fix.
4184 2011-08-29 Robert Dewar <dewar@adacore.com>
4186 * frontend.adb, gnat1drv.adb: Minor reformatting.
4188 2011-08-29 Tristan Gingold <gingold@adacore.com>
4190 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
4191 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
4192 space in front of the header.
4194 2011-08-29 Johannes Kanig <kanig@adacore.com>
4196 * frontend.adb (Frontend): Exit after creating Standard package when
4197 -gnatd.H is present.
4198 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
4201 2011-08-29 Robert Dewar <dewar@adacore.com>
4203 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
4204 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
4205 snames.ads-tmpl: Minor reformatting.
4207 2011-08-29 Philippe Gil <gil@adacore.com>
4209 * prj.adb (Reset_Units_In_Table): New procedure.
4210 Reset units to avoid access to freed memory.
4212 2011-08-29 Thomas Quinot <quinot@adacore.com>
4214 * get_scos.adb: When reading a P statement SCO without a pragma name
4215 (from an older ALI file), ensure that the Pragma_Name component is set
4216 to Unknown_Pragma (not left uninitialized).
4218 2011-08-29 Vincent Celier <celier@adacore.com>
4220 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
4221 modified to compute correctly the object path of a SAL project that is
4222 extending another library project.
4223 (Write_Path_File): New procedure.
4224 * makeutl.ads (Directories): New table moved from Buildgpr
4225 (Get_Directories): New procedure moved from Buildgpr
4226 (Write_Path_File): New procedure
4227 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
4228 paths before binding SALs, instead of Set_Ada_Paths.
4229 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
4231 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
4232 (Current_Source_Path_File_Of): New function
4233 (Set_Current_Object_Path_File_Of): New procedure
4234 (Current_Source_Object_File_Of): New function
4235 (Set_Current_Object_Path_File_Of): New procedure
4236 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
4237 (Current_Source_Path_File_Of): New function
4238 (Set_Current_Object_Path_File_Of): New procedure
4239 (Current_Source_Object_File_Of): New function
4240 (Set_Current_Object_Path_File_Of): New procedure
4242 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4244 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
4245 packed entity, use a bit-field assignment only if there is no change of
4248 2011-08-29 Thomas Quinot <quinot@adacore.com>
4250 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
4251 Is_RTU instead of using Chars comparisons.
4253 2011-08-29 Thomas Quinot <quinot@adacore.com>
4255 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
4256 temporary object if the actual is constrained, and the discriminants
4257 read from the stream don't match.
4259 2011-08-29 Tristan Gingold <gingold@adacore.com>
4261 * sem_attr.adb, exp_attr.adb: Add handling of
4262 Attribute_System_Allocator_Alignment
4263 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
4264 Attribute_System_Allocator_Alignment.
4265 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
4266 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
4267 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
4268 get_target_system_allocator_alignment.
4270 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4272 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
4275 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4277 * exp_ch3.adb (In_Runtime): Fix typo.
4279 2011-08-29 Bob Duff <duff@adacore.com>
4281 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
4283 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4285 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
4286 and a separate tag assignment is generated, ensure that the tag
4287 assignment is analyzed.
4289 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4291 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
4292 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
4293 of statement lists that may contain local declarations.
4294 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
4295 duplicate the triggering statements needed for the expansion of this
4296 construct, when the trigger is a dispatching call to a synchronized
4299 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4301 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
4302 * bindgen.adb: Add comments.
4303 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
4306 2011-08-29 Robert Dewar <dewar@adacore.com>
4308 * exp_attr.adb: Minor reformatting.
4309 Minor code reorganization and commenting.
4310 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
4313 2011-08-29 Thomas Quinot <quinot@adacore.com>
4315 * get_scos.adb: Ignore chaining indicators not currently supported
4318 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4320 * system.ads: Minor editing.
4322 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4324 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
4326 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
4327 Attribute_Elab_Subp_Body.
4328 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
4329 * sem_util.adb: Update comments.
4331 2011-08-29 Thomas Quinot <quinot@adacore.com>
4333 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
4334 pragma name for each SCO statement corresponding to a pragma.
4336 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4338 * opt.ads: Minor editing.
4340 2011-08-29 Yannick Moy <moy@adacore.com>
4342 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
4343 that only made sense for CodePeer mode.
4345 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4347 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
4348 which is no longer used.
4349 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
4350 handling of the 64-bit division check.
4351 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
4353 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
4356 2011-08-29 Thomas Quinot <quinot@adacore.com>
4358 * get_scos.adb: Minor reformatting.
4360 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4362 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
4363 statement list is wrapped in a block, the block is explicitly analyzed
4364 in order to properly redecorate the entities and create a servicing
4367 2011-08-29 Tristan Gingold <gingold@adacore.com>
4369 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
4370 (Set_Zero_Cost_Handling): Remove.
4372 2011-08-29 Thomas Quinot <quinot@adacore.com>
4374 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
4376 2011-08-29 Geert Bosch <bosch@adacore.com>
4378 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
4379 instruction, as the latter may produce -0.0, which is not a valid VAX
4381 (Neg_G): Likewise for VAX F float.
4383 2011-08-29 Robert Dewar <dewar@adacore.com>
4385 * exp_util.adb: Minor reformatting.
4387 2011-08-29 Yannick Moy <moy@adacore.com>
4389 * sem_ch3.adb: Minor comment update.
4391 2011-08-29 Thomas Quinot <quinot@adacore.com>
4393 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
4396 2011-08-29 Thomas Quinot <quinot@adacore.com>
4398 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
4399 current statement sequence on a generic instantiation or a subprogram
4402 2011-08-29 Robert Dewar <dewar@adacore.com>
4404 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
4407 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4409 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4410 Correct the check which involves the freeze node of a controlled or
4411 access-to-controlled type.
4413 2011-08-29 Geert Bosch <bosch@adacore.com>
4415 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
4417 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
4420 2011-08-29 Yannick Moy <moy@adacore.com>
4422 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
4423 for every index type and component type that is not a subtype_mark.
4424 (Process_Subtype): Set Etype of subtype.
4426 2011-08-29 Robert Dewar <dewar@adacore.com>
4428 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
4429 reorganization. Minor reformatting.
4431 2011-08-29 Steve Baird <baird@adacore.com>
4433 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
4434 for CodePeer and ALFA modes.
4436 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4438 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
4439 that comes from an enclosing scope if it is not the renaming of an
4440 actual, to handle properly a spurious ambiguity in an instance.
4442 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4444 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
4445 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
4446 use it instead of the Esize of the first parameter.
4447 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
4449 <Size>: Likewise. Call it for composite types on the RM size.
4451 2011-08-29 Yannick Moy <moy@adacore.com>
4453 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
4454 * sem_util.adb (Unique_Name): Correct behaviour for names of
4457 2011-08-29 Yannick Moy <moy@adacore.com>
4459 * sem_prag.adb (Check_Precondition_Postcondition): In formal
4460 verification mode, analyze pragma expression for correctness, for
4461 pre/post on library-level subprogram, as it is not expanded later.
4463 2011-08-29 Yannick Moy <moy@adacore.com>
4465 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
4466 in formal verification.
4468 2011-08-29 Thomas Quinot <quinot@adacore.com>
4470 * sem_util.adb: Minor reformatting.
4471 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
4473 * par_sco.ads, par_sco.adb: Update comments.
4475 2011-08-29 Yannick Moy <moy@adacore.com>
4477 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
4478 associated getter/setter.
4479 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
4481 2011-08-29 Vincent Celier <celier@adacore.com>
4483 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
4484 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
4485 with declarations for Language_Kind and Dependency_Kind for Ada.
4486 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
4487 (Process_Compiler): Take into account the new attributes Dependency_Kind
4489 (Check_Configuration): Check if language kind is unit based, not if the
4490 language name is Ada.
4491 (Process_Exceptions_Unit_Based): Ditto
4492 (Add_Language): Remove default additions of language and dependency kind
4493 * prj.ads: Minor comment change
4494 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
4496 2011-08-29 Johannes Kanig <kanig@adacore.com>
4498 * debug.adb: Update comments.
4500 2011-08-24 Joseph Myers <joseph@codesourcery.com>
4502 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
4503 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
4504 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
4505 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
4506 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
4508 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4510 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
4511 (GNATLIBCFLAGS_FOR_C): Replace
4512 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
4513 (gnatlib-shared-default, gnatlib-shared-dual-win32)
4514 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
4515 (gnatlib-sjlj, gnatlib-zcx): Likewise.
4517 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
4519 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
4521 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
4523 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
4525 2011-08-05 Nicolas Roche <roche@adacore.com>
4527 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
4528 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
4530 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
4532 2011-08-05 Matthew Heaney <heaney@adacore.com>
4534 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
4535 subprogram bodies declared out-of-order.
4537 2011-08-05 Yannick Moy <moy@adacore.com>
4539 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
4540 entities directly in package Standard, otherwise skip the standard
4543 2011-08-05 Robert Dewar <dewar@adacore.com>
4545 * a-cbmutr.adb: Minor reformatting
4546 (Allocate_Node): refactor node allocation algorithm
4548 2011-08-05 Robert Dewar <dewar@adacore.com>
4550 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
4551 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
4553 (Analyze_Pragma, case Check_Policy): Ditto.
4554 * sem_prag.ads (Check_Disabled): New function
4555 * snames.ads-tmpl: Add Name_Disable.
4557 2011-08-05 Robert Dewar <dewar@adacore.com>
4559 * gnat_rm.texi: Document implementation-defined policy DISABLE for
4560 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
4562 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4564 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
4565 that appears in a generic formal part and applies to a formal
4568 2011-08-05 Robert Dewar <dewar@adacore.com>
4570 * a-cbmutr.ads: Minor reformatting.
4572 2011-08-05 Matthew Heaney <heaney@adacore.com>
4574 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
4575 to check count, check sign of value instead.
4576 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
4577 (Copy_Subtree): allocate copy of source element
4578 (Equal_Subtree): compare elements, not access objects
4580 2011-08-05 Vincent Celier <celier@adacore.com>
4582 * gnat_ugn.texi: Fix VMS alternative.
4584 2011-08-05 Thomas Quinot <quinot@adacore.com>
4586 * sem_ch11.adb: Add comment.
4588 2011-08-05 Robert Dewar <dewar@adacore.com>
4590 * exp_util.adb: Minor comment fix.
4592 2011-08-05 Robert Dewar <dewar@adacore.com>
4594 * scng.adb (Error_Unterminated_String): Improve flag position when
4597 2011-08-05 Matthew Heaney <heaney@adacore.com>
4599 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
4601 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
4602 multiway tree containers.
4604 2011-08-05 Robert Dewar <dewar@adacore.com>
4606 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
4607 * stylesw.adb: Implement -gnatyC to control comment spacing
4608 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
4610 * usage.adb: Add line for -gnatyC.
4612 2011-08-05 Robert Dewar <dewar@adacore.com>
4614 * gnat_ugn.texi: Document -gnatyC.
4615 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
4616 synonym for COMMENTS2).
4618 2011-08-05 Robert Dewar <dewar@adacore.com>
4620 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
4621 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
4622 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
4623 a-comutr.ads, lib-xref.adb: Minor reformatting.
4625 2011-08-05 Robert Dewar <dewar@adacore.com>
4627 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
4628 warning if there is an exception handler present.
4630 2011-08-05 Pascal Obry <obry@adacore.com>
4632 * a-iteint.ads: Fix copyright year.
4634 2011-08-05 Thomas Quinot <quinot@adacore.com>
4636 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
4637 statement SCO for a USE clause or a representation clause.
4639 2011-08-05 Yannick Moy <moy@adacore.com>
4641 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
4642 between body and spec for stub.
4643 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
4644 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
4645 pragma precondition or postcondition, for which the enclosing
4646 subprogram or package in the AST is not the desired one, return empty.
4648 2011-08-05 Thomas Quinot <quinot@adacore.com>
4650 * g-expect.adb: Minor reformatting.
4652 2011-08-05 Bob Duff <duff@adacore.com>
4654 * a-fihema.adb: Comment out OS_Lib.
4656 2011-08-05 Matthew Heaney <heaney@adacore.com>
4658 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
4659 (unbounded multiway tree containers) and a-iteint.ads.
4660 * a-comutr.ads, a-comutr.adb:
4661 This is the new Ada 2012 unit for unbounded multiway tree containers
4662 * a-cimutr.ads, a-cimutr.adb
4663 This is the new Ada 2012 unit for indefinite multiway tree containers
4664 * a-iteint.ads: New file.
4666 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4668 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
4670 2011-08-05 Bob Duff <duff@adacore.com>
4672 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
4674 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
4676 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4678 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
4679 general indexing aspects of Ada2012. Called when analyzing indexed
4680 components when other interpretations fail.
4681 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
4682 in an expression context where overloading is meaningful. This excludes
4683 the occurrence in an aspect specification (efficiency only).
4684 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
4685 related to iterators can be set by an attribute specification, but
4687 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
4688 Constant_Indexing and Variable_Indexing.
4689 (Check_Indexing_Functions): New procedure to perform legality checks.
4690 Additional semantic checks at end of declarations.
4692 2011-08-05 Sergey Rybin <rybin@adacore.com>
4694 * tree_io.ads: Update ASIS_Version_Number because of the change of the
4695 order of calling Tree_Write/Tree_Read routines made for aspects.
4697 2011-08-05 Bob Duff <duff@adacore.com>
4699 * a-fihema.adb (Finalize): Fix race condition.
4701 2011-08-05 Yannick Moy <moy@adacore.com>
4703 * sem_ch12.adb (Analyze_Package_Instantiation,
4704 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
4707 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4709 * sem_type.adb (Specific_Type): in an instance, the type-specific
4710 operand of an equality check that involves null may have a private
4711 type. Use full view to determine legality of construct.
4713 2011-08-05 Vincent Celier <celier@adacore.com>
4715 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
4716 delete or close the file when the call to gnatmake was successful.
4718 2011-08-05 Yannick Moy <moy@adacore.com>
4720 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
4721 Global_Discard_Names.
4723 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4725 * sinfo.ads: comments on use of entity field for aspect specifications.
4727 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4729 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
4730 node is not itself an entity but a selected component, it is a
4731 rewritten parameterless call to an en enclosing synchronized operation,
4732 and this expansion will be performed again in the instance, so there is
4733 no global information to preserve.
4735 2011-08-05 Javier Miranda <miranda@adacore.com>
4737 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
4738 for renamings of predefined primitives.
4739 (In_Predef_Prims_DT): New subprogram.
4741 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4743 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
4744 possible interpretation of name is a reference type, add an
4745 interpretation that is the designated type of the reference
4746 discriminant of that type.
4747 * sem_res.adb (resolve): If the interpretation imposed by context is an
4748 implicit dereference, rewrite the node as the deference of the
4749 reference discriminant.
4750 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
4751 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
4752 parent type or base type.
4753 * sem_ch4.adb (Process_Indexed_Component,
4754 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
4755 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
4756 Check for implicit dereference.
4757 (List_Operand_Interps): Indicate when an implicit dereference is
4759 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
4761 2011-08-05 Thomas Quinot <quinot@adacore.com>
4763 * scos.ads: Update documentation of SCO table. Pragma statements can now
4764 be marked as disabled (using 'p' instead of 'P' as the statement kind).
4765 * par_sco.ads, par_sco.adb: Implement the above change.
4766 (Process_Decisions_Defer): Generate a P decision for the first parameter
4767 of a dyadic pragma Debug.
4768 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
4770 * put_scos.adb: Code simplification based on above change.
4772 2011-08-05 Robert Dewar <dewar@adacore.com>
4774 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
4775 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
4776 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
4777 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
4779 2011-08-05 Bob Duff <duff@adacore.com>
4781 * a-stunau.ads, g-spipat.adb: Update comments.
4783 2011-08-05 Bob Duff <duff@adacore.com>
4785 * a-fihema.ads: Minor comment fix.
4786 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
4788 (Attach, Detach): Remove some unnecessary code.
4789 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
4791 2011-08-05 Bob Duff <duff@adacore.com>
4793 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
4794 allocation for Objects component. This simplifies the code somewhat. It
4795 is also a little more efficient in the not-so-unusual case where there
4796 are no controlled objects allocated.
4797 Make Finalization_Started flag atomic.
4798 (Finalize): Avoid unnecessary detachment of items from the list.
4799 (pcol): Minor cleanup.
4801 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4803 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
4804 package whose name is the same as that of the generic unit, or its
4807 2011-08-05 Bob Duff <duff@adacore.com>
4809 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
4810 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
4811 Minor comment fixes.
4813 2011-08-05 Arnaud Charlet <charlet@adacore.com>
4815 * make.adb (Linking_Phase): No longer need to set source search path
4816 before calling gnatlink in CodePeer mode.
4817 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
4818 gcc in CodePeer mode, since the binder generated file no longer has a
4820 * switch.ads, switch.adb (Is_Language_Switch): Removed.
4821 * switch-c.adb: Update comment.
4823 2011-08-05 Thomas Quinot <quinot@adacore.com>
4825 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
4827 2011-08-05 Nicolas Roche <roche@adacore.com>
4829 * gnat_ugn.texi: Fix minor syntax error issue.
4831 2011-08-05 Vincent Celier <celier@adacore.com>
4833 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
4834 delete or close the file when the call to gnatmake returns a non
4835 successful return code.
4837 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4839 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
4840 check, indicate that the copy of the original node does not come from
4841 source, to prevent an infinite recursion of the expansion.
4843 2011-08-05 Johannes Kanig <kanig@adacore.com>
4845 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
4846 VC generation for subprogram bodies.
4848 2011-08-05 Yannick Moy <moy@adacore.com>
4851 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
4852 the base type with the smallest allowed base type.
4854 2011-08-05 Sergey Rybin <rybin@adacore.com>
4856 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
4859 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4861 * sem_ch12.ads: minor comment updates.
4863 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4865 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
4866 instantiation and a formal package the compiler generates a package
4867 renaming declaration so that the generic name within the declaration
4868 is interpreted as a renaming of the instance. At the end of a formal
4869 package declaration, this renaming must become invisible.
4871 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4873 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
4874 comparison and rely on concrete entities instead.
4876 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4878 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
4879 and discriminants, to indicate that the type has an access discriminant
4880 that supports implicit dereference.
4881 * snames.ads-tmpl: Add names of aspects and attributes related to
4882 Ada2012 iterators: constant_indexing, default_iterator,
4883 iterator_element, implicit_dereference, variable_indexing.
4884 * aspects.ads, aspects.adb: entries for iterator-related aspects.
4885 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
4886 iterator-related aspects.
4887 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
4889 2011-08-05 Sergey Rybin <rybin@adacore.com>
4891 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
4892 metrics in gnatmetric to cover new kinds of coupling mentrics.
4894 2011-08-05 Steve Baird <baird@adacore.com>
4896 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
4897 of calling the user-defined main subprogram.
4898 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
4899 is set) Call_Main_Subprogram ahead of, as opposed to
4901 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
4902 generation of a "with" of the user-defined main subprogram.
4903 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
4904 (which is now called from Gen_Main instead).
4906 2011-08-05 Emmanuel Briot <briot@adacore.com>
4908 * projects.texi: Added reference to the Makefile package.
4910 2011-08-05 Thomas Quinot <quinot@adacore.com>
4912 * exp_ch7.adb: Minor comment rewording.
4914 2011-08-05 Ed Falis <falis@adacore.com>
4916 * env.c: Fix comment.
4918 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4920 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
4921 character comparison and rely on concrete entities instead.
4923 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4925 * sem_ch3.adb: (Check_Private_Overriding): better error message,
4926 suggested by AI95-0068.
4928 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4930 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
4931 the two potential initialization calls. This accounts for any
4932 access-before-elaboration checks which may precede the initialization
4934 (Next_Suitable_Statement): New routine. Returns the next real statement
4935 after the input node while skipping generated checks.
4936 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
4937 with comment on usage.
4938 Do not generate Elaborate_All when the trigger is a finalization call
4939 coming from a type init proc.
4940 (Check_Elab_Call): Propagate the initialization procedure context to
4941 subsequent calls to Check_A_Call.
4942 (Check_Internal_Call_Continue): Propagate the initialization procedure
4943 context to subsequent calls to Check_Elab_Call.
4944 (Is_Finalization_Procedure): New routine. Returns True if the input
4945 entity denotes a [Deep_]Finalize routine.
4946 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
4947 along with comment on usage.
4949 2011-08-05 Vadim Godunko <godunko@adacore.com>
4951 * s-atocou.ads: Add list of supported platforms.
4953 2011-08-05 Yannick Moy <moy@adacore.com>
4955 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
4957 * opt.ads (Disable_ALI_File): new Boolean flag
4958 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
4960 2011-08-05 Ed Falis <falis@adacore.com>
4962 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
4963 environ is properly defined.
4965 2011-08-05 Vincent Celier <celier@adacore.com>
4967 * make.adb (Compilation_Phase): Exit immediately when all objects have
4968 been found up to date, to avoid multiple exit messages.
4969 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
4970 same project for languages with no compiler.
4971 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
4973 2011-08-05 Robert Dewar <dewar@adacore.com>
4975 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
4976 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
4977 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
4978 s-atocou-builtin.adb: Minor reformatting.
4980 2011-08-05 Yannick Moy <moy@adacore.com>
4982 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
4983 if the node to wrap is a pragma check, this node and enclosed
4984 expression are not expanded, so do not apply any transformations here.
4985 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
4986 introducing transient scopes.
4988 2011-08-05 Jose Ruiz <ruiz@adacore.com>
4990 * adaint.c (__gnat_set_writable, __gnat_set_readable,
4991 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
4992 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
4993 routine is available, so we use the default implementation of these
4995 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
4996 support for copying attributes on VxWorks 6.
4998 2011-08-05 Yannick Moy <moy@adacore.com>
5000 * debug.adb: Remove use of -gnatd.D.
5001 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
5002 * opt.ads: Simplify variables for ALFA mode, to keep one only
5003 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
5006 2011-08-05 Vincent Celier <celier@adacore.com>
5008 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
5009 Builder'Default_Switches.
5011 2011-08-05 Vincent Celier <celier@adacore.com>
5013 * makeusg.adb: Add lines for --create-map-file switches.
5015 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5017 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
5018 profile is incomplete and the full view is available, replace it with
5020 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
5021 incomplete, freezing the subprogram is delayed until the full view is
5023 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
5024 fixed-point multiplication operator and the predefined operator is
5025 resolved in favor of the user-defined one.
5027 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5029 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
5032 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5034 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
5035 whether a type lacks user-defined Read or Write operations, or has a
5036 component that lacks them.
5037 * sem_attr.adb (Check_Stream_Attribute): if restriction
5038 No_Default_Stream_Attributes is active, verify that all subcomponent
5039 types of the target have user-defined stream operations, and report
5041 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
5042 * exp_strm.adb: Build_Elementary_Input_Call,
5043 Build_Elementary_Write_Call): remove checks for restriction
5044 No_Default_Stream_Attributes, now checked in semantics.
5046 2011-08-04 Vincent Celier <celier@adacore.com>
5048 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
5049 switches on the command line, look for all valid --RTS switches in the
5050 Builder switches and for each language use the first runtime name found
5051 to invoke gprconfig.
5052 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
5053 command line and there is no auto-configuration.
5054 (Runtime_Name_Set_For): New function.
5056 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5058 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
5059 elaborate initialization expression for variable Abort when processing
5060 a package body or a declaration.
5061 (Create_Finalizer): Propagate the package context when creating the
5062 exception-related variables.
5063 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
5064 For_Package along with usage comment.
5066 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5068 * gcc-interface/Makefile.in: Clean up targets.
5069 Enable new package for atomic counters and copy-on-write implementation
5070 of unbounded strings on x86 platforms.
5071 * gcc-interface/Make-lang.in: Update dependencies.
5073 2011-08-04 Robert Dewar <dewar@adacore.com>
5075 * exp_ch7.adb: Minor reformatting.
5077 2011-08-04 Robert Dewar <dewar@adacore.com>
5079 * exp_strm.adb: Minor reformatting.
5081 2011-08-04 Vadim Godunko <godunko@adacore.com>
5083 * s-atocou.adb: Replace by dummy version and use on targets where atomic
5084 operations are not supported.
5085 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
5086 * s-atocou-x86.adb: New file.
5087 * Makefile.rtl: Add s-atocou.o file
5089 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5091 * make.adb (Compile): Move setting of CodePeer_Mode to ...
5092 (Compilation_Phase): ... here.
5093 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
5095 2011-08-04 Thomas Quinot <quinot@adacore.com>
5097 * Make-generated.in: Fix minor typo in comment.
5099 2011-08-04 Thomas Quinot <quinot@adacore.com>
5101 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
5104 2011-08-04 Robert Dewar <dewar@adacore.com>
5106 * a-coinho.adb: Minor reformatting.
5108 2011-08-04 Robert Dewar <dewar@adacore.com>
5110 * a-coinho.ads: Minor reformatting.
5112 2011-08-04 Vadim Godunko <godunko@adacore.com>
5114 * s-atocou.ads, s-atocou.adb: New files.
5115 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
5116 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
5117 direct use of GCC's atomic builtins and replace them by use of new
5118 atomic counter package.
5120 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5122 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
5124 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5126 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
5127 with a call to Get_External_Tag.
5128 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
5129 subprogram usage. Remove the guard against package declarations and
5130 bodies since Build_Cleanup_Statements is no longer invoked in that
5132 (Build_Components): Initialize Tagged_Type_Stmts when the context
5133 contains at least one library-level tagged type.
5134 (Build_Finalizer): New local variables Has_Tagged_Types and
5135 Tagged_Type_Stmts along with associated comments on usage. Update the
5136 logic to include tagged type processing.
5137 (Create_Finalizer): Insert all library-level tagged type unregistration
5138 code before the jump block circuitry.
5139 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
5140 (Expand_N_Package_Declaration): Remove the call to
5141 Build_Cleanup_Statements.
5142 (Process_Tagged_Type_Declaration): New routine. Generate a call to
5143 unregister the external tag of a tagged type.
5144 (Processing_Actions): Reimplemented to handle tagged types.
5145 (Process_Declarations): Detect the declaration of a library-level
5146 tagged type and carry out the appropriate actions.
5147 (Unregister_Tagged_Types): Removed. The machinery has been directly
5148 merged with Build_Finalizer.
5150 2011-08-04 Robert Dewar <dewar@adacore.com>
5152 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
5153 gnatls.adb, exp_ch3.adb: Minor reformatting.
5155 2011-08-04 Marc Sango <sango@adacore.com>
5157 * sem_attr.adb (Analyze_Attribute): Replace the message
5158 "invisible attribute of}" of the spark restriction violation in
5159 attribute reference by the simple message "invisible attribute of type".
5160 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
5161 two insertion characters: '&' and '}'.
5163 2011-08-04 Vadim Godunko <godunko@adacore.com>
5165 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
5166 * a-coinho.ads, a-coinho.adb: New file.
5167 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
5169 2011-08-04 Nicolas Roche <roche@adacore.com>
5171 * alfa_test.adb: Not all ali files are containing alfa information even
5172 if compiled with -gnatd.F. So suppress warning about missing ALFA
5175 2011-08-04 Yannick Moy <moy@adacore.com>
5177 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
5179 * put_alfa.adb: Check that scope name is not empty.
5181 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5183 * exp_ch3.adb (Stream_Operation_Ok): new predicate
5184 Needs_Elementary_Stream_Operation, to determine whether user-defined
5185 Read and Write attributes are available for the elementary components
5186 of the given type. If only the predefined attributes are available,
5187 then when restriction No_Default_Stream_Attributes is active the
5188 predefined stream attributes for the composite type cannot be created.
5190 2011-08-04 Robert Dewar <dewar@adacore.com>
5192 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
5193 Put routines in alpha order
5195 2011-08-04 Jose Ruiz <ruiz@adacore.com>
5197 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
5198 * gcc-interface/Make-lang.in: Update dependencies.
5200 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5202 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
5203 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
5206 2011-08-04 Robert Dewar <dewar@adacore.com>
5208 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
5209 lib-xref-alfa.adb: Minor reformatting.
5211 2011-08-04 Marc Sango <sango@adacore.com>
5213 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
5214 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
5215 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
5218 2011-08-04 Tristan Gingold <gingold@adacore.com>
5220 * bindgen.adb (Gen_Adainit_C): Remove.
5221 (Gen_Adafinal_C): Ditto.
5222 (Gen_Elab_Externals_C): Ditto.
5223 (Gen_Elab_Calls_C): Ditto.
5224 (Gen_Elab_Order_C): Ditto.
5225 (Gen_Elab_Defs_C): Ditto.
5226 (Gen_Finalize_Library_C): Ditto.
5227 (Gen_Finalize_Library_Defs_C): Ditto.
5228 (Gen_Main_C): Ditto.
5229 (Gen_Output_File_C): Ditto.
5230 (Gen_Restrictions_C): Ditto.
5231 (Gen_Versions_C): Ditto.
5232 (Write_Info_Ada_C): Ditto.
5233 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
5234 (Gen_Output_File): Do not force Ada_Bind_File anymore.
5235 Always call Gen_Output_File_Ada.
5236 * gnatlink.adb (Begin_Info): Now a constant.
5238 (Ada_Bind_File): Remove
5239 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
5240 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
5241 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
5242 * opt.ads (Ada_Bind_File): Remove.
5244 2011-08-04 Thomas Quinot <quinot@adacore.com>
5246 * projects.texi: Document target-specific directory in default project
5249 2011-08-04 Thomas Quinot <quinot@adacore.com>
5251 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
5254 2011-08-04 Yannick Moy <moy@adacore.com>
5256 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
5257 opt.ads, lib-xref.ads: Code clean up.
5259 2011-08-04 Yannick Moy <moy@adacore.com>
5261 * gnat_rm.texi: Update description of Test_Case
5262 * gnat_ugn.texi: Typo.
5264 2011-08-04 Ed Falis <falis@adacore.com>
5266 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
5268 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5270 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
5271 it is of type Root_Controlled. This action eliminates fields Prev and
5272 Next from type equality.
5274 2011-08-04 Yannick Moy <moy@adacore.com>
5276 * lib-xref-alfa.adb: Correct typo.
5278 2011-08-04 Matthew Heaney <heaney@adacore.com>
5280 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
5283 2011-08-04 Yannick Moy <moy@adacore.com>
5285 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
5286 (Analyze_Pragma): allow static string expression for name of Test_Case,
5287 instead of simply string literals.
5288 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
5291 2011-08-04 Vincent Celier <celier@adacore.com>
5293 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
5294 case suffixes to find truncated main sources.
5296 2011-08-04 Tristan Gingold <gingold@adacore.com>
5298 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
5299 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
5300 (Compute_Current_Task): Ditto.
5302 2011-08-04 Tristan Gingold <gingold@adacore.com>
5304 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
5306 2011-08-04 Yannick Moy <moy@adacore.com>
5308 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
5309 library-level constant.
5310 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
5311 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
5312 used as selector of parameter association, in ALFA mode.
5314 2011-08-04 Robert Dewar <dewar@adacore.com>
5316 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
5317 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
5320 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5322 * make.adb (Linking_Phase): Set source search path before calling
5323 gnatlink in CodePeer mode.
5325 2011-08-04 Javier Miranda <miranda@adacore.com>
5327 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
5328 Remove code which takes care of building TSDs.
5329 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
5330 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
5331 the accessibility check in VM targets.
5332 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
5333 (Building_Static_DT): Now returns false for VM targets.
5334 (Build_VM_TSDs): Removed.
5335 (Expand_Interface_Conversion): Generate missing runtime check for
5336 conversions to interface types whose target type is unknown at compile
5338 (Make_VM_TSD): Add missing code to disable the generation of calls to
5339 Check_TSD if the tagged type is not defined at library level, or not
5340 has a representation clause specifying its external tag, or -gnatdQ is
5342 * exp_disp.ads (Build_VM_TSDs): Removed.
5343 (Make_VM_TSDs): Spec relocated from exp_disp.adb
5344 * sem_disp.adb (Check_Dispatching_Operation): No code required to
5345 register primitives in the dispatch tables in VM targets.
5346 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
5347 initialization of class-wide interface objects in VM targets.
5348 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
5351 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5353 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
5354 when dotnet-ld cannot be found.
5356 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5358 * bindgen.adb: Simplify significantly generation of binder body file in
5360 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
5361 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
5364 2011-08-04 Yannick Moy <moy@adacore.com>
5366 * sem_prag.adb, sem.ads: Code cleanup.
5368 2011-08-04 Tristan Gingold <gingold@adacore.com>
5370 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
5371 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
5372 results if possible.
5373 * s-stusta.adb (Print): Adjust after changes in s-stausa.
5374 * gnat_ugn.texi: Update dynamic stack usage section.
5376 2011-08-04 Steve Baird <baird@adacore.com>
5378 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
5379 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
5380 contains only a call to the user-defined main subprogram.
5381 (Gen_Main_Ada) - If CodePeer_Mode is set, then
5382 call the "wrapper" subprogram instead of directly
5383 calling the user-defined main subprogram.
5385 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5387 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
5388 alternatives of a case statement for controlled objects. Rename local
5389 variable A to Dead_Alt.
5390 (Expand_N_If_Statement): Check the then and else statements of an if
5391 statement for controlled objects. Check the then statements of all
5392 elsif parts of an if statement for controlled objects.
5393 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
5395 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
5396 detects a loop associated with the expansion of an array object.
5397 Augment the processing of the loop statements to account for a possible
5398 wrap done by Process_Statements_For_Controlled_Objects.
5399 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
5400 statements and abortable part of an asynchronous select for controlled
5402 (Expand_N_Conditional_Entry_Call): Check the else statements of a
5403 conditional entry call for controlled objects.
5404 (Expand_N_Selective_Accept): Check the alternatives of a selective
5405 accept for controlled objects.
5406 (Expand_N_Timed_Entry_Call): Check the entry call and delay
5407 alternatives of a timed entry call for controlled objects.
5408 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
5409 exception handler for controlled objects.
5410 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5411 Add formal parameter Nested_Constructs along with its associated
5413 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
5414 Requires_Cleanup_Actions.
5415 (Process_Statements_For_Controlled_Objects): New routine.
5416 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
5417 routine. Inspect a node which contains a non-handled sequence of
5418 statements for controlled objects. If such an object is found, the
5419 statements are wrapped in a block.
5421 2011-08-04 Bob Duff <duff@adacore.com>
5423 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
5424 need to compare with Class_Wide_Type (T2), in order to get at the
5425 original class-wide type node.
5426 * sem_type.ads (Covers): Improve the comment.
5427 * einfo.ads (Class_Wide_Type): Improve the comment.
5428 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
5429 the type of the Deref.
5431 2011-08-04 Yannick Moy <moy@adacore.com>
5433 * gnat_rm.texi: Document that Test_Case pragma can only appear on
5434 separate declarations.
5435 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
5436 check identifier of pragma argument.
5437 (Chain_TC): check that no other test case associated to the same entity
5438 share the same name.
5439 (Check_Test_Case): disallow test case inside subprogram body
5440 (Analyze_Pragma): correct call to check identifier and not argument
5441 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
5442 function gets name from test case pragma.
5444 2011-08-04 Yannick Moy <moy@adacore.com>
5446 * gnat_rm.texi: Document new pragma and aspect.
5447 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
5448 (No_Duplicates_Allowed): new constant array defining whether duplicates
5449 aspects of each kind can appear on the same declaration.
5450 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
5451 field, which points to a node holding the previous Spec_PPC_List.
5452 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
5453 through the indirection with Contract.
5454 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
5455 * par-prag.adb (Prag): do nothing on Test_Case pragma
5456 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
5458 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
5459 component Ensures of Test_Case.
5460 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
5461 (Analyze_Generic_Subprogram_Declaration,
5462 Analyze_Subprogram_Instantiation,
5463 Analyze_Abstract_Subprogram_Declaration,
5464 Analyze_Subprogram_Body_Helper,
5465 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
5466 insert contract in subprogram node at point of definition
5468 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
5469 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
5470 corresponding pragma
5471 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
5472 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
5473 similar to the analysis of pre/post
5474 (Derive_Subprogram): insert contract in subprogram node at point of
5476 * sem_prag.adb, sem_prag.ads
5477 (Check_Arg_Is_String_Literal, Check_Identifier):
5478 new checking procedures to be called in treatment of pragmas
5479 (Check_Test_Case): new procedure to check that a Test_Case aspect or
5480 pragma is well-formed. This does not check currently that 'Result is
5481 used only in the Ensures component of a Test_Case.
5482 (Analyze_Pragma): add case for Test_Case
5483 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
5484 components of a Test_Case.
5485 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
5486 expressions in the 3rd (and 4th if present) arguments of a Test_Case
5487 pragma, treated as spec expressions.
5488 (Sig_Flags): add value -1 for Test_Case.
5489 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
5490 Get_Requires_From_Test_Case_Pragma): getters for both expression
5491 components of a Test_Case.
5492 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
5493 indirection between an entry or [generic] subprogram entity and its
5494 pre/post + test-cases.
5495 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
5496 get/set for fields of an N_Contract node.
5497 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
5498 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
5499 names and pragma for Test_Case.
5500 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
5502 2011-08-04 Vincent Celier <celier@adacore.com>
5504 * gnat_ugn.texi: Improve documentation of gnatmake switch
5505 --source-info-file=.
5507 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5509 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
5510 type). Initialize Atyp to the appropriate type which is later checked
5511 for completion. Rewrite the assertion associated with private type
5514 2011-08-04 Ed Falis <falis@adacore.com>
5516 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
5517 initialize the number of CPUs.
5519 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5521 * sem_type.adb (Disambiguate): New subsidiary routine
5522 In_Same_Declaration_List, to implement AI05-0020: a user-defined
5523 equality on an anonymous access type whose designated type is private
5524 does not lead to an ambiguity with the universal access equality
5525 operator in the body or child units of the defining package. The same
5526 is true for a multiplication operator on a private type completed with
5529 2011-08-04 Javier Miranda <miranda@adacore.com>
5531 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
5532 (Normalize_Scalars_Config): Removed.
5534 (Register_Opt_Config_Switches): Remove registering config values of
5535 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
5536 (Restore_Opt_Config_Switches): Remove code which restores the values of
5537 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
5538 Init_Or_Norm_Scalars.
5539 (Save_Opt_Config_Switches): Remove code which saves values of
5540 Init_Or_Norm_Scalars and Normalize_Scalars.
5541 (Set_Opt_Config_Switches): Remove code which restores config values of
5542 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
5543 Init_Or_Norm_Scalars.
5545 2011-08-04 Yannick Moy <moy@adacore.com>
5547 * frontend.adb (Frontend): remove previous patch to avoid full
5548 qualification in ALFA mode.
5549 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
5550 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
5551 unique name for an entity, which could be used to identify the entity
5552 across compilation units.
5554 2011-08-04 Thomas Quinot <quinot@adacore.com>
5557 (Initialize_Default_Project_Path): Add target specific directory
5558 ($prefix/$target/lib/gnat) in front of project path in all cases
5559 (making gnatmake's behaviour consistent with gprbuild).
5560 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
5561 Pass target name from Sdefault to project subsystem.
5562 * gnatls.adb: Show new target specific default project directory.
5564 2011-08-04 Johannes Kanig <kanig@adacore.com>
5566 * cstand.adb: Add Information to Identifier in Standard
5567 (Identifer_For): Set Entity to the corresponding entity
5569 2011-08-04 Sergey Rybin <rybin@adacore.com>
5571 * gnat_ugn.texi: Update doc on gnatcheck.
5573 2011-08-04 Yannick Moy <moy@adacore.com>
5575 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
5578 2011-08-04 Yannick Moy <moy@adacore.com>
5580 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
5581 performing expansion.
5582 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
5583 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
5584 it is not called in ALFA mode.
5586 2011-08-04 Emmanuel Briot <briot@adacore.com>
5588 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
5589 after all, so removed.
5591 2011-08-04 Sergey Rybin <rybin@adacore.com>
5593 * vms_data.ads: Add missing VMS qualifiers.
5595 2011-08-04 Emmanuel Briot <briot@adacore.com>
5597 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
5598 the list of files on the command line after processing it through
5601 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5603 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
5604 processing for .NET/JVM. These targets can now benefit from
5605 Raise_From_Controlled_Operation and they share the same processing with
5607 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
5608 These targets need transient scopes in order to properly finalize short
5609 lived controlled objects.
5610 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
5611 NET/JVM. These targets can now benefit from
5612 Raise_From_Controlled_Operation and they share the same processing with
5615 2011-08-04 Geert Bosch <bosch@adacore.com>
5617 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
5619 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5621 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
5622 Expand_Record_Aggregate, to determine whether aggregate must be
5623 expanded into assignments. This is the case if the ancestor part is
5624 private, regarless of the setting of the flag Has_Private_Ancestor.
5626 2011-08-04 Ed Falis <falis@adacore.com>
5628 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
5630 2011-08-04 Bob Duff <duff@adacore.com>
5632 * sinfo.ads: Fix comment.
5634 2011-08-04 Steve Baird <baird@adacore.com>
5636 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
5637 choose a package name in much the same way as is
5638 done for JGNAT when VM_Target /= No_VM, except that
5639 a slightly more distinctive prefix string is used.
5641 2011-08-04 Emmanuel Briot <briot@adacore.com>
5643 * makeutl.adb (Complete_Mains): no longer accept unit names on the
5644 gnatmake command line.
5645 This behavior was never documented (and was supported only because of
5646 an early bug in the code). This case might lead to ambiguous cases
5647 (between unit names and truncated base names without suffixes).
5649 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5651 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
5652 Remove the external tag of a tagged type from the internal hash table.
5653 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
5654 expanded usage of the routine. Strenghten the check for Is_Master. Add
5655 processing for tagged types.
5656 (Build_Finalizer): Create all the necessary lists used in finalizer
5657 creation when the processed context is a package that may contain
5659 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
5660 Requires_Cleanup_Actions.
5661 (Expand_N_Package_Body): Package bodies may need clean up code
5662 depending on whether they contain tagged types.
5663 (Expand_N_Package_Declaration): Package declarations may need clean up
5664 code depending on whether they contain tagged types.
5665 (Unregister_Tagged_Types): New routine. Search through a list of
5666 declarations or statements, looking for non-abstract Ada tagged types.
5667 For each such type, generate code to unregister the external tag.
5668 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
5669 Requires_Cleanup_Actions.
5670 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
5671 through a list of declarations or statements looking for non-abstract
5672 Ada tagged types or controlled objects.
5673 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
5674 Requires_Cleanup_Actions.
5675 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
5676 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
5679 2011-08-04 Vincent Celier <celier@adacore.com>
5681 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
5682 has Ada sources, not project Project, because if the root project
5683 Project has no sources of its own, all projects will be deemed without
5686 2011-08-04 Gary Dismukes <dismukes@adacore.com>
5688 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
5689 of the No_Param_Proc acc-to-subp type used for initialization of
5690 __gnat_finalize_library_objects so that it's declared at library level
5691 rather than nested inside of the adainit routine.
5693 2011-08-04 Javier Miranda <miranda@adacore.com>
5695 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
5696 if the tagged type has a representation clause which specifies its
5699 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5701 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
5702 Remove previous procedure with that name.
5703 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
5705 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
5706 subtype mark, the ancestor cannot have unknown discriminants.
5707 (Resolve_Record_Aggregate): if the type has invisible components
5708 because of a private ancestor, the aggregate is illegal.
5710 2011-08-04 Vincent Celier <celier@adacore.com>
5712 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
5713 account switches -gnat2005, -gnat12 and -gnat2012.
5715 2011-08-04 Bob Duff <duff@adacore.com>
5717 * s-tasdeb.ads: Minor comment fix.
5719 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5721 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
5723 * switch.ads, switch.adb (Is_Language_Switch): New function.
5725 2011-08-04 Vincent Celier <celier@adacore.com>
5727 * switch-c.adb: Minor comment addition.
5729 2011-08-04 Vincent Celier <celier@adacore.com>
5731 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
5732 ending with '=' is followed by a space (missing file name).
5734 2011-08-04 Pascal Obry <obry@adacore.com>
5736 * g-regist.ads: Fix size of HKEY on x86_64-windows.
5738 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5740 * sem_ch12.adb (Analyze_Associations): New routine
5741 Check_Overloaded_Formal_Subprogram to reject a formal package when
5742 there is a named association or a box initialisation for an overloaded
5743 formal subprogram of the corresponding generic.
5745 2011-08-04 Yannick Moy <moy@adacore.com>
5747 * alfa.ads (ALFA_Xref_Record): add component for type of entity
5748 * get_alfa.adb, put_alfa.adb: Read and write new component of
5750 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
5752 2011-08-04 Pascal Obry <obry@adacore.com>
5754 * urealp.adb: Minor reformatting.
5756 2011-08-04 Tristan Gingold <gingold@adacore.com>
5758 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
5759 Handle the case when Cleanup_Protected_Object returns Empty.
5761 2011-08-04 Yannick Moy <moy@adacore.com>
5763 * frontend.adb (Frontend): only qualify names in non-ALFA mode
5765 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5767 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
5768 call, ignore functions.
5770 2011-08-04 Geert Bosch <bosch@adacore.com>
5772 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
5775 2011-08-04 Emmanuel Briot <briot@adacore.com>
5777 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
5778 as an index for Builder'Switches. This conforms to the documentation.
5779 * make.adb (Insert_Project_Sources): avoid duplicate code
5781 2011-08-04 Emmanuel Briot <briot@adacore.com>
5783 * makeutl.adb (Complete_Mains): if the user has passed a relative file
5784 name on the command line (for instance "../dummy"), never assume it can
5787 2011-08-04 Tristan Gingold <gingold@adacore.com>
5789 * bindgen.adb: Remove code the reference or create the
5790 Break_Start/__gnat_break_start procedure.
5791 * s-stalib.adb (Break_Start): Removed.
5793 2011-08-04 Emmanuel Briot <briot@adacore.com>
5795 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
5796 shared with gprbuild.
5798 2011-08-04 Yannick Moy <moy@adacore.com>
5800 * par-ch4.adb (P_Primary): preferentially issue an error message about
5801 a missing parenthesis arount a conditional or case expression in Ada
5802 2012 mode, if we detect that the alignment is not correct for a
5805 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5807 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
5808 tag-to-class-wide conversion as needing finalization actions.
5809 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
5810 a tag-to-class-wide conversion as needing finalization actions.
5811 (Is_Finalizable_Transient): The result of a tag-to-class-wide
5812 conversion does not need finalization actions.
5813 (Is_Tag_To_CW_Conversion): New routine.
5814 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
5815 whether an object is the result of a tag-to-class-wide conversion.
5817 2011-08-04 Yannick Moy <moy@adacore.com>
5819 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
5820 the left-hand-side and right-hand-side of a conjunct are inserted when
5821 translating a pre- or postcondition
5822 * sem_ch6.adb: Correct typo in comment
5824 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5826 * gnat_rm.texi: Ravenscar does not prohibit dependence on
5827 Unchecked_Conversion and Unchecked_Deallocation.
5829 2011-08-04 Thomas Quinot <quinot@adacore.com>
5831 * make.adb: Minor reformatting.
5833 2011-08-04 Emmanuel Briot <briot@adacore.com>
5835 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
5836 sources in the project and its imported projects, but not in the whole
5839 2011-08-04 Emmanuel Briot <briot@adacore.com>
5841 * make.adb: Remove debug trace.
5843 2011-08-04 Vincent Celier <celier@adacore.com>
5845 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
5846 path in canonical form, to be able to compare path names on platforms
5847 such as Windows or Darwin.
5849 2011-08-04 Thomas Quinot <quinot@adacore.com>
5851 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
5852 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
5853 * scos.ads: Update documentation accordingly.
5854 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
5857 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5859 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
5860 attribute only if prefix type is scalar.
5862 2011-08-04 Emmanuel Briot <briot@adacore.com>
5864 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
5865 in gnatmake for specifying mains on the command line that do not belong
5866 to the main project. These mains must currently all belong to the same
5868 (Ultimate_Extension_Of): removed, since duplicated
5869 Ultimate_Extending_Project.
5871 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5873 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
5875 (CodePeer_Mode_String): New.
5876 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
5878 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
5879 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
5880 mode, since no useful elaboration subprogram is needed by CodePeer.
5881 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
5882 In this mode, compile binder file with -gnatC and do stop after this
5885 2011-08-04 Vincent Celier <celier@adacore.com>
5887 * exp_ch7.adb: Minor comment fix.
5889 2011-08-04 Robert Dewar <dewar@adacore.com>
5891 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
5892 exp_ch4.adb, makeutl.adb: Minor reformatting.
5894 2011-08-04 Emmanuel Briot <briot@adacore.com>
5896 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
5897 Create several new subprograms to move code out of Make. This makes the
5898 code more readable, removes code duplication, and is a preparation work
5899 for adding support for aggregate projects.
5901 2011-08-04 Tristan Gingold <gingold@adacore.com>
5903 * s-po32gl.ads, s-po32gl.adb: New files.
5904 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
5905 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
5906 (Build_Finalization_Collection): Use it.
5907 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
5908 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
5910 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
5911 * gcc-interface/Make-lang.in: Update dependencies.
5913 2011-08-04 Emmanuel Briot <briot@adacore.com>
5915 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
5918 2011-08-04 Emmanuel Briot <briot@adacore.com>
5920 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
5921 command line is not a file name, also check whether it could be a unit
5924 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5926 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
5927 the header of the finalization routine.
5928 If the unit has no finalizer but is a body whose spec has one, then
5929 generate the decrement of the elaboration entity only.
5930 If the unit has a finalizer and is a spec, then do not generate the
5931 decrement of the elaboration entity.
5932 (Gen_Finalize_Library_C): Likewise.
5934 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5936 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
5937 (Bounds_Size_Expression): Removed.
5938 (Double_Alignment_Of): New subsidiary routine.
5939 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
5940 for a hole in the dope vector of unconstrained arrays due to different
5941 index and element alignments.
5943 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5945 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
5946 raise program_error because body has not been seen yet.
5948 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5950 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
5953 2011-08-04 Vincent Celier <celier@adacore.com>
5955 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
5957 2011-08-04 Yannick Moy <moy@adacore.com>
5959 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
5960 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
5962 2011-08-04 Thomas Quinot <quinot@adacore.com>
5964 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
5965 instantiation in RCI.
5967 2011-08-04 Emmanuel Briot <briot@adacore.com>
5969 * make.adb: Share more code with gprbuild
5971 2011-08-04 Emmanuel Briot <briot@adacore.com>
5973 * projects.texi: Added documentation for the IDE'Gnat project file
5976 2011-08-04 Nicolas Roche <roche@adacore.com>
5978 * gnat_rm.texi: Minor editing.
5980 2011-08-04 Javier Miranda <miranda@adacore.com>
5982 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
5983 and the library case for VM targets.
5984 (Gen_Adainit_Ada): Likewise.
5986 2011-08-04 Robert Dewar <dewar@adacore.com>
5988 * g-altive.ads: Minor comment updates.
5989 * prj-nmsc.adb: Minor reformatting.
5991 2011-08-04 Javier Miranda <miranda@adacore.com>
5994 (Normalize_Scalars_Config): Value of the configuration switch set by
5995 pragma Normalize_Scalars when it appears in the gnat.adc file.
5996 (Normalize_Scalars): New field for record Config_Switches_Type. Used
5997 to save and restore settings of this pragma.
5999 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
6000 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
6002 2011-08-04 Vincent Celier <celier@adacore.com>
6004 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
6006 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6008 * makeutl.adb: Minor reformatting.
6010 2011-08-04 Olivier Hainque <hainque@adacore.com>
6012 * g-altive.ads: Update comments to reflect that only the soft
6013 binding is available today.
6015 2011-08-04 Robert Dewar <dewar@adacore.com>
6017 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
6018 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
6019 * gcc-interface/Make-lang.in: Update dependencies.
6021 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6023 * prj-env.adb: Remove local debug traces.
6025 2011-08-04 Yannick Moy <moy@adacore.com>
6027 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
6028 was used instead of Hi_OK, which could cause a read of an uninitialized
6029 value later on. Detected while working on the new warning.
6030 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
6032 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
6033 in more cases, in order to detect more unreferenced values.
6034 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
6035 object for expression, if any.
6037 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6039 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
6040 the operand types instead of the Esize.
6042 2011-08-04 Steve Baird <baird@adacore.com>
6044 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
6045 enable CodePeer_Mode.
6046 * bindusg.adb (Display): Add help message describing -P binder switch.
6047 * gnat_ugn.texi: Document -P binder switch.
6048 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
6049 user-defined main program directly.
6050 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
6051 user-defined main program in the context clause of the package body.
6053 2011-08-04 Yannick Moy <moy@adacore.com>
6055 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
6056 duplicate of Defining_Entity
6057 (Get_Unique_Entity_For_Decl): rename function into
6058 Unique_Defining_Entity
6059 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
6060 (Formal_Proof_On): remove synthesized flag
6061 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6062 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
6063 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
6064 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
6065 Annotate (Formal_Proof)
6067 2011-08-04 Emmanuel Briot <briot@adacore.com>
6069 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
6070 source files with non-standard naming schemes, in imported projects
6072 2011-08-04 Emmanuel Briot <briot@adacore.com>
6074 * makeutl.adb (Complete_Mains): when a multi-unit source file is
6075 specified on the gprbuild command line, we need to compile all units
6076 within that file, not just the first one we find
6077 Fix error message for mains that are not found.
6079 2011-08-04 Thomas Quinot <quinot@adacore.com>
6081 * sem_ch6.adb: Update comment.
6082 * sem_ch12.adb: Minor reformatting.
6084 2011-08-04 Bob Duff <duff@adacore.com>
6086 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
6087 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
6088 race condition whose symptom is to fail to lock Parent. That, in turn,
6089 causes Parent.Awake_Count to be accessed without locking Parent, which
6090 causes another race condition whose symptom is that Parent.Awake_Count
6091 can be off by 1 (either too high or too low). The solution is to lock
6092 Parent unconditionally, and then lock Acceptor, before reading
6093 Acceptor.Terminate_Alternative.
6095 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6097 * debug.adb: Update comment.
6099 2011-08-04 Robert Dewar <dewar@adacore.com>
6101 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
6102 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
6103 exp_ch6.adb: Minor reformatting.
6105 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6107 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
6110 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6112 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
6114 2011-08-04 Thomas Quinot <quinot@adacore.com>
6116 * sinfo.ads: Minor reformatting.
6118 2011-08-04 Emmanuel Briot <briot@adacore.com>
6120 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
6121 even if there is no location.
6123 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6125 * sem_res.adb, sem_ch4.adb: move check for restriction
6126 No_Task_Hierarchy to resolve_allocator.
6128 2011-08-04 Thomas Quinot <quinot@adacore.com>
6130 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
6131 This flag of N_Pragma nodes is not used, remove it as well as all of
6132 the associated circuitry.
6134 2011-08-04 Javier Miranda <miranda@adacore.com>
6136 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
6137 runtime check on duplicated externa tags
6138 * debug.adb Document switch -gnatdQ.
6140 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6142 * a-fihema.ads: Minor typo fix.
6144 2011-08-04 Yannick Moy <moy@adacore.com>
6146 * sem_ch10.adb: Minor comment update.
6148 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6150 * einfo.adb: Update the node field usage to reflect the renaming of
6151 Return_Flag to Return_ Flag_Or_Transient_Decl.
6152 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
6153 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
6154 (Write_Field15_Name): Change Return_Flag to
6155 Return_Flag_Or_Transient_Decl.
6156 * einfo.ads: Rename node field Return_Flag to
6157 Return_Flag_Or_Transient_Decl. Update the associated comment and all
6158 occurrences in entities.
6159 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
6160 associated Inline pragma.
6161 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
6162 associated Inline pragma.
6163 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
6165 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
6166 Return_Flag and Set_Return_Flag.
6167 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
6168 objects generated for controlled transients declared inside an
6169 Exception_With_Actions. Update the calls to Return_Flag.
6170 (Process_Object_Declaration): Add code to add a null guard for hook
6171 objects generated for controlled transients declared inside an
6172 Exception_With_Actions. Update related comment.
6173 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
6174 objects generated for controlled transients declared inside an
6175 Exception_With_Actions. Update the calls to Return_Flag.
6176 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
6178 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6180 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
6181 positional aggregate.
6183 2011-08-04 Vincent Celier <celier@adacore.com>
6185 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
6186 SLOC only for pragmas.
6188 2011-08-04 Emmanuel Briot <briot@adacore.com>
6190 * projects.texi: Minor typo fix.
6192 2011-08-04 Emmanuel Briot <briot@adacore.com>
6194 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
6195 on case-sensitive file systems.
6197 2011-08-04 Thomas Quinot <quinot@adacore.com>
6199 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
6200 nested in a disabled pragma.
6201 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
6202 enclosing pragma, if any, for X decisions.
6204 2011-08-04 Thomas Quinot <quinot@adacore.com>
6206 * sem_prag.adb: Minor reformatting.
6208 2011-08-04 Vincent Celier <celier@adacore.com>
6210 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
6211 allowed in no run time mode.
6213 2011-08-04 Vincent Celier <celier@adacore.com>
6215 * make.adb (Check): When -gnatc is used, check for the source file
6216 inside the ALI file with a canonical case file name.
6218 2011-08-04 Emmanuel Briot <briot@adacore.com>
6220 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
6221 overriding the separator.
6223 2011-08-04 Robert Dewar <dewar@adacore.com>
6225 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
6226 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
6228 2011-08-04 Robert Dewar <dewar@adacore.com>
6230 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
6232 2011-08-04 Yannick Moy <moy@adacore.com>
6234 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
6235 'Result only appears in postcondition of function.
6237 2011-08-04 Thomas Quinot <quinot@adacore.com>
6239 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
6240 external tag, include the value of the external tag in the exception
6243 2011-08-04 Yannick Moy <moy@adacore.com>
6245 * sem_attr.adb (Result): modify error message for misplaced 'Result
6247 2011-08-04 Sergey Rybin <rybin@adacore.com>
6249 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
6250 clear that the second argument must be an identifier.
6252 2011-08-04 Thomas Quinot <quinot@adacore.com>
6254 * exp_ch9.adb (Build_Barrier_Function): When compiling with
6255 -fpreserve-control-flow, insert an IF statement on the barrier
6256 condition to ensure that a conditional branch instruction is generated.
6258 2011-08-04 Emmanuel Briot <briot@adacore.com>
6260 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
6261 (Processing_Flags.Ignore_Missing_With): new flag.
6263 2011-08-04 Emmanuel Briot <briot@adacore.com>
6265 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
6266 Source_List_File on case-insensitive systems where the file is actually
6267 on a case-sensitive file system (NFS,...).
6269 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6271 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
6272 function return contains a controlled [extension] aggregate and the
6273 return statement is not part of a handled sequence of statements, wrap
6274 the return in a block. This ensures that all controlled temporaries
6275 generated during aggregate resolution will be picked up by the
6276 finalization machinery.
6278 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6280 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
6281 components, freeze type before resolution, to ensure that default
6282 initializations are present for all components.
6283 * sem_res.adb (Resolve_Actuals): the designated object of an
6284 accces-to-constant type is a legal actual in a call to an
6285 initialization procedure.
6287 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6289 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
6290 N_Unchecked_Type_Conversion to the possible containers of a renamed
6293 2011-08-04 Yannick Moy <moy@adacore.com>
6295 * par-ch13.adb (Aspect_Specifications_Present): recognize
6296 "with Identifier'Class =>" as an aspect, so that a meaningful warning
6297 is issued in Strict mode.
6298 * par.adb: Fix typos in comments.
6300 2011-08-04 Yannick Moy <moy@adacore.com>
6302 * sem_attr.adb (Result): modify error message to take into account Post
6303 aspect when compiling Ada 2012 (or newer) code.
6305 2011-08-04 Nicolas Roche <roche@adacore.com>
6307 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
6308 remove need for GCC exceptions.
6310 2011-08-04 Vincent Celier <celier@adacore.com>
6312 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
6313 project, not the source file name.
6314 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
6315 excluded, continue looking. This excluded source will only be returned
6316 if there is no other source with the same base name that is not locally
6319 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6321 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
6322 private and one of the operands is a real literal, use a qualified
6323 expression rather than a conversion which is not meaningful to the
6326 2011-08-04 Yannick Moy <moy@adacore.com>
6328 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
6329 corresponding aspect X'Class are allowed, proceed with analysis of the
6330 aspect instead of skipping it.
6332 2011-08-04 Tristan Gingold <gingold@adacore.com>
6334 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
6335 This will allow to have an Ada implementation for the subprogram.
6337 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6339 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
6340 completion and aspects are present, apply them to the entity for the
6341 type which is currently the partial view, but which is the one that
6343 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
6344 applies to a partial view, indicate that the full view has predicates
6345 and delayed aspects.
6346 (Replace_Type_Reference): Handle properly predicates that apply to the
6347 full view of a private completion.
6349 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6351 * layout.adb (Layout_Type): For composite types, do not set Esize.
6352 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
6354 (Size_Known): Look at the RM size of components instead of the Esize.
6355 (Freeze_Record_Type): Look at the RM size instead of the Esize to
6356 issue warning and activate Implicit_Packing.
6357 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
6358 if the Esize is not known.
6359 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
6360 for elementary types only.
6361 (Analyze_Record_Representation_Clause): Look at the RM size instead
6362 of the Esize to issue errors.
6363 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
6365 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
6367 Look at the RM size instead of the Esize for types if the latter is
6369 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
6371 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6373 * sem_type.adb: proper handling of equality not involving anonymous
6376 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6378 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
6379 Vis_Decls. When creating a library-level finalizer for a package spec,
6380 both the declaration and body of the finalizer are inserted either in
6381 the visible or private declarations of the package spec.
6383 2011-08-04 Javier Miranda <miranda@adacore.com>
6385 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
6386 use of the full-view of a type when invoking Is_Ancestor.
6387 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
6388 the full-view of private parents is requested, then use also the
6389 full-view of the parent of the first derivation.
6391 2011-08-04 Tristan Gingold <gingold@adacore.com>
6393 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
6394 instead of the locally imported procedure.
6395 * s-taprop-mingw.adb (Enter_Task): Ditto.
6396 * s-valrea.adb (Scan_Real): Ditto.
6397 * s-imgrea.adb (Set_Image_Real): Ditto.
6398 * s-flocon.ads: Make the package pure.
6400 2011-08-04 Thomas Quinot <quinot@adacore.com>
6402 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
6403 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
6404 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
6405 New subprogram, moved here from...
6406 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
6407 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
6408 rewriting of the last argument into a procedure call statement here...
6409 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
6412 2011-08-04 Thomas Quinot <quinot@adacore.com>
6414 * par_sco.adb: Minor reformatting.
6416 2011-08-04 Robert Dewar <dewar@adacore.com>
6418 * erroutc.adb: Minor reformatting.
6420 2011-08-04 Thomas Quinot <quinot@adacore.com>
6422 * par_sco.adb: Comment update.
6424 2011-08-04 Tristan Gingold <gingold@adacore.com>
6426 * s-flocon.ads: New file.
6427 * g-flocon.ads: Now a renaming of s-flocon.
6428 * Makefile.rtl: Add s-flocon.o
6430 2011-08-04 Javier Miranda <miranda@adacore.com>
6432 * exp_strm.adb (Build_Array_Input_Function): if the array type is
6433 constrained, do not attempt to build a subtype of it.
6435 2011-08-04 Yannick Moy <moy@adacore.com>
6437 * errout.ads Change comments: remove 'R'M as an example where quotes
6438 are needed; add ALFA as another case where quotes are not needed
6439 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
6440 case where quotes are not needed.
6441 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6442 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
6443 Remove all occurrences of 'A'L'F'A
6445 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6447 * sem_ch13.adb: check legality of invariant pragma.
6449 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6451 * bindgen.adb: Add comments.
6453 2011-08-04 Yannick Moy <moy@adacore.com>
6455 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
6457 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
6458 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
6460 2011-08-04 Robert Dewar <dewar@adacore.com>
6462 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
6463 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
6464 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
6466 2011-08-04 Thomas Quinot <quinot@adacore.com>
6468 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
6470 2011-08-04 Thomas Quinot <quinot@adacore.com>
6473 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
6476 2011-08-04 Robert Dewar <dewar@adacore.com>
6478 * einfo.ads, exp_ch4.adb: Minor reformatting.
6480 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6482 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
6484 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6486 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
6487 type in all cases to compute list of primitive operations, because full
6488 view may be an itype that is not attached to the list of declarations.
6490 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6492 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
6493 library has already been finalized.
6494 (Gen_Adafinal_C): Likewise.
6495 (Gen_Adainit_Ada): Generate an early return if the library has
6496 already been elaborated.
6497 (Gen_Adainit_C): Likewise.
6498 (Gen_Output_File_Ada): Generate an elaboration flag.
6499 (Gen_Output_File_C): Likewise.
6501 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6503 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
6504 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
6505 built in the first place.
6506 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
6507 for CodePeer because Finalize_Address was not built to begin with.
6508 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
6510 2011-08-04 Pascal Obry <obry@adacore.com>
6512 * adaint.c (__gnat_tmp_name): Use current process id to create temp
6513 filenames, this ensures unicity of filenames across processes.
6515 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6517 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
6518 Raise_Controlled to Raise_From_Controlled_Operation. Update the
6519 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
6520 Add False as the actual to From_Abort in the generated call to
6521 Raise_From_Controlled_Operation.
6523 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6525 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
6526 so that the ali file name can be retrieved from outside of this package.
6527 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
6528 doing nothing in the general case, but used to update the object file
6529 timestamp if directly generated by the backend.
6530 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
6531 to a later time than the ali file one.
6533 2011-08-04 Yannick Moy <moy@adacore.com>
6535 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
6536 entities whose body contains an Annotate pragma which forces formal
6538 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6539 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
6540 Mark_Non_ALFA_Subprogram to pass in a message and node.
6541 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
6542 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
6543 surrounding subprogram.
6544 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
6545 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
6546 as not in ALFA is annotated with Formal_Proof being On, then an error
6547 is issued based on the additional parameters for message and node.
6548 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
6549 * gcc-interface/Make-lang.in: Update dependencies.
6551 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6553 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
6554 Finalize_Address when CodePeer is enabled.
6556 2011-08-04 Pascal Obry <obry@adacore.com>
6558 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
6559 the latter returns a pointer to a static buffer which is deallocated
6560 at the end of the routine.
6562 2011-08-04 Yannick Moy <moy@adacore.com>
6564 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
6565 after index creation; mark unconstrained base array type generated as
6566 being in/not in ALFA as well
6567 (Make_Index): mark subtype created as in/not in ALFA
6568 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
6569 over a loop as in/not in ALFA, depending on its type and form of loop
6572 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6574 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
6575 directly to False on .NET and JVM.
6577 2011-08-04 Yannick Moy <moy@adacore.com>
6579 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
6580 constraint that subtype must come from source code to be in ALFA, so
6581 that anonymous subtypes can be in ALFA too.
6583 2011-08-04 Yannick Moy <moy@adacore.com>
6585 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
6586 reference for ALFA mode.
6587 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
6588 procedure public so as to use it from formal verification back-end.
6590 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6592 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
6593 invalid checks of the Parameter, making Remove_Switch not working
6596 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6598 * targparm.ads: Update header: no run-time exception is needed on this
6601 2011-08-04 Vincent Celier <celier@adacore.com>
6603 * a-fihema.adb: Use System.IO instead of GNAT.IO
6605 2011-08-04 Thomas Quinot <quinot@adacore.com>
6607 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
6608 are forbidden in Compiler_Unit mode.
6610 2011-08-04 Robert Dewar <dewar@adacore.com>
6612 * sem_util.adb: Minor reformatting.
6614 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6616 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
6617 library-level finalizers.
6618 (Gen_Finalize_Library_C): Update the import string for library-level
6620 (Gen_Finalize_Library_Defs_C): Update the definition name of a
6621 library-level finalizer.
6622 * exp_ch7.adb: Remove with and use clauses for Stringt.
6623 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
6624 Spec_Decl. Add local variable Body_Id. The names of library-level
6625 finalizers are now manually fully qualified and are no longer external.
6626 A single name is now capable of servicing .NET, JVM and non-VM targets.
6627 Pragma Export is no longer required to provide visibility for the name.
6628 (Create_Finalizer_String): Removed.
6629 (New_Finalizer_Name): New routine which mimics New_..._Name.
6631 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6633 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
6634 elaboration counter to Standard_Short_Integer.
6635 * sem_util.adb (Build_Elaboration_Entity): Likewise.
6636 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
6637 (Gen_Elab_Externals_C): Likewise.
6639 2011-08-04 Ed Falis <falis@adacore.com>
6641 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
6642 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
6643 system-vxworks-mips.ads, system-vxworks-x86.ads
6644 (Always_Compatible_Rep): set to False for all VxWorks targets.
6646 2011-08-04 Robert Dewar <dewar@adacore.com>
6648 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
6649 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
6650 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
6651 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
6652 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
6653 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
6654 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
6655 Minor reformatting and code reorganization.
6657 2011-08-04 Emmanuel Briot <briot@adacore.com>
6659 * projects.texi: Added doc for aggregate projects.
6661 2011-08-04 Emmanuel Briot <briot@adacore.com>
6663 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
6664 Add support for overriding the Project_Path in aggregate projects.
6666 2011-08-04 Robert Dewar <dewar@adacore.com>
6668 * a-cofove.ads: Minor reformatting.
6670 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6672 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
6673 on the generated code.
6674 (Build_Finalize_Statements): Update the comment on the generated code.
6675 (Build_Initialize_Statements): Update the comment on the generated code.
6676 (Build_Object_Declarations): Add local variable Result. The object
6677 declarations are now built in sequence.
6678 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
6681 2011-08-04 Robert Dewar <dewar@adacore.com>
6683 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
6685 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6687 * einfo.ads (Elaboration_Entity): Document new definition and use.
6688 (Elaboration_Entity_Required): Adjust to above change.
6689 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
6690 * exp_ch12.adb: And with and use for Snames.
6691 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
6692 * exp_util.adb (Set_Elaboration_Flag): Likewise.
6693 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
6694 <Check_Unit_Name>: Deal with N_Expanded_Name.
6695 <Attribute_Elaborated>: Extend to all unit names.
6696 * sem_elab.adb: And with and use for Uintp.
6697 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
6698 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
6699 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
6700 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
6701 from Gen_Adainit_Ada.
6702 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
6703 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
6704 case, do not call System.Standard_Library.Adafinal; instead call
6705 finalize_library if needed.
6706 (Gen_Adafinal_C): Likewise.
6707 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
6708 non-main program case.
6709 (Gen_Adainit_C): Generate a couple of external declarations here.
6710 In the main program case, set SSL.Finalize_Library_Objects.
6711 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
6712 (Gen_Elab_Calls_C): Likewise.
6713 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
6714 (Gen_Finalize_Library_C): Likewise. Generate a full function.
6715 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
6717 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
6718 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
6720 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
6721 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
6722 of external declarations. Call Gen_Finalize_Library_C.
6724 2011-08-04 Emmanuel Briot <briot@adacore.com>
6726 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
6727 Compute_Compilation_Phases): new subprogram.
6728 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
6729 The number of mains as well as the various compilation phases that
6730 need to be run are now project tree specific, since various
6731 aggregated trees might have different requirements. In particular,
6732 they do not all require bind or link phases.
6734 2011-08-04 Emmanuel Briot <briot@adacore.com>
6736 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
6737 (Project_Tree_Appdata): New type.
6738 It is now possible to associate application-specific data to a project
6739 tree. In particular, this is used in the gprbuild builder to avoid a
6740 number of global tables and htables, especially now that there can be
6741 several project trees loaded at once because of aggregate projects.
6742 (Debug_Name): new procedure.
6743 * projects.texi: Clarify syntax of "**" for Source_Dirs
6745 2011-08-03 Emmanuel Briot <briot@adacore.com>
6747 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
6748 the "roots" for a main.
6749 (Fill_From_Project): add support for aggregate projects. Main units
6750 in aggregated projects are now automatically added in the list of
6751 files to build (although this fails later on in gprbuild, because
6752 these files are not using the root proejct tree, so this needs
6754 * gcc-interface/Make-lang.in: Update dependencies.
6756 2011-08-03 Yannick Moy <moy@adacore.com>
6758 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
6759 conditional expression in ALFA.
6760 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
6761 expressions as not in ALFA.
6763 2011-08-03 Robert Dewar <dewar@adacore.com>
6765 * a-cofove.adb: Minor reformatting.
6767 2011-08-03 Emmanuel Briot <briot@adacore.com>
6769 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
6770 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
6772 These packages are more logically placed in the Queue package, since
6773 they manipulate the queue. It is also likely that they can be adapted
6774 for gnatmake, thus sharing more code.
6775 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
6776 that we could move the above.
6778 2011-08-03 Emmanuel Briot <briot@adacore.com>
6780 * errutil.adb (Finalize): clean up the list of error messages on exit.
6781 Calling this subprogram multiple times will no longer show duplicate
6782 error messages on stderr.
6784 2011-08-03 Emmanuel Briot <briot@adacore.com>
6786 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
6787 Getopt_Switches when we have already define a command line
6790 2011-08-03 Yannick Moy <moy@adacore.com>
6792 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
6793 in ALFA. Instead, they are considered as assertions to prove.
6794 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
6795 nodes as not in ALFA. Instead, include conditional expressions in ALFA
6796 if they have no ELSE part, or if they occur in pre- and postconditions,
6797 where the Condition cannot have side-effects in ALFA
6798 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
6799 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
6800 Instead, include type conversion between scalar types in ALFA.
6801 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
6802 if-and-only-if its type is in ALFA.
6804 2011-08-03 Thomas Quinot <quinot@adacore.com>
6806 * scos.adb, get_scos.adb, put_scos.adb
6807 New code letter for decisions: G (entry guard)
6809 (Traverse_Subprogram_Body): Rename to...
6810 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
6811 (Traverse_Protected_Body): New subprogram
6812 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
6813 protected bodies and entry bodies.
6815 2011-08-03 Yannick Moy <moy@adacore.com>
6817 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
6818 entities with get/set subprograms, which is set on procedure entities
6819 generated by the compiler for a postcondition.
6820 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
6821 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
6822 entity for a declaration
6823 (Get_Unique_Entity_For_Decl): new function returning an entity which
6824 represents a declaration, so that matching spec and body have the same
6827 2011-08-03 Robert Dewar <dewar@adacore.com>
6829 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
6830 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
6832 2011-08-03 Yannick Moy <moy@adacore.com>
6834 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
6835 library-level because retriction No_Implicit_Dynamic_Code in the
6836 front-end prevents its definition as a local subprogram
6837 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
6838 for reuse in other contexts
6839 (Traverse_Declarations_Or_Statements,
6840 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6841 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
6842 procedures take a callback parameter to be called on all declarations
6844 (Traverse_All_Compilation_Units): new generic function to traverse a
6845 compilation unit and call a callback parameter on all declarations
6847 2011-08-03 Javier Miranda <miranda@adacore.com>
6849 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
6850 in Java since they are always enclosed in a namespace that
6851 differentiates them, and overloaded entities are supported by the VM.
6853 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6855 * checks.adb (Determine_Range): If a computed bound of an operation is
6856 outside the range of the base type of the expression, and overflow
6857 checks are enabled, the result is unknown and cannot be used for any
6858 subsequent constant folding.
6859 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
6860 unknown, so is the result of the comparison.
6862 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6864 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
6865 From_Abort. When finalization was triggered by an abort, propagate
6866 Standard'Abort_Signal rather than Program_Error.
6867 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
6869 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
6870 From_Abort. When finalization was triggered by an abort, propagate
6871 Standard'Abort_Signal rather than Program_Error.
6872 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
6874 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
6875 Abort_Id. Update the calls to Build_Object_Declarations and
6876 Build_Raise_Statement to include Abort_Id.
6877 (Build_Adjust_Statements): New local variable Abort_Id. Update the
6878 calls to Build_Object_Declarations and Build_Raise_Statement to include
6880 (Build_Finalize_Statements): New local variable Abort_Id. Update the
6881 calls to Build_Object_Declarations and Build_Raise_Statement to include
6883 (Build_Components): Create an entity for Abort_Id when exceptions are
6884 allowed on the target.
6885 (Build_Finalizer): New local variable Abort_Id.
6886 (Build_Initialize_Statements): New local variable Abort_Id. Update the
6887 calls to Build_Object_Declarations and Build_Raise_Statement to include
6889 (Build_Object_Declarations): Add new formal Abort_Id. Create the
6890 declaration of flag Abort_Id to preserve the original abort status
6891 before finalization code is executed.
6892 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
6893 runtime routine Raise_From_Controlled_Operation.
6894 (Create_Finalizer): Update the call to Build_Raise_Statement to include
6895 Abort_Id. Update the call to Build_Object_Declarations to include
6896 Abort_Id. Update the layout of the finalizer body.
6897 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
6898 (Process_Transient_Objects): New local variable Abort_Id. Remove the
6899 clunky code to create all flags and objects related to
6900 exception propagation and replace it with a call to
6901 Build_Object_Declarations. Update the call to Build_Raise_Statement to
6903 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
6904 Add new formal Abort_Id and associated comment on its use.
6905 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
6907 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
6908 Remove the clunky code to create all flags and objects related to
6909 exception propagation and replace it with a call to
6910 Build_Object_Declarations. Update the call to Build_Raise_Statement.
6912 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6914 * s-tassta.adb: Fix minor typos.
6916 2011-08-03 Robert Dewar <dewar@adacore.com>
6918 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
6919 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
6921 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6923 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
6924 to packages. This ensures that the finalizer body will not end up
6925 inside the freeze node.
6926 (Process_Declarations): Add code to detect whether a freeze node has a
6927 nested finalization collection.
6929 2011-08-03 Pascal Obry <obry@adacore.com>
6931 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
6932 (Current_Session): Return a not null access to Session_Type.
6933 (Default_Session): Likewise.
6935 2011-08-03 Robert Dewar <dewar@adacore.com>
6937 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
6938 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
6940 2011-08-03 Pascal Obry <obry@adacore.com>
6942 * g-awk.ads: Minor comment fix.
6944 2011-08-03 Sergey Rybin <rybin@adacore.com>
6946 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6947 the tree structure related to discriminant constraints.
6948 Original_Discriminant cannot be used any more for computing the
6949 defining name for the reference to a discriminant.
6951 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6953 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
6954 function is not visibly tagged, this is not a dispatching call and
6955 therfore is not Tag_Indeterminate, even if the function is marked as
6956 dispatching on result.
6958 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6960 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
6961 (Expand_N_Free_Statement): Add a guard to protect against run-times
6962 which do not support controlled types.
6963 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
6964 against run-times which do not support controlled types.
6965 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
6966 against run-times which do not support controlled types.
6967 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
6968 against run-times which do not support controlled types.
6969 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
6970 protect against run-times which do not support controlled types.
6972 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6974 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
6975 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
6977 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6979 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
6980 modified in the source, to prevent spurious warnings when compiling
6983 2011-08-03 Thomas Quinot <quinot@adacore.com>
6985 * a-except-2005.adb: Minor reformatting.
6987 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6989 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
6990 is a renaming declaration in the private part of a package, do not emit
6991 a warning that the with_clause could be moved because the renaming may
6992 be used in the body or in a child unit.
6994 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6996 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6997 Propagate the Comes_From_Source attribute from the original return
6998 object to the renaming.
7000 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7002 * exp_ch7.adb (Build_Raise_Statement): Do not call
7003 Raise_From_Controlled_Operation when this routine is not present in
7004 the run-time library.
7005 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
7006 libraries (Ravenscar), tasks are non-terminating, and protected objects
7007 and tasks can only appear at library level, so we do not want
7008 finalization of protected objects nor tasks.
7009 * exp_intr.adb: Minor clarification in comment.
7010 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
7011 Gen_Output_File_C): Remove references to finalization of library-level
7012 objects when using restricted run-time libraries.
7014 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7016 * sem_ch3.adb (Build_Discriminant_Constraints): Set
7017 Original_Discriminant only if the parent type is a generic formal.
7019 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7021 * exp_ch13.adb: Add with and use clause for Targparm;
7022 (Expand_N_Free_Statement): Prevent the generation of a custom
7023 Deallocate on .NET/JVM targets since this requires pools and address
7025 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
7026 .NET/JVM targets, attach the newly allocated object to the access
7027 type's finalization collection. Do not generate a call to
7028 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
7029 exist in the runtime.
7030 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
7031 create a custom Allocate for object that do not require initialization.
7032 Attach a newly allocated object to the access type's finalization
7033 collection on .NET/JVM.
7034 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
7035 assignment of controlled types on .NET/JVM. The two hidden pointers
7036 Prev and Next and stored and later restored after the assignment takes
7038 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
7039 kludge for .NET/JVM to recognize a particular piece of code coming from
7040 Heap_Management and change the call to Finalize into Deep_Finalize.
7041 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
7042 finalization collections on .NET/JVM only for types derived from
7043 Controlled. Separate the association of storage pools with a collection
7044 and only allow it on non-.NET/JVM targets.
7045 (Make_Attach_Call): New routine.
7046 (Make_Detach_Call): New routine.
7047 (Process_Object_Declarations): Suppress the generation of
7048 build-in-place return object clean up code on .NET/JVM since it uses
7050 * exp_ch7.ads (Make_Attach_Call): New routine.
7051 (Make_Detach_Call): New routine.
7052 * exp_intr.adb Add with and use clause for Targparm.
7053 (Expand_Unc_Deallocation): Detach a controlled object from a collection
7054 on .NET/JVM targets.
7055 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
7056 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
7057 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
7058 names used in finalization.
7060 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7062 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
7063 (Attach, Detach): Lock the current task when chaining an object onto a
7066 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7068 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
7069 Rewritten to create the message strings when the exception is not
7070 raised by an abort during finalization.
7071 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
7072 Raise_From_Controlled_Operation and update its associated comment.
7073 * a-fihema.ads, a-fihema.adb: New GNAT unit.
7074 Ada.Finalization.Heap_Management provides key functionality
7075 associated with controlled objects on the heap, their creation,
7076 finalization and reclamation. Type Finalization_Collection is
7077 effectively a wrapper which sits ontop of a storage pool and performs
7078 all necessary bookkeeping for all the objects it contains. Each
7079 access-to-controlled or access-to-class-wide type receives a collection
7080 as part of its expansion. The compiler generates buffer code and
7081 invokes Allocate / Deallocate to create and destroy allocated
7083 * a-finali.adb ("="): Removed.
7084 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
7085 fields Prev and Next.
7086 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
7087 A library unit with at least one controlled object on the library level
7088 has a special finalizer which is invoked by the binder. To signal this,
7089 ali files carry field PF.
7090 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
7091 associated comment on field usage.
7092 * a-tags.adb (Get_RC_Offset): Removed.
7093 (Needs_Finalization): New routine.
7094 * a-tags.ads: Update the structure of the GNAT dispatch tables.
7095 Dispatch tables now carry field Needs_Finalization which provides
7096 runtime indication whether a type is controlled or has controlled
7097 components or both. Remove field RC_Offset.
7098 (Get_RC_Offset): Removed along with its associated pragma Export.
7099 Since tagged types with controlled components no longer carry hidden
7100 field _controller, the special mechanism to retrieve its location is no
7102 (Needs_Finalization): New routine.
7103 * atree.ads, atree.adb (Elist24): New routine.
7104 (Set_Elist24): New routine.
7105 * atree.h: Add a define clause for Elist24.
7106 * bindgen.adb New library-level variable Lib_Final_Built.
7107 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
7108 presence of a VM target, the routine generates calls to the proper
7109 library finalization routine.
7110 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
7111 targets. Set the correct library finalization routine depending on
7112 whether the library has controlled objects or this is a VM compilation.
7113 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
7114 to library-level finalizers of compiled units in reverse order of
7115 elaboration. It also produces exception management code and reraises a
7116 potential exception after all units have been finalized.
7117 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
7118 library-level finalizers of compiled units in reverse order of
7120 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
7121 definitions of all library-level finalizers available to the compilation
7122 (Gen_Main_Ada): Directly call Adafinal which now contails all target
7124 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
7125 System.Standard_Library.Adafinal directly. If the library needs
7126 finalization actions, create the sequence of finalization calls.
7127 (Gen_Output_File_Ada): Alphabetize local variables and constants.
7128 Generate a with clause for System.Soft_Links when compiling for a VM.
7129 Remove the code which imports System.Standard_Library.Adafinal as
7130 Do_Finalize. Generate the library finalization routine.
7131 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
7132 If the library needs finalization actions, create all the definitions
7133 of library- level finalizers.
7134 (Has_Finalizer): New routine. Determines whether at least one compiled
7135 unit has a library-level finalizer.
7136 Add type Qualification_Mode.
7137 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
7138 * einfo.adb: New usage of field 15 as Return_Flag.
7139 Remove Finalization_Chain_Entity from the usages of field 19.
7140 Remove Associated_Final_Chain from the usages of field 23.
7141 New usage of field 23 as Associated_Collection.
7142 New usage of field 24 as Finalizer.
7143 New usage of flag 252 as Is_Processed_Transient.
7144 (Associated_Final_Chain): Removed.
7145 (Associated_Collection): New routine.
7146 (Finalization_Chain_Entity): Removed.
7147 (Finalizer): New routine.
7148 (Is_Finalizer): New routine.
7149 (Is_Processed_Transient): New routine.
7150 (Return_Flag): New routine.
7151 (Set_Associated_Final_Chain): Removed.
7152 (Set_Associated_Collection): New routine.
7153 (Set_Finalization_Chain_Entity): Removed.
7154 (Set_Finalizer): New routine.
7155 (Set_Is_Processed_Transient): New routine.
7156 (Set_Return_Flag): New routine.
7157 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
7159 (Write_Field8_Name): Alphabetize the output.
7160 (Write_Field11_Name): Alphabetize the output.
7161 (Write_Field12_Name): Alphabetize the output.
7162 (Write_Field13_Name): Alphabetize the output.
7163 (Write_Field14_Name): Alphabetize the output.
7164 (Write_Field15_Name): Alphabetize the output.
7165 (Write_Field16_Name): Alphabetize the output.
7166 (Write_Field17_Name): Alphabetize the output.
7167 (Write_Field18_Name): Alphabetize the output.
7168 (Write_Field19_Name): Alphabetize the output. Remove the output of
7169 Finalization_Chain_Entity.
7170 (Write_Field20_Name): Alphabetize the output.
7171 (Write_Field21_Name): Alphabetize the output.
7172 (Write_Field22_Name): Alphabetize the output.
7173 (Write_Field23_Name): Alphabetize the output. Remove the output of
7174 Associated_Final_Chain. Add output for Associated_Collection.
7175 (Write_Field24_Name): Alphabetize the output.
7176 (Write_Field25_Name): Add output for Finalizer.
7177 (Write_Field26_Name): Alphabetize the output.
7178 (Write_Field27_Name): Alphabetize the output.
7179 (Write_Field28_Name): Alphabetize the output.
7180 * einfo.ads: Add new field description for Associated_Collection and
7182 Remove Associated_Final_Chain and its uses in nodes.
7183 Remove Finalization_Chain_Entity and its uses in nodes.
7184 Add new field description for Finalizer and its uses in nodes.
7185 Add new synthesized attribute Is_Finalizer.
7186 Add new flag description for Is_Processed_Transient and its uses in
7188 Add new field description for Return_Flag and its uses in nodes.
7189 (Associated_Final_Chain): Removed along with its pragma Inline.
7190 (Associated_Collection): New routine and pragma Inline.
7191 (Finalization_Chain_Entity): Removed along with its pragma Inline.
7192 (Finalizer): New routine and pragma Inline.
7193 (Is_Finalizer): New routine and pragma Inline.
7194 (Is_Processed_Transient): New routine and pragma Inline.
7195 (Return_Flag): New routine and pragma Inline.
7196 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
7197 (Set_Associated_Collection): New routine and pragma Inline.
7198 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
7199 (Set_Finalizer): New routine and pragma Inline.
7200 (Set_Is_Processed_Transient): New routine and pragma Inline.
7201 (Set_Return_Flag): New routine and pragma Inline.
7202 * exp_aggr.adb: Alphabetize subprograms.
7203 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
7204 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
7205 associated comments. Remove local variables External_Final_List and
7207 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
7208 Ancestor. Remove the retrieval of finalization lists. Update the call to
7210 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
7211 lists. Update the call to Late_Expansion.
7212 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
7213 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
7214 (Gen_Assign): Remove the retrieval of the finalization list used to
7215 build the assignment. Update the calls to Make_Init_Call and
7217 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
7218 Remove the mechanism to determine attachment levels and finalization
7219 list retrieval. Remove the processing for coextensions.
7220 (Init_Controller): Removed. Controllers no longer exist.
7221 (Late_Expansion): Remove formals Flist and Obj along with their
7222 associated comments. Update the calls to Build_Record_Aggr_Code and
7223 Build_Array_Aggr_Code.
7224 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
7225 (Expand_N_Freeze_Entity): Add special processing for finalizers which
7226 appear in entry bodies, protected subprograms and task bodies.
7227 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
7228 * exp_ch3.adb (Add_Final_Chain): Removed.
7229 (Build_Array_Init_Proc): Alphabetize local variables.
7230 (Build_Assignment): Alphabetize local variables. Update the call to
7232 (Build_Class_Wide_Master): Rename local variables to better reflect
7234 (Build_Discriminant_Assignments): Code reformatting.
7235 (Build_Init_Call_Thru): Code reformatting.
7236 (Build_Init_Procedure): Code reformatting. Generate a special version
7237 of Deep_Finalize which is capable of finalizing all initialized
7238 components and ignore the rest.
7239 (Build_Init_Statements): Rename local variables to better reflect their
7241 Reimplement the mechanism to include the creation and update of an index
7242 variable called a "counter". It is used as a bookmark for tracing
7243 initialized and non-initialized components.
7244 (Build_Initialization_Call): Remove local variable Controller_Typ.
7245 Alphabetize all local variables. Remove the initialization of the
7246 record controller and update the call to Make_Init_Call.
7247 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
7248 New local variable Counter.
7249 (Constrain_Array): Alphabetize.
7250 (Expand_Freeze_Array_Type): Create a collection instead of a
7252 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
7253 Finalize_Address which is used in conjunction with allocated controlled
7255 (Expand_N_Object_Declaration): Remove the creation of a finalization
7256 list for anonymous access types. Update the calls to Make_Init_Call and
7258 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
7259 retrieval of finalization lists. Remove the expansion of the record
7260 controller. Create TSS primitive Finalize_Address used in conjunction
7261 with controlled objects on the heap. Create finalization collections
7262 for access-to-controlled record components.
7263 (Expand_Record_Controller): Removed.
7264 (Freeze_Type): Remove the freezing of record controllers. Freezing of
7265 class-wide types now requires additional processing. Create
7266 finalization collections for access-to-controlled types.
7267 (Increment_Counter): New routine.
7268 (Make_Counter): New routine.
7269 (Make_Eq_If): Remove the mention of Name_uController.
7270 (Make_Predefined_Primitive_Specs): There is no longer need to skip
7271 types coming from System.Finalization_Root.
7272 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
7273 (Predefined_Primitive_Bodies): There is no longer need to skip types
7274 coming from System.Finalization_Root.
7275 (Stream_Operation_OK): Do not generate stream routines for
7276 type Ada.Finalization.Heap_Management.Finalization_Collection.
7277 * exp_ch3.ads: Alphabetize subprograms.
7278 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
7279 Add with and use clause for Lib.
7280 (Complete_Coextension_Finalization): Removed.
7281 (Complete_Controlled_Allocation): New routine. Create a finalization
7282 collection for anonymous access-to-controlled types. Create a custom
7283 Allocate which interfaces with the back end and the machinery in
7285 (Expand_Allocator_Expression): Add necessary calls to
7286 Complete_Controlled_Allocation. Remove the retrieval of finalization
7287 lists. Update the calls to Make_Adjust_Call. Generate a call to
7288 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
7289 the associated collection.
7290 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
7291 Code clean up. Remove the retrieval of finalization lists and
7293 Update the call to Make_Init_Call. Generate a call to
7294 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
7295 the associated collection.
7296 (Get_Allocator_Final_List): Removed. Finalization lists are not
7298 (Suitable_Element): Remove the mention of Name_uController.
7299 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
7300 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
7301 the left hand side, carry out the assignment and adjust the left hand
7303 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
7304 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
7305 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
7306 BIP_Collection and BIPcollection.
7307 (Build_Heap_Allocator): New routine used to allocate the return object
7308 of a build-in-place function onto a collection.
7309 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
7310 (Expand_Call): Do not replace direct calls to Deep routines with their
7312 (Expand_N_Extended_Return_Statement): Give all variables shorter names
7313 and update their occurrences. Add a special return flag to monitor the
7314 [ab]normal execution of the function. The flag is set right before the
7316 Rewrite the mechanism used to allocate a build-in-place return object
7317 on the heap or on a storage pool.
7318 (Is_Direct_Deep_Call): New routine.
7319 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
7320 build-in-place function call instead of a final list. Build a call to
7321 Set_Finalize_Address_Ptr to decorate the associated collection.
7322 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
7323 order to name the build-in-place function call's result for later
7324 finalization. Add a collection to a build-in-place function call
7325 instead of a final list.
7326 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
7327 build-in-place function call instead of a final list. Remove the code
7328 which moves one final list and transforms it into the actual in a
7329 nested build-in-place call.
7330 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
7331 build-in-place function call instead of a final list.
7332 (Move_Final_List): Removed.
7333 (Needs_BIP_Collection): New routine.
7334 (Needs_BIP_Final_List): Removed.
7335 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
7336 enumeration type BIP_Formal_Kind.
7337 Update the related comment.
7338 (Needs_BIP_Collection): New routine.
7339 (Needs_BIP_Final_List): Removed.
7340 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
7341 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
7342 majority of subprograms in this unit. Add Name_Finalize_Address to
7343 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
7344 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
7345 statements for an array type.
7346 (Build_Adjust_Statements): Create the adjust statements for a record
7348 (Build_Cleanup_Statements): New routine. A procedure which given any
7349 construct containing asynchronous calls, references to _master, or is a
7350 task body, a task allocation or a protected body produces the necessary
7351 runtime calls to clean up these constructs.
7352 (Build_Exception_Handler): New routine.
7353 (Build_Final_List): Removed.
7354 (Build_Finalization_Collection): New routine. A core procedure which
7355 creates a collection to service heap allocated controlled objects
7356 associated with an access-to-controlled type.
7357 (Build_Finalize_Statements): Create the finalization statements for a
7359 (Build_Finalizer): New routine. A core procedure which given any
7360 construct with declarations and/or statements detects all objects which
7361 need any type of clean up (controlled objects, protected objects) and
7362 generates all necessary code to clean up the said objects in the proper
7364 (Build_Finalizer_Call): New routine.
7365 (Build_Initialize_Statements): Create the initialization statements for
7366 an array type. The generated routine contains code to finalize partially
7368 (Build_Object_Declarations): New routine.
7369 (Build_Raise_Statement): New routine.
7370 (Clean_Simple_Protected_Objects): Removed.
7371 (Controller_Component): Removed.
7372 (Enclosing_Function): New routine.
7373 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
7374 either declarations or statements or both.
7375 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
7376 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
7378 (Find_Final_List): Removed.
7379 (Global_Flist_Ref): Removed.
7380 (In_Finalization_Root): Removed.
7381 (Insert_Actions_In_Scope_Around): Determine the range of the transient
7382 scope in terms of tree nodes. Process all transient variables within
7384 (Make_Adjust_Call): Rewritten. There is no longer an attach call
7385 generated after the adjust.
7386 (Make_Attach_Call): Removed.
7387 (Make_Call): New routine.
7388 (Make_Clean): Removed.
7389 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
7391 (Make_Deep_Proc): Rewritten to generate the new profile signature used
7393 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
7395 (Make_Final_Call): Modified to simply create a call to either
7396 Deep_Finalize or Finalize.
7397 (Make_Finalize_Address_Body): New routine.
7398 (Make_Finalize_Address_Stmts): New routine. A function which produces
7399 TSS primitive Finalize_Address used in conjunction with heap allocated
7401 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
7402 (Make_Init_Call): Rewritten. There is no longer an attach call
7403 generated after initialization.
7404 (Make_Local_Deep_Finalize): New routine.
7405 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7406 (Make_Transient_Block): Remove the finalization list retrieval and
7408 (Needs_Finalization): Moved to Exp_Util.
7409 (Parent_Field_Type): New routine.
7410 (Preprocess_Components): New routine.
7411 (Process_Transient_Objects): New routine.
7412 (Wrap_HSS_In_Block): New routine.
7413 (Wrap_Transient_Declaration): Remove finalization list management and
7414 controller insertion.
7415 (Wrap_Transient_Expression): Code reformatting.
7416 (Wrap_Transient_Statement): Code reformatting.
7417 * exp_ch7.ads (Build_Final_List): Removed.
7418 (Build_Finalization_Collection): New routine.
7419 (Build_Raise_Statement): New routine.
7420 (Controller_Component): Removed.
7421 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
7422 (Find_Final_List): Removed.
7423 (In_Finalization_Root): Removed.
7424 (Is_Simple_Protected_Type): Update related comment.
7425 (Make_Adjust_Call): New parameter profile and associated comments.
7426 (Make_Attach_Call): Removed.
7427 (Make_Final_Call): New parameter profile and associated comments.
7428 (Make_Finalize_Address_Body): New routine.
7429 (Make_Init_Call): New parameter profile and associated comments.
7430 (Make_Local_Deep_Finalize): New routine.
7431 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7432 (Needs_Finalization): Moved to Exp_Util.
7433 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
7434 (Expand_N_Protected_Body): Remove the handling of finalization lists.
7435 (Find_Protection_Type): Moved to Exp_Util.
7436 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
7437 (Make_DT): Update sequence of dispatch table initialization. Remove the
7438 initialization of field RC_Offset. Add initialization of field Needs_
7440 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
7441 Reimplement how an object is first finalized, then deallocated.
7442 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
7444 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
7445 Register TSS_Finalize_Address with type TSS_Names.
7446 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
7447 procedure provides the interface between an allocation / deallocation
7448 and the support machinery in Ada.Finalization.Heap_Management.
7449 (Find_Init_Call): Code reformatting.
7450 (Find_Init_Call_In_List): Code reformatting.
7451 (Find_Protection_Type): Moved from Exp_Ch9.
7452 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
7453 (Has_Controlled_Coextensions): Removed.
7454 (Has_Controlled_Objects): New routine.
7455 (In_Library_Level_Package_Body): New routine.
7456 (Insert_Action_After): New routine.
7457 (Is_Finalizable_Transient): New routine. This predicate determines
7458 whether an object declaration is one of the many variants of controlled
7460 (Is_Null_Access_BIP_Func_Call): New routine.
7461 (Is_Non_BIP_Func_Call): New routine.
7462 (Is_Related_To_Func_Return): New routine.
7463 (Needs_Finalization): Moved from Exp_Ch7.
7464 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
7465 (Find_Protection_Type): Moved from Exp_Ch9.
7466 (Has_Controlled_Coextensions): Removed.
7467 (Has_Controlled_Objects): New routine.
7468 (In_Library_Level_Package_Body): New routine.
7469 (Insert_Action_After): New routine.
7470 (Is_Finalizable_Transient): New routine.
7471 (Is_Null_Access_BIP_Func_Call): New routine.
7472 (Is_Non_BIP_Func_Call): New routine.
7473 (Is_Related_To_Func_Return): New routine.
7474 (Needs_Finalization): Moved from Exp_ch7.
7475 * expander.adb (Expand): Add a case for N_Free_Statement.
7476 * freeze.adb (Freeze_All): Replace the generation of a finalization
7477 list with a collection for access-to-controlled types.
7478 (Freeze_Entity): Code reformatting.
7479 (Freeze_Record_Type): Remove the freezing of a record controller
7481 (Freeze_Subprogram): Code reformatting.
7482 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
7484 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
7485 has a library-level finalizer.
7486 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
7487 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
7488 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
7489 files. Add a-fihema to the list of object files.
7491 Alphabetize the associations in type Is_Parameterless_Attribute.
7492 * rtsfind.ads: Ada.Finalization_List.Controller and
7493 System.Finalization_Implementation are no longer a GNAT unit.
7494 Update the range of type Ada_Finalization_Child. Remove the following
7495 recoverable entities:
7497 RE_Attach_To_Final_List
7501 RE_Finalizable_Ptr_Ptr
7502 RE_Global_Final_List
7503 RE_Limited_Record_Controller
7506 RE_Record_Controller
7507 RE_Simple_List_Controller
7509 Add the following recoverable entities:
7511 RE_Add_Offset_To_Address
7515 RE_Exception_Identity
7516 RE_Finalization_Collection
7517 RE_Finalization_Collection_Ptr
7518 RE_Needs_Finalization
7519 RE_Save_Library_Occurrence
7520 RE_Set_Finalize_Address_Ptr
7521 RE_Set_Storage_Pool_Ptr
7523 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
7525 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
7526 (First_Stored_Discriminant): Remove the mention of Name_uController.
7527 * sem_aux.ads: Comment reformatting.
7528 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
7529 to redecorate an already existing class-wide type.
7530 (Decorate_Tagged_Type): New parameter profile and associated comment.
7531 Create a "shadow class-wide type" for a shadow entity.
7532 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
7533 of the final chain along with the associated comment.
7534 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
7535 Full_Desig and set it to the full view of the designated type.
7536 Initialize the finalization collection to empty.
7537 (Build_Derived_Record_Type): Alphabetize local variables. Code
7539 (Collect_Fixed_Components): Remove the mention of Name_uController.
7540 (Create_Constrained_Components): Remove the mention of Name_uController.
7541 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
7542 class-wide type of a shadow entity.
7543 (Process_Full_View): Update the machinery which marks type
7544 Limited_Controlled's entity as limited.
7545 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
7546 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
7547 list, instead make a collection build-in-place formal.
7548 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
7549 a designated type in order to establish a match between the renaming
7550 and the renamed entity.
7551 (Find_Selected_Component): Add guard to prevent spurious exceptions
7552 from being raised on .NET/JVM.
7553 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
7554 to the list of primitive that need special processing. Update arrays
7555 C_Names and D_Names.
7556 (Replace_Types): Handle class-wide types.
7557 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
7558 different parameter profile, look at the first formal.
7559 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
7560 use clauses for Exp_Util.
7561 * sem_res.adb: Remove with and use clauses for Elists.
7562 (Propagate_Coextensions): Removed.
7563 (Resolve_Allocator): Do not propagate the list of coextensions from one
7564 allocator to another.
7565 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
7566 Deaccessed_T to Desig_Typ.
7567 (Enter_Name): Remove the mention of Name_uController.
7568 (Gather_Components): Remove the mention of Name_uController.
7569 (Incomplete_Or_Private_View): New routine.
7570 (Is_Coextension_Root): Removed.
7571 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
7572 * sem_util.ads (Incomplete_Or_Private_View): New routine.
7573 (Is_Coextension_Root): Removed.
7574 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
7575 Controlled types are now derived from a null tagged record. Remove
7576 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
7577 * sinfo.adb (Coextensions): Removed.
7578 (Set_Coextensions): Removed.
7579 * sinfo.ads: Remove Coextensions from the explanation of node fields
7580 and its uses in nodes.
7581 Update the field usage of N_Allocator.
7582 (Coextensions): Removed along with its pragma Inline.
7583 (Set_Coextensions): Removed along with its pragma Inline.
7584 * snames.ads-tmpl: Remove names
7589 Name_uLocal_Final_List
7590 Name_Finalization_Root
7597 Name_Finalize_Address
7598 * s-pooglo.adb (Allocate): Add overriding indicator.
7599 (Deallocate): Add overriding indicator.
7600 (Storage_Size): Add overriding indicator.
7601 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
7602 than Finalize_Global_List.
7603 (Null_Finalize_Global_List): Removed.
7604 (Save_Library_Occurrence): New routine.
7605 * s-soflin.ads: Remove variable Finalize_Global_List along with its
7606 initialization. Add variable Finalize_Library_Objects along with its
7607 pragma Export. Add variables Library_Exception and
7608 Library_Exception_Set along with their pragma Export.
7609 (Null_Finalize_Global_List): Removed.
7610 (Save_Library_Occurrence): New routine.
7611 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
7612 rather than Finalize_Global_List.
7613 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
7614 of the constructed node.
7616 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7618 * link.c: Include "auto-host.h" before system headers.
7620 2011-08-03 Vincent Celier <celier@adacore.com>
7622 * make.adb (Gnatmake): Add to table Library_Projs only library projects
7623 that are not extended. Do not check if a library project that is
7624 extended should be regenerated. Do not add to table Library_Paths the
7625 libraries that are in extended projects. Link only with libraries that
7626 are in libray projects that are not extended.
7627 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
7628 for a library project that is extended.
7630 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7632 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
7633 conforming subprogram renamings that appear to be completions if they
7634 are not fully conformant.
7635 Such renamings are homographs but not completions.
7636 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
7637 names in a subprogram renaming that appears in an instance.
7639 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7641 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
7642 not immutably limited, build actual subtype from expression to provide
7643 proper bounds to caller.
7645 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7647 * sem_ch8.adb: Minor comment correction.
7649 2011-08-03 Thomas Quinot <quinot@adacore.com>
7651 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
7652 returning a limited array, use an extended return statement.
7654 2011-08-03 Vincent Celier <celier@adacore.com>
7656 * make.adb (Initialize): If --subdirs= is used, but no project file is
7657 specified, attempt to create the specify subdir if it does not already
7658 exist and use it as the object directory as if -D had been specified.
7660 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7662 * s-tpopsp-vms.adb: New file.
7663 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
7664 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
7666 2011-08-03 Emmanuel Briot <briot@adacore.com>
7668 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
7671 2011-08-03 Yannick Moy <moy@adacore.com>
7673 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
7674 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
7675 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
7676 detect that an array has static bounds.
7678 2011-08-03 Thomas Quinot <quinot@adacore.com>
7680 * exp_dist.adb: Minor reformatting.
7682 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7684 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
7685 (ATCB_Key): Removed, not always used.
7687 2011-08-03 Emmanuel Briot <briot@adacore.com>
7689 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
7690 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
7691 most remaining global variables.
7693 2011-08-03 Robert Dewar <dewar@adacore.com>
7695 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
7696 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
7699 2011-08-03 Javier Miranda <miranda@adacore.com>
7701 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
7702 that must be passed by copy in VM targets.
7704 2011-08-03 Emmanuel Briot <briot@adacore.com>
7706 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
7707 duplicates a similar htable now in the project tree.
7709 2011-08-03 Claire Dross <dross@adacore.com>
7711 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
7712 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
7713 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
7714 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
7715 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
7716 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
7717 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
7720 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7722 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
7723 (ATCB_Key): Removed, not always used.
7724 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
7726 * s-tpopsp-tls.adb: New file.
7727 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
7728 x86/x64/ia64/powerpc/sparc Linux.
7730 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7732 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
7733 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
7735 2011-08-03 Thomas Quinot <quinot@adacore.com>
7737 * rtsfind.ads, exp_dist.adb, exp_dist.ads
7738 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
7739 Fix type selection for mapping integer types to PolyORB types.
7741 2011-08-03 Bob Duff <duff@adacore.com>
7743 * sem_ch7.adb: Minor comment clarification.
7745 2011-08-03 Bob Duff <duff@adacore.com>
7747 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
7748 an error analyzing a choice, skip further processing. Further
7749 processing could cause a crash or cascade errors.
7751 2011-08-03 Emmanuel Briot <briot@adacore.com>
7753 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
7754 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
7755 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
7756 prj-env.ads (Shared_Project_Tree_Data): new type
7757 An aggregate project and its aggregated trees need to share the common
7758 data structures used for lists of strings, packages,... This makes the
7759 code simpler since otherwise we have to pass the root tree (also used
7760 for the configuration file data) in addition to the current project
7761 tree. This also avoids ambiguities as to which tree should be used.
7762 And finally this saves a bit of memory.
7763 (For_Every_Project_Imported): new parameter Tree.
7764 Since aggregated projects are using a different tree, we need to let
7765 the caller know which tree to use to manipulate the returned project.
7767 2011-08-03 Robert Dewar <dewar@adacore.com>
7769 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
7770 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
7771 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
7772 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
7774 2011-08-03 Javier Miranda <miranda@adacore.com>
7776 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
7777 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
7779 2011-08-03 Bob Duff <duff@adacore.com>
7781 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
7784 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
7786 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
7787 g-sehash.ads: Fix typo. Update header.
7789 2011-08-03 Thomas Quinot <quinot@adacore.com>
7791 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
7794 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7796 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
7797 prefixes of private types along with records, since the selector may be
7799 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
7800 private types along with records, since the selector may be a
7803 2011-08-03 Emmanuel Briot <briot@adacore.com>
7805 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
7807 2011-08-03 Javier Miranda <miranda@adacore.com>
7809 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
7810 Tagged_Type_Expansion.
7812 2011-08-03 Yannick Moy <moy@adacore.com>
7814 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
7815 violation when the argument of concatenation is the name of a
7818 2011-08-03 Emmanuel Briot <briot@adacore.com>
7820 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
7821 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
7822 (Process_Declarative_Items): new parameter Child_Env.
7824 2011-08-03 Yannick Moy <moy@adacore.com>
7826 * alfa.ads: Update format of ALFA section in ALI file in order to
7827 add a mapping from bodies to specs when both are present.
7828 (ALFA_Scope_Record): Add components for spec file/scope.
7829 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
7831 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
7832 collected, fill in the spec information when relevant.
7833 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
7836 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7838 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
7839 code unit to decide whether to add internally generated subprograms.
7841 2011-08-03 Javier Miranda <miranda@adacore.com>
7843 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
7844 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
7845 be handled by copy in VM targets.
7847 2011-08-03 Emmanuel Briot <briot@adacore.com>
7849 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
7850 code with Makeutl.Get_Switches.
7851 * prj-tree.adb: Update comment.
7853 2011-08-03 Thomas Quinot <quinot@adacore.com>
7855 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
7856 subprogram with a limited formal that does not support external
7859 2011-08-03 Yannick Moy <moy@adacore.com>
7861 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
7863 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
7864 not from current unit in two phases, because it is not possible to
7865 change the table while iterating over its content.
7866 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
7868 2011-08-03 Sergey Rybin <rybin@adacore.com>
7870 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
7871 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
7873 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7875 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
7876 and the component type is composite, this is ambiguous for predefined
7877 concatenation, but if the node is not overloaded and the entity is a use
7878 -defined function its profile can be used to resolve that aggregate.
7880 2011-08-03 Robert Dewar <dewar@adacore.com>
7882 * exp_ch4.adb: Minor code cleanup.
7884 2011-08-03 Thomas Quinot <quinot@adacore.com>
7886 * exp_dist.adb: Do not generate distribution stubs if serious errors
7887 have been diagnosed.
7889 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7891 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
7892 the first formal of a primitive operation, go to the base type to
7893 handle properly an access to a derived type with constrained
7895 * sem_type.adb (Disambiguate): an immediately visible operator hides a
7896 user-defined function that is only use-visible.
7898 2011-08-03 Robert Dewar <dewar@adacore.com>
7900 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
7901 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
7902 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
7903 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
7904 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
7905 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
7906 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
7907 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
7909 2011-08-03 Robert Dewar <dewar@adacore.com>
7911 * repinfo.adb (List_Mechanism): Add handling of
7912 Convention_Ada_Pass_By_XXX.
7913 * sem_mech.adb (Set_Mechanism): Ditto.
7914 * sem_prag.adb (Process_Convention): Add entries for
7915 Convention_Ada_Pass_By_XXX.
7916 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
7918 2011-08-03 Pascal Obry <obry@adacore.com>
7920 * makeutl.adb: Minor reformatting.
7922 2011-08-03 Vincent Celier <celier@adacore.com>
7925 (Get_File_Name) If the file cannot be found when there are no config
7926 pragmas file and May_Fail is True, return No_File instead of the file
7927 name, to be consistent.
7929 2011-08-03 Pascal Obry <obry@adacore.com>
7931 * adaint.c (__gnat_is_executable_file_attr): Avoid access
7934 2011-08-03 Javier Miranda <miranda@adacore.com>
7937 (Same_Representation): In VM targets the representation of arrays with
7938 aliased components differs from arrays with non-aliased components.
7940 2011-08-03 Emmanuel Briot <briot@adacore.com>
7942 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
7943 not systematically lower case attribute indexes that contain no "."
7944 Fix definition of several Naming attributes, which take
7945 a unit name as index and therefore should be case insensitive.
7946 Minor refactoring (reduce length of variable names).
7948 2011-08-03 Emmanuel Briot <briot@adacore.com>
7950 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
7952 2011-08-03 Emmanuel Briot <briot@adacore.com>
7954 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
7955 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
7956 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
7957 prj-tree.ads (Prj.Tree.Environment): new type.
7959 2011-08-03 Emmanuel Briot <briot@adacore.com>
7961 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
7962 prj-tree.adb, prj-tree.ads (Environment): new type.
7964 2011-08-03 Emmanuel Briot <briot@adacore.com>
7966 * prj-tree.ads: Remove unused variable.
7968 2011-08-03 Yannick Moy <moy@adacore.com>
7970 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
7971 issuing messages related to SPARK restriction violation.
7973 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7975 * sem_ch6.adb: guard against error nodes in return statements.
7977 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7979 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
7980 a warning can only appear on a configuration file, so emit warning
7981 without further checks.
7983 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7985 * s-interr.ads: add overriding keyword.
7987 2011-08-03 Geert Bosch <bosch@adacore.com>
7989 * exp_attr.adb: Fix minor typo.
7991 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7993 * par-ch4.adb: improve error recovery.
7995 2011-08-03 Emmanuel Briot <briot@adacore.com>
7997 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
7998 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
8001 2011-08-03 Emmanuel Briot <briot@adacore.com>
8003 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
8004 "external" as an attribute name in aggregate projects.
8006 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8008 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
8009 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
8010 from 0, so we need to adjust.
8012 2011-08-03 Emmanuel Briot <briot@adacore.com>
8014 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
8015 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
8017 2011-08-03 Yannick Moy <moy@adacore.com>
8019 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
8020 restriction on overloaded entity if the entity is not an operator.
8022 2011-08-03 Yannick Moy <moy@adacore.com>
8024 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
8025 restrict.ads: Rename remaining Check_Formal_Restriction* into
8026 Check_SPARK_Restriction*.
8028 2011-08-03 Emmanuel Briot <briot@adacore.com>
8030 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
8031 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
8033 (Project_Empty): removed
8034 (Empty_Project): new parameter Qualifier
8035 This is used to have fields specific to aggregate projects, cleaner
8036 New field to store the list of aggregated projects.
8037 (Check_Aggregate_Project): removed
8038 (Process_Aggregated_Projects, Free): new subprograms.
8040 2011-08-03 Olivier Hainque <hainque@adacore.com>
8042 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
8044 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8046 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
8047 explicit dereference of an unconstrained type, create a constrained
8048 subtype for it, as is done for function calls that return an
8051 2011-08-03 Thomas Quinot <quinot@adacore.com>
8053 * g-pehage.adb (Finalize): Avoid possible double-free.
8055 2011-08-03 Steve Baird <baird@adacore.com>
8057 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
8058 Elab_Spec/Body attrs in CodePeer_Mode.
8060 2011-08-03 Javier Miranda <miranda@adacore.com>
8062 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
8063 low bound is not known at compile time but they have no others choice.
8064 Done because in this case the bounds can be obtained directly from the
8067 2011-08-03 Ed Falis <falis@adacore.com>
8069 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
8070 on VxWorks SMP. Remove unusable constant ANY_CPU.
8072 2011-08-03 Emmanuel Briot <briot@adacore.com>
8074 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
8075 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
8076 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
8077 Prj.Env.Initialize_Empty): new subprograms
8078 (Get_Env, Find_Project): remove parameter Target_Name.
8080 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8082 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
8083 as a condition for the delayed call to Derived_Subprograms done for the
8084 case of the rewriting of a derived type that constrains the
8085 discriminants of its parent type.
8086 Avoids redundant subprogram derivations for private subtype derivations.
8088 2011-08-03 Javier Miranda <miranda@adacore.com>
8090 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
8091 Build_Record_Aggr_Code.
8092 (Build_Record_Aggr_Code): Add missing support to initialize hidden
8093 discriminants in extension aggregates.
8095 2011-08-03 Emmanuel Briot <briot@adacore.com>
8097 * prj-pp.adb (Print): also output project qualifiers, since in
8098 particular "aggregate" is mandatory in an aggregate project.
8100 2011-08-03 Emmanuel Briot <briot@adacore.com>
8102 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
8103 (Debug_Output): new function.
8105 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8107 * gnat_ugn.texi: Document -Wstack-usage.
8108 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
8110 2011-08-03 Thomas Quinot <quinot@adacore.com>
8112 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
8113 have keyword LIMITED.
8115 2011-08-03 Yannick Moy <moy@adacore.com>
8117 * alfa.adb, alfa.ads, alfa_test.adb: New files.
8118 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
8119 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
8120 section (does not happen in compiler, only if code directly calls
8122 * get_alfa.adb, get_alfa.ads: New files.
8123 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
8125 * lib-xref-alfa.adb: New file.
8126 * lib-xref.adb, lib-xref.ads
8127 (Xref_Entry): redefine information needed in cross-references for ALFA.
8128 Push ALFA treatments in separated local package.
8129 (Enclosing_Subpragram_Or_Package): treat specially subprogram
8130 identifiers. Return entity of package body instead of spec. Return
8131 Empty for a scope with no location.
8132 (Generate_Reference): adapt to new components for ALFA information.
8133 Remove the need for D references on definitions.
8134 (Is_Local_Reference): moved to ALFA local package
8135 (Output_References): extract subfunction as Extract_Source_Name
8136 (Output_Local_References): remove procedure, replaced by filtering of
8137 cross-references in package ALFA and printing in Put_ALFA.
8138 (Write_Entity_Name): remove procedure
8139 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
8140 print exact name of entity as it appears in source file
8141 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
8142 * put_alfa.adb, put_alfa.ads: New files.
8143 * xref_lib.adb (Search_Xref): protect read of cross-references against
8144 reading other sections of the ALI file, in gnatxref
8145 (Search): protect read of cross-references against reading other
8146 sections of the ALI file, in gnatfind.
8147 * gcc-interface/Make-lang.in: Update dependencies.
8149 2011-08-03 Thomas Quinot <quinot@adacore.com>
8151 * sem_ch3.adb: Minor reformatting.
8153 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8155 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
8156 raising an exception.
8158 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8160 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
8161 type, always use 1 as the lower bound or string, even if lower bound of
8162 context is not static, to handle properly null strings in a non-static
8165 2011-08-03 Bob Duff <duff@adacore.com>
8167 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
8168 always legal on the right-hand side of an assignment statement; there
8169 is always an applicable index constraint in this case. Therefore, the
8170 check for Pkind = N_Assignment_Statement is now unconditional -- it
8171 doesn't depend on whether Is_Constrained (Typ).
8173 2011-08-03 Robert Dewar <dewar@adacore.com>
8175 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
8177 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8179 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
8180 for an itype created within a generic unit.
8182 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8184 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
8185 suppresses all inlining.
8187 2011-08-03 Robert Dewar <dewar@adacore.com>
8189 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
8190 exp_aggr.adb: Minor reformatting.
8192 2011-08-03 Thomas Quinot <quinot@adacore.com>
8194 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
8195 tagged assignment when discriminant checks are suppressed. This is
8196 useless and extremely costly in terms of static stack usage.
8198 2011-08-03 Bob Duff <duff@adacore.com>
8200 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
8201 of generics, because this leads to the wrong entity in the wrong scope,
8202 causing (e.g.) pragma Export_Procedure to get an error if the entity is
8204 (Process_Interface_Name): Follow Alias for instances of generics, to
8205 correct for the above change.
8207 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8209 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
8210 is an integer literal it is always safe to replace the reference. In
8211 addition, if the reference appears in the generated code for an object
8212 declaration it is necessary to copy because otherwise the reference
8213 might be to the uninitilized value of the discriminant of the object
8216 2011-08-03 Pascal Obry <obry@adacore.com>
8218 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
8219 ACL used, in this case we want to check for ending .exe, not .exe
8220 anywhere in the path.
8222 2011-08-03 Sergey Rybin <rybin@adacore.com>
8224 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8225 the tree structure (semantic decoration of references to record
8228 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8230 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
8231 choices of a named array aggregate, bail out when any choices are
8232 marked as Errors_Posted.
8234 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8236 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
8237 in which entity is frozen, to handle properly loop variables in
8240 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8242 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
8243 subtype is not static, compute the upper bound using attributes, to
8244 handle properly index types that are not integer types.
8246 2011-08-03 Bob Duff <duff@adacore.com>
8248 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
8249 Update copyright notice.
8251 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8253 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
8254 Original_Discriminant if within an instance.
8255 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
8257 2011-08-03 Thomas Quinot <quinot@adacore.com>
8259 * einfo.ads: Minor reformatting.
8261 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8263 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
8264 composite type with an unfrozen subcomponent, in the profile of a
8265 primitive operation.
8267 2011-08-03 Robert Dewar <dewar@adacore.com>
8269 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
8271 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8273 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
8274 unconstrained type with discriminants is initialized with an aggregate,
8275 use the constrained subtype of the aggregate as the type of the object,
8276 because it is immutable, and this allows the back-end to generate no
8277 code for the object declaration.
8279 2011-08-03 Robert Dewar <dewar@adacore.com>
8281 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
8282 comparison operand is variable, and turns out to be zero or negative.
8284 2011-08-03 Javier Miranda <miranda@adacore.com>
8287 (Expand_Dispatching_Constructor_Call): Disable expansion of
8288 code required for native targets. Done to avoid generating
8289 references to unavailable runtime entities in VM targets.
8291 (Expand_N_Object_Declaration): Add missing support to handle
8292 the explicit initialization of class-wide interface objects.
8295 2011-08-03 Matthew Heaney <heaney@adacore.com>
8297 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
8299 2011-08-03 Matthew Heaney <heaney@adacore.com>
8301 * a-cbdlli.adb (Splice): move source items from first to last
8303 2011-08-03 Yannick Moy <moy@adacore.com>
8305 * sem_util.ads: comment added.
8307 2011-08-03 Javier Miranda <miranda@adacore.com>
8310 (Expand_Record_Aggregate): In VM targets disable the expansion into
8311 assignments of aggregates whose type is not known at compile time.
8313 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8315 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
8316 protected entries and task entries, to build the proper renaming
8317 declaration for entry formals, used in debugging.
8318 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
8319 parameters in the same way.
8321 2011-08-02 Robert Dewar <dewar@adacore.com>
8323 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
8324 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
8325 code reorganization.
8327 2011-08-02 Robert Dewar <dewar@adacore.com>
8329 * debug.adb: Debug flag d.P to suppress length comparison optimization
8330 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
8331 comparison of Length by comparing First/Last instead.
8333 2011-08-02 Matthew Heaney <heaney@adacore.com>
8335 * a-cobove.ads: Code clean up.
8337 2011-08-02 Vincent Celier <celier@adacore.com>
8339 * adaint.c (file_names_case_sensitive_cache): New static int.
8340 (__gnat_get_file_names_case_sensitive): Cache the return value in
8341 file_names_case_sensitive_cache at the first invocation, to avoid
8342 multiple calls to getenv.
8344 2011-08-02 Bob Duff <duff@adacore.com>
8346 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
8348 2011-08-02 Yannick Moy <moy@adacore.com>
8350 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
8351 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
8352 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
8353 indicate that we are in a precondition or postcondition. This is used in
8354 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
8355 decide whether to flag the spec or body of the current subprogram as
8358 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
8360 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
8362 * a-extiin.ads: New file.
8364 2011-08-02 Bob Duff <duff@adacore.com>
8366 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
8367 now raises Name_Error instead of Use_Error in certain cases. The other
8368 parts of this AI were already implemented properly.
8370 2011-08-02 Vincent Celier <celier@adacore.com>
8372 * link.c: Only import "auto-host.h" when building the gnattools.
8374 2011-08-02 Yannick Moy <moy@adacore.com>
8376 * sem_util.adb: Inter-unit inlining does not work for a subprogram
8377 which calls a local subprogram, so extract subprogram
8378 from Mark_Non_ALFA_Subprogram_Body.
8380 2011-08-02 Javier Miranda <miranda@adacore.com>
8383 (Extract_Dispatching_Call): If the type of the dispatching object is an
8384 access type then return an explicit dereference in the Object out-mode
8387 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8389 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
8390 compatibility checks for all indexes of an array subtype, not just the
8391 first. Reset Has_Dynamic_Range_Check on the subtype before each
8392 potential check to ensure that Insert_Range_Checks will not elide any
8393 of the dynamic checks.
8395 2011-08-02 Yannick Moy <moy@adacore.com>
8397 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
8398 SPARK restriction at parsing time.
8399 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
8400 directive only if the SPARK restriction is set for this unit.
8402 2011-08-02 Yannick Moy <moy@adacore.com>
8404 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
8405 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
8406 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
8407 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
8408 Mark_Non_ALFA_Subprogram_Body.
8409 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
8412 2011-08-02 Yannick Moy <moy@adacore.com>
8414 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
8417 2011-08-02 Robert Dewar <dewar@adacore.com>
8419 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
8420 exp_ch3.adb: Minor reformatting.
8422 2011-08-02 Emmanuel Briot <briot@adacore.com>
8424 * adaint.c (__gnat_locate_exec_on_path): only returns executable
8425 files, not any regular file.
8426 (__gnat_locate_file_with_predicate): new subprogram.
8428 2011-08-02 Yannick Moy <moy@adacore.com>
8430 * sinfo.adb, sinfo.ads: Restrict the use of flags
8431 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
8432 nodes, plus N_Subtype_Declaration for the 2nd one.
8434 2011-08-02 Sergey Rybin <rybin@adacore.com>
8436 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8437 - fix bugs in the description of Source_Trace;
8438 - get rid of UNIT_NAME;
8440 2011-08-02 Javier Miranda <miranda@adacore.com>
8443 (Build_Dispatching_Requeue): Adding support for VM targets
8444 since we cannot directly reference the Tag entity.
8445 * exp_sel.adb (Build_K): Adding support for VM targets.
8446 (Build_S_Assignment): Adding support for VM targets.
8448 (Default_Prim_Op_Position): In VM targets do not restrict availability
8449 of predefined interface primitives to compiling in Ada 2005 mode.
8450 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8451 restricted to compiling in Ada 2005 mode.
8452 (Make_VM_TSD): Generate code that declares and initializes the OSD
8453 record. Needed to support dispatching calls through synchronized
8456 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8457 primitives associated with synchronized interfaces.
8458 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8459 primitives associated with synchronized interfaces.
8461 2011-08-02 Yannick Moy <moy@adacore.com>
8463 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8464 statements hidden in SPARK if preceded by the HIDE directive
8465 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8466 exception handlers as hidden in SPARK if preceded by the HIDE directive
8467 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8468 if starting with the HIDE directive
8469 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8470 starting with the HIDE directive; mark the declarations in a private
8471 part as hidden in SPARK if the private part starts with the HIDE
8473 * restrict.adb, restrict.ads
8474 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8475 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8476 argument node belongs to a part which is hidden in SPARK
8477 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8478 parts in SPARK; protect the possibly costly call to
8479 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8480 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8481 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8482 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8484 (Scan): recognize special comment starting with '#' and followed by
8485 SPARK keyword "hide" as a HIDE directive.
8487 2011-08-02 Yannick Moy <moy@adacore.com>
8489 * types.ads, erroutc.ads: Minor reformatting.
8491 2011-08-02 Vincent Celier <celier@adacore.com>
8493 * link.c: Add response file support for cross platforms.
8495 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8497 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8498 in an association, set parent field of copy before partial analysis.
8499 * sem_res.adb (Resolve_Slice): create reference to itype only when
8500 expansion is enabled.
8502 2011-08-02 Yannick Moy <moy@adacore.com>
8504 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8505 for new flag denoting which subprogram bodies are in ALFA
8506 * restrict.adb, sem_ch7.adb: Update comment
8507 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8508 sem_ch9.adb, sem_res.adb: Add calls to
8509 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8510 * sem_ch6.adb (Analyze_Function_Return): add calls to
8511 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8512 middle of the body, and extended return.
8513 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8514 False when missing return.
8515 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8516 to True for subprograms whose spec is in ALFA. Remove later on the flag
8517 on the entity used for a subprogram body when there exists a separate
8519 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8520 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8521 False, otherwise do nothing.
8523 2011-08-02 Robert Dewar <dewar@adacore.com>
8525 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8527 2011-08-02 Yannick Moy <moy@adacore.com>
8529 * sem_ch4.ads: minor formatting.
8531 2011-08-02 Yannick Moy <moy@adacore.com>
8533 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8534 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8535 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8536 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8537 opt.ads: cleanup of SPARK mode
8539 2011-08-02 Yannick Moy <moy@adacore.com>
8541 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8543 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8544 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8546 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8547 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8548 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8549 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8551 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8553 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8554 functions whose return type is not in ALFA.
8555 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8557 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8558 parameter's type is not in ALFA.
8559 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8562 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8564 * sem_ch6 (Analyze_Expression_Function): treat the function as
8565 Inline_Always, and introduce a subprogram declaration for it when it is
8567 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8568 expression functions, so that the back-end can determine whether they
8569 can in fact be inlined.
8570 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8571 a function body comes from an expression function.
8573 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8575 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8576 null exclusions to test Can_Never_Be_Null on the anonymous access types
8577 of the formals rather than testing the formals themselves. Exclude this
8578 check in cases where the Old_Formal is marked as a controlling formal,
8579 to avoid issuing spurious errors for bodies completing dispatching
8580 operations (due to the flag not getting set on controlling access
8581 formals in body specs).
8582 (Find_Corresponding_Spec): When checking full and subtype conformance of
8583 subprogram bodies in instances, pass Designated and E in that order, for
8584 consistency with the expected order of the formals (New_Id followed by
8587 2011-08-02 Robert Dewar <dewar@adacore.com>
8589 * sem_ch8.adb: Minor reformatting.
8591 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8593 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8594 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8595 primitive operations of class-wide actuals.
8597 2011-08-02 Javier Miranda <miranda@adacore.com>
8599 * exp_atag.ads, exp_atag.adb
8600 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8601 since its value is implicitly passed in argument Typ.
8602 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8603 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8604 Build_Common_Dispatching_Select_Statements.
8606 2011-08-02 Robert Dewar <dewar@adacore.com>
8608 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8609 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8612 2011-08-02 Robert Dewar <dewar@adacore.com>
8614 * sem_res.adb: Minor reformatting.
8615 * sem_prag.adb: Minor reformatting.
8617 2011-08-02 Javier Miranda <miranda@adacore.com>
8619 * exp_atag.adb, exp_atags.ads
8620 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8621 by the tagged type Entity. Required to use this routine in the VM
8622 targets since we do not have available the Tag entity in the VM
8625 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8626 Ada.Tags has not been previously loaded.
8628 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8629 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8631 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8632 view of enclosing scopes. Required to handle enclosing scopes that
8633 are synchronized types whose full view is a task type.
8635 (Build_VM_TSDs): Minor code improvement to avoid generating and
8636 analyzing lists with empty nodes.
8637 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8638 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8639 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8640 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8641 (Make_Select_Specific_Data_Table): Add support for VM targets.
8642 (Make_VM_TSD): Generate code to initialize the SSD structure of
8645 2011-08-02 Yannick Moy <moy@adacore.com>
8647 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8648 cross-references section in ALI.
8649 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8650 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8652 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8653 subprogram or package entity of a node
8654 (Is_Local_Reference_Type): new function returns True for references
8655 selected in local cross-references.
8656 (Lt): function extracted from Lt in Output_References
8657 (Write_Entity_Name): function extracted from Output_References
8658 (Generate_Definition): generate reference with type 'D' for definition
8659 of objects (object declaration and parameter specification), with
8660 appropriate locations and units, for use in local cross-references.
8661 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8662 references of type 'I' for initialization in object definition.
8663 (Output_References): move part of function Lt and procedure
8664 Write_Entity_Name outside of the body. Ignore references of types 'D'
8665 and 'I' introduced for local cross-references.
8666 (Output_Local_References): new procedure to output the local
8667 cross-references sections.
8668 (Lref_Entity_Status): new array defining whether an entity is a local
8669 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8670 with 'I' type when initialization expression is present.
8671 * get_scos.adb, get_scos.ads: Correct comments and typos
8673 2011-08-02 Javier Miranda <miranda@adacore.com>
8675 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8677 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8679 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8682 2011-08-02 Vincent Celier <celier@adacore.com>
8684 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8685 (No_Space_Img): New function
8686 (Find_Excluded_Sources): When reading from a file, record the file name
8687 and the line number for each excluded source.
8688 (Mark_Excluded_Sources): When reporting an error, if the excluded
8689 sources were read from a file, include file name and line number in
8692 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8694 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8696 2011-08-02 Robert Dewar <dewar@adacore.com>
8698 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8700 2011-08-02 Javier Miranda <miranda@adacore.com>
8702 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8703 generation of TSDs to the DOTNET compiler.
8704 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8705 generation of TSDs to the DOTNET compiler.
8707 2011-08-02 Javier Miranda <miranda@adacore.com>
8709 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8710 record of all the tagged types declared inside library level package
8711 declarations, library level package bodies or library level subprograms.
8712 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8713 associated with a given tagged type.
8714 (Build_VM_TSDs): New subprogram.
8715 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8716 compilation units that are subprograms.
8717 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8718 compilation units that are package bodies.
8719 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8720 units that are a package declaration or a package instantiation.
8721 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8722 reorganization to improve the error generated by the frontend when the
8723 function Ada.Tags.Secondary_Tag is not available.
8724 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8725 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8727 2011-08-02 Javier Miranda <miranda@adacore.com>
8729 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8731 2011-08-02 Robert Dewar <dewar@adacore.com>
8733 * s-imenne.ads: Minor reformatting.
8735 2011-08-02 Robert Dewar <dewar@adacore.com>
8737 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8738 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8739 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8741 2011-08-02 Robert Dewar <dewar@adacore.com>
8743 * einfo.ads (Materialize_Entity): Document this is only for renamings
8744 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8745 required debug information in the case where we transform the object
8746 declaration into a renaming declaration.
8747 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8749 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8752 2011-08-02 Robert Dewar <dewar@adacore.com>
8754 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8755 Suppress_Init_Procs.
8756 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8757 Suppress_Initialization/Initialization_Suppressed.
8758 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8759 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8760 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8761 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8763 2011-08-02 Robert Dewar <dewar@adacore.com>
8765 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8768 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8770 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8771 only have inheritable classwide pre/postconditions.
8773 2011-08-02 Javier Miranda <miranda@adacore.com>
8775 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8776 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8777 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8778 checks if the external tag of a type is the same as the external tag
8779 of some other declaration.
8781 2011-08-02 Thomas Quinot <quinot@adacore.com>
8783 * s-taskin.ads: Minor reformatting.
8785 2011-08-02 Emmanuel Briot <briot@adacore.com>
8787 * g-comlin.adb (Display_Help): swap the order in which it prints the
8788 short help and the general usage.
8790 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8792 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8793 the aspect declarations and attach them to the generic copy for
8794 subsequent analysis.
8795 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8796 declarations of the generic tree to the new subprogram declarations.
8797 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8798 conditions that apply to a subprogram instance.
8800 2011-08-02 Robert Dewar <dewar@adacore.com>
8802 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8804 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8806 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8807 private type with a tagged full view is not derived in the immediate
8808 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8810 2011-08-02 Robert Dewar <dewar@adacore.com>
8812 * exp_ch4.adb: Minor reformatting.
8814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8816 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8817 Ada2012 iterator, the loop will be rewritten during expansion into a
8818 while loop with a cursor and an element declaration. Do not analyze the
8819 body in this case, because if the container is for indefinite types the
8820 actual subtype of the elements will only be determined when the cursor
8821 declaration is analyzed.
8823 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8825 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8826 size/alignment related attributes in CodePeer_Mode.
8828 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8830 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8831 Prepend_Element, since this can result in the operation getting the
8832 wrong slot in the full type's dispatch table if the full type has
8833 inherited operations. The incomplete type's operation will get added
8834 to the proper position in the full type's primitives
8835 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8836 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8837 dispatching operations, since there are cases where nonprimitive
8838 subprograms can get added to the list of incomplete dependents (such
8839 as subprograms in nested packages).
8840 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8841 private part when determining whether to add a primitive with a
8842 parameter of a tagged incomplete type to the Private_Dependents list.
8843 Such primitives can also occur in the visible part, and should not have
8844 been excluded from being private dependents.
8845 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8846 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8847 list of a Taft-amendment incomplete type is a primitive before issuing
8848 an error that the full type must appear in the same unit. There are
8849 cases where nonprimitives can be in the list (such as subprograms in
8851 * sem_disp.adb (Derives_From): Use correct condition for checking that
8852 a formal's type is derived from the type of the corresponding formal in
8853 the parent subprogram (the condition was completely wrong). Add
8854 checking that was missing for controlling result types being derived
8855 from the result type of the parent operation.
8857 2011-08-02 Yannick Moy <moy@adacore.com>
8859 * errout.adb (First_Node): minor renaming
8860 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8863 2011-08-02 Yannick Moy <moy@adacore.com>
8865 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8866 before accessing operands.
8867 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8868 decide whether an initialization expression respects SPARK rules, as
8869 the plain node is the expanded one. This allows for more valid warnings
8871 * gnat_rm.texi: Minor update.
8873 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8875 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8878 2011-08-02 Robert Dewar <dewar@adacore.com>
8880 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8882 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8884 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8885 loop statements and the element renaming declaration with a block when
8886 the element type is controlled.
8888 2011-08-02 Yannick Moy <moy@adacore.com>
8890 * sinfo.ads: Minor formatting.
8892 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8894 * sem_aggr.adb (Add_Association): if the association has a box and no
8895 expression, use the Sloc of the aggregate itself for the new
8897 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8900 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8902 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8903 When a container is provided via a function call, generate a renaming
8904 of the function result. This avoids the creation of a transient scope
8905 and the premature finalization of the container.
8906 * exp_ch7.adb (Is_Container_Cursor): Removed.
8907 (Wrap_Transient_Declaration): Remove the supression of the finalization
8908 of the list controller when the declaration denotes a container cursor,
8911 2011-08-02 Yannick Moy <moy@adacore.com>
8913 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8914 node is from source, instead of the original node being from source.
8916 (Resolve_Array_Aggregate): refine the check for a static expression, to
8917 recognize also static ranges
8918 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8919 Array_Type_Declaration): postpone the test for the type being a subtype
8920 mark after the type has been resolved, so that component-selection and
8921 expanded-name are discriminated.
8922 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8923 to distinguish the case of an iteration scheme, so that an error is
8924 issed on a non-static range in SPARK except in an iteration scheme.
8925 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8926 In_Iter_Schm = True.
8927 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8928 user-defined operators so that they are allowed in renaming
8930 (Find_Selected_Component): refine the check for prefixing of operators
8931 so that they are allowed in renaming. Move the checks for restrictions
8932 on selector name after analysis discriminated between
8933 component-selection and expanded-name.
8934 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8935 concatenation argument of string type if it is static.
8936 * sem_util.adb, sem_util.ads
8937 (Check_Later_Vs_Basic_Declarations): add a new function
8938 Is_Later_Declarative_Item to decice which declarations are allowed as
8939 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8940 mode, add that renamings are considered as later items.
8941 (Enclosing_Package): new function to return the enclosing package
8942 (Enter_Name): correct the rule for homonyms in SPARK
8943 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8944 from source (result of expansion) to avoid issuing wrong warnings.
8946 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8948 * errout.adb: On anything but an expression First_Node returns its
8951 2011-08-02 Pascal Obry <obry@adacore.com>
8953 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8955 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8957 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8958 Set the associated loop as the related expression of internally
8960 * exp_ch7.adb (Is_Container_Cursor): New routine.
8961 (Wrap_Transient_Declaration): Supress the finalization of the list
8962 controller when the declaration denotes a container cursor.
8964 2011-08-02 Yannick Moy <moy@adacore.com>
8966 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8968 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8969 expression is a simple expression. This check cannot be performed in
8970 the semantics, so just drop it.
8971 (P_Index_Or_Discriminant_Constraint): move check that the index or
8972 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8973 semantics. Other cases were previously checked in the semantics.
8974 * par-ch4.adb (P_Name): move checks that a selector name is not
8975 character literal or an operator symbol to Find_Selected_Component in
8977 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8978 declarations are not placed after later declarations in a separate
8979 procedure in Sem_Util (possibly not the best choice?), to be used both
8980 during parsing, for Ada 83 mode, and during semantic analysis, for
8982 * par-endh.adb (Check_End): move check that end label is not missing
8983 to Process_End_Label in the semantics
8984 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8985 the special case for SPARK restriction
8986 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8987 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8988 parameter Force to issue the error message even on internal node (used
8989 for generated end label). Call Check_Restriction to check when an error
8990 must be issued. In SPARK mode, issue an error message even if the
8991 restriction is not set.
8992 (Check_Restriction): new procedure with an additional out parameter to
8993 inform the caller that a message has been issued
8994 * sem_aggr.adb: Minor modification of message
8995 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8996 instead of issuing an error message directly
8997 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8998 declarations are not placed after later declarations, by calling
8999 Check_Later_Vs_Basic_Declarations
9000 (Analyze_Subtype_Declaration): move here the check that an index or
9001 discriminant constraint must be a subtype mark. Change the check that
9002 a subtype of String must start at one so that it works on subtype marks.
9003 * sem_ch4.adb (Analyze_Call): move here the check that a named
9004 association cannot follow a positional one in a call
9005 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9006 instead of issuing an error message directly
9007 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9008 selector name is not a character literal or an operator symbol. Move
9009 here the check that the prefix of an expanded name cannot be a
9010 subprogram or a loop statement.
9011 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9012 procedure called from parsing and semantics to check that basic
9013 declarations are not placed after later declarations
9014 (Process_End_Label): move here the check that end label is not missing
9016 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9018 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9019 representation clause in codepeer mode, since it confuses CodePeer and
9020 does not bring useful info.
9022 2011-08-02 Ed Falis <falis@adacore.com>
9024 * init.c: initialize fp hw on MILS.
9026 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9028 * errout.adb (First_Node): for bodies, return the node itself (small
9029 optimization). For other nodes, do not check source_unit if the node
9030 comes from Standard.
9032 2011-08-02 Robert Dewar <dewar@adacore.com>
9034 * exp_ch3.adb: Minor comment additions.
9035 * sem_ch13.adb: Minor reformatting.
9037 2011-08-02 Pascal Obry <obry@adacore.com>
9039 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9041 2011-08-02 Robert Dewar <dewar@adacore.com>
9043 * sem_attr.adb: Minor reformatting.
9045 2011-08-02 Robert Dewar <dewar@adacore.com>
9047 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9048 (Has_Default_Component_Value): Removed
9049 * einfo.ads Comment updates
9050 (Has_Default_Aspect): Replaces Has_Default_Value
9051 (Has_Default_Component_Value): Removed
9053 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9055 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9056 (Get_Simple_Init_Val): Handle Default_Value aspect
9057 (Needs_Simple_Initialization): Handle Default_Value aspect
9058 * exp_ch3.ads: Needs_Simple_Initialization
9059 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9060 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9062 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9063 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9064 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9066 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9068 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9069 package containing iteration primitives.
9070 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9072 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9074 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9075 "of", pre-analyze expression in case it is a function call with
9076 finalization actions that must be placed ahead of the loop.
9077 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9078 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9080 2011-08-02 Geert Bosch <bosch@adacore.com>
9082 * cstand.adb (Create_Float_Types): Only consider C's long double for
9083 Long_Long_Float, in addition to double.
9085 2011-08-02 Robert Dewar <dewar@adacore.com>
9087 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9088 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9089 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9094 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9097 2011-08-02 Javier Miranda <miranda@adacore.com>
9099 * einfo.ads, einfo.adb
9100 (Original_Access_Type): Move this attribute to Node26 since there was
9101 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9102 which causes conflicts and breaks the generation of the .NET compiler.
9103 (Interface_Name): Add missing documentation on JGNAT only uses of
9106 2011-08-02 Geert Bosch <bosch@adacore.com>
9108 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9109 (Find_Back_End_Float_Type): Likewise
9110 (Create_Back_End_Float_Types): Likewise
9111 (Create_Float_Types): Likewise
9112 (Register_Float_Type): Likewise
9113 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9114 Nlist and split out type selection in new local Find_Base_Type function.
9115 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9117 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9119 2011-08-02 Robert Dewar <dewar@adacore.com>
9121 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9123 * opt.ads: Minor comment change.
9124 * sem_ch12.adb: Minor code reorganization.
9126 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9128 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9129 subtype's list of rep items to the list on the full subtype in the case
9130 where the lists are the same.
9132 2011-08-02 Geert Bosch <bosch@adacore.com>
9134 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9135 using the one from System.Strings, which also deallocates all strings.
9137 2011-08-02 Geert Bosch <bosch@adacore.com>
9139 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9141 * gcc-interface/Make-lang.in: Update dependencies.
9143 2011-08-02 Olivier Hainque <hainque@adacore.com>
9145 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9148 2011-08-02 Javier Miranda <miranda@adacore.com>
9150 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9151 associated with anonymous access to subprograms.
9153 2011-08-02 Geert Bosch <bosch@adacore.com>
9156 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9157 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9158 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9159 (Add_Symbol_Definition): Move to switch-c.adb
9160 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9161 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9162 (Add_Symbol_Definition): Move to switch-c.adb.
9163 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9165 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9167 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9168 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9170 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9171 (Add_Symbol_Definition): Moved from Prepcomp.
9172 * switch-c.ads: Update copyright notice. Use String_List instead of
9173 Argument_List, removing dependency on System.OS_Lib.
9175 2011-08-02 Yannick Moy <moy@adacore.com>
9177 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9178 mode on initialization expression which does not respect SPARK
9180 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9181 if the tree referenced by its argument represents an initialization
9182 expression in SPARK, suitable for initializing an object in an object
9185 2011-08-02 Javier Miranda <miranda@adacore.com>
9187 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9188 internally generated access to subprogram with its associated protected
9190 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9192 2011-08-02 Geert Bosch <bosch@adacore.com>
9194 * cstand.adb (Register_Float_Type): Print information about type to
9195 register, if the Debug_Flag_Dot_B is set.
9196 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9197 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9198 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9199 with a requested precision of more than Max_Digits digits and no more
9200 than Max_Base_Digits digits, if a range specification is present and the
9201 Predefined_Float_Types list has a suitable type to derive from.
9202 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9203 case of type completion with pragma Import
9205 (Process_Import_Predefined_Type): Processing to complete a type
9206 with pragma Import. Currently supports floating point types only.
9207 (Set_Convention_From_Pragma): Do nothing without underlying type.
9208 (Process_Convention): Guard against absence of underlying type,
9209 which may happen when importing incomplete types.
9210 (Process_Import_Or_Interface): Handle case of importing predefined
9211 types. Tweak error message.
9213 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9215 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9216 functions to previous change. Reorganize code slightly.
9218 2011-08-02 Geert Bosch <bosch@adacore.com>
9220 * back_end.ads (Register_Type_Proc): New call back procedure type for
9221 allowing the back end to provide information about available types.
9222 (Register_Back_End_Types): New procedure to register back end types.
9223 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9225 * cstand.adb (Back_End_Float_Types): New list for floating point types
9226 supported by the back end.
9227 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9228 (Copy_Float_Type): New procedure to make new copies of predefined types.
9229 (Register_Float_Type): New call back procedure to populate the BEFT list
9230 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9231 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9232 (Create_Float_Types): New procedure to create entities for floating
9233 point types predefined in Standard, and put these and any remaining
9234 BEFTs on the Predefined_Float_Types list.
9235 * stand.ads (Predefined_Float_Types): New list for predefined floating
9236 point types that do not have declarations in package Standard.
9238 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9240 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9241 entity node for the unit containing the parameter.
9242 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9243 (Add_Inlined_Subprogram): Likewise.
9244 * gcc-interface/Make-lang.in: Update dependencies.
9246 2011-08-02 Thomas Quinot <quinot@adacore.com>
9248 * s-stusta.adb (Print): Make sure Pos is always initialized to a
9251 2011-08-02 Geert Bosch <bosch@adacore.com>
9253 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9255 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9257 * sem_type.adb (Covers): Move trivial case to the top and reuse the
9258 computed value of Base_Type.
9260 2011-08-02 Yannick Moy <moy@adacore.com>
9262 * restrict.adb (Check_Restriction): issue an error for any use of
9263 class-wide, even if the No_Dispatch restriction is not set.
9264 * sem_aggr.adb: Correct typos in comments and messages in formal mode
9265 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9266 when completing a private extension, the type named in the private part
9267 is not the same as that named in the visible part.
9268 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9269 of an inherited primitive operations of a tagged type or type extension
9270 that returns the tagged type.
9271 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9272 function which returns True for an implicit operation inherited by the
9273 derived type declaration for the argument type.
9274 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9279 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9280 Process_Bounds, to perform analysis with expansion of a range or an
9281 expression that is the iteration scheme for a loop.
9282 (Analyze_Iterator_Specification): If domain of iteration is given by a
9283 function call with a controlled result, as is the case if call returns
9284 a predefined container, ensure that finalization actions are properly
9286 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9288 2011-08-02 Javier Miranda <miranda@adacore.com>
9290 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9291 * gcc-interface/Make-lang.in: Update dependencies.
9293 2011-08-02 Javier Miranda <miranda@adacore.com>
9295 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9296 determine if the analysis is performed using N or Original_Node (N).
9297 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9298 functionality of routine Is_Variable avoids code duplication.
9299 * checks.adb (Determine_Range): Handle temporaries generated by
9300 Remove_Side_Effects.
9302 2011-08-02 Javier Miranda <miranda@adacore.com>
9304 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9305 expansion of the condition. Required since the previous analysis was
9306 done with expansion disabled (see Resolve_Quantified_Expression) and
9307 hence checks were not inserted and record comparisons have not been
9310 2011-08-02 Ed Falis <falis@adacore.com>
9312 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9315 2011-08-02 Bob Duff <duff@adacore.com>
9317 * opt.ads: Minor comment fix.
9319 2011-08-02 Bob Duff <duff@adacore.com>
9321 * sem_ch12.adb (Analyze_Package_Instantiation,
9322 Analyze_Subprogram_Instantiation): Turn off style checking while
9323 analyzing an instance. Whatever style checks that apply to the generic
9324 unit should apply, so it makes no sense to apply them in an instance.
9325 This was causing trouble when compiling an instance of a runtime
9326 unit that violates the -gnatyO switch.
9327 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9328 one of the two case statements, causing spurious errors.
9330 2011-08-02 Robert Dewar <dewar@adacore.com>
9332 * uname.adb: Minor reformatting.
9333 * gnatcmd.adb: Minor reformatting.
9334 * exp_attr.adb: Minor reformatting.
9336 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9338 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9339 No_Dispatching_Calls, do not look for the Assign primitive, because
9340 predefined primitives are not created in this case.
9342 2011-08-02 Bob Duff <duff@adacore.com>
9344 * stylesw.ads: Minor comment fixes.
9346 2011-08-02 Robert Dewar <dewar@adacore.com>
9348 * freeze.adb (Add_To_Result): New procedure.
9350 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9352 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9353 time, if the specific run-time routines for handling streams of strings
9354 are not available, use the default mechanism.
9356 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9358 * s-regpat.ads: Fix typo.
9360 2011-08-02 Vincent Celier <celier@adacore.com>
9362 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9363 not null, call it to create the in memory config project file without
9364 parsing an existing default config project file.
9366 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9368 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9372 * sem_elim.adb: an abstract subprogram does not need an eliminate
9373 pragma for its descendant to be eliminable.
9375 2011-08-02 Ed Falis <falis@adacore.com>
9377 * init.c: revert to handling before previous checkin for VxWorks
9378 * s-intman-vxworks.adb: delete unnecessary declarations related to
9379 using Ada interrupt facilities for handling signals.
9380 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9381 * s-intman-vxworks.ads: Import __gnat_install_handler as
9382 Initialize_Interrupts.
9383 * s-taprop-vxworks.adb: Delete Signal_Mask.
9384 (Abort_Handler): change construction of mask to unblock exception
9387 2011-08-02 Jerome Guitton <guitton@adacore.com>
9389 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9390 Debug_Raise_Exception before propagation starts.
9392 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9394 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9395 to Restriction_Check_Required.
9396 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9397 * sem_res.adb (Resolve_Call): Likewise.
9398 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9400 2011-08-02 Bob Duff <duff@adacore.com>
9402 * stylesw.ads: Update comment.
9403 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9404 * errout.ads: Remove obsolete comment.
9406 2011-08-02 Javier Miranda <miranda@adacore.com>
9408 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9409 (Set_Is_Safe_To_Reevaluate): new procedure.
9410 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9411 assignment is allowed on safe-to-reevaluate variables.
9412 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9413 temporary created to remove side effects in expressions that use
9414 the secondary stack as safe-to-reevaluate.
9415 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9416 variables that are not true constants.
9418 2011-08-02 Robert Dewar <dewar@adacore.com>
9420 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9421 sem_res.adb, sem_ch6.adb: Minor reformatting.
9423 2011-08-02 Jerome Guitton <guitton@adacore.com>
9425 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9427 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9429 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9430 not set Overridden_Operation if subprogram is an initialization
9433 2011-08-02 Yannick Moy <moy@adacore.com>
9435 * par-ch6.adb: Correct obsolete name in comments
9436 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9437 which takes two message arguments (existing function takes one), with
9438 second message used for continuation.
9439 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9440 block statements that originate from a source block statement, not
9441 generated block statements
9442 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9443 symmetry with procedure case
9444 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9445 function to issue an error in formal mode if a package specification
9446 contains more than one tagged type or type extension.
9447 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9448 parameters matching formals of tagged types are objects (or ancestor
9449 type conversions of objects), not general expressions. Issue an error
9450 on view conversions that are not involving ancestor conversion of an
9452 (Resolve_Type_Conversion): in formal mode, issue an error on the
9453 operand of an ancestor type conversion which is not an object
9454 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9455 procedure so that it works also for actuals of function calls
9456 (Is_Actual_Tagged_Parameter): new function which determines if its
9457 argument is an actual parameter of a formal of tagged type in a
9459 (Is_SPARK_Object_Reference): new function which determines if the tree
9460 referenced by its argument represents an object in SPARK
9462 2011-08-02 Robert Dewar <dewar@adacore.com>
9464 * sem_ch3.adb: Minor reformatting
9465 Minor comment addition
9466 Minor error msg text change
9468 2011-08-02 Javier Miranda <miranda@adacore.com>
9470 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9471 function. Used to be more precise when we generate a variable plus one
9472 assignment to remove side effects in the evaluation of the Bound
9474 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9475 of the bound expression to force its re-analysis and thus expand the
9476 associated transient scope (if required). Code cleanup replacing the
9477 previous code that declared the constant entity by an invocation to
9478 routine Force_Evaluation which centralizes this work in the frontend.
9480 2011-08-02 Robert Dewar <dewar@adacore.com>
9482 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9483 (Base_Type): Now uses improved Is_Base_Type function
9484 * einfo.ads (Base_Type): Inline this function
9486 2011-08-02 Robert Dewar <dewar@adacore.com>
9488 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9489 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9491 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9493 * gcc-interface/Make-lang.in: Update dependencies.
9494 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9497 2011-08-02 Yannick Moy <moy@adacore.com>
9499 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9500 non-simple expression used in delta constraint
9501 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9502 index constraint which is not a subtype mark
9503 * par.adb: With and use Restrict
9504 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9505 mode on component type which is not a subtype mark and default
9506 expression on component
9507 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9508 of string which does not have a lower index bound equal to 1
9509 (Array_Type_Declaration): issue an error in formal mode on index or
9510 component type which is not a subtype mark, and on aliased keyword on
9512 (Derived_Type_Declaration): issue an error in formal mode on interface,
9513 limited or abstract type
9514 (Record_Type_Declaration): issue an error in formal mode on interface
9515 (Record_Type_Definition): issue an error in formal mode on tagged types
9516 and type extensions not declared in the specification of a library unit
9517 package; on null non-tagged record; on variant part
9519 2011-08-02 Vincent Celier <celier@adacore.com>
9521 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9522 not declared for qualified library project when Library_Name is not
9523 declared, but Library_Dir is.
9525 2011-08-02 Robert Dewar <dewar@adacore.com>
9527 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9528 pragmas (affects aspects [Component_]Default_Value
9529 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9530 component type for the resolution
9532 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9534 * einfo.adb (Base_Type): Tune implementation for speed.
9536 2011-08-02 Robert Dewar <dewar@adacore.com>
9538 * freeze.adb: Minor reformatting.
9540 2011-08-02 Thomas Quinot <quinot@adacore.com>
9542 * scos.ads: Update comments.
9544 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9546 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9547 base type, because the parent may be a subtype of a private type whose
9548 convention is established in a private part.
9550 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9552 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9553 statement in a block when the expansion of the return expression has
9554 created a finalization chain.
9555 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9556 with the parent node.
9557 Add N_Extended_Return_Statement to handle the case where a transient
9558 object declaration appears in the Return_Object_Declarations list of
9559 an extended return statement.
9561 2011-08-02 Matthew Gingell <gingell@adacore.com>
9563 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9564 unused parameter 'name'.
9566 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9568 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9569 inherited operation, check whether its alias, which is the source
9570 operastion that it renames, has been marked eliminated.
9572 2011-08-02 Javier Miranda <miranda@adacore.com>
9574 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9575 in-mode parameter whose type is an access type since it can be used to
9576 modify its designated object. Enforce code that handles as safe an
9577 access type that is not access-to-constant but it is the result of a
9578 previous removal of side-effects.
9579 (Remove_Side_Effects): Minor code reorganization of cases which require
9580 no action. Done to incorporate documentation on new cases uncovered
9581 working in this ticket: no action needed if this routine was invoked
9582 too early and the nodes are not yet decorated.
9583 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9584 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9585 were issued with actuals that are implicitly provided by
9588 2011-08-02 Robert Dewar <dewar@adacore.com>
9590 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9592 2011-08-02 Yannick Moy <moy@adacore.com>
9594 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9595 to issue an error in formal mode on attribute not supported in this mode
9596 (Analyze_Attribute): issue errors on standard attributes not supported
9598 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9599 comment, and issue error in formal mode on modulus which is not a power
9601 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9603 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9605 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9606 operator on modular type (except 'not').
9608 2011-08-02 Robert Dewar <dewar@adacore.com>
9610 * gnat_rm.texi: Minor reformatting.
9612 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9614 * s-osinte-linux.ads: Minor comment update and reformatting.
9615 * i-cexten.ads: Make this unit pure, as for its parent.
9616 Will allow its usage in more contexts if needed.
9618 2011-08-02 Robert Dewar <dewar@adacore.com>
9620 * s-utf_32.ads: Minor comment fix.
9622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9624 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9625 operation of a tagged synchronized type, handle the case where the
9626 controlling argument is overloaded.
9628 2011-08-02 Yannick Moy <moy@adacore.com>
9630 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9631 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9632 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9633 SPARK mode and formal verification mode on processing SPARK restriction
9634 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9635 requiring consistency checking.
9637 2011-08-02 Robert Dewar <dewar@adacore.com>
9639 * sem_res.adb: Minor reformatting.
9641 2011-08-02 Robert Dewar <dewar@adacore.com>
9643 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9644 a-cforse.ads: Remove unneeded with of Ada.Containers
9645 Remove commented out pragma Inline's
9646 Move specifications of new subprograms to the actual specs
9648 2011-08-02 Yannick Moy <moy@adacore.com>
9650 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9651 a-cforse.ads: Update comments.
9653 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9655 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9657 2011-08-02 Robert Dewar <dewar@adacore.com>
9659 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9660 a-cforse.ads, a-cofove.ads: Minor reformatting.
9662 2011-08-02 Claire Dross <dross@adacore.com>
9664 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9665 a-cofove.ads: Add comments.
9667 2011-08-02 Yannick Moy <moy@adacore.com>
9669 * gnat_rm.texi: Document formal containers.
9671 2011-08-02 Emmanuel Briot <briot@adacore.com>
9673 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9676 2011-08-02 Robert Dewar <dewar@adacore.com>
9678 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9681 2011-08-02 Robert Dewar <dewar@adacore.com>
9683 * aspects.adb: New aspects Default_Value and Default_Component_Value
9684 New format of Aspect_Names table checks for omitted entries
9685 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9686 handling of boolean aspects for derived types.
9687 New aspects Default_Value and Default_Component_Value
9688 New format of Aspect_Names table checks for omitted entries
9689 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9690 (Has_Default_Value): New flag
9691 (Has_Default_Component_Value): New flag
9692 (Has_Default_Value): New flag
9693 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9695 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9696 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9697 Default_Value and Default_Component_Value
9698 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9699 New aspects Default_Value and Default_Component_Value
9700 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9701 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9703 2011-08-02 Vincent Celier <celier@adacore.com>
9705 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9706 inherit library kind.
9708 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9710 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9713 2011-08-02 Robert Dewar <dewar@adacore.com>
9715 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9717 2011-08-02 Yannick Moy <moy@adacore.com>
9719 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9721 2011-08-02 Robert Dewar <dewar@adacore.com>
9723 * impunit.adb: Add comment.
9725 2011-08-02 Yannick Moy <moy@adacore.com>
9727 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9728 qualification of aggregates in formal mode
9729 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9731 (Resolve_Aggregate): complete the test that an aggregate is adequately
9732 qualified in formal mode
9734 2011-08-02 Pascal Obry <obry@adacore.com>
9736 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9737 * mlib-prj.adb: Supress warning when compiling binder generated file.
9738 (Build_Library): Supress all warnings when compiling the binder
9741 2011-08-02 Yannick Moy <moy@adacore.com>
9743 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9745 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9746 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9747 Add with/use clauses to make Check_Formal_Restriction visible
9749 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9751 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9752 in-parameters when type of the generic formal is private in the generic
9753 spec and non-private in the body.
9755 2011-08-02 Claire Dross <dross@adacore.com>
9757 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9758 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9759 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9760 * impunit.adb, Makefile.rtl: Take new files into account.
9762 2011-08-02 Robert Dewar <dewar@adacore.com>
9764 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9765 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9767 2011-08-02 Yannick Moy <moy@adacore.com>
9769 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9771 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9772 matching static array bounds, taking into account the special case of
9774 * sem_ch3.adb: Typo in comment.
9776 2011-08-02 Yannick Moy <moy@adacore.com>
9778 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9779 which issues an error in formal mode if its argument node is originally
9781 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9782 has a discriminant specification so that it does not include the case
9784 (Derived_Type_Declaration): move here the test that a derived type has a
9785 discriminant specification
9786 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9787 first element of a component association before accessing its choices
9788 (presence of component association is not enough)
9789 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9790 declaration is a library item before accessing the next element in a
9791 list, as library items are not member of lists
9792 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9793 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9794 Check_Formal_Restriction whenever possible.
9796 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9798 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9799 reference when needed.
9801 2011-08-02 Bob Duff <duff@adacore.com>
9803 * gnat_ugn.texi: Fix typo.
9805 2011-08-02 Vincent Celier <celier@adacore.com>
9807 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9808 archive file name. Do not use the full path name of archives for Open
9811 2011-08-02 Robert Dewar <dewar@adacore.com>
9813 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9814 Analyze_Aspect_Specifications
9816 (Analyze_Aspect_Specifications): New handling for boolean aspects
9817 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9818 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9819 sequence for Analyze_Aspect_Specifications
9820 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9821 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9823 2011-08-02 Robert Dewar <dewar@adacore.com>
9825 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9826 aspects, since these no longer exist.
9828 2011-08-02 Robert Dewar <dewar@adacore.com>
9830 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9831 semicolon, do not try to see if there are aspects following it.
9832 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9835 2011-08-02 Robert Dewar <dewar@adacore.com>
9837 * sem_ch8.adb, aspects.ads: Minor reformatting.
9839 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9841 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9842 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9844 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9846 2011-08-02 Yannick Moy <moy@adacore.com>
9848 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9849 mode on subprogram declaration outside of package specification, unless
9850 it is followed by a pragma Import
9851 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9852 Access_Type_Declaration): issue error in formal mode on access type
9853 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9855 (Analyze_Object_Declaration): issue error in formal mode on object
9856 declaration which does not respect SPARK restrictions
9857 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9858 declaration which does not respect SPARK restrictions
9859 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9860 error in formal mode on digits or delta constraint
9861 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9862 decimal fixed point type
9863 (Derived_Type_Declaration): issue error in formal mode on derived type
9864 other than type extensions of tagged record types
9865 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9866 with check on access definition
9867 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9868 mode on protected definition.
9869 (Analyze_Task_Definition): issue error in formal mode on task definition
9871 2011-08-02 Robert Dewar <dewar@adacore.com>
9873 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9875 2011-08-02 Javier Miranda <miranda@adacore.com>
9877 * sem_ch6.adb (Can_Override_Operator): New function.
9878 (Verify_Overriding_Indicator): Add missing code to check overriding
9879 indicator in operators. Fixes regression.
9880 (Check_Overriding_Indicator): Minor reformating after replacing the
9881 code that evaluates if the subprogram can override an operator by
9882 invocations to the above new function.
9884 (Write_Field26_Name): Add missing code to ensure that, following
9885 the documentation in einfo.ads, this field is not shown as attribute
9886 "Static_Initialization" on non-dispatching functions.
9888 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9890 * sem_res.adb (Resolve_Call): A call to
9891 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9892 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9893 i.e., when the second parameter is of type Time_Span.
9895 2011-08-02 Vincent Celier <celier@adacore.com>
9897 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9898 with an archive instead of -L<library dir> -l<library name>.
9900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9902 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9903 mark the base types In_Use in addition to making the operations
9906 2011-08-02 Ed Falis <falis@adacore.com>
9908 * init.c: add and setup __gnat_signal_mask for the exception signals
9909 * s-inmaop-vxworks.adb: new file.
9910 * s-intman-vxworks.adb: remove unnecessary initializations and
9912 * s-intman-vxworks.ads: remove unnecessary variable
9913 * s-taprop-vxworks.adb: simplify signal initialization
9915 2011-08-02 Robert Dewar <dewar@adacore.com>
9917 * sem_ch8.adb: Minor code reorganization, comment updates.
9919 2011-08-02 Robert Dewar <dewar@adacore.com>
9921 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9922 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9924 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9925 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9927 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9929 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9930 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9931 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9932 use_type_clauses, to handle more efficiently use_type and use_all_type
9934 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9935 Ada2012 Use_All_Type clause.
9936 (Use_Class_Wide_Operations): new procedure.
9938 2011-08-02 Robert Dewar <dewar@adacore.com>
9940 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9941 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9942 expression to expression function.
9944 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9946 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9947 if types are compatible.
9949 2011-08-02 Yannick Moy <moy@adacore.com>
9951 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9952 returns True if its argument array types have same dimension and same
9953 static bounds at each index.
9954 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9955 OUT or IN OUT paramaters which are not view conversions in SPARK.
9956 (Resolve_Arithmetic_Op): issue an error in formal mode on
9957 multiplication or division with operands of fixed point types which are
9958 not qualified or explicitly converted.
9959 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9960 Boolean or array type (except String) operands.
9961 (Resolve_Equality_Op): issue an error in formal mode on equality
9962 operators for array types other than String with non-matching static
9964 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9965 for array types with non-matching static bounds. Factorize the code in
9966 Matching_Static_Array_Bounds.
9967 (Resolve_Qualified_Expression): issue an error in formal mode on
9968 qualified expressions for array types with non-matching static bounds.
9969 (Resolve_Type_Conversion): issue an error in formal mode on type
9970 conversion for array types with non-matching static bounds
9972 2011-08-02 Robert Dewar <dewar@adacore.com>
9974 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9976 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9978 * par-ch9.adb: save location of entry for proper error message.
9980 2011-08-02 Javier Miranda <miranda@adacore.com>
9982 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9983 (Use_Full_View) which permits this routine to climb through the
9984 ancestors using the full-view of private parents.
9985 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9986 Use_Full_View to true in calls to Is_Ancestor.
9987 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9988 true in call to Is_Ancestor.
9989 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9990 Use_Full_View to true in call to Is_Ancestor.
9991 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9992 call to Is_Ancestor.
9993 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9994 Use_Full_View to true in calls to Is_Ancestor.
9995 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9996 Make_Select_Specific_Data_Table, Register_Primitive,
9997 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9998 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9999 to true in call to Is_Ancestor.
10000 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10001 Use_Full_View to true in calls to Is_Ancestor.
10003 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10004 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10006 2011-08-02 Robert Dewar <dewar@adacore.com>
10008 * gnat_rm.texi: Minor reformatting.
10009 * sem_prag.adb: Minor reformatting.
10011 2011-08-02 Tristan Gingold <gingold@adacore.com>
10013 * vms_data.ads: Add VMS qualifier for -gnateP.
10015 2011-08-02 Robert Dewar <dewar@adacore.com>
10017 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10018 * par-ch7.adb (P_Package): Proper placement of aspects for package
10019 decl/instantiation.
10020 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10021 (End_Statements): Add Is_Sloc parameterr
10022 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10023 (Check_End): Ad Is_Sloc parameter
10024 (End_Statements): Add Is_Sloc parameterr
10026 2011-08-02 Vincent Celier <celier@adacore.com>
10028 * ug_words: Add VMS qualifier equivalent to -gnateP:
10029 /SYMBOL_PREPROCESSING.
10031 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10033 * gnat-style.texi: For hexadecimal numeric literals the typical
10034 grouping of digits is 4 to represent 2 bytes.
10035 A procedure spec which is split into several lines is indented two
10038 2011-08-02 Yannick Moy <moy@adacore.com>
10040 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10041 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10042 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10044 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10045 choice in array aggregate
10046 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10048 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10049 positional and named aggregate for record, or others in record
10050 aggregate, or multiple choice in record aggregate
10051 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10052 array operands to logical operations AND, OR and XOR do not have the
10053 same static lower and higher bounds
10054 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10056 2011-08-01 Robert Dewar <dewar@adacore.com>
10058 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10059 Replaces Last_Source_Node_In_Sequence.
10060 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10061 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10062 parens and blank in string (this was inconsistently implemented).
10064 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10065 blank in string (this was inconsistently implemented).
10067 (Set_Global_Switches): Set formal mode switches appropriately
10068 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10070 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10071 call Set_Error_Msg_Lang to set "spark" as language name.
10072 * par.adb: Remove unnecessary call to set formal language for errout
10073 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10074 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10076 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10077 calls to it, moved after resolution so that types are known
10078 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10079 result of concatenation is not of type String
10080 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10081 concatenation is not properly restricted
10082 * gnat_rm.texi: Add doc on pragma Spark_95.
10083 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10084 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10085 * gcc-interface/Make-lang.in: Update dependencies.
10087 2011-08-01 Javier Miranda <miranda@adacore.com>
10089 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10090 condition that detects if the overridden operation must replace an
10093 2011-08-01 Javier Miranda <miranda@adacore.com>
10095 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10096 code declarations inserted by Insert_Actions in each alternative of the
10097 N_Case_Expression node.
10099 2011-08-01 Robert Dewar <dewar@adacore.com>
10101 * sem_ch6.adb: Minor code reorganization.
10102 * sem_util.adb: Minor reformatting.
10104 2011-08-01 Pascal Obry <obry@adacore.com>
10106 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10107 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10109 2011-08-01 Yannick Moy <moy@adacore.com>
10111 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10112 literal or operator symbol which is prefixed
10113 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10114 mode on access attributes.
10115 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10116 that concatenation operands are properly restricted in formal mode
10117 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10118 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10119 result of the concatenation has a type different from String.
10120 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10121 Analyze_Quantified_Expression, Analyze_Slice,
10122 Analyze_Null): issue an error in formal mode on unsupported constructs
10124 (Analyze_Block_Statement): only issue error on source block statement
10125 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10126 function which returns the last node in a list of nodes for which
10127 Comes_From_Source returns True, if any
10128 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10129 Last_Source_Node_In_Sequence
10130 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10131 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10132 mode on unsupported constructs
10133 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10134 rest of the actions may be needed later on since the error is marked as
10136 * sinfo.ads: Typos in comments.
10138 2011-08-01 Pascal Obry <obry@adacore.com>
10140 * projects.texi: Minor editing.
10142 2011-08-01 Yannick Moy <moy@adacore.com>
10144 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10145 insertion character ~~
10146 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10147 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10148 with insertion character ~~
10149 (Set_Msg_Text): treat insertion character ~~
10150 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10151 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10152 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10153 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10154 errors related to the formal language restriction not serious
10155 (insertion character |).
10156 * par.adb (Par): set formal language for error messages if needed
10157 * sem_ch6.adb (Check_Missing_Return): take into account possible
10158 generated statements at the end of the function
10159 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10160 enumeration value to define a new pragma SPARK_95
10161 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10162 SPARK_Version): new type and variables to store the SPARK version
10164 (SPARK_Mode): return True when SPARK_Version is set
10165 * par-prag.adb: Correct indentation
10166 (Prag): take Pragma_SPARK_95 into account
10167 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10170 2011-08-01 Robert Dewar <dewar@adacore.com>
10172 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10173 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10174 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10176 2011-08-01 Pascal Obry <obry@adacore.com>
10178 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10179 Target_Name to Get_Path call.
10180 (Parse_Single_Project): Likewise.
10181 (Post_Parse_Context_Clause): Likewise.
10182 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10183 Call Initialise_Project_Path with the proper Target_Name.
10184 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10186 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10187 with the proper Target_Name.
10188 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10189 Part.Parse routine.
10190 (Parse_Project_And_Apply_Config): Likewise.
10191 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10192 This is fine as this part of the code is supporting only native
10194 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10195 is fine as this part of the code is supporting only native compilation.
10197 2011-08-01 Yannick Moy <moy@adacore.com>
10199 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10200 of homonym, unless the homonym is one of the cases allowed in SPARK
10201 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10202 package declaration occurring after a body.
10204 2011-08-01 Robert Dewar <dewar@adacore.com>
10206 * checks.adb, exp_ch4.adb: Minor reformatting.
10208 2011-08-01 Javier Miranda <miranda@adacore.com>
10210 * einfo.ads (Access_Disp_Table): Fix documentation.
10211 (Dispatch_Table_Wrappers): Fix documentation.
10213 2011-08-01 Pascal Obry <obry@adacore.com>
10215 * prj-env.adb, prj-env.ads: Minor reformatting.
10217 2011-08-01 Yannick Moy <moy@adacore.com>
10219 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10220 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10221 procedures out of these packages.
10222 * errout.ads, errout.adb
10223 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10224 procedures in of this package
10225 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10226 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10227 on misplaced later vs initial declarations, like in Ada 83
10228 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10229 formal mode on attribute of private type whose full type declaration
10231 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10232 package declaration inside a package specification
10233 (Analyze_Full_Type_Declaration): issue error in formal mode on
10234 controlled type or discriminant type
10235 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10236 user-defined operator means that it should come from the source
10237 (New_Overloaded_Entity): issue error in formal mode on overloaded
10239 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10241 2011-08-01 Thomas Quinot <quinot@adacore.com>
10243 * atree.adb: Minor reformatting.
10244 * checks.adb: Minor reformatting.
10246 2011-08-01 Vincent Celier <celier@adacore.com>
10248 * s-parame-vms-ia64.ads: Fix typo in comment
10250 * s-parame-vms-restrict.ads: Removed, unused.
10252 2011-08-01 Javier Miranda <miranda@adacore.com>
10255 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10257 (Constrain_Index): Remove side effects in the evaluation of the bounds.
10258 * sem_ch3.ads, sem_ch3.adb
10259 (Is_Constant_Bound): New extended version of the subprogram that was
10260 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10261 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10262 * sem_aux.ads (Constant_Value): Fix typo in comment.
10263 * checks.adb (Generate_Index_Checks): New implementation which, for
10264 array objects with constant bounds, generates the runtime check
10265 referencing the bounds of the array type. For other cases this routine
10266 provides its previous behavior obtaining such values from the array
10268 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10270 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10271 we cannot have semantic interpretations of the new node.
10273 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10275 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10278 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10280 * sem_ch8.adb: Minor code editing.
10281 * s-vxwext.adb: Remove trailing space.
10282 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10283 consistency with other files.
10285 2011-08-01 Thomas Quinot <quinot@adacore.com>
10287 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10289 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10291 * par-ch10.adb: reject parameterized expressions as compilation unit.
10292 * sem_ch4.adb: handle properly conditional expression with overloaded
10293 then_clause and no else_clause.
10295 2011-08-01 Tristan Gingold <gingold@adacore.com>
10297 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10298 like done by System.Aux_DEC.
10299 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10301 2011-08-01 Yannick Moy <moy@adacore.com>
10303 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10304 missing label at end of declaration (subprogram or package)
10305 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10306 of positional and named parameter association
10307 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10308 Error_Msg_SP which adds a prefix to the error message giving the name
10309 of the formal language analyzed
10310 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10311 access result type in subprogram, unconstrained array as result type,.
10312 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10314 * sem_ch8.adb: Code clean up.
10316 2011-08-01 Javier Miranda <miranda@adacore.com>
10318 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10319 * einfo.ads (Access_Disp_Table): Fix documentation.
10320 (Dispatch_Table_Wrappers): Fix documentation.
10321 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10322 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10323 to enforce the documentation of this attribute.
10324 (Set_Is_Interface): Cleanup the assertion.
10325 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10326 the Underlying_Type entity before reading attribute Access_Disp_Table.
10327 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10328 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10329 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10330 the Underlying_Type entity before reading attribute Access_Disp_Table.
10331 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10332 Locate the Underlying_Type entity before reading attribute
10335 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10337 * s-poosiz.ads: Additional overriding indicators.
10339 2011-08-01 Yannick Moy <moy@adacore.com>
10341 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10343 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10344 parameter specification does not include a subtype mark.
10345 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10346 formal mode on abstract subprogram.
10347 (Analyze_Subprogram_Specification): issue error in formal mode on
10348 user-defined operator.
10349 (Process_Formals): issue error in formal mode on access parameter and
10350 default expression.
10351 * sem_ch9.adb (Analyze_Abort_Statement,
10352 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10353 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10354 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10355 Analyze_Requeue, Analyze_Selective_Accept,
10356 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10357 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10358 issue error in formal mode on user-defined raise statement.
10360 2011-08-01 Thomas Quinot <quinot@adacore.com>
10362 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10363 declaration being hidden when overriding an implicit inherited
10365 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10366 (-gnats), do not complain about a source file that contains only a
10369 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10371 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10372 variable if already set.
10374 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10376 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10377 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10378 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10379 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10380 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10381 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10382 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10383 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10384 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10385 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10386 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10387 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10388 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10389 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10390 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10391 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10392 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10393 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10394 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10395 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10396 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10397 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10398 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10399 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10400 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10401 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10402 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10403 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10404 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10405 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10406 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10407 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10408 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10409 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10410 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10411 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10412 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10413 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10414 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10415 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10416 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10417 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10418 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10419 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10420 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10421 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10422 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10423 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10424 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10425 Use GNAT instead of GNARL.
10427 2011-08-01 Bob Duff <duff@adacore.com>
10429 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10430 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10431 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10434 2011-08-01 Yannick Moy <moy@adacore.com>
10436 * debug.adb (d.D) reverve flag for the SPARK mode
10437 (d.E) reverve flag for SPARK generation mode
10438 (d.F) reverve flag for Why generation mode
10439 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10440 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10441 functions which return True when the corresponding modes are set
10442 (Formal_Language): return "spark" or "alfa" when in formal verification
10444 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10445 Error_Msg to prefix the error message with a tag giving the formal
10447 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10448 message with a tag giving the formal language
10449 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10451 (Analyze_Case_Statement): issue error in formal mode on case statement
10452 with a single "others" case alternative
10453 (Analyze_Exit_Statement): issue errors in formal mode on exit
10454 statements which do not respect SPARK restrictions
10455 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10456 (Check_Unreachable_Code): always issue an error (not a warning) in
10457 formal mode on unreachable code (concerns both code after an infinite
10458 loop and after an unconditional jump, both not allowed in SPARK)
10459 * sem_ch6.adb (Analyze_Return_Statement): add call to
10460 Set_Return_Present for a procedure containing a return statement
10461 (already done for functions in Analyze_Function_Return)
10462 (Analyze_Function_Return): issue error in formal mode on extended
10463 return or if return is not last statement in function
10464 (Check_Missing_Return): issue error in formal mode if function does
10465 not end with return or if procedure contains a return
10466 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10467 function to detect if there is an inner scope of its parameter S which
10470 2011-08-01 Thomas Quinot <quinot@adacore.com>
10472 * sem_ch6.ads: Minor reformatting.
10474 2011-08-01 Javier Miranda <miranda@adacore.com>
10476 * sem_util.adb (Abstract_Interface_List): Complete condition when
10477 processing private type declarations to avoid reading unavailable
10479 (Is_Synchronized_Tagged_Type): Complete condition when processing
10480 private extension declaration nodes to avoid reading unavailable
10483 2011-08-01 Thomas Quinot <quinot@adacore.com>
10485 * sem_ch3.adb: Minor reformatting.
10487 2011-08-01 Thomas Quinot <quinot@adacore.com>
10489 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10490 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10491 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10492 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10493 for VMS, instead parametrize the common implementation with
10494 System.Parameters declarations.
10496 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10498 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10500 2011-08-01 Tristan Gingold <gingold@adacore.com>
10502 * seh_init.c: Fix SEH handler installation on win64.
10504 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10506 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10507 double analysis of an anonymous access to subprogram, because it can
10508 lead to improper sharing of profiles and a back-end crash.
10510 2011-08-01 Robert Dewar <dewar@adacore.com>
10512 * make.adb, sem_ch4.adb: Minor reformatting.
10513 * gcc-interface/Make-lang.in: Update dependencies.
10514 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10516 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10518 * gnat_rm.texi: Fix definition of Long_Integer.
10520 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10522 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10523 to prevent storage exhaustion.
10524 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10525 finalized is a function body, insert the cleanup code before the final
10526 return statement, to prevent spurious warnings.
10527 * s-pooglo.ads: add overriding indicator.
10529 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10531 * sem_ch4.adb (Operator_Check): improve error message when both a
10532 with_clause and a use_clause are needed to make operator usage legal.
10533 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10534 determine whether a compilation unit is visible within an other,
10535 either through a with_clause in the current unit, or a with_clause in
10536 its library unit or one one of its parents.
10538 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10540 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10541 over an arbitrary expression of an array or container type.
10542 * lib-xref.adb: clarify comment.
10544 2011-08-01 Bob Duff <duff@adacore.com>
10546 * einfo.ads: Minor reformatting.
10547 * debug.adb: Minor comment improvement.
10549 2011-08-01 Javier Miranda <miranda@adacore.com>
10551 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10552 consider hidden subprograms as valid candidates.
10554 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10556 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10558 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10560 * gnat_ugn.texi: Fix typo.
10562 2011-08-01 Robert Dewar <dewar@adacore.com>
10564 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10565 lib-xref.adb: Minor reformatting
10567 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10569 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10570 when to generate a call to Move_Final_List.
10571 (Has_Controlled_Parts): Remove this function.
10573 2011-08-01 Geert Bosch <bosch@adacore.com>
10575 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10576 "," in choice list.
10578 2011-08-01 Thomas Quinot <quinot@adacore.com>
10580 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10581 explicit raise of a predefined exception as Comes_From_Source if the
10582 original N_Raise_Statement comes from source.
10584 2011-08-01 Robert Dewar <dewar@adacore.com>
10586 * sinfo.ads: Add comment.
10587 * sem_ch6.adb: Minor reformatting.
10589 2011-08-01 Robert Dewar <dewar@adacore.com>
10591 * freeze.adb (Freeze_Entity): Refine check for bad component size
10592 clause to avoid rejecting confirming clause when atomic/aliased present.
10594 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10596 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10597 better determine whether an entity reference is a write.
10598 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10600 * lib-xref.adb (Output_References): Do no suppress a read reference at
10601 the same location as an immediately preceeding modify-reference, to
10602 handle properly in-out actuals.
10604 2011-08-01 Tristan Gingold <gingold@adacore.com>
10606 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10608 2011-08-01 Quentin Ochem <ochem@adacore.com>
10610 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10611 heap to compute the result.
10613 2011-08-01 Robert Dewar <dewar@adacore.com>
10615 * atree.ads: Minor reformatting.
10617 2011-08-01 Emmanuel Briot <briot@adacore.com>
10619 * g-expect.adb (Get_Command_Output): Fix memory leak.
10621 2011-08-01 Geert Bosch <bosch@adacore.com>
10623 * cstand.adb (P_Float_Type): New procedure to print the definition of
10624 predefined fpt types.
10625 (P_Mixed_Name): New procedure to print a name using mixed case
10626 (Print_Standard): Use P_Float_Type for printing floating point types
10627 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10628 precision IEEE float.
10630 2011-08-01 Thomas Quinot <quinot@adacore.com>
10632 * sem_ch3.adb: Minor reformatting.
10634 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10636 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10637 the completion of a generic function, insert the new body rather than
10638 rewriting the original.
10640 2011-08-01 Yannick Moy <moy@adacore.com>
10642 * sinfo.ads, errout.ads: Typos in comments.
10644 2011-08-01 Robert Dewar <dewar@adacore.com>
10646 * par-endh.adb: Minor reformatting.
10648 2011-08-01 Robert Dewar <dewar@adacore.com>
10650 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10651 (Pre_Post_Aspects): New subtype.
10652 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10653 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10654 * par-ch7.adb (P_Package): Remove Decl parameter
10655 (P_Package): Handle new syntax for aspects (before IS)
10656 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10658 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10659 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10660 (P_Package): Remove Decl parameter
10661 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10663 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10665 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10666 * sinfo.ads: Document new syntax for aspects in packages etc.
10667 * sprint.adb: Handle new syntax of aspects before IS in package
10669 2011-08-01 Thomas Quinot <quinot@adacore.com>
10671 * atree.ads: Minor reformatting.
10672 * sem_prag.adb: Minor reformatting.
10674 2011-08-01 Robert Dewar <dewar@adacore.com>
10676 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10677 case expr alternative.
10679 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10681 * sem_ch12.adb: Fix typo.
10683 2011-08-01 Geert Bosch <bosch@adacore.com>
10685 * sem_prag.adb (Check_No_Link_Name): New procedure.
10686 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10687 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10688 instead of Standard_Long_Long_Float_Size global. Preparation for
10689 eventual removal of per type constants.
10690 * exp_util.ads (Get_Stream_Size): New function returning the stream
10691 size value of subtype E.
10692 * exp_util.adb (Get_Stream_Size): Implement new function.
10693 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10695 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10697 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10699 2011-08-01 Geert Bosch <bosch@adacore.com>
10701 * cstand.adb: Fix comments.
10702 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10703 count of arguments.
10705 2011-08-01 Robert Dewar <dewar@adacore.com>
10707 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10709 2011-08-01 Geert Bosch <bosch@adacore.com>
10711 * atree.ads: Fix comment.
10713 2011-08-01 Robert Dewar <dewar@adacore.com>
10715 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10716 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10717 * par.adb: Add with for Namet.Sp.
10718 * par-tchk.adb: Minor reformatting.
10720 2011-08-01 Vincent Celier <celier@adacore.com>
10722 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10723 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10724 of the init procedure of a SAL.
10725 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10728 2011-08-01 Thomas Quinot <quinot@adacore.com>
10730 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10733 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10735 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10737 2011-08-01 Thomas Quinot <quinot@adacore.com>
10739 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10740 conformant with its spec (return True only for types that have
10741 an overriding Initialize primitive operation that prevents them from
10742 having preelaborable initialization).
10743 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10744 initialization for controlled types in Ada 2005 or later mode.
10746 2011-08-01 Robert Dewar <dewar@adacore.com>
10748 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10750 (Same_Aspect): New function.
10751 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10752 Type_Invariant, Precondition, Postcondition.
10753 * snames.ads-tmpl: Add Name_Type_Invariant.
10755 2011-08-01 Robert Dewar <dewar@adacore.com>
10757 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10759 (Freeze_All_Ent): Fix error in handling inherited aspects.
10760 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10761 already analyzed, but don't skip entire processing of a declaration,
10762 that's wrong in some cases of declarations being rewritten.
10763 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10764 Don't delay for integer, string literals
10765 Treat predicates in usual manner for delay, remove special case code,
10767 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10768 (Build_Predicate_Function): Update saved expression in aspect
10769 (Build_Invariant_Procedure): Update saved expression in aspect
10770 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10771 of replacement of discriminant references if the reference is simple.
10773 2011-08-01 Robert Dewar <dewar@adacore.com>
10775 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10776 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10777 Static_Predicate and Dynamic_Predicate.
10778 (Build_Predicate_Function): Add processing for Static_Predicate
10779 and Dynamic_Predicate.
10780 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10781 (From_Static_Predicate): New flag
10782 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10784 2011-08-01 Robert Dewar <dewar@adacore.com>
10786 * usage.adb: Documentation cleanup for Ada version modes in usage.
10787 * expander.adb: Minor reformatting.
10789 2011-08-01 Robert Dewar <dewar@adacore.com>
10791 * atree.ads: Minor comment fix.
10792 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10793 a-witeio.ads, sem_prag.adb: Minor reformatting.
10795 2011-08-01 Doug Rupp <rupp@adacore.com>
10797 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10798 pointers. Use descrip.h header file for convenience. Add some
10801 2011-08-01 Robert Dewar <dewar@adacore.com>
10803 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10804 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10805 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10807 (Check_Aspect_At_End_Of_Declarations): New procedure
10808 (Analye_Aspect_Specification): Minor changes for above procedures
10809 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10810 specification node as well.
10812 2011-08-01 Pascal Obry <obry@adacore.com>
10814 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10815 Windows files. Use GetFilesAttributes() in this case to check for file
10816 existence instead of returning with an error code.
10818 2011-08-01 Vincent Celier <celier@adacore.com>
10820 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10821 High is above Source length.
10823 2011-08-01 Robert Dewar <dewar@adacore.com>
10825 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10827 2011-08-01 Robert Dewar <dewar@adacore.com>
10829 * aspects.ads (Boolean_Aspects): New subtype.
10830 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10831 for derived types in cases where the parent type and derived type have
10833 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10834 with aspects when parent type also has aspects.
10835 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10836 boolean expression at this point).
10837 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10838 accordance with final decision on the Ada 2012 feature.
10839 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10841 2011-08-01 Matthew Heaney <heaney@adacore.com>
10843 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10845 2011-08-01 Pascal Obry <obry@adacore.com>
10847 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10848 Fix Replace_Slice when High is above current string size.
10849 (Replace_Slice): Fix DL computation when High is above current
10852 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10854 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10856 2011-08-01 Matthew Heaney <heaney@adacore.com>
10858 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10861 2011-08-01 Pascal Obry <obry@adacore.com>
10863 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10866 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10868 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10869 access to protected subprograms in generic bodies.
10870 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10871 protected type, indicate that the convention of the subprogram is
10872 Convention_Protected, because it may be used in subsequent declarations
10873 within the protected declaration.
10875 2011-08-01 Vincent Celier <celier@adacore.com>
10877 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10878 and "final" procedures when the name of the library is "ada", to avoid
10879 duplicate symbols "adainit" and "adafinal" in executables.
10881 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10883 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10884 quantified expression that appears within a postcondition and uses the
10885 Ada2012 'Result attribute.
10887 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10889 * init.c (__gnat_error_handler): Cast reason to int.
10890 (__gnat_install_handler): Explain sa_sigaction use.
10892 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10894 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10895 subprogram has copy-in copy-out parameters, try to promote the mode of
10896 the return type if it is passed in registers.
10898 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10900 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10901 left operand as addressable.
10903 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10905 * gcc-interface/gigi.h (build_function_stub): Remove.
10906 (build_return_expr): Likewise.
10907 (convert_vms_descriptor): Declare.
10908 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10909 (build_function_stub): Move to...
10910 * gcc-interface/utils2.c (build_return_expr): Move to...
10911 * gcc-interface/trans.c (build_function_stub): ...here.
10912 (build_return_expr): ...here.
10913 (Subprogram_Body_to_gnu): Add local variable for language_function.
10914 Disconnect the parameter attributes cache, if any, once done with it.
10915 Call end_subprog_body only after setting the end_locus.
10916 Build the stub associated with the function, if any, at the very end.
10917 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10918 variables and streamline control flow.
10920 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10923 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10924 g-trasym-dwarf.adb.
10926 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10929 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10930 Assign to act.sa_sigaction.
10931 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10932 current->return_address to char * before arithmetic.
10934 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10936 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10937 Correct argument types.
10938 Extract code from reason.
10939 (__gnat_install_handler): Assign to act.sa_sigaction.
10941 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10943 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10944 (GNAT1_OBJS): ...here.
10946 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10949 * g-socthi-mingw.adb (Fill): Fix formatting.
10951 * gcc-interface/gigi.h: Move around comment.
10953 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10956 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10958 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10961 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10963 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10965 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10966 range comparison if Pmode is SImode.
10968 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10969 Eric Botcazou <ebotcazou@adacore.com>
10971 * adadecode.c: Wrap up in extern "C" block.
10972 * adadecode.h: Likewise.
10973 * adaint.c: Likewise. Remove 'const' keyword.
10974 * adaint.h: Likewise.
10975 * argv.c: Likewise.
10976 * atree.h: Likewise.
10978 * cstreams.c: Likewise.
10980 * exit.c: Likewise.
10982 * final.c: Likewise.
10983 * init.c: Likewise.
10984 * initialize.c: Likewise.
10985 * link.c: Likewise.
10986 * namet.h: Likewise.
10987 * nlists.h: Likewise.
10988 * raise.c: Likewise.
10989 * raise.h: Likewise.
10990 * repinfo.h: Likewise.
10991 * seh_init.c: Likewise.
10992 * targext.c: Likewise.
10993 * tracebak.c: Likewise.
10994 * uintp.h: Likewise.
10995 * urealp.h: Likewise.
10996 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10997 * xsinfo.adb: Likewise.
10998 * xsnamest.adb: Likewise.
10999 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11000 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11001 * gcc-interface/misc.c: Likewise.
11002 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11003 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11004 ada/targext.o here...
11005 (GNAT_ADA_OBJS): ...and not here.
11006 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11007 (GNATBIND_OBJS): Reorder.
11009 2011-07-07 Richard Henderson <rth@redhat.com>
11011 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11012 dwarf2out_frame_init.
11014 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11016 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11018 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11021 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11023 2011-07-06 Richard Guenther <rguenther@suse.de>
11025 * gcc-interface/misc.c (gnat_init): Merge calls to
11026 build_common_tree_nodes and build_common_tree_nodes_2.
11027 Re-initialize boolean_false_node.
11029 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11030 Olivier Hainque <hainque@adacore.com>
11031 Nicolas Setton <setton@adacore.com>
11033 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11034 the type according to the ARTIFICIAL_P parameter.
11035 (create_type_decl): Likewise.
11036 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11038 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11040 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11041 (gnatbind): Likewise.
11043 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11045 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11047 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11049 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11050 local variable throughout. Remove useless call to Base_Type.
11051 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11052 Take it also into account for the volatileness of the field. Set the
11053 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11055 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11057 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11058 on a dereference built for a by-ref object if it has an address clause.
11060 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11062 * einfo.ads (Address_Taken): Document use for the second argument of
11063 Asm_Input and Asm_Output attributes.
11064 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11065 argument is an entity name, then set Address_Taken on it.
11066 <Attribute_Asm_Output>: Likewise.
11067 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11068 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11069 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11070 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11072 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11074 PR middle-end/46500
11075 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11077 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11079 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11080 (ada/utils.o): Update dependencies.
11081 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11082 ../../../libcpp/libcpp.a.
11083 * gcc-interface/utils.c: Include common/common-target.h.
11084 (process_attributes): Use targetm_common.have_named_sections.
11086 2011-06-07 Richard Guenther <rguenther@suse.de>
11088 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11091 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11093 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11094 TREE_THIS_NOTRAP flag.
11096 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11098 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11101 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11103 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11104 constants whose full view has discriminants specially.
11106 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11108 * gcc-interface/utils.c: Include diagnostic.h.
11109 (gnat_write_global_declarations): Output debug information for all
11110 global type declarations before finalizing the compilation unit.
11111 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11113 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11115 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11117 2011-05-25 Kai Tietz <ktietz@redhat.com>
11119 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11120 initialization instead of const/none-const pointer assignment.
11122 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11124 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11125 $(EXTRA_GNAT1_OBJS).
11126 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11127 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11128 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11129 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11130 libcommon-target.a instead of prefix.o.
11132 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11135 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11137 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11139 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11140 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11141 instead of version.o.
11143 2011-05-18 Kai Tietz <ktietz@redhat.com>
11145 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11146 boolean_false_node instead of integer_zero_node.
11147 (convert_with_check): Likewise.
11148 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11150 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11152 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11153 type of the parameter is an unconstrained array, convert the actual to
11154 the type of the formal in the In Out and Out cases as well.
11156 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11158 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11159 call build_function_type_array or build_varargs_function_type_array
11161 (create_subprog_type): Don't call build_function_type; call
11162 build_function_type_vec instead.
11164 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11166 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11167 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11168 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11170 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11172 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11174 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11175 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11177 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11179 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11181 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11183 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11184 instead of accessing TYPE_ARG_TYPES directly.
11185 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11187 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11190 * gcc-interface/gigi.h (get_variant_part): Declare.
11191 * gcc-interface/decl.c (get_variant_part): Make global.
11192 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11193 types have the same constant size, are record types and T1 has a
11194 variant part while T2 doesn't.
11196 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11198 * gcc-interface/utils.c (begin_subprog_body): Do not call
11200 (end_subprog_body): Likewise.
11202 2011-05-04 Richard Guenther <rguenther@suse.de>
11204 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11206 (pos_to_constructor): Likewise.
11208 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
11209 Eric Botcazou <ebotcazou@adacore.com>
11211 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11212 of build_function_type. Adjust calls to...
11213 (build_raise_check): ...this. Do not take a void_tree parameter.
11214 Call build_function_type_list instead of build_function_type.
11215 Fix head comment and swap couple of conditional blocks.
11217 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11219 * gnatvsn.ads (Library_Version): Bump to 4.7.
11220 (Current_Year): Bump to 2011.
11222 2011-04-29 Michael Matz <matz@suse.de>
11224 * gcc-interface/misc.c (gnat_handle_option): Set
11225 warn_maybe_uninitialized.
11227 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11229 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11230 the Watson/McCabe paper.
11232 2011-04-23 Jim Meyering <meyering@redhat.com>
11234 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11236 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11238 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11241 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11243 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11245 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
11246 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11247 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11248 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11249 <all>: Do not set flags on the reused DECL node coming from an alias.
11250 Set DECL_IGNORED_P on the DECL node built for subprograms if they
11251 don't need debug info here...
11252 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11253 (gigi): Adjust calls to create_subprog_decl.
11254 (build_raise_check): Likewise.
11255 (establish_gnat_vms_condition_handler): Likewise.
11256 (Compilation_Unit_to_gnu): Likewise.
11257 (gnat_to_gnu): Likewise.
11259 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
11261 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11262 (NO_REORDER_ADAFLAGS): New variable.
11263 (EXTRA_GNATTOOLS): Always define.
11264 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11265 Clean up and adjust list of files compiled with special options.
11266 * gcc-interface/Make-lang.in: Likewise.
11267 (ada/decl.o): Cosmetical change.
11268 (ada/misc.o): Remove dependency on $(PLUGIN_H).
11270 2011-04-20 Jim Meyering <meyering@redhat.com>
11272 * initialize.c (__gnat_initialize): Remove useless if-before-free.
11274 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11276 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11277 $(CFLAGS) on the link line.
11279 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11281 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11282 padded type built for the return type if it is unconstrained.
11284 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
11286 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11288 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11290 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11291 before calling TREE_CHAIN.
11292 * gcc-interface/misc.c (gnat_init_ts): New function.
11293 (LANG_HOOKS_INIT_TS): Define.
11295 2011-04-12 Martin Jambor <mjambor@suse.cz>
11297 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11298 instead of cgraph_node.
11300 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11302 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11303 alignment on fields of the RETURN type built for the Copy-In Copy-Out
11306 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11308 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11309 of aggregate types that contain a placeholder.
11311 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11313 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11315 (handle_type_generic_attribute): Likewise.
11317 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11320 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11322 2011-04-04 Kai Tietz <ktietz@redhat.com>
11325 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11328 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11330 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11331 type case, do not strip a padding type around the array type.
11333 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11335 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11338 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11340 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11341 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11342 code for -feliminate-unused-debug-types.
11343 (gnat_post_options): Likewise.
11345 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11347 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11348 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11351 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11353 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11354 DECL_ARTIFICIAL flag on enumeration types.
11356 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11358 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11359 fat pointer types artificial unconditionally.
11360 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11363 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11365 * gcc-interface/gigi.h (get_dummy_type): Declare.
11366 (build_dummy_unc_pointer_types): Likewise.
11367 (finish_fat_pointer_type): Likewise.
11368 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11369 fat pointer type has been built, complete it in place.
11370 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11371 and thin pointers. Remove useless variable.
11372 (finish_fat_pointer_type): Make global and move to...
11373 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11374 (get_dummy_type): New function.
11375 (build_dummy_unc_pointer_types): Likewise.
11376 (gnat_pushdecl): Propage the name to the anonymous variants only.
11377 (update_pointer_to): Only adjust the pointer types in the unconstrained
11380 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11382 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11383 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11384 if this is a Taft amendment type and the full declaration is available.
11385 * gcc-interface/trans.c (process_type): Likewise.
11386 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11387 (process_freeze_entity): Likewise.
11388 * gcc-interface/utils.c (dummy_global): New static variable.
11389 (gnat_write_global_declarations): If there are types declared as used
11390 at the global level, insert them in the global hash table.
11392 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11394 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11395 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11396 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11398 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11399 flag of the type accordingly.
11400 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11402 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11404 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11405 finalizing types when updating the pointers to the designated type.
11406 <all>: Finalize the deferred types even if we didn't defer processing
11407 of incomplete types in this invocation.
11409 2011-04-01 Olivier Hainque <hainque@adacore.com>
11410 Nicolas Setton <setton@adacore.com>
11411 Eric Botcazou <ebotcazou@adacore.com>
11413 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11414 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11416 2011-03-28 Kai Tietz <ktietz@redhat.com>
11418 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11420 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11421 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11423 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11425 2011-03-28 Tristan Gingold <gingold@adacore.com>
11428 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11429 Use ada output of gnatbind.
11430 (ada/b_gnatb.adb): Ditto.
11431 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11432 (ada.mostlyclean, ada.stage1)
11433 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11434 (ada.stagefeedback): Adjust.
11435 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11436 Use ada output of gnatbind.
11437 (b_gnatm.adb): Ditto.
11438 (b_gnatl.o, b_gnatm.o): New rules.
11440 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11442 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11443 for the padded type built to support a specified size or alignment.
11445 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11447 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11448 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11449 unconditionally to the end of the unit when the designated type is
11451 <all>: Rename local variable. Attempt to un-defer types only and do it
11452 for limited_with'ed types as well.
11453 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11454 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11455 consistently and remove redundant call to finalize_from_with_types.
11457 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11459 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11460 subprograms without a previous spec declared in the same unit.
11461 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11462 subprograms at the end of the unit instead of at the beginning.
11463 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11464 isn't public for the special handling of non-inline functions nested
11465 inside inline external functions.
11467 2011-03-25 Jeff Law <law@redhat.com>
11469 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11471 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11473 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11474 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11475 to compute Set_Size_Depends_On_Discriminant.
11476 (Layout_Type): Call it on array types in back-end layout mode.
11477 * sem_util.adb (Requires_Transient_Scope): Return true for array
11478 types only if the size depends on the value of discriminants.
11479 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11480 type if the RHS is a call to a function that returns an unconstrained
11481 type with default discriminant.
11483 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11485 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11486 non-conversion to the nominal result type at the end.
11488 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11490 * gcc-interface/trans.c (create_temporary): New function taken from...
11491 (create_init_temporary): ...here. Call it.
11492 (call_to_gnu): Create the temporary for the return value early, if any.
11493 Create it for a function with copy-in/copy-out parameters if there is
11494 no target; in other cases of copy-in/copy-out, use another temporary.
11495 Push the new binding level lazily. Add and rename local variables.
11497 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11499 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11501 (set_rm_size): Likewise.
11503 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11505 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11506 for the padded type built in order to support a specified alignment.
11507 Fix incorrect formatting.
11509 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11512 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11514 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11516 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11517 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11518 to the end of the list. Adjust recursive call. Rename local variable.
11519 If REORDER is true, reorder components of the record type.
11520 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11521 components_to_record and adjust the parameter list.
11523 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11525 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11526 disabled, use the variable for bounds of loop iteration scheme.
11528 2011-03-21 Kai Tietz <ktietz@redhat.com>
11531 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11533 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11535 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11536 out whether the expression is read-only. Short-circuit placeholder
11537 case and rename a couple of local variables.
11539 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11541 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11542 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11543 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11544 (convert): Deal with conversions from a smaller form type specially.
11546 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11548 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11549 its argument, except for the special -I- switch.
11551 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11553 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11556 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11558 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11560 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11562 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11564 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11565 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11566 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11567 Do not generate the check directly, instead instantiate the template
11568 check present in the descriptor.
11569 (make_descriptor_field): Move around.
11570 (build_vms_descriptor32): Build a template check in the POINTER field.
11571 (build_vms_descriptor): Remove useless suffixes.
11572 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11574 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11577 * targext.c: Include target files if IN_RTS is defined.
11579 2011-01-26 Richard Guenther <rguenther@suse.de>
11582 * targext.c: Include config.h.
11583 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11586 2011-01-04 Pascal Obry <obry@adacore.com>
11587 Eric Botcazou <ebotcazou@adacore.com>
11589 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11591 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11593 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11594 end-of-case on the end label and its associated gotos, if any.
11596 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11598 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11599 expressions of the parameter cache within the statement group of
11600 the CICO mechanism.
11602 2011-01-04 Olivier Hainque <hainque@adacore.com>
11603 Eric Botcazou <ebotcazou@adacore.com>
11605 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11606 (set_end_locus_from_node): New function.
11607 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11608 make and the function end_locus.
11609 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11610 for the elaboration subprogram.
11611 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11612 set the end_locus of the expression as well.
11614 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11617 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11618 variables that are referenced in exception handlers volatile.
11622 Copyright (C) 2011 Free Software Foundation, Inc.
11624 Copying and distribution of this file, with or without modification,
11625 are permitted in any medium without royalty provided the copyright
11626 notice and this notice are preserved.
11628 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11629 - fix bugs in the description of Source_Trace;
11630 - get rid of UNIT_NAME;
11632 2011-08-02 Javier Miranda <miranda@adacore.com>
11635 (Build_Dispatching_Requeue): Adding support for VM targets
11636 since we cannot directly reference the Tag entity.
11637 * exp_sel.adb (Build_K): Adding support for VM targets.
11638 (Build_S_Assignment): Adding support for VM targets.
11640 (Default_Prim_Op_Position): In VM targets do not restrict availability
11641 of predefined interface primitives to compiling in Ada 2005 mode.
11642 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11643 restricted to compiling in Ada 2005 mode.
11644 (Make_VM_TSD): Generate code that declares and initializes the OSD
11645 record. Needed to support dispatching calls through synchronized
11648 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11649 primitives associated with synchronized interfaces.
11650 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11651 primitives associated with synchronized interfaces.
11653 2011-08-02 Yannick Moy <moy@adacore.com>
11655 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11656 statements hidden in SPARK if preceded by the HIDE directive
11657 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11658 exception handlers as hidden in SPARK if preceded by the HIDE directive
11659 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11660 if starting with the HIDE directive
11661 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11662 starting with the HIDE directive; mark the declarations in a private
11663 part as hidden in SPARK if the private part starts with the HIDE
11665 * restrict.adb, restrict.ads
11666 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11667 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11668 argument node belongs to a part which is hidden in SPARK
11669 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11670 parts in SPARK; protect the possibly costly call to
11671 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11672 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11673 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11674 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11676 (Scan): recognize special comment starting with '#' and followed by
11677 SPARK keyword "hide" as a HIDE directive.
11679 2011-08-02 Yannick Moy <moy@adacore.com>
11681 * types.ads, erroutc.ads: Minor reformatting.
11683 2011-08-02 Vincent Celier <celier@adacore.com>
11685 * link.c: Add response file support for cross platforms.
11687 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11689 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11690 in an association, set parent field of copy before partial analysis.
11691 * sem_res.adb (Resolve_Slice): create reference to itype only when
11692 expansion is enabled.
11694 2011-08-02 Yannick Moy <moy@adacore.com>
11696 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11697 for new flag denoting which subprogram bodies are in ALFA
11698 * restrict.adb, sem_ch7.adb: Update comment
11699 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11700 sem_ch9.adb, sem_res.adb: Add calls to
11701 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11702 * sem_ch6.adb (Analyze_Function_Return): add calls to
11703 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11704 middle of the body, and extended return.
11705 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11706 False when missing return.
11707 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11708 to True for subprograms whose spec is in ALFA. Remove later on the flag
11709 on the entity used for a subprogram body when there exists a separate
11711 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11712 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11713 False, otherwise do nothing.
11715 2011-08-02 Robert Dewar <dewar@adacore.com>
11717 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11719 2011-08-02 Yannick Moy <moy@adacore.com>
11721 * sem_ch4.ads: minor formatting.
11723 2011-08-02 Yannick Moy <moy@adacore.com>
11725 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11726 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11727 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11728 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11729 opt.ads: cleanup of SPARK mode
11731 2011-08-02 Yannick Moy <moy@adacore.com>
11733 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11735 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11736 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11738 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11739 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11740 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11741 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11743 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11745 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11746 functions whose return type is not in ALFA.
11747 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11749 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11750 parameter's type is not in ALFA.
11751 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11754 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11756 * sem_ch6 (Analyze_Expression_Function): treat the function as
11757 Inline_Always, and introduce a subprogram declaration for it when it is
11759 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11760 expression functions, so that the back-end can determine whether they
11761 can in fact be inlined.
11762 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11763 a function body comes from an expression function.
11765 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11767 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11768 null exclusions to test Can_Never_Be_Null on the anonymous access types
11769 of the formals rather than testing the formals themselves. Exclude this
11770 check in cases where the Old_Formal is marked as a controlling formal,
11771 to avoid issuing spurious errors for bodies completing dispatching
11772 operations (due to the flag not getting set on controlling access
11773 formals in body specs).
11774 (Find_Corresponding_Spec): When checking full and subtype conformance of
11775 subprogram bodies in instances, pass Designated and E in that order, for
11776 consistency with the expected order of the formals (New_Id followed by
11779 2011-08-02 Robert Dewar <dewar@adacore.com>
11781 * sem_ch8.adb: Minor reformatting.
11783 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11785 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11786 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11787 primitive operations of class-wide actuals.
11789 2011-08-02 Javier Miranda <miranda@adacore.com>
11791 * exp_atag.ads, exp_atag.adb
11792 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11793 since its value is implicitly passed in argument Typ.
11794 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11795 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11796 Build_Common_Dispatching_Select_Statements.
11798 2011-08-02 Robert Dewar <dewar@adacore.com>
11800 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11801 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11802 Minor reformatting.
11804 2011-08-02 Robert Dewar <dewar@adacore.com>
11806 * sem_res.adb: Minor reformatting.
11807 * sem_prag.adb: Minor reformatting.
11809 2011-08-02 Javier Miranda <miranda@adacore.com>
11811 * exp_atag.adb, exp_atags.ads
11812 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11813 by the tagged type Entity. Required to use this routine in the VM
11814 targets since we do not have available the Tag entity in the VM
11817 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11818 Ada.Tags has not been previously loaded.
11820 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11821 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11823 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11824 view of enclosing scopes. Required to handle enclosing scopes that
11825 are synchronized types whose full view is a task type.
11827 (Build_VM_TSDs): Minor code improvement to avoid generating and
11828 analyzing lists with empty nodes.
11829 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11830 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11831 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11832 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11833 (Make_Select_Specific_Data_Table): Add support for VM targets.
11834 (Make_VM_TSD): Generate code to initialize the SSD structure of
11837 2011-08-02 Yannick Moy <moy@adacore.com>
11839 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11840 cross-references section in ALI.
11841 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11842 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11844 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11845 subprogram or package entity of a node
11846 (Is_Local_Reference_Type): new function returns True for references
11847 selected in local cross-references.
11848 (Lt): function extracted from Lt in Output_References
11849 (Write_Entity_Name): function extracted from Output_References
11850 (Generate_Definition): generate reference with type 'D' for definition
11851 of objects (object declaration and parameter specification), with
11852 appropriate locations and units, for use in local cross-references.
11853 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11854 references of type 'I' for initialization in object definition.
11855 (Output_References): move part of function Lt and procedure
11856 Write_Entity_Name outside of the body. Ignore references of types 'D'
11857 and 'I' introduced for local cross-references.
11858 (Output_Local_References): new procedure to output the local
11859 cross-references sections.
11860 (Lref_Entity_Status): new array defining whether an entity is a local
11861 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11862 with 'I' type when initialization expression is present.
11863 * get_scos.adb, get_scos.ads: Correct comments and typos
11865 2011-08-02 Javier Miranda <miranda@adacore.com>
11867 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11869 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11871 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11874 2011-08-02 Vincent Celier <celier@adacore.com>
11876 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11877 (No_Space_Img): New function
11878 (Find_Excluded_Sources): When reading from a file, record the file name
11879 and the line number for each excluded source.
11880 (Mark_Excluded_Sources): When reporting an error, if the excluded
11881 sources were read from a file, include file name and line number in
11884 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11886 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11888 2011-08-02 Robert Dewar <dewar@adacore.com>
11890 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11892 2011-08-02 Javier Miranda <miranda@adacore.com>
11894 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11895 generation of TSDs to the DOTNET compiler.
11896 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11897 generation of TSDs to the DOTNET compiler.
11899 2011-08-02 Javier Miranda <miranda@adacore.com>
11901 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11902 record of all the tagged types declared inside library level package
11903 declarations, library level package bodies or library level subprograms.
11904 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11905 associated with a given tagged type.
11906 (Build_VM_TSDs): New subprogram.
11907 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11908 compilation units that are subprograms.
11909 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11910 compilation units that are package bodies.
11911 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11912 units that are a package declaration or a package instantiation.
11913 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11914 reorganization to improve the error generated by the frontend when the
11915 function Ada.Tags.Secondary_Tag is not available.
11916 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11917 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11919 2011-08-02 Javier Miranda <miranda@adacore.com>
11921 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11923 2011-08-02 Robert Dewar <dewar@adacore.com>
11925 * s-imenne.ads: Minor reformatting.
11927 2011-08-02 Robert Dewar <dewar@adacore.com>
11929 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11930 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11931 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11933 2011-08-02 Robert Dewar <dewar@adacore.com>
11935 * einfo.ads (Materialize_Entity): Document this is only for renamings
11936 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11937 required debug information in the case where we transform the object
11938 declaration into a renaming declaration.
11939 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11941 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11942 Materialize_Entity.
11944 2011-08-02 Robert Dewar <dewar@adacore.com>
11946 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11947 Suppress_Init_Procs.
11948 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11949 Suppress_Initialization/Initialization_Suppressed.
11950 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11951 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11952 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11953 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11955 2011-08-02 Robert Dewar <dewar@adacore.com>
11957 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11958 Minor reformatting.
11960 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11962 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11963 only have inheritable classwide pre/postconditions.
11965 2011-08-02 Javier Miranda <miranda@adacore.com>
11967 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11968 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11969 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11970 checks if the external tag of a type is the same as the external tag
11971 of some other declaration.
11973 2011-08-02 Thomas Quinot <quinot@adacore.com>
11975 * s-taskin.ads: Minor reformatting.
11977 2011-08-02 Emmanuel Briot <briot@adacore.com>
11979 * g-comlin.adb (Display_Help): swap the order in which it prints the
11980 short help and the general usage.
11982 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11984 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11985 the aspect declarations and attach them to the generic copy for
11986 subsequent analysis.
11987 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11988 declarations of the generic tree to the new subprogram declarations.
11989 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11990 conditions that apply to a subprogram instance.
11992 2011-08-02 Robert Dewar <dewar@adacore.com>
11994 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11996 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11998 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11999 private type with a tagged full view is not derived in the immediate
12000 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12002 2011-08-02 Robert Dewar <dewar@adacore.com>
12004 * exp_ch4.adb: Minor reformatting.
12006 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12008 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12009 Ada2012 iterator, the loop will be rewritten during expansion into a
12010 while loop with a cursor and an element declaration. Do not analyze the
12011 body in this case, because if the container is for indefinite types the
12012 actual subtype of the elements will only be determined when the cursor
12013 declaration is analyzed.
12015 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12017 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12018 size/alignment related attributes in CodePeer_Mode.
12020 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12022 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12023 Prepend_Element, since this can result in the operation getting the
12024 wrong slot in the full type's dispatch table if the full type has
12025 inherited operations. The incomplete type's operation will get added
12026 to the proper position in the full type's primitives
12027 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12028 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12029 dispatching operations, since there are cases where nonprimitive
12030 subprograms can get added to the list of incomplete dependents (such
12031 as subprograms in nested packages).
12032 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12033 private part when determining whether to add a primitive with a
12034 parameter of a tagged incomplete type to the Private_Dependents list.
12035 Such primitives can also occur in the visible part, and should not have
12036 been excluded from being private dependents.
12037 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12038 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12039 list of a Taft-amendment incomplete type is a primitive before issuing
12040 an error that the full type must appear in the same unit. There are
12041 cases where nonprimitives can be in the list (such as subprograms in
12043 * sem_disp.adb (Derives_From): Use correct condition for checking that
12044 a formal's type is derived from the type of the corresponding formal in
12045 the parent subprogram (the condition was completely wrong). Add
12046 checking that was missing for controlling result types being derived
12047 from the result type of the parent operation.
12049 2011-08-02 Yannick Moy <moy@adacore.com>
12051 * errout.adb (First_Node): minor renaming
12052 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12055 2011-08-02 Yannick Moy <moy@adacore.com>
12057 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12058 before accessing operands.
12059 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12060 decide whether an initialization expression respects SPARK rules, as
12061 the plain node is the expanded one. This allows for more valid warnings
12063 * gnat_rm.texi: Minor update.
12065 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12067 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12070 2011-08-02 Robert Dewar <dewar@adacore.com>
12072 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12074 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12076 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12077 loop statements and the element renaming declaration with a block when
12078 the element type is controlled.
12080 2011-08-02 Yannick Moy <moy@adacore.com>
12082 * sinfo.ads: Minor formatting.
12084 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12086 * sem_aggr.adb (Add_Association): if the association has a box and no
12087 expression, use the Sloc of the aggregate itself for the new
12089 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12092 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12094 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12095 When a container is provided via a function call, generate a renaming
12096 of the function result. This avoids the creation of a transient scope
12097 and the premature finalization of the container.
12098 * exp_ch7.adb (Is_Container_Cursor): Removed.
12099 (Wrap_Transient_Declaration): Remove the supression of the finalization
12100 of the list controller when the declaration denotes a container cursor,
12103 2011-08-02 Yannick Moy <moy@adacore.com>
12105 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12106 node is from source, instead of the original node being from source.
12108 (Resolve_Array_Aggregate): refine the check for a static expression, to
12109 recognize also static ranges
12110 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12111 Array_Type_Declaration): postpone the test for the type being a subtype
12112 mark after the type has been resolved, so that component-selection and
12113 expanded-name are discriminated.
12114 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12115 to distinguish the case of an iteration scheme, so that an error is
12116 issed on a non-static range in SPARK except in an iteration scheme.
12117 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12118 In_Iter_Schm = True.
12119 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12120 user-defined operators so that they are allowed in renaming
12122 (Find_Selected_Component): refine the check for prefixing of operators
12123 so that they are allowed in renaming. Move the checks for restrictions
12124 on selector name after analysis discriminated between
12125 component-selection and expanded-name.
12126 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12127 concatenation argument of string type if it is static.
12128 * sem_util.adb, sem_util.ads
12129 (Check_Later_Vs_Basic_Declarations): add a new function
12130 Is_Later_Declarative_Item to decice which declarations are allowed as
12131 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12132 mode, add that renamings are considered as later items.
12133 (Enclosing_Package): new function to return the enclosing package
12134 (Enter_Name): correct the rule for homonyms in SPARK
12135 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12136 from source (result of expansion) to avoid issuing wrong warnings.
12138 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12140 * errout.adb: On anything but an expression First_Node returns its
12143 2011-08-02 Pascal Obry <obry@adacore.com>
12145 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12147 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12149 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12150 Set the associated loop as the related expression of internally
12152 * exp_ch7.adb (Is_Container_Cursor): New routine.
12153 (Wrap_Transient_Declaration): Supress the finalization of the list
12154 controller when the declaration denotes a container cursor.
12156 2011-08-02 Yannick Moy <moy@adacore.com>
12158 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12160 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12161 expression is a simple expression. This check cannot be performed in
12162 the semantics, so just drop it.
12163 (P_Index_Or_Discriminant_Constraint): move check that the index or
12164 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12165 semantics. Other cases were previously checked in the semantics.
12166 * par-ch4.adb (P_Name): move checks that a selector name is not
12167 character literal or an operator symbol to Find_Selected_Component in
12169 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12170 declarations are not placed after later declarations in a separate
12171 procedure in Sem_Util (possibly not the best choice?), to be used both
12172 during parsing, for Ada 83 mode, and during semantic analysis, for
12174 * par-endh.adb (Check_End): move check that end label is not missing
12175 to Process_End_Label in the semantics
12176 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12177 the special case for SPARK restriction
12178 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12179 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12180 parameter Force to issue the error message even on internal node (used
12181 for generated end label). Call Check_Restriction to check when an error
12182 must be issued. In SPARK mode, issue an error message even if the
12183 restriction is not set.
12184 (Check_Restriction): new procedure with an additional out parameter to
12185 inform the caller that a message has been issued
12186 * sem_aggr.adb: Minor modification of message
12187 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12188 instead of issuing an error message directly
12189 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12190 declarations are not placed after later declarations, by calling
12191 Check_Later_Vs_Basic_Declarations
12192 (Analyze_Subtype_Declaration): move here the check that an index or
12193 discriminant constraint must be a subtype mark. Change the check that
12194 a subtype of String must start at one so that it works on subtype marks.
12195 * sem_ch4.adb (Analyze_Call): move here the check that a named
12196 association cannot follow a positional one in a call
12197 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12198 instead of issuing an error message directly
12199 * sem_ch8.adb (Find_Selected_Component): move here the check that a
12200 selector name is not a character literal or an operator symbol. Move
12201 here the check that the prefix of an expanded name cannot be a
12202 subprogram or a loop statement.
12203 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12204 procedure called from parsing and semantics to check that basic
12205 declarations are not placed after later declarations
12206 (Process_End_Label): move here the check that end label is not missing
12208 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12210 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12211 representation clause in codepeer mode, since it confuses CodePeer and
12212 does not bring useful info.
12214 2011-08-02 Ed Falis <falis@adacore.com>
12216 * init.c: initialize fp hw on MILS.
12218 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12220 * errout.adb (First_Node): for bodies, return the node itself (small
12221 optimization). For other nodes, do not check source_unit if the node
12222 comes from Standard.
12224 2011-08-02 Robert Dewar <dewar@adacore.com>
12226 * exp_ch3.adb: Minor comment additions.
12227 * sem_ch13.adb: Minor reformatting.
12229 2011-08-02 Pascal Obry <obry@adacore.com>
12231 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12233 2011-08-02 Robert Dewar <dewar@adacore.com>
12235 * sem_attr.adb: Minor reformatting.
12237 2011-08-02 Robert Dewar <dewar@adacore.com>
12239 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12240 (Has_Default_Component_Value): Removed
12241 * einfo.ads Comment updates
12242 (Has_Default_Aspect): Replaces Has_Default_Value
12243 (Has_Default_Component_Value): Removed
12245 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12247 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12248 (Get_Simple_Init_Val): Handle Default_Value aspect
12249 (Needs_Simple_Initialization): Handle Default_Value aspect
12250 * exp_ch3.ads: Needs_Simple_Initialization
12251 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12252 * par-prag.adb (Pragma_Default[_Component]Value) Removed
12254 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12255 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12256 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12258 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12260 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12261 package containing iteration primitives.
12262 exp_ch5.adb (Expand_Iterator_Loop): ditto.
12264 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12266 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12267 "of", pre-analyze expression in case it is a function call with
12268 finalization actions that must be placed ahead of the loop.
12269 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12270 on an Ada2012 iterator, insert them ahead of the rewritten loop.
12272 2011-08-02 Geert Bosch <bosch@adacore.com>
12274 * cstand.adb (Create_Float_Types): Only consider C's long double for
12275 Long_Long_Float, in addition to double.
12277 2011-08-02 Robert Dewar <dewar@adacore.com>
12279 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12280 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12281 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12282 Minor reformatting.
12284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12286 * sem_attr.adb: handle properly 'Result when it is a prefix of an
12289 2011-08-02 Javier Miranda <miranda@adacore.com>
12291 * einfo.ads, einfo.adb
12292 (Original_Access_Type): Move this attribute to Node26 since there was
12293 an undocumented use of Node21 in E_Access_Subprogram_Type entities
12294 which causes conflicts and breaks the generation of the .NET compiler.
12295 (Interface_Name): Add missing documentation on JGNAT only uses of
12298 2011-08-02 Geert Bosch <bosch@adacore.com>
12300 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12301 (Find_Back_End_Float_Type): Likewise
12302 (Create_Back_End_Float_Types): Likewise
12303 (Create_Float_Types): Likewise
12304 (Register_Float_Type): Likewise
12305 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12306 Nlist and split out type selection in new local Find_Base_Type function.
12307 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12309 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12311 2011-08-02 Robert Dewar <dewar@adacore.com>
12313 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12315 * opt.ads: Minor comment change.
12316 * sem_ch12.adb: Minor code reorganization.
12318 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12320 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12321 subtype's list of rep items to the list on the full subtype in the case
12322 where the lists are the same.
12324 2011-08-02 Geert Bosch <bosch@adacore.com>
12326 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12327 using the one from System.Strings, which also deallocates all strings.
12329 2011-08-02 Geert Bosch <bosch@adacore.com>
12331 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12333 * gcc-interface/Make-lang.in: Update dependencies.
12335 2011-08-02 Olivier Hainque <hainque@adacore.com>
12337 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12340 2011-08-02 Javier Miranda <miranda@adacore.com>
12342 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12343 associated with anonymous access to subprograms.
12345 2011-08-02 Geert Bosch <bosch@adacore.com>
12348 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12349 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12350 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12351 (Add_Symbol_Definition): Move to switch-c.adb
12352 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12353 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12354 (Add_Symbol_Definition): Move to switch-c.adb.
12355 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12357 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12358 Move to warnsw.adb.
12359 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12360 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12361 Move to warnsw.adb.
12362 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12363 (Add_Symbol_Definition): Moved from Prepcomp.
12364 * switch-c.ads: Update copyright notice. Use String_List instead of
12365 Argument_List, removing dependency on System.OS_Lib.
12367 2011-08-02 Yannick Moy <moy@adacore.com>
12369 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12370 mode on initialization expression which does not respect SPARK
12372 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12373 if the tree referenced by its argument represents an initialization
12374 expression in SPARK, suitable for initializing an object in an object
12377 2011-08-02 Javier Miranda <miranda@adacore.com>
12379 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12380 internally generated access to subprogram with its associated protected
12382 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12384 2011-08-02 Geert Bosch <bosch@adacore.com>
12386 * cstand.adb (Register_Float_Type): Print information about type to
12387 register, if the Debug_Flag_Dot_B is set.
12388 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12389 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12390 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12391 with a requested precision of more than Max_Digits digits and no more
12392 than Max_Base_Digits digits, if a range specification is present and the
12393 Predefined_Float_Types list has a suitable type to derive from.
12394 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12395 case of type completion with pragma Import
12397 (Process_Import_Predefined_Type): Processing to complete a type
12398 with pragma Import. Currently supports floating point types only.
12399 (Set_Convention_From_Pragma): Do nothing without underlying type.
12400 (Process_Convention): Guard against absence of underlying type,
12401 which may happen when importing incomplete types.
12402 (Process_Import_Or_Interface): Handle case of importing predefined
12403 types. Tweak error message.
12405 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12407 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12408 functions to previous change. Reorganize code slightly.
12410 2011-08-02 Geert Bosch <bosch@adacore.com>
12412 * back_end.ads (Register_Type_Proc): New call back procedure type for
12413 allowing the back end to provide information about available types.
12414 (Register_Back_End_Types): New procedure to register back end types.
12415 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12417 * cstand.adb (Back_End_Float_Types): New list for floating point types
12418 supported by the back end.
12419 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12420 (Copy_Float_Type): New procedure to make new copies of predefined types.
12421 (Register_Float_Type): New call back procedure to populate the BEFT list
12422 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12423 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12424 (Create_Float_Types): New procedure to create entities for floating
12425 point types predefined in Standard, and put these and any remaining
12426 BEFTs on the Predefined_Float_Types list.
12427 * stand.ads (Predefined_Float_Types): New list for predefined floating
12428 point types that do not have declarations in package Standard.
12430 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12432 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12433 entity node for the unit containing the parameter.
12434 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12435 (Add_Inlined_Subprogram): Likewise.
12436 * gcc-interface/Make-lang.in: Update dependencies.
12438 2011-08-02 Thomas Quinot <quinot@adacore.com>
12440 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12443 2011-08-02 Geert Bosch <bosch@adacore.com>
12445 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12447 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12449 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12450 computed value of Base_Type.
12452 2011-08-02 Yannick Moy <moy@adacore.com>
12454 * restrict.adb (Check_Restriction): issue an error for any use of
12455 class-wide, even if the No_Dispatch restriction is not set.
12456 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12457 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12458 when completing a private extension, the type named in the private part
12459 is not the same as that named in the visible part.
12460 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12461 of an inherited primitive operations of a tagged type or type extension
12462 that returns the tagged type.
12463 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12464 function which returns True for an implicit operation inherited by the
12465 derived type declaration for the argument type.
12466 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12469 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12471 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12472 Process_Bounds, to perform analysis with expansion of a range or an
12473 expression that is the iteration scheme for a loop.
12474 (Analyze_Iterator_Specification): If domain of iteration is given by a
12475 function call with a controlled result, as is the case if call returns
12476 a predefined container, ensure that finalization actions are properly
12478 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12480 2011-08-02 Javier Miranda <miranda@adacore.com>
12482 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12483 * gcc-interface/Make-lang.in: Update dependencies.
12485 2011-08-02 Javier Miranda <miranda@adacore.com>
12487 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12488 determine if the analysis is performed using N or Original_Node (N).
12489 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12490 functionality of routine Is_Variable avoids code duplication.
12491 * checks.adb (Determine_Range): Handle temporaries generated by
12492 Remove_Side_Effects.
12494 2011-08-02 Javier Miranda <miranda@adacore.com>
12496 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12497 expansion of the condition. Required since the previous analysis was
12498 done with expansion disabled (see Resolve_Quantified_Expression) and
12499 hence checks were not inserted and record comparisons have not been
12502 2011-08-02 Ed Falis <falis@adacore.com>
12504 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12507 2011-08-02 Bob Duff <duff@adacore.com>
12509 * opt.ads: Minor comment fix.
12511 2011-08-02 Bob Duff <duff@adacore.com>
12513 * sem_ch12.adb (Analyze_Package_Instantiation,
12514 Analyze_Subprogram_Instantiation): Turn off style checking while
12515 analyzing an instance. Whatever style checks that apply to the generic
12516 unit should apply, so it makes no sense to apply them in an instance.
12517 This was causing trouble when compiling an instance of a runtime
12518 unit that violates the -gnatyO switch.
12519 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12520 one of the two case statements, causing spurious errors.
12522 2011-08-02 Robert Dewar <dewar@adacore.com>
12524 * uname.adb: Minor reformatting.
12525 * gnatcmd.adb: Minor reformatting.
12526 * exp_attr.adb: Minor reformatting.
12528 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12530 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12531 No_Dispatching_Calls, do not look for the Assign primitive, because
12532 predefined primitives are not created in this case.
12534 2011-08-02 Bob Duff <duff@adacore.com>
12536 * stylesw.ads: Minor comment fixes.
12538 2011-08-02 Robert Dewar <dewar@adacore.com>
12540 * freeze.adb (Add_To_Result): New procedure.
12542 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12544 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12545 time, if the specific run-time routines for handling streams of strings
12546 are not available, use the default mechanism.
12548 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12550 * s-regpat.ads: Fix typo.
12552 2011-08-02 Vincent Celier <celier@adacore.com>
12554 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12555 not null, call it to create the in memory config project file without
12556 parsing an existing default config project file.
12558 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12560 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12562 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12564 * sem_elim.adb: an abstract subprogram does not need an eliminate
12565 pragma for its descendant to be eliminable.
12567 2011-08-02 Ed Falis <falis@adacore.com>
12569 * init.c: revert to handling before previous checkin for VxWorks
12570 * s-intman-vxworks.adb: delete unnecessary declarations related to
12571 using Ada interrupt facilities for handling signals.
12572 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12573 * s-intman-vxworks.ads: Import __gnat_install_handler as
12574 Initialize_Interrupts.
12575 * s-taprop-vxworks.adb: Delete Signal_Mask.
12576 (Abort_Handler): change construction of mask to unblock exception
12579 2011-08-02 Jerome Guitton <guitton@adacore.com>
12581 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12582 Debug_Raise_Exception before propagation starts.
12584 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12586 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12587 to Restriction_Check_Required.
12588 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12589 * sem_res.adb (Resolve_Call): Likewise.
12590 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12592 2011-08-02 Bob Duff <duff@adacore.com>
12594 * stylesw.ads: Update comment.
12595 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12596 * errout.ads: Remove obsolete comment.
12598 2011-08-02 Javier Miranda <miranda@adacore.com>
12600 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12601 (Set_Is_Safe_To_Reevaluate): new procedure.
12602 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12603 assignment is allowed on safe-to-reevaluate variables.
12604 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12605 temporary created to remove side effects in expressions that use
12606 the secondary stack as safe-to-reevaluate.
12607 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12608 variables that are not true constants.
12610 2011-08-02 Robert Dewar <dewar@adacore.com>
12612 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12613 sem_res.adb, sem_ch6.adb: Minor reformatting.
12615 2011-08-02 Jerome Guitton <guitton@adacore.com>
12617 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12619 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12621 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12622 not set Overridden_Operation if subprogram is an initialization
12625 2011-08-02 Yannick Moy <moy@adacore.com>
12627 * par-ch6.adb: Correct obsolete name in comments
12628 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12629 which takes two message arguments (existing function takes one), with
12630 second message used for continuation.
12631 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12632 block statements that originate from a source block statement, not
12633 generated block statements
12634 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12635 symmetry with procedure case
12636 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12637 function to issue an error in formal mode if a package specification
12638 contains more than one tagged type or type extension.
12639 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12640 parameters matching formals of tagged types are objects (or ancestor
12641 type conversions of objects), not general expressions. Issue an error
12642 on view conversions that are not involving ancestor conversion of an
12644 (Resolve_Type_Conversion): in formal mode, issue an error on the
12645 operand of an ancestor type conversion which is not an object
12646 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12647 procedure so that it works also for actuals of function calls
12648 (Is_Actual_Tagged_Parameter): new function which determines if its
12649 argument is an actual parameter of a formal of tagged type in a
12651 (Is_SPARK_Object_Reference): new function which determines if the tree
12652 referenced by its argument represents an object in SPARK
12654 2011-08-02 Robert Dewar <dewar@adacore.com>
12656 * sem_ch3.adb: Minor reformatting
12657 Minor comment addition
12658 Minor error msg text change
12660 2011-08-02 Javier Miranda <miranda@adacore.com>
12662 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12663 function. Used to be more precise when we generate a variable plus one
12664 assignment to remove side effects in the evaluation of the Bound
12666 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12667 of the bound expression to force its re-analysis and thus expand the
12668 associated transient scope (if required). Code cleanup replacing the
12669 previous code that declared the constant entity by an invocation to
12670 routine Force_Evaluation which centralizes this work in the frontend.
12672 2011-08-02 Robert Dewar <dewar@adacore.com>
12674 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12675 (Base_Type): Now uses improved Is_Base_Type function
12676 * einfo.ads (Base_Type): Inline this function
12678 2011-08-02 Robert Dewar <dewar@adacore.com>
12680 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12681 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12683 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12685 * gcc-interface/Make-lang.in: Update dependencies.
12686 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12689 2011-08-02 Yannick Moy <moy@adacore.com>
12691 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12692 non-simple expression used in delta constraint
12693 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12694 index constraint which is not a subtype mark
12695 * par.adb: With and use Restrict
12696 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12697 mode on component type which is not a subtype mark and default
12698 expression on component
12699 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12700 of string which does not have a lower index bound equal to 1
12701 (Array_Type_Declaration): issue an error in formal mode on index or
12702 component type which is not a subtype mark, and on aliased keyword on
12704 (Derived_Type_Declaration): issue an error in formal mode on interface,
12705 limited or abstract type
12706 (Record_Type_Declaration): issue an error in formal mode on interface
12707 (Record_Type_Definition): issue an error in formal mode on tagged types
12708 and type extensions not declared in the specification of a library unit
12709 package; on null non-tagged record; on variant part
12711 2011-08-02 Vincent Celier <celier@adacore.com>
12713 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12714 not declared for qualified library project when Library_Name is not
12715 declared, but Library_Dir is.
12717 2011-08-02 Robert Dewar <dewar@adacore.com>
12719 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12720 pragmas (affects aspects [Component_]Default_Value
12721 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12722 component type for the resolution
12724 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12726 * einfo.adb (Base_Type): Tune implementation for speed.
12728 2011-08-02 Robert Dewar <dewar@adacore.com>
12730 * freeze.adb: Minor reformatting.
12732 2011-08-02 Thomas Quinot <quinot@adacore.com>
12734 * scos.ads: Update comments.
12736 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12738 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12739 base type, because the parent may be a subtype of a private type whose
12740 convention is established in a private part.
12742 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12744 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12745 statement in a block when the expansion of the return expression has
12746 created a finalization chain.
12747 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12748 with the parent node.
12749 Add N_Extended_Return_Statement to handle the case where a transient
12750 object declaration appears in the Return_Object_Declarations list of
12751 an extended return statement.
12753 2011-08-02 Matthew Gingell <gingell@adacore.com>
12755 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12756 unused parameter 'name'.
12758 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12760 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12761 inherited operation, check whether its alias, which is the source
12762 operastion that it renames, has been marked eliminated.
12764 2011-08-02 Javier Miranda <miranda@adacore.com>
12766 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12767 in-mode parameter whose type is an access type since it can be used to
12768 modify its designated object. Enforce code that handles as safe an
12769 access type that is not access-to-constant but it is the result of a
12770 previous removal of side-effects.
12771 (Remove_Side_Effects): Minor code reorganization of cases which require
12772 no action. Done to incorporate documentation on new cases uncovered
12773 working in this ticket: no action needed if this routine was invoked
12774 too early and the nodes are not yet decorated.
12775 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12776 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12777 were issued with actuals that are implicitly provided by
12780 2011-08-02 Robert Dewar <dewar@adacore.com>
12782 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12784 2011-08-02 Yannick Moy <moy@adacore.com>
12786 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12787 to issue an error in formal mode on attribute not supported in this mode
12788 (Analyze_Attribute): issue errors on standard attributes not supported
12790 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12791 comment, and issue error in formal mode on modulus which is not a power
12793 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12795 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12797 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12798 operator on modular type (except 'not').
12800 2011-08-02 Robert Dewar <dewar@adacore.com>
12802 * gnat_rm.texi: Minor reformatting.
12804 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12806 * s-osinte-linux.ads: Minor comment update and reformatting.
12807 * i-cexten.ads: Make this unit pure, as for its parent.
12808 Will allow its usage in more contexts if needed.
12810 2011-08-02 Robert Dewar <dewar@adacore.com>
12812 * s-utf_32.ads: Minor comment fix.
12814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12816 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12817 operation of a tagged synchronized type, handle the case where the
12818 controlling argument is overloaded.
12820 2011-08-02 Yannick Moy <moy@adacore.com>
12822 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12823 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12824 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12825 SPARK mode and formal verification mode on processing SPARK restriction
12826 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12827 requiring consistency checking.
12829 2011-08-02 Robert Dewar <dewar@adacore.com>
12831 * sem_res.adb: Minor reformatting.
12833 2011-08-02 Robert Dewar <dewar@adacore.com>
12835 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12836 a-cforse.ads: Remove unneeded with of Ada.Containers
12837 Remove commented out pragma Inline's
12838 Move specifications of new subprograms to the actual specs
12840 2011-08-02 Yannick Moy <moy@adacore.com>
12842 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12843 a-cforse.ads: Update comments.
12845 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12847 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12849 2011-08-02 Robert Dewar <dewar@adacore.com>
12851 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12852 a-cforse.ads, a-cofove.ads: Minor reformatting.
12854 2011-08-02 Claire Dross <dross@adacore.com>
12856 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12857 a-cofove.ads: Add comments.
12859 2011-08-02 Yannick Moy <moy@adacore.com>
12861 * gnat_rm.texi: Document formal containers.
12863 2011-08-02 Emmanuel Briot <briot@adacore.com>
12865 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12866 are empty sections.
12868 2011-08-02 Robert Dewar <dewar@adacore.com>
12870 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12873 2011-08-02 Robert Dewar <dewar@adacore.com>
12875 * aspects.adb: New aspects Default_Value and Default_Component_Value
12876 New format of Aspect_Names table checks for omitted entries
12877 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12878 handling of boolean aspects for derived types.
12879 New aspects Default_Value and Default_Component_Value
12880 New format of Aspect_Names table checks for omitted entries
12881 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12882 (Has_Default_Value): New flag
12883 (Has_Default_Component_Value): New flag
12884 (Has_Default_Value): New flag
12885 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12887 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12888 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12889 Default_Value and Default_Component_Value
12890 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12891 New aspects Default_Value and Default_Component_Value
12892 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12893 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12895 2011-08-02 Vincent Celier <celier@adacore.com>
12897 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12898 inherit library kind.
12900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12902 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12903 Minor reformatting.
12905 2011-08-02 Robert Dewar <dewar@adacore.com>
12907 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12909 2011-08-02 Yannick Moy <moy@adacore.com>
12911 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12913 2011-08-02 Robert Dewar <dewar@adacore.com>
12915 * impunit.adb: Add comment.
12917 2011-08-02 Yannick Moy <moy@adacore.com>
12919 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12920 qualification of aggregates in formal mode
12921 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12923 (Resolve_Aggregate): complete the test that an aggregate is adequately
12924 qualified in formal mode
12926 2011-08-02 Pascal Obry <obry@adacore.com>
12928 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12929 * mlib-prj.adb: Supress warning when compiling binder generated file.
12930 (Build_Library): Supress all warnings when compiling the binder
12933 2011-08-02 Yannick Moy <moy@adacore.com>
12935 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12937 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12938 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12939 Add with/use clauses to make Check_Formal_Restriction visible
12941 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12943 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12944 in-parameters when type of the generic formal is private in the generic
12945 spec and non-private in the body.
12947 2011-08-02 Claire Dross <dross@adacore.com>
12949 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12950 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12951 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12952 * impunit.adb, Makefile.rtl: Take new files into account.
12954 2011-08-02 Robert Dewar <dewar@adacore.com>
12956 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12957 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12959 2011-08-02 Yannick Moy <moy@adacore.com>
12961 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12963 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12964 matching static array bounds, taking into account the special case of
12966 * sem_ch3.adb: Typo in comment.
12968 2011-08-02 Yannick Moy <moy@adacore.com>
12970 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12971 which issues an error in formal mode if its argument node is originally
12973 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12974 has a discriminant specification so that it does not include the case
12976 (Derived_Type_Declaration): move here the test that a derived type has a
12977 discriminant specification
12978 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12979 first element of a component association before accessing its choices
12980 (presence of component association is not enough)
12981 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12982 declaration is a library item before accessing the next element in a
12983 list, as library items are not member of lists
12984 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12985 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12986 Check_Formal_Restriction whenever possible.
12988 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12990 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12991 reference when needed.
12993 2011-08-02 Bob Duff <duff@adacore.com>
12995 * gnat_ugn.texi: Fix typo.
12997 2011-08-02 Vincent Celier <celier@adacore.com>
12999 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13000 archive file name. Do not use the full path name of archives for Open
13003 2011-08-02 Robert Dewar <dewar@adacore.com>
13005 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13006 Analyze_Aspect_Specifications
13008 (Analyze_Aspect_Specifications): New handling for boolean aspects
13009 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13010 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13011 sequence for Analyze_Aspect_Specifications
13012 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13013 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13015 2011-08-02 Robert Dewar <dewar@adacore.com>
13017 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13018 aspects, since these no longer exist.
13020 2011-08-02 Robert Dewar <dewar@adacore.com>
13022 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13023 semicolon, do not try to see if there are aspects following it.
13024 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13027 2011-08-02 Robert Dewar <dewar@adacore.com>
13029 * sem_ch8.adb, aspects.ads: Minor reformatting.
13031 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13033 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13034 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13036 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13038 2011-08-02 Yannick Moy <moy@adacore.com>
13040 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13041 mode on subprogram declaration outside of package specification, unless
13042 it is followed by a pragma Import
13043 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13044 Access_Type_Declaration): issue error in formal mode on access type
13045 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13047 (Analyze_Object_Declaration): issue error in formal mode on object
13048 declaration which does not respect SPARK restrictions
13049 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13050 declaration which does not respect SPARK restrictions
13051 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13052 error in formal mode on digits or delta constraint
13053 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13054 decimal fixed point type
13055 (Derived_Type_Declaration): issue error in formal mode on derived type
13056 other than type extensions of tagged record types
13057 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13058 with check on access definition
13059 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13060 mode on protected definition.
13061 (Analyze_Task_Definition): issue error in formal mode on task definition
13063 2011-08-02 Robert Dewar <dewar@adacore.com>
13065 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13067 2011-08-02 Javier Miranda <miranda@adacore.com>
13069 * sem_ch6.adb (Can_Override_Operator): New function.
13070 (Verify_Overriding_Indicator): Add missing code to check overriding
13071 indicator in operators. Fixes regression.
13072 (Check_Overriding_Indicator): Minor reformating after replacing the
13073 code that evaluates if the subprogram can override an operator by
13074 invocations to the above new function.
13076 (Write_Field26_Name): Add missing code to ensure that, following
13077 the documentation in einfo.ads, this field is not shown as attribute
13078 "Static_Initialization" on non-dispatching functions.
13080 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13082 * sem_res.adb (Resolve_Call): A call to
13083 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13084 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13085 i.e., when the second parameter is of type Time_Span.
13087 2011-08-02 Vincent Celier <celier@adacore.com>
13089 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13090 with an archive instead of -L<library dir> -l<library name>.
13092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13094 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13095 mark the base types In_Use in addition to making the operations
13098 2011-08-02 Ed Falis <falis@adacore.com>
13100 * init.c: add and setup __gnat_signal_mask for the exception signals
13101 * s-inmaop-vxworks.adb: new file.
13102 * s-intman-vxworks.adb: remove unnecessary initializations and
13104 * s-intman-vxworks.ads: remove unnecessary variable
13105 * s-taprop-vxworks.adb: simplify signal initialization
13107 2011-08-02 Robert Dewar <dewar@adacore.com>
13109 * sem_ch8.adb: Minor code reorganization, comment updates.
13111 2011-08-02 Robert Dewar <dewar@adacore.com>
13113 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13114 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13116 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13117 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13119 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13121 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13122 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13123 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13124 use_type_clauses, to handle more efficiently use_type and use_all_type
13126 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13127 Ada2012 Use_All_Type clause.
13128 (Use_Class_Wide_Operations): new procedure.
13130 2011-08-02 Robert Dewar <dewar@adacore.com>
13132 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13133 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13134 expression to expression function.
13136 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13138 * sem_ch4.adb: transform simple Ada2012 membership into equality only
13139 if types are compatible.
13141 2011-08-02 Yannick Moy <moy@adacore.com>
13143 * sem_res.adb (Matching_Static_Array_Bounds): new function which
13144 returns True if its argument array types have same dimension and same
13145 static bounds at each index.
13146 (Resolve_Actuals): issue an error in formal mode on actuals passed as
13147 OUT or IN OUT paramaters which are not view conversions in SPARK.
13148 (Resolve_Arithmetic_Op): issue an error in formal mode on
13149 multiplication or division with operands of fixed point types which are
13150 not qualified or explicitly converted.
13151 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13152 Boolean or array type (except String) operands.
13153 (Resolve_Equality_Op): issue an error in formal mode on equality
13154 operators for array types other than String with non-matching static
13156 (Resolve_Logical_Op): issue an error in formal mode on logical operators
13157 for array types with non-matching static bounds. Factorize the code in
13158 Matching_Static_Array_Bounds.
13159 (Resolve_Qualified_Expression): issue an error in formal mode on
13160 qualified expressions for array types with non-matching static bounds.
13161 (Resolve_Type_Conversion): issue an error in formal mode on type
13162 conversion for array types with non-matching static bounds
13164 2011-08-02 Robert Dewar <dewar@adacore.com>
13166 * par-ch10.adb: Minor code reorganization (use Nkind_In).
13168 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13170 * par-ch9.adb: save location of entry for proper error message.
13172 2011-08-02 Javier Miranda <miranda@adacore.com>
13174 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13175 (Use_Full_View) which permits this routine to climb through the
13176 ancestors using the full-view of private parents.
13177 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13178 Use_Full_View to true in calls to Is_Ancestor.
13179 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13180 true in call to Is_Ancestor.
13181 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13182 Use_Full_View to true in call to Is_Ancestor.
13183 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13184 call to Is_Ancestor.
13185 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13186 Use_Full_View to true in calls to Is_Ancestor.
13187 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13188 Make_Select_Specific_Data_Table, Register_Primitive,
13189 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13190 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13191 to true in call to Is_Ancestor.
13192 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13193 Use_Full_View to true in calls to Is_Ancestor.
13195 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13196 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13198 2011-08-02 Robert Dewar <dewar@adacore.com>
13200 * gnat_rm.texi: Minor reformatting.
13201 * sem_prag.adb: Minor reformatting.
13203 2011-08-02 Tristan Gingold <gingold@adacore.com>
13205 * vms_data.ads: Add VMS qualifier for -gnateP.
13207 2011-08-02 Robert Dewar <dewar@adacore.com>
13209 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13210 * par-ch7.adb (P_Package): Proper placement of aspects for package
13211 decl/instantiation.
13212 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13213 (End_Statements): Add Is_Sloc parameterr
13214 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13215 (Check_End): Ad Is_Sloc parameter
13216 (End_Statements): Add Is_Sloc parameterr
13218 2011-08-02 Vincent Celier <celier@adacore.com>
13220 * ug_words: Add VMS qualifier equivalent to -gnateP:
13221 /SYMBOL_PREPROCESSING.
13223 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13225 * gnat-style.texi: For hexadecimal numeric literals the typical
13226 grouping of digits is 4 to represent 2 bytes.
13227 A procedure spec which is split into several lines is indented two
13230 2011-08-02 Yannick Moy <moy@adacore.com>
13232 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13233 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13234 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13236 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13237 choice in array aggregate
13238 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13240 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13241 positional and named aggregate for record, or others in record
13242 aggregate, or multiple choice in record aggregate
13243 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13244 array operands to logical operations AND, OR and XOR do not have the
13245 same static lower and higher bounds
13246 * sem_ch5.adb, sinfo.ads: Correct typos in comments
13248 2011-08-01 Robert Dewar <dewar@adacore.com>
13250 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13251 Replaces Last_Source_Node_In_Sequence.
13252 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13253 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13254 parens and blank in string (this was inconsistently implemented).
13256 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13257 blank in string (this was inconsistently implemented).
13259 (Set_Global_Switches): Set formal mode switches appropriately
13260 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13262 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13263 call Set_Error_Msg_Lang to set "spark" as language name.
13264 * par.adb: Remove unnecessary call to set formal language for errout
13265 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13266 appropriately and call Set_Error_Msg_Lang to set "spark" as language
13268 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13269 calls to it, moved after resolution so that types are known
13270 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13271 result of concatenation is not of type String
13272 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13273 concatenation is not properly restricted
13274 * gnat_rm.texi: Add doc on pragma Spark_95.
13275 * gcc-interface/Makefile.in: Remove obsolete target pairs for
13276 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13277 * gcc-interface/Make-lang.in: Update dependencies.
13279 2011-08-01 Javier Miranda <miranda@adacore.com>
13281 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13282 condition that detects if the overridden operation must replace an
13285 2011-08-01 Javier Miranda <miranda@adacore.com>
13287 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13288 code declarations inserted by Insert_Actions in each alternative of the
13289 N_Case_Expression node.
13291 2011-08-01 Robert Dewar <dewar@adacore.com>
13293 * sem_ch6.adb: Minor code reorganization.
13294 * sem_util.adb: Minor reformatting.
13296 2011-08-01 Pascal Obry <obry@adacore.com>
13298 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13299 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13301 2011-08-01 Yannick Moy <moy@adacore.com>
13303 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13304 literal or operator symbol which is prefixed
13305 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13306 mode on access attributes.
13307 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13308 that concatenation operands are properly restricted in formal mode
13309 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13310 Analyze_Concatenation_Operand. Issue an error in formal mode if the
13311 result of the concatenation has a type different from String.
13312 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13313 Analyze_Quantified_Expression, Analyze_Slice,
13314 Analyze_Null): issue an error in formal mode on unsupported constructs
13316 (Analyze_Block_Statement): only issue error on source block statement
13317 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13318 function which returns the last node in a list of nodes for which
13319 Comes_From_Source returns True, if any
13320 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13321 Last_Source_Node_In_Sequence
13322 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13323 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13324 mode on unsupported constructs
13325 * sem_ch9.adb Do not return after issuing error in formal mode, as the
13326 rest of the actions may be needed later on since the error is marked as
13328 * sinfo.ads: Typos in comments.
13330 2011-08-01 Pascal Obry <obry@adacore.com>
13332 * projects.texi: Minor editing.
13334 2011-08-01 Yannick Moy <moy@adacore.com>
13336 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13337 insertion character ~~
13338 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13339 (Set_Error_Msg_Lang): new procedure which fixes the language for use
13340 with insertion character ~~
13341 (Set_Msg_Text): treat insertion character ~~
13342 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13343 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13344 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13345 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13346 errors related to the formal language restriction not serious
13347 (insertion character |).
13348 * par.adb (Par): set formal language for error messages if needed
13349 * sem_ch6.adb (Check_Missing_Return): take into account possible
13350 generated statements at the end of the function
13351 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13352 enumeration value to define a new pragma SPARK_95
13353 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13354 SPARK_Version): new type and variables to store the SPARK version
13356 (SPARK_Mode): return True when SPARK_Version is set
13357 * par-prag.adb: Correct indentation
13358 (Prag): take Pragma_SPARK_95 into account
13359 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13362 2011-08-01 Robert Dewar <dewar@adacore.com>
13364 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13365 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13366 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13368 2011-08-01 Pascal Obry <obry@adacore.com>
13370 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13371 Target_Name to Get_Path call.
13372 (Parse_Single_Project): Likewise.
13373 (Post_Parse_Context_Clause): Likewise.
13374 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13375 Call Initialise_Project_Path with the proper Target_Name.
13376 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13378 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13379 with the proper Target_Name.
13380 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13381 Part.Parse routine.
13382 (Parse_Project_And_Apply_Config): Likewise.
13383 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13384 This is fine as this part of the code is supporting only native
13386 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13387 is fine as this part of the code is supporting only native compilation.
13389 2011-08-01 Yannick Moy <moy@adacore.com>
13391 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13392 of homonym, unless the homonym is one of the cases allowed in SPARK
13393 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13394 package declaration occurring after a body.
13396 2011-08-01 Robert Dewar <dewar@adacore.com>
13398 * checks.adb, exp_ch4.adb: Minor reformatting.
13400 2011-08-01 Javier Miranda <miranda@adacore.com>
13402 * einfo.ads (Access_Disp_Table): Fix documentation.
13403 (Dispatch_Table_Wrappers): Fix documentation.
13405 2011-08-01 Pascal Obry <obry@adacore.com>
13407 * prj-env.adb, prj-env.ads: Minor reformatting.
13409 2011-08-01 Yannick Moy <moy@adacore.com>
13411 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13412 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13413 procedures out of these packages.
13414 * errout.ads, errout.adb
13415 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13416 procedures in of this package
13417 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13418 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13419 on misplaced later vs initial declarations, like in Ada 83
13420 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13421 formal mode on attribute of private type whose full type declaration
13423 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13424 package declaration inside a package specification
13425 (Analyze_Full_Type_Declaration): issue error in formal mode on
13426 controlled type or discriminant type
13427 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13428 user-defined operator means that it should come from the source
13429 (New_Overloaded_Entity): issue error in formal mode on overloaded
13431 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13433 2011-08-01 Thomas Quinot <quinot@adacore.com>
13435 * atree.adb: Minor reformatting.
13436 * checks.adb: Minor reformatting.
13438 2011-08-01 Vincent Celier <celier@adacore.com>
13440 * s-parame-vms-ia64.ads: Fix typo in comment
13442 * s-parame-vms-restrict.ads: Removed, unused.
13444 2011-08-01 Javier Miranda <miranda@adacore.com>
13447 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13449 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13450 * sem_ch3.ads, sem_ch3.adb
13451 (Is_Constant_Bound): New extended version of the subprogram that was
13452 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13453 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13454 * sem_aux.ads (Constant_Value): Fix typo in comment.
13455 * checks.adb (Generate_Index_Checks): New implementation which, for
13456 array objects with constant bounds, generates the runtime check
13457 referencing the bounds of the array type. For other cases this routine
13458 provides its previous behavior obtaining such values from the array
13460 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13462 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13463 we cannot have semantic interpretations of the new node.
13465 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13467 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13470 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13472 * sem_ch8.adb: Minor code editing.
13473 * s-vxwext.adb: Remove trailing space.
13474 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13475 consistency with other files.
13477 2011-08-01 Thomas Quinot <quinot@adacore.com>
13479 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13481 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13483 * par-ch10.adb: reject parameterized expressions as compilation unit.
13484 * sem_ch4.adb: handle properly conditional expression with overloaded
13485 then_clause and no else_clause.
13487 2011-08-01 Tristan Gingold <gingold@adacore.com>
13489 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13490 like done by System.Aux_DEC.
13491 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13493 2011-08-01 Yannick Moy <moy@adacore.com>
13495 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13496 missing label at end of declaration (subprogram or package)
13497 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13498 of positional and named parameter association
13499 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13500 Error_Msg_SP which adds a prefix to the error message giving the name
13501 of the formal language analyzed
13502 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13503 access result type in subprogram, unconstrained array as result type,.
13504 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13506 * sem_ch8.adb: Code clean up.
13508 2011-08-01 Javier Miranda <miranda@adacore.com>
13510 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13511 * einfo.ads (Access_Disp_Table): Fix documentation.
13512 (Dispatch_Table_Wrappers): Fix documentation.
13513 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13514 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13515 to enforce the documentation of this attribute.
13516 (Set_Is_Interface): Cleanup the assertion.
13517 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13518 the Underlying_Type entity before reading attribute Access_Disp_Table.
13519 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13520 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13521 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13522 the Underlying_Type entity before reading attribute Access_Disp_Table.
13523 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13524 Locate the Underlying_Type entity before reading attribute
13527 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13529 * s-poosiz.ads: Additional overriding indicators.
13531 2011-08-01 Yannick Moy <moy@adacore.com>
13533 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13535 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13536 parameter specification does not include a subtype mark.
13537 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13538 formal mode on abstract subprogram.
13539 (Analyze_Subprogram_Specification): issue error in formal mode on
13540 user-defined operator.
13541 (Process_Formals): issue error in formal mode on access parameter and
13542 default expression.
13543 * sem_ch9.adb (Analyze_Abort_Statement,
13544 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13545 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13546 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13547 Analyze_Requeue, Analyze_Selective_Accept,
13548 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13549 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13550 issue error in formal mode on user-defined raise statement.
13552 2011-08-01 Thomas Quinot <quinot@adacore.com>
13554 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13555 declaration being hidden when overriding an implicit inherited
13557 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13558 (-gnats), do not complain about a source file that contains only a
13561 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13563 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13564 variable if already set.
13566 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13568 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13569 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13570 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13571 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13572 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13573 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13574 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13575 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13576 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13577 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13578 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13579 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13580 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13581 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13582 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13583 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13584 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13585 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13586 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13587 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13588 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13589 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13590 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13591 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13592 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13593 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13594 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13595 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13596 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13597 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13598 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13599 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13600 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13601 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13602 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13603 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13604 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13605 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13606 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13607 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13608 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13609 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13610 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13611 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13612 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13613 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13614 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13615 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13616 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13617 Use GNAT instead of GNARL.
13619 2011-08-01 Bob Duff <duff@adacore.com>
13621 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13622 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13623 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13626 2011-08-01 Yannick Moy <moy@adacore.com>
13628 * debug.adb (d.D) reverve flag for the SPARK mode
13629 (d.E) reverve flag for SPARK generation mode
13630 (d.F) reverve flag for Why generation mode
13631 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13632 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13633 functions which return True when the corresponding modes are set
13634 (Formal_Language): return "spark" or "alfa" when in formal verification
13636 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13637 Error_Msg to prefix the error message with a tag giving the formal
13639 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13640 message with a tag giving the formal language
13641 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13643 (Analyze_Case_Statement): issue error in formal mode on case statement
13644 with a single "others" case alternative
13645 (Analyze_Exit_Statement): issue errors in formal mode on exit
13646 statements which do not respect SPARK restrictions
13647 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13648 (Check_Unreachable_Code): always issue an error (not a warning) in
13649 formal mode on unreachable code (concerns both code after an infinite
13650 loop and after an unconditional jump, both not allowed in SPARK)
13651 * sem_ch6.adb (Analyze_Return_Statement): add call to
13652 Set_Return_Present for a procedure containing a return statement
13653 (already done for functions in Analyze_Function_Return)
13654 (Analyze_Function_Return): issue error in formal mode on extended
13655 return or if return is not last statement in function
13656 (Check_Missing_Return): issue error in formal mode if function does
13657 not end with return or if procedure contains a return
13658 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13659 function to detect if there is an inner scope of its parameter S which
13662 2011-08-01 Thomas Quinot <quinot@adacore.com>
13664 * sem_ch6.ads: Minor reformatting.
13666 2011-08-01 Javier Miranda <miranda@adacore.com>
13668 * sem_util.adb (Abstract_Interface_List): Complete condition when
13669 processing private type declarations to avoid reading unavailable
13671 (Is_Synchronized_Tagged_Type): Complete condition when processing
13672 private extension declaration nodes to avoid reading unavailable
13675 2011-08-01 Thomas Quinot <quinot@adacore.com>
13677 * sem_ch3.adb: Minor reformatting.
13679 2011-08-01 Thomas Quinot <quinot@adacore.com>
13681 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13682 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13683 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13684 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13685 for VMS, instead parametrize the common implementation with
13686 System.Parameters declarations.
13688 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
13690 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13692 2011-08-01 Tristan Gingold <gingold@adacore.com>
13694 * seh_init.c: Fix SEH handler installation on win64.
13696 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13698 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13699 double analysis of an anonymous access to subprogram, because it can
13700 lead to improper sharing of profiles and a back-end crash.
13702 2011-08-01 Robert Dewar <dewar@adacore.com>
13704 * make.adb, sem_ch4.adb: Minor reformatting.
13705 * gcc-interface/Make-lang.in: Update dependencies.
13706 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13708 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13710 * gnat_rm.texi: Fix definition of Long_Integer.
13712 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13714 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13715 to prevent storage exhaustion.
13716 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13717 finalized is a function body, insert the cleanup code before the final
13718 return statement, to prevent spurious warnings.
13719 * s-pooglo.ads: add overriding indicator.
13721 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13723 * sem_ch4.adb (Operator_Check): improve error message when both a
13724 with_clause and a use_clause are needed to make operator usage legal.
13725 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13726 determine whether a compilation unit is visible within an other,
13727 either through a with_clause in the current unit, or a with_clause in
13728 its library unit or one one of its parents.
13730 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13732 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13733 over an arbitrary expression of an array or container type.
13734 * lib-xref.adb: clarify comment.
13736 2011-08-01 Bob Duff <duff@adacore.com>
13738 * einfo.ads: Minor reformatting.
13739 * debug.adb: Minor comment improvement.
13741 2011-08-01 Javier Miranda <miranda@adacore.com>
13743 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13744 consider hidden subprograms as valid candidates.
13746 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13748 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13750 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13752 * gnat_ugn.texi: Fix typo.
13754 2011-08-01 Robert Dewar <dewar@adacore.com>
13756 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13757 lib-xref.adb: Minor reformatting
13759 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13761 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13762 when to generate a call to Move_Final_List.
13763 (Has_Controlled_Parts): Remove this function.
13765 2011-08-01 Geert Bosch <bosch@adacore.com>
13767 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13768 "," in choice list.
13770 2011-08-01 Thomas Quinot <quinot@adacore.com>
13772 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13773 explicit raise of a predefined exception as Comes_From_Source if the
13774 original N_Raise_Statement comes from source.
13776 2011-08-01 Robert Dewar <dewar@adacore.com>
13778 * sinfo.ads: Add comment.
13779 * sem_ch6.adb: Minor reformatting.
13781 2011-08-01 Robert Dewar <dewar@adacore.com>
13783 * freeze.adb (Freeze_Entity): Refine check for bad component size
13784 clause to avoid rejecting confirming clause when atomic/aliased present.
13786 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13788 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13789 better determine whether an entity reference is a write.
13790 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13792 * lib-xref.adb (Output_References): Do no suppress a read reference at
13793 the same location as an immediately preceeding modify-reference, to
13794 handle properly in-out actuals.
13796 2011-08-01 Tristan Gingold <gingold@adacore.com>
13798 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13800 2011-08-01 Quentin Ochem <ochem@adacore.com>
13802 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13803 heap to compute the result.
13805 2011-08-01 Robert Dewar <dewar@adacore.com>
13807 * atree.ads: Minor reformatting.
13809 2011-08-01 Emmanuel Briot <briot@adacore.com>
13811 * g-expect.adb (Get_Command_Output): Fix memory leak.
13813 2011-08-01 Geert Bosch <bosch@adacore.com>
13815 * cstand.adb (P_Float_Type): New procedure to print the definition of
13816 predefined fpt types.
13817 (P_Mixed_Name): New procedure to print a name using mixed case
13818 (Print_Standard): Use P_Float_Type for printing floating point types
13819 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13820 precision IEEE float.
13822 2011-08-01 Thomas Quinot <quinot@adacore.com>
13824 * sem_ch3.adb: Minor reformatting.
13826 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13828 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13829 the completion of a generic function, insert the new body rather than
13830 rewriting the original.
13832 2011-08-01 Yannick Moy <moy@adacore.com>
13834 * sinfo.ads, errout.ads: Typos in comments.
13836 2011-08-01 Robert Dewar <dewar@adacore.com>
13838 * par-endh.adb: Minor reformatting.
13840 2011-08-01 Robert Dewar <dewar@adacore.com>
13842 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13843 (Pre_Post_Aspects): New subtype.
13844 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13845 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13846 * par-ch7.adb (P_Package): Remove Decl parameter
13847 (P_Package): Handle new syntax for aspects (before IS)
13848 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13850 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13851 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13852 (P_Package): Remove Decl parameter
13853 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13855 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13857 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13858 * sinfo.ads: Document new syntax for aspects in packages etc.
13859 * sprint.adb: Handle new syntax of aspects before IS in package
13861 2011-08-01 Thomas Quinot <quinot@adacore.com>
13863 * atree.ads: Minor reformatting.
13864 * sem_prag.adb: Minor reformatting.
13866 2011-08-01 Robert Dewar <dewar@adacore.com>
13868 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13869 case expr alternative.
13871 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13873 * sem_ch12.adb: Fix typo.
13875 2011-08-01 Geert Bosch <bosch@adacore.com>
13877 * sem_prag.adb (Check_No_Link_Name): New procedure.
13878 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13879 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13880 instead of Standard_Long_Long_Float_Size global. Preparation for
13881 eventual removal of per type constants.
13882 * exp_util.ads (Get_Stream_Size): New function returning the stream
13883 size value of subtype E.
13884 * exp_util.adb (Get_Stream_Size): Implement new function.
13885 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13887 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13889 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13891 2011-08-01 Geert Bosch <bosch@adacore.com>
13893 * cstand.adb: Fix comments.
13894 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13895 count of arguments.
13897 2011-08-01 Robert Dewar <dewar@adacore.com>
13899 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13901 2011-08-01 Geert Bosch <bosch@adacore.com>
13903 * atree.ads: Fix comment.
13905 2011-08-01 Robert Dewar <dewar@adacore.com>
13907 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13908 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13909 * par.adb: Add with for Namet.Sp.
13910 * par-tchk.adb: Minor reformatting.
13912 2011-08-01 Vincent Celier <celier@adacore.com>
13914 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13915 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13916 of the init procedure of a SAL.
13917 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13920 2011-08-01 Thomas Quinot <quinot@adacore.com>
13922 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13925 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13927 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13929 2011-08-01 Thomas Quinot <quinot@adacore.com>
13931 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13932 conformant with its spec (return True only for types that have
13933 an overriding Initialize primitive operation that prevents them from
13934 having preelaborable initialization).
13935 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13936 initialization for controlled types in Ada 2005 or later mode.
13938 2011-08-01 Robert Dewar <dewar@adacore.com>
13940 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13942 (Same_Aspect): New function.
13943 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13944 Type_Invariant, Precondition, Postcondition.
13945 * snames.ads-tmpl: Add Name_Type_Invariant.
13947 2011-08-01 Robert Dewar <dewar@adacore.com>
13949 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13951 (Freeze_All_Ent): Fix error in handling inherited aspects.
13952 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13953 already analyzed, but don't skip entire processing of a declaration,
13954 that's wrong in some cases of declarations being rewritten.
13955 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13956 Don't delay for integer, string literals
13957 Treat predicates in usual manner for delay, remove special case code,
13959 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13960 (Build_Predicate_Function): Update saved expression in aspect
13961 (Build_Invariant_Procedure): Update saved expression in aspect
13962 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13963 of replacement of discriminant references if the reference is simple.
13965 2011-08-01 Robert Dewar <dewar@adacore.com>
13967 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13968 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13969 Static_Predicate and Dynamic_Predicate.
13970 (Build_Predicate_Function): Add processing for Static_Predicate
13971 and Dynamic_Predicate.
13972 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13973 (From_Static_Predicate): New flag
13974 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13976 2011-08-01 Robert Dewar <dewar@adacore.com>
13978 * usage.adb: Documentation cleanup for Ada version modes in usage.
13979 * expander.adb: Minor reformatting.
13981 2011-08-01 Robert Dewar <dewar@adacore.com>
13983 * atree.ads: Minor comment fix.
13984 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13985 a-witeio.ads, sem_prag.adb: Minor reformatting.
13987 2011-08-01 Doug Rupp <rupp@adacore.com>
13989 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13990 pointers. Use descrip.h header file for convenience. Add some
13993 2011-08-01 Robert Dewar <dewar@adacore.com>
13995 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13996 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13997 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13999 (Check_Aspect_At_End_Of_Declarations): New procedure
14000 (Analye_Aspect_Specification): Minor changes for above procedures
14001 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14002 specification node as well.
14004 2011-08-01 Pascal Obry <obry@adacore.com>
14006 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14007 Windows files. Use GetFilesAttributes() in this case to check for file
14008 existence instead of returning with an error code.
14010 2011-08-01 Vincent Celier <celier@adacore.com>
14012 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14013 High is above Source length.
14015 2011-08-01 Robert Dewar <dewar@adacore.com>
14017 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14019 2011-08-01 Robert Dewar <dewar@adacore.com>
14021 * aspects.ads (Boolean_Aspects): New subtype.
14022 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14023 for derived types in cases where the parent type and derived type have
14025 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14026 with aspects when parent type also has aspects.
14027 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14028 boolean expression at this point).
14029 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14030 accordance with final decision on the Ada 2012 feature.
14031 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14033 2011-08-01 Matthew Heaney <heaney@adacore.com>
14035 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14037 2011-08-01 Pascal Obry <obry@adacore.com>
14039 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14040 Fix Replace_Slice when High is above current string size.
14041 (Replace_Slice): Fix DL computation when High is above current
14044 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14046 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14048 2011-08-01 Matthew Heaney <heaney@adacore.com>
14050 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14053 2011-08-01 Pascal Obry <obry@adacore.com>
14055 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14058 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14060 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14061 access to protected subprograms in generic bodies.
14062 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14063 protected type, indicate that the convention of the subprogram is
14064 Convention_Protected, because it may be used in subsequent declarations
14065 within the protected declaration.
14067 2011-08-01 Vincent Celier <celier@adacore.com>
14069 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14070 and "final" procedures when the name of the library is "ada", to avoid
14071 duplicate symbols "adainit" and "adafinal" in executables.
14073 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14075 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14076 quantified expression that appears within a postcondition and uses the
14077 Ada2012 'Result attribute.
14079 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14081 * init.c (__gnat_error_handler): Cast reason to int.
14082 (__gnat_install_handler): Explain sa_sigaction use.
14084 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14086 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14087 subprogram has copy-in copy-out parameters, try to promote the mode of
14088 the return type if it is passed in registers.
14090 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14092 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14093 left operand as addressable.
14095 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14097 * gcc-interface/gigi.h (build_function_stub): Remove.
14098 (build_return_expr): Likewise.
14099 (convert_vms_descriptor): Declare.
14100 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14101 (build_function_stub): Move to...
14102 * gcc-interface/utils2.c (build_return_expr): Move to...
14103 * gcc-interface/trans.c (build_function_stub): ...here.
14104 (build_return_expr): ...here.
14105 (Subprogram_Body_to_gnu): Add local variable for language_function.
14106 Disconnect the parameter attributes cache, if any, once done with it.
14107 Call end_subprog_body only after setting the end_locus.
14108 Build the stub associated with the function, if any, at the very end.
14109 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14110 variables and streamline control flow.
14112 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14115 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14116 g-trasym-dwarf.adb.
14118 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14121 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14122 Assign to act.sa_sigaction.
14123 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14124 current->return_address to char * before arithmetic.
14126 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14128 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14129 Correct argument types.
14130 Extract code from reason.
14131 (__gnat_install_handler): Assign to act.sa_sigaction.
14133 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14135 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14136 (GNAT1_OBJS): ...here.
14138 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
14141 * g-socthi-mingw.adb (Fill): Fix formatting.
14143 * gcc-interface/gigi.h: Move around comment.
14145 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
14148 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14150 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
14153 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14155 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
14157 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14158 range comparison if Pmode is SImode.
14160 2011-07-12 Laurent GUERBY <laurent@guerby.net>
14161 Eric Botcazou <ebotcazou@adacore.com>
14163 * adadecode.c: Wrap up in extern "C" block.
14164 * adadecode.h: Likewise.
14165 * adaint.c: Likewise. Remove 'const' keyword.
14166 * adaint.h: Likewise.
14167 * argv.c: Likewise.
14168 * atree.h: Likewise.
14170 * cstreams.c: Likewise.
14172 * exit.c: Likewise.
14174 * final.c: Likewise.
14175 * init.c: Likewise.
14176 * initialize.c: Likewise.
14177 * link.c: Likewise.
14178 * namet.h: Likewise.
14179 * nlists.h: Likewise.
14180 * raise.c: Likewise.
14181 * raise.h: Likewise.
14182 * repinfo.h: Likewise.
14183 * seh_init.c: Likewise.
14184 * targext.c: Likewise.
14185 * tracebak.c: Likewise.
14186 * uintp.h: Likewise.
14187 * urealp.h: Likewise.
14188 * xeinfo.adb: Wrap up generated C code in extern "C" block.
14189 * xsinfo.adb: Likewise.
14190 * xsnamest.adb: Likewise.
14191 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14192 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14193 * gcc-interface/misc.c: Likewise.
14194 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14195 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
14196 ada/targext.o here...
14197 (GNAT_ADA_OBJS): ...and not here.
14198 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14199 (GNATBIND_OBJS): Reorder.
14201 2011-07-07 Richard Henderson <rth@redhat.com>
14203 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14204 dwarf2out_frame_init.
14206 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
14208 * gcc-interface/misc.c (gnat_init): Tweak previous change.
14210 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14213 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14215 2011-07-06 Richard Guenther <rguenther@suse.de>
14217 * gcc-interface/misc.c (gnat_init): Merge calls to
14218 build_common_tree_nodes and build_common_tree_nodes_2.
14219 Re-initialize boolean_false_node.
14221 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14222 Olivier Hainque <hainque@adacore.com>
14223 Nicolas Setton <setton@adacore.com>
14225 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14226 the type according to the ARTIFICIAL_P parameter.
14227 (create_type_decl): Likewise.
14228 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14230 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14232 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14233 (gnatbind): Likewise.
14235 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14237 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14239 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14241 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14242 local variable throughout. Remove useless call to Base_Type.
14243 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14244 Take it also into account for the volatileness of the field. Set the
14245 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
14247 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14249 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14250 on a dereference built for a by-ref object if it has an address clause.
14252 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14254 * einfo.ads (Address_Taken): Document use for the second argument of
14255 Asm_Input and Asm_Output attributes.
14256 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14257 argument is an entity name, then set Address_Taken on it.
14258 <Attribute_Asm_Output>: Likewise.
14259 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14260 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14261 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14262 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14264 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
14266 PR middle-end/46500
14267 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14269 2011-06-14 Joseph Myers <joseph@codesourcery.com>
14271 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14272 (ada/utils.o): Update dependencies.
14273 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14274 ../../../libcpp/libcpp.a.
14275 * gcc-interface/utils.c: Include common/common-target.h.
14276 (process_attributes): Use targetm_common.have_named_sections.
14278 2011-06-07 Richard Guenther <rguenther@suse.de>
14280 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14283 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14285 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14286 TREE_THIS_NOTRAP flag.
14288 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14290 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14293 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14295 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14296 constants whose full view has discriminants specially.
14298 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14300 * gcc-interface/utils.c: Include diagnostic.h.
14301 (gnat_write_global_declarations): Output debug information for all
14302 global type declarations before finalizing the compilation unit.
14303 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14305 2011-05-25 Jakub Jelinek <jakub@redhat.com>
14307 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14309 2011-05-25 Kai Tietz <ktietz@redhat.com>
14311 * adaint.c (__gnat_to_canonical_file_list_next): Use array
14312 initialization instead of const/none-const pointer assignment.
14314 2011-05-24 Joseph Myers <joseph@codesourcery.com>
14316 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14317 $(EXTRA_GNAT1_OBJS).
14318 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14319 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14320 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14321 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14322 libcommon-target.a instead of prefix.o.
14324 2011-05-21 Joseph Myers <joseph@codesourcery.com>
14327 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14329 2011-05-20 Joseph Myers <joseph@codesourcery.com>
14331 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14332 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14333 instead of version.o.
14335 2011-05-18 Kai Tietz <ktietz@redhat.com>
14337 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14338 boolean_false_node instead of integer_zero_node.
14339 (convert_with_check): Likewise.
14340 * gcc-interface/decl.c (choices_to_gnu): Likewise.
14342 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
14344 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14345 type of the parameter is an unconstrained array, convert the actual to
14346 the type of the formal in the In Out and Out cases as well.
14348 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14350 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14351 call build_function_type_array or build_varargs_function_type_array
14353 (create_subprog_type): Don't call build_function_type; call
14354 build_function_type_vec instead.
14356 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14358 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14359 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14360 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14362 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
14364 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14366 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14367 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14369 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14371 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14373 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14375 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14376 instead of accessing TYPE_ARG_TYPES directly.
14377 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14379 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14382 * gcc-interface/gigi.h (get_variant_part): Declare.
14383 * gcc-interface/decl.c (get_variant_part): Make global.
14384 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14385 types have the same constant size, are record types and T1 has a
14386 variant part while T2 doesn't.
14388 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14390 * gcc-interface/utils.c (begin_subprog_body): Do not call
14392 (end_subprog_body): Likewise.
14394 2011-05-04 Richard Guenther <rguenther@suse.de>
14396 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14398 (pos_to_constructor): Likewise.
14400 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
14401 Eric Botcazou <ebotcazou@adacore.com>
14403 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14404 of build_function_type. Adjust calls to...
14405 (build_raise_check): ...this. Do not take a void_tree parameter.
14406 Call build_function_type_list instead of build_function_type.
14407 Fix head comment and swap couple of conditional blocks.
14409 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14411 * gnatvsn.ads (Library_Version): Bump to 4.7.
14412 (Current_Year): Bump to 2011.
14414 2011-04-29 Michael Matz <matz@suse.de>
14416 * gcc-interface/misc.c (gnat_handle_option): Set
14417 warn_maybe_uninitialized.
14419 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14421 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14422 the Watson/McCabe paper.
14424 2011-04-23 Jim Meyering <meyering@redhat.com>
14426 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14428 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14430 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14433 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14435 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14437 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14438 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14439 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14440 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14441 <all>: Do not set flags on the reused DECL node coming from an alias.
14442 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14443 don't need debug info here...
14444 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14445 (gigi): Adjust calls to create_subprog_decl.
14446 (build_raise_check): Likewise.
14447 (establish_gnat_vms_condition_handler): Likewise.
14448 (Compilation_Unit_to_gnu): Likewise.
14449 (gnat_to_gnu): Likewise.
14451 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14453 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14454 (NO_REORDER_ADAFLAGS): New variable.
14455 (EXTRA_GNATTOOLS): Always define.
14456 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14457 Clean up and adjust list of files compiled with special options.
14458 * gcc-interface/Make-lang.in: Likewise.
14459 (ada/decl.o): Cosmetical change.
14460 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14462 2011-04-20 Jim Meyering <meyering@redhat.com>
14464 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14466 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14468 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14469 $(CFLAGS) on the link line.
14471 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14473 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14474 padded type built for the return type if it is unconstrained.
14476 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14478 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14480 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14482 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14483 before calling TREE_CHAIN.
14484 * gcc-interface/misc.c (gnat_init_ts): New function.
14485 (LANG_HOOKS_INIT_TS): Define.
14487 2011-04-12 Martin Jambor <mjambor@suse.cz>
14489 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14490 instead of cgraph_node.
14492 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14494 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14495 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14498 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14500 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14501 of aggregate types that contain a placeholder.
14503 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14505 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14507 (handle_type_generic_attribute): Likewise.
14509 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14512 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14514 2011-04-04 Kai Tietz <ktietz@redhat.com>
14517 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14520 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14522 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14523 type case, do not strip a padding type around the array type.
14525 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14527 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14530 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14532 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14533 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14534 code for -feliminate-unused-debug-types.
14535 (gnat_post_options): Likewise.
14537 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14539 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14540 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14543 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14545 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14546 DECL_ARTIFICIAL flag on enumeration types.
14548 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14550 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14551 fat pointer types artificial unconditionally.
14552 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14555 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14557 * gcc-interface/gigi.h (get_dummy_type): Declare.
14558 (build_dummy_unc_pointer_types): Likewise.
14559 (finish_fat_pointer_type): Likewise.
14560 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14561 fat pointer type has been built, complete it in place.
14562 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14563 and thin pointers. Remove useless variable.
14564 (finish_fat_pointer_type): Make global and move to...
14565 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14566 (get_dummy_type): New function.
14567 (build_dummy_unc_pointer_types): Likewise.
14568 (gnat_pushdecl): Propage the name to the anonymous variants only.
14569 (update_pointer_to): Only adjust the pointer types in the unconstrained
14572 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14574 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14575 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14576 if this is a Taft amendment type and the full declaration is available.
14577 * gcc-interface/trans.c (process_type): Likewise.
14578 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14579 (process_freeze_entity): Likewise.
14580 * gcc-interface/utils.c (dummy_global): New static variable.
14581 (gnat_write_global_declarations): If there are types declared as used
14582 at the global level, insert them in the global hash table.
14584 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14586 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14587 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14588 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14590 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14591 flag of the type accordingly.
14592 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14594 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14596 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14597 finalizing types when updating the pointers to the designated type.
14598 <all>: Finalize the deferred types even if we didn't defer processing
14599 of incomplete types in this invocation.
14601 2011-04-01 Olivier Hainque <hainque@adacore.com>
14602 Nicolas Setton <setton@adacore.com>
14603 Eric Botcazou <ebotcazou@adacore.com>
14605 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14606 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14608 2011-03-28 Kai Tietz <ktietz@redhat.com>
14610 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14612 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14613 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14615 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14617 2011-03-28 Tristan Gingold <gingold@adacore.com>
14620 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14621 Use ada output of gnatbind.
14622 (ada/b_gnatb.adb): Ditto.
14623 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14624 (ada.mostlyclean, ada.stage1)
14625 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14626 (ada.stagefeedback): Adjust.
14627 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14628 Use ada output of gnatbind.
14629 (b_gnatm.adb): Ditto.
14630 (b_gnatl.o, b_gnatm.o): New rules.
14632 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14634 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14635 for the padded type built to support a specified size or alignment.
14637 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14639 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14640 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14641 unconditionally to the end of the unit when the designated type is
14643 <all>: Rename local variable. Attempt to un-defer types only and do it
14644 for limited_with'ed types as well.
14645 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14646 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14647 consistently and remove redundant call to finalize_from_with_types.
14649 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14651 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14652 subprograms without a previous spec declared in the same unit.
14653 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14654 subprograms at the end of the unit instead of at the beginning.
14655 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14656 isn't public for the special handling of non-inline functions nested
14657 inside inline external functions.
14659 2011-03-25 Jeff Law <law@redhat.com>
14661 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14663 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14665 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14666 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14667 to compute Set_Size_Depends_On_Discriminant.
14668 (Layout_Type): Call it on array types in back-end layout mode.
14669 * sem_util.adb (Requires_Transient_Scope): Return true for array
14670 types only if the size depends on the value of discriminants.
14671 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14672 type if the RHS is a call to a function that returns an unconstrained
14673 type with default discriminant.
14675 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14677 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14678 non-conversion to the nominal result type at the end.
14680 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14682 * gcc-interface/trans.c (create_temporary): New function taken from...
14683 (create_init_temporary): ...here. Call it.
14684 (call_to_gnu): Create the temporary for the return value early, if any.
14685 Create it for a function with copy-in/copy-out parameters if there is
14686 no target; in other cases of copy-in/copy-out, use another temporary.
14687 Push the new binding level lazily. Add and rename local variables.
14689 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14691 * gcc-interface/decl.c (validate_size): Improve comments and tweak
14693 (set_rm_size): Likewise.
14695 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14697 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14698 for the padded type built in order to support a specified alignment.
14699 Fix incorrect formatting.
14701 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14704 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14706 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14708 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14709 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14710 to the end of the list. Adjust recursive call. Rename local variable.
14711 If REORDER is true, reorder components of the record type.
14712 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14713 components_to_record and adjust the parameter list.
14715 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14717 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14718 disabled, use the variable for bounds of loop iteration scheme.
14720 2011-03-21 Kai Tietz <ktietz@redhat.com>
14723 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14725 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14727 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14728 out whether the expression is read-only. Short-circuit placeholder
14729 case and rename a couple of local variables.
14731 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14733 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14734 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14735 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14736 (convert): Deal with conversions from a smaller form type specially.
14738 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14740 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14741 its argument, except for the special -I- switch.
14743 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14745 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14748 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14750 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14752 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14754 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14756 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14757 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14758 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14759 Do not generate the check directly, instead instantiate the template
14760 check present in the descriptor.
14761 (make_descriptor_field): Move around.
14762 (build_vms_descriptor32): Build a template check in the POINTER field.
14763 (build_vms_descriptor): Remove useless suffixes.
14764 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14766 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14769 * targext.c: Include target files if IN_RTS is defined.
14771 2011-01-26 Richard Guenther <rguenther@suse.de>
14774 * targext.c: Include config.h.
14775 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14778 2011-01-04 Pascal Obry <obry@adacore.com>
14779 Eric Botcazou <ebotcazou@adacore.com>
14781 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14783 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14785 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14786 end-of-case on the end label and its associated gotos, if any.
14788 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14790 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14791 expressions of the parameter cache within the statement group of
14792 the CICO mechanism.
14794 2011-01-04 Olivier Hainque <hainque@adacore.com>
14795 Eric Botcazou <ebotcazou@adacore.com>
14797 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14798 (set_end_locus_from_node): New function.
14799 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14800 make and the function end_locus.
14801 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14802 for the elaboration subprogram.
14803 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14804 set the end_locus of the expression as well.
14806 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14809 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14810 variables that are referenced in exception handlers volatile.
14814 Copyright (C) 2011 Free Software Foundation, Inc.
14816 Copying and distribution of this file, with or without modification,
14817 are permitted in any medium without royalty provided the copyright
14818 notice and this notice are preserved.