1 2007-11-14 Samuel Tardieu <sam@rfc1149.net>
3 * adaint.c init.c initialize.c link.c: Remove system-specific
4 sections of non-supported Interix target.
6 * s-osinte-interix.ads: Removed.
8 2007-11-13 Samuel Tardieu <sam@rfc1149.net>
10 * a-tasatt.adb: Add a comment at the beginning of the package
11 explaining why in general 'Unchecked_Access must be used instead
14 * sem_prag.adb (Process_Convention): Move the test for the
15 entity on which the Convention pragma applies down to also
16 forbid pragma Convention on enumeration literals reached
19 2007-11-10 Samuel Tardieu <sam@rfc1149.net>
21 * a-tasatt.adb: Revert previous change for this file as it will
22 generate an error when this package is instantiated from a
25 2007-11-07 Samuel Tardieu <sam@rfc1149.net>
27 * a-tasatt.adb: Type Wrapper should be declared in comment instead
28 of already declared type Node_Access.
29 Use 'Access instead of 'Unchecked_Access when applicable. Local
30 lifetime is the one of the package.
31 (Set_Value): W is allocated on the heap.
33 * g-socket.adb: Use 'Access instead of 'Unchecked_Access when
35 (Get_Socket_Option): Optlen formal of C_Getsockopt is of an anonymous
37 (Receive_Socket): Fromlen formal of C_Recvfrom is of an anonymous
40 * s-taasde.adb: Use 'Access instead of 'Unchecked_Access when
42 (elaboration code): Timer_Queue lifetime is the one of the
45 * tracebak.c (i386 alternative): Remove useless comparaison
46 which is always false; LOWEST_ADDRESS is 0 and is never greater
47 than an unsigned integer.
49 * sem_attr.adb (Analyze_Attribute): Remove duplicate identical
50 embedded check for "Ada_Version >= Ada_05".
52 2007-11-07 Olivier Hainque <hainque@adacore.com>
54 * decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we
55 craft and expand comment.
57 2007-11-01 Eric Botcazou <ebotcazou@adacore.com>
59 * lang-specs.h: Move translation of -fRTS= after -gnatez switch.
61 2007-10-23 Eric Botcazou <ebotcazou@adacore.com>
63 * misc.c (gnat_handle_option): Replace call to abort with
64 call to gcc_unreachable.
65 (gnat_init): Likewise.
66 (gnat_expand_expr): Likewise.
67 (fp_prec_to_size): Likewise.
68 (fp_size_to_prec): Likewise.
70 2007-10-23 Richard Guenther <rguenther@suse.de>
73 * tracebak.c: #undef abort after including system.h.
75 2007-10-20 Danny Smith <dannysmith@users.sourceforge.net>
77 * Makefile.in (LIBGNAT_TARGET_PAIRS) Add s-tasinf-mingw.adb,
78 s-tasinf-mingw.ads, a-exetim-mingw.adb, a-exetim-mingw.ads
80 (EXTRA_GNATRTL_TASKING_OBJS): Add a-exetim.o for win32 targets.
82 2007-10-15 Eric Botcazou <ebotcazou@adacore.com>
84 * s-osinte-tru64.adb: (Hide_Yellow_Zone): Add On parameter.
85 Set the protection status of the guard page based on the value of On.
87 * s-osinte-tru64.ads: (Hide_Yellow_Zone): Add On parameter.
89 * s-taprop-tru64.adb: (Enter_Task): Pass True to Hide_Yellow_Zone.
90 (Exit_Task): Pass False to Hide_Yellow_Zone.
92 2007-10-15 Robert Dewar <dewar@adacore.com>
94 * s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
95 s-taprop-vxworks.adb, s-taprop-posix.adb, a-calend-vms.adb,
96 a-calend.adb, a-nuflra.adb, a-tigeau.adb, a-wtgeau.adb,
97 checks.adb, bindgen.adb, eval_fat.adb, exp_fixd.adb, fmap.adb,
98 freeze.adb, g-awk.adb, g-calend.adb, g-diopit.adb, g-expect.adb,
99 gnatchop.adb, gnatlink.adb, g-spipat.adb, g-thread.adb, make.adb,
100 mdll.adb, mlib.adb, mlib-prj.adb, osint.adb, par-ch3.adb, prj.adb,
101 prj-makr.adb, sem_prag.adb, sem_type.adb, s-fatgen.adb, s-fileio.adb,
102 sinfo.ads, sinput-d.adb, s-taasde.adb, s-tasdeb.ads, s-tasren.adb,
103 s-tassta.adb, s-tpobop.adb, s-tposen.adb, stylesw.adb, types.ads,
104 uintp.adb, validsw.adb, makegpr.adb, a-rbtgso.adb, a-crbtgo.adb,
105 a-coorse.adb, a-convec.adb, a-coinve.adb, a-cohama.adb, a-ciorse.adb,
106 a-cihama.adb, a-cidlli.adb, a-chtgop.adb, a-cdlili.adb, a-cdlili.adb,
107 a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb, a-ciorma.adb,
108 a-coorma.adb, a-ztgeau.adb, symbols-vms.adb, a-crdlli.adb,
109 a-calari.adb, a-calfor.adb, s-os_lib.adb, s-regpat.adb, a-ngrear.adb:
111 Add Unreferenced and Warnings (Off) pragmas for cases of
112 variables modified calls where they are IN OUT or OUT parameters and
113 the resulting values are not subsequently referenced. In a few cases,
114 we also remove redundant code found by the new warnings.
116 * ug_words, vms_data.ads, usage.adb, sem_util.adb, sem_util.ads,
117 sem_warn.adb, sem_warn.ads, sem_res.adb, sem_ch7.adb, sem_ch8.adb,
118 sem_ch5.adb, opt.ads, lib-xref.adb, lib-xref.ads, exp_smem.adb,
119 sem_ch11.adb, exp_ch6.adb, einfo.ads, einfo.adb: implement a new
120 warning controlled by -gnatw.o that warns on cases of out parameter
121 values being ignored.
123 2007-10-15 Geert Bosch <bosch@adacore.com>
125 * adaint.c, socket.c, cal.c: Initial port to arm-mentor-nucleus.
127 * expect.c: Initial port to arm-mentor-nucleus.
128 Use kill for __gnat_kill() on VMS.
130 2007-10-15 Emmanuel Briot <briot@adacore.com>
132 * ali.ads, ali.adb (Scan_ALI): Initialize XE.Tref to a known default
134 (Xref_Record): Change type for Line, since in the case of a reference to
135 a predefined entity (as happens for array index types), the line is set
137 Add support for parsing multiple array index types info, or
138 multiple inherited interfaces info. This information cannot be stored
139 in Xref_Entity_Record, which only supports a single instance of Tref_*,
140 and is therefore stored in the list of references instead. It has a
141 special treatement later on in tools that use this information.
143 2007-10-15 Tristan Gingold <gingold@adacore.com>
145 * debug.adb: Document use of -gnatd.a and -gnatd.I
147 * layout.adb: On OpenVMS -gnatd.a disables alignment optimization.
149 2007-10-15 Javier Miranda <miranda@adacore.com>
151 * exp_attr.adb (Expand_N_Attribute_Reference): Case Access,
152 Unchecked_Access, and Unrestricted_Access. Cleanup code that takes
153 care of access to class-wide interface types plus removal of bizarre
154 conversion of tagged object to access type (reported by Gary
155 Dismukes). After this patch there is no need to perform any
156 additional management on these nodes in Expand_Interface_Actuals.
158 * exp_disp.adb (Expand_Interface_Actuals): Code cleanup. Remove code
159 that handles use of 'Access and 'Unchecked_Access applied to
160 actuals covering interface types. Such code is now
161 centralized in Expand_N_Attribute_Reference.
163 2007-10-15 Ed Schonberg <schonberg@adacore.com>
165 * exp_ch3.adb (Build_Init_Procedure): Keep separate the initialization
166 of tagged types whose ultimate ancestor is a CPP type.
167 (Freeze_Array_Type): For a packed array type, generate an initialization
168 procedure if the type is public, to handle properly a client that
169 specifies Normalize_Scalars.
171 2007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
173 * exp_ch9.adb (Actual_Index_Expression): When the expansion occurs
174 inside a generic body, retrieve the full view of the entry family
175 discrete subtype if available.
177 2007-10-15 Thomas Quinot <quinot@adacore.com>
179 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies): Do not
180 attempt to generate stubs for hidden primitive operations.
182 2007-10-15 Vincent Celier <celier@adacore.com>
184 * mlib-tgt-specific.adb (Support_For_Libraries): New function,
185 returning None, used when there is no platform specific body for
188 2007-10-15 Bob Duff <duff@adacore.com>
190 * sem_case.adb, sem_ch13.adb, lib-sort.adb: Replace use of Heap_Sort_A
191 (passing'Unrestricted_Access of nested subprograms to Sort) with use of
192 the generic Heap_Sort_G, in order to avoid trampolines.
194 2007-10-15 Vasiliy Fofanov <fofanov@adacore.com>
195 Jose Ruiz <ruiz@adacore.com>
197 * vx_stack_info.c: New file.
199 * i-forbla-unimplemented.ads: New file.
201 * Makefile.in: i-forbla-unimplemented.ads: a variant of i-forbla.ads
202 for unsupported configurations; use it on VMS targets instead of the
204 (EXTRA_LIBGNAT_SRCS,EXTRA_LIBGNAT_OBJS for VxWorks): Include
205 vx_stack_info.{c,o} that contains the routine __gnat_get_stack_info
206 used by VxWorks targets to have access to task-specific data and be
207 able to extract the stack boundaries for stack checking.
208 Use system-vms-ia64.ads on ivms.
210 * Make-lang.in: Update dependencies.
212 * sysdep.c (__gnat_get_stack_info): Move to a standalone file
215 2007-10-15 Vincent Celier <celier@adacore.com>
217 * snames.adb, snames.ads: Add new standard name runtime_library_dir
219 * prj.ads (Language_Config): Add new component Runtime_Library_Dir
221 * prj-attr.adb: Add project level attribute Runtime_Library_Dir
223 * prj-env.adb (Create_Mapping_File): Do not put an entry if the path of
224 the source is unknown.
226 * prj-ext.adb: Spelling error fix
228 * prj-nmsc.adb (Check_Ada_Name): Reject any unit that includes an Ada
229 95 reserved word in its name.
230 (Process_Project_Level_Array_Attributes): Process new attribute
233 * prj-part.adb (Parse_Single_Project): Do not check the name of the
234 config project against the user project names.
236 * prj-proc.adb (Expression): In multi-language mode, indexes that do
237 not include a dot are always case insensitive.
238 (Process_Declarative_Items): Ditto
239 (Process_Project_Tree_Phase_1): Set Success to False in case an error is
242 * prj-util.adb (Value_Of (In_Array)): When Force_Lower_Case_Index is
243 True, compare both indexes in lower case.
245 2007-10-15 Robert Dewar <dewar@adacore.com>
247 * rtsfind.adb: (Load_RTU): Turn off style checks for Load call
249 2007-10-15 Gary Dismukes <dismukes@adacore.com>
251 * sem_aggr.adb (Resolve_Record_Aggregate): In the case of a box
252 association for an access component, add an association with null as
253 the expression. Remove testing for array subtypes and the setting in
254 that case of Ctyp to the array component type, which prevented proper
255 inclusion of an association for null-initialized arrays. Collapse
256 condition that tests for array subtypes into just a test of
257 Is_Partially_Initialized_Type (which already covers arrays anyway).
259 2007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
261 * sem_ch12.adb: Minor code reformatting.
262 (Check_Generic_Child_Unit): Iterate over the homonym chain in order to
263 find the parent package which may have been hidden by local
266 2007-10-15 Gary Dismukes <dismukes@adacore.com>
268 * sem_ch3.adb (Build_Derived_Concurrent_Type): Set the Is_Constrained
269 flag of derived concurrent types, taking into account the flag setting
270 on the parent subtype and any new set of discriminants.
272 2007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
274 * sem_ch4.adb: Minor code and comment reformatting.
275 (Analyze_Allocator): When the designated type of an unconstrained
276 allocator is a record with unknown discriminants or an array with
277 unknown range bounds, emit a detailed error message depending on the
278 compilation mode and whether the designated type is limited.
280 2007-10-15 Tristan Gingold <gingold@adacore.com>
282 * system-vms-ia64.ads: New file.
284 * system-vms_64.ads: Minor comment fix.
286 2007-10-15 Ed Schonberg <schonberg@adacore.com>
288 * sem_ch6.adb (Find_Corresponding_Spec): If the previous entity is a
289 body generated for a function with a controlling result that is a null
290 extension, discard the generated body in favor of the current explicit
293 2007-10-15 Ed Schonberg <schonberg@adacore.com>
295 * sem_disp.adb (Find_Controlling_Arg): Examine the call node before
296 examining its original form, to handle properly operator calls that
299 2007-10-15 Olivier Hainque <hainque@adacore.com>
301 * tb-alvms.c (tb_entry_t, __gnat_backtrace): Store a frame pointer
302 instead of a procedure value in each traceback entry.
304 * g-trasym-vms-alpha.adb (Symbolic_Traceback): Pass frame pointer
305 instead of procedure value to TBK$SYMBOLIZE.
307 * s-traent-vms.adb (PV_For): Rename as FP_For and access the proper
309 (TB_Entry_For): Account for the PV/FP renaming.
311 * s-traent-vms.ads (Traceback_Entry): Rename PV component into FP and
313 (Null_TB_Entry): Account for change of component name.
314 (PV_For): Rename as FP_For.
316 2007-10-15 Tristan Gingold <gingold@adacore.com>
318 * trans.c (gnat_to_gnu): Remove the padding structure more often.
319 This optimize assignment to over-aligned record.
321 2007-10-15 Emmanuel Briot <briot@adacore.com>
323 * xref_lib.adb (Get_Full_Type): Add support for the 'h' entity type, ie
326 * xr_tabls.adb (Add_Reference): Add support for the new 'R' reference
327 type, for dispatching calls.
329 2007-10-15 Vincent Celier <celier@adacore.com>
330 Robert Dewar <dewar@adacore.com>
332 * gnat_ugn.texi: Add documentation for switches --version and --help
333 for the GNAT tools gnatbind, gnatlink, gnatmake, gnatchop, gnatname,
334 gnatxref, gnatfind, gnatls, and gnatclean.
336 Mention attribute Excluded_Source_Dirs
337 Replace obsolescent attribute Locally_Removed_Files with attribute
338 Excluded_Source_Files.
339 Improve documentation of -u (gnatbind)
340 Document how to do reliable stack checking for the environmental task
343 * gnat_rm.texi: Rewrite section about No_Implicit_Dynamic_Code.
344 Document attribute Excluded_Source_Files and indicate that attribute
345 Locally_Removed_Files is obsolescent.
347 2007-10-15 Thomas Quinot <quinot@adacore.com>
349 * g-soccon-vms.ads: Fix value of MSG_WAITALL.
352 Update documentation to note that OpenVMS 8.3 or later must be used
353 to generate g-soccon-vms.ads.
355 * atree.adb: Add ??? comment
357 * exp_util.adb: Minor reformatting.
358 Add ??? comment in Kill_Dead_Code.
360 2007-10-15 Robert Dewar <dewar@adacore.com>
362 * errout.ads: Comment clarification
364 * exp_ch4.adb (Expand_N_Allocator): Code cleanup.
365 (Expand_N_Op_Eq): Improve handling of array equality with -gnatVa
367 * lib.ads: Comment update
369 * init.c: Minor reformatting.
371 * sem_attr.adb: Minor formatting
373 * osint-b.ads: Minor reformatting
375 * sem_ch9.adb: Implement -gnatd.I switch
377 * g-comlin.adb: (Start): Fix handling of empty command line.
379 * gnatcmd.adb (GNATCmd): Do not put the -rules in the -cargs section,
380 even when -rules follows the -cargs section.
382 2007-10-08 Ollie Wild <aaw@google.com>
384 * misc.c (LANG_HOOKS_PUSHDECL): Replaced lhd_return_tree with
386 (gnat_init_gcc_eh): Replaced gnat_eh_runtime_type with
388 (gnat_eh_runtime_type): Removed.
389 (gnat_return_tree): New function.
391 2007-10-08 Ben Elliston <bje@au.ibm.com>
395 2007-08-31 Ben Elliston <bje@au.ibm.com>
397 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
398 when compiling for powerpc64-*-linux.
399 * system-linux-ppc64.ads: New file.
401 2007-09-27 Eric Botcazou <ebotcazou@adacore.com>
403 Mapped location support
404 * back_end.adb (Call_Back_End): Pass information about source
405 files instead of units to gigi.
406 * gigi.h (struct File_Info_Type): New.
407 (gigi): Rename and change type of number_units parameter, change
408 type of file_info_ptr parameter.
409 * trans.c (number_files): New global variable.
410 (gigi): Rename and change type of number_units parameter, change
411 type of file_info_ptr parameter.
412 If mapped location support is enabled, create the isomorphic mapping
413 between source files and line maps.
414 (Sloc_to_locus): If mapped location support is enabled, translate
415 source location into mapped location.
416 (annotate_with_node): Rename into set_expr_location_from_node.
417 Call set_expr_location instead of annotate_with_locus.
418 (Pragma_to_gnu): Adjust for above change.
419 (Loop_Statement_to_gnu): Likewise.
420 (call_to_gnu): Likewise.
421 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
422 (gnat_to_gnu): Likewise.
423 (add_stmt_with_node): Likewise.
424 (add_cleanup): Likewise.
425 * utils.c (gnat_init_decl_processing): Do not set input_line.
427 2007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
429 * sem_ch8.adb (Analyze_Use_Type): Code cleanup.
430 (Applicable_Use): Emit a warning when a package tries to use itself.
431 (Use_One_Type): Add variable Is_Known_Used. Emit a warning when a type
432 is already in use or the package where it is declared is in use or is
433 declared in the current package.
434 (Spec_Reloaded_For_Body): New subsidiary routine for Use_One_Type.
436 * a-tasatt.adb, s-osprim-vxworks.adb, g-socthi-mingw.adb,
437 s-intman-vms.adb, g-socket.adb, g-thread.adb, s-tarest.adb,
438 s-tassta.adb, s-tporft.adb: Remove redundant 'use type' clause.
440 2007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
442 * a-calend-vms.adb, a-calend.adb:
443 Add a section on leap seconds control along with two entities used to
444 enable and disable leap seconds support. The array Leap_Second_Times is
445 now constant and contains hard time values pre-generated. Remove
446 all elaboration code used to populate the table of leap seconds.
449 Add entity Leap_Seconds_Support to the list of global run-time variables
450 along with a comment on its usage and values.
451 (Gen_Adainit_Ada): Add code to generate the declaration and import of
452 Integer variable Leap_Seconds_Support. Set its value to zero (disabled)
453 or one (enabled) depending on the presence of binder switch "-y".
454 (Gen_Adainit_C): Add code to generate the declaration of external int
455 __gl_leap_seconds_support. Set is value to zero (disabled) or one
456 (enabled) depending on the presence of binder switch "-y".
458 * init.c: Add __gl_leap_seconds_support to the list of global values
459 computed by the binder.
461 2007-09-26 Jerome Guitton <guitton@adacore.com>
463 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
464 s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb,
465 s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
466 s-taprop-posix.adb (Stop_Task): New function, dummy implementation.
468 * s-taprop.ads, s-taprop-vxworks.adb (Stop_Task): New function.
470 * s-tasdeb.adb (Stop_All_Tasks): New function, implementing a run-time
471 function which can be called by the debugger to interrupt the tasks of
472 an Ada application asynchronously, as needed on VxWorks.
473 (Stop_All_Tasks_Handler): Renamed from Stop_All_Tasks.
475 * s-tasdeb.ads (Stop_All_Tasks_Handler): New function declaration,
476 renamed from Stop_All_Tasks. Update comments.
477 (Stop_All_tasks): New function declaration.
479 2007-09-26 Olivier Hainque <hainque@adacore.com>
481 * adaint.c (if defined (__Lynx__)): Wrap #def/#undef VMOS_DEV around
482 #include <utime.h> and #define GCC_RESOURCE_H before
483 #include <sys/wait.h>.
484 Add more protections in __gnat_translate_vms.
486 * expect.c (if defined (__Lynx__)): #define GCC_RESOURCE_H before
487 #include <sys/wait.h>.
489 2007-09-26 Thomas Quinot <quinot@adacore.com>
490 Sergey Rybin <rybin@adacore.com>
492 * gnatvsn.ads (PCS_Version_Number, ASIS_Version_Number): Removed.
494 * exp_dist.ads (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
497 * opt.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
499 * rtsfind.adb (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
502 * sem_dist.ads: Minor comment fix
504 * tree_io.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
506 2007-09-26 Javier Miranda <miranda@adacore.com>
507 Eric Botcazou <ebotcazou@adacore.com>
510 (Get_HT_Link/Set_HT_Link): Updated to handle the additional level of
511 indirection added to the HT_Link component of the TSD. This is required
512 to statically allocate the TSD.
515 Minor reordering of the declarations in the private part. Required to
516 add a level of indirection to the contents of the TSD component HT_Link.
517 This is required to statically allocate the TSD.
519 * decl.c (gnat_to_gnu_entity) <object>: Do not exclude objects with
520 Is_Statically_Allocated set from constant objects.
521 Do not make exported constants created by the compiler volatile.
522 (gnat_to_gnu_param): Do not treat an IN parameter whose address is taken
525 * trans.c (Identifier_to_gnu): For constants, unshare initializers
526 before returning them.
528 * exp_disp.ads, exp_disp.adb (Building_Static_DT): Spec moved to the
529 public part of the package.
530 (Make_DT): Move HT_Link component out of the TSD record. For this
531 purpose Make_DT now declares a separate object that stores the
532 HT_Link value, and initializes the TSD component with the address
533 of this new object. The addition of this level of indirection is
534 required to statically allocate the TSD because the TSD cannot
535 have variable components.
536 (Expand_Interface_Conversion): Improve the expanded code.
537 (Expand_Interface_Thunk): Set Is_Thunk in the thunk entity.
539 * sem_disp.adb (Check_Dispatching_Operation): In case of a body
540 declaring a primitive operation ---allowed by RM 3.9.2 (13.e/2)---,
541 if we are building static dispatch tables then we must not generate
542 extra code to register the primitive because the dispatch table will
543 be built at the end of the library package; otherwise we notify that
544 we cannot build the static dispatch table.
546 2007-09-26 Robert Dewar <dewar@adacore.com>
548 * checks.adb, gnat1drv.adb, sem_util.ads: Improve warnings for address
551 * sem_ch13.ads, sem_ch13.adb: Improve warnings for address overlays
552 (Analyze_Record_Representation_Clause): Suppress junk warning for
553 missing component clause.
554 (Analyze_Attribute_Definition_Clause, case Address): Apply the special
555 tests for controlled type overlay to composites with controlled
557 (Analyze_Record_Representation_Clause): Add reference for component name
559 2007-09-26 Javier Miranda <miranda@adacore.com>
560 Gary Dismukes <dismukes@adacore.com>
562 * einfo.adb (Is_Thunk): New attribute applicable to subprograms. True
563 for thunks associated with interface types.
565 * einfo.ads: Improve documentatation of Is_Internal
566 (Is_Thunk): New attribute applicable to subprograms. True for thunks
567 associated with interface types.
568 Extensive comment fixes regarding flags that appear in all entities. The
569 documentation is now consistent for all such flags (there were a number
570 of errors in the documentation in this regard).
572 * exp_attr.adb (Expand_N_Attribute_Reference): Minor code cleanup.
574 * exp_ch6.adb (Make_Build_In_Place_Call_*): Return immediately if any
575 of these procedures are passed a function call that already has
576 build-in-place actuals (testing new flag
577 Is_Expanded_Build_In_Place_Call). Set the flag on the function call in
578 the case where processing continues.
579 (Expand_Call): If the call is generated from a thunk body then we
580 propagate the extra actuals associated with the accessibility
581 level of the access type actuals.
583 * sem_ch6.adb (Analyze_Subprogram_Body): Set the Protected_Formal field
584 of each extra formal of a protected operation to reference the
585 corresponding extra formal of the subprogram denoted by the
586 operation's Protected_Body_Subprogram.
588 * sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on
589 N_Function_Call nodes.
591 2007-09-26 Robert Dewar <dewar@adacore.com>
593 * exp_ch5.adb: Activate memmove type processing if debug flag d.s is set
595 * debug.adb: Add d.s flag.
597 2007-09-26 Gary Dismukes <dismukes@adacore.com>
599 * exp_dbug.adb (Debug_Renaming_Declaration): Set Is_Internal on the
600 debug variable so that it won't be initialized when pragma
601 Initialize_Scalars is in effect.
603 2007-09-26 Gary Dismukes <dismukes@adacore.com>
605 * freeze.adb (Freeze_Entity): Remove check for preelaborable
606 initialization of a full view. This is moved to
607 Analyze_Package_Specification.
609 * sem_ch7.adb (Analyze_Package_Specification): Add check for
610 preelaborable initialization of a full view in entity loop.
611 (Uninstall_Declarations): If entity is a use-visible compilation unit,
612 its child units are use-visible only if they are visible child units.
614 * sem_util.adb (Is_Preelaborable_Expression): New function to determine
615 whether an expression can be used within a type declaration that
616 requires preelaborable init.
617 (Check_Components): Replace inline code that does partial checking for
618 preelaborable default expressions with call to
619 Is_Preelaborable_Expression.
620 (Has_Preelaborable_Initialization): In the case of a generic actual
621 subtype, (that is, Is_Generic_Actual is True), return the result of
622 applying Has_Preelaborable_Initialization to the generic actual's base
625 2007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
627 * g-calend.adb (Has_53_Weeks): Rename to Last_Year_Has_53_Weeks. Add a
628 call to Jan_1_Day _Of_Week to optimize its performance.
629 (Is_Leap): Move the routine to the scope of Week_In_Year.
630 (Jan_1_Day_Of_Week): New routine in Week_In_Year which calculates the
631 weekday on which January 1 falls of Year - 1 and Year + 1. This function
632 avoids calling Time_Of and Split, thus making it more efficent.
633 (Week_In_Year): Reimplemented in oder to follow ISO 8601.
635 * g-calend.ads (Week_In_Year): Change comment to reflect new
638 2007-09-26 Emmanuel Briot <briot@adacore.com>
640 * g-comlin.ads, g-comlin.adb (Command_Line_Configuration,
641 Command_Line): New types
642 (Define_Alias, Define_Prefix, Free): New subprograms. These provide
643 support for defining how switches can be grouped on a command line (as
644 is the case for -gnatw... for GNAT), and how simple switches can be
645 used as aliases for more complex switches (-gnatwa is same as
647 (Set_Command_Line, Add_Switch, Remove_Switch): New subprogram
648 (Start, Current_*): New subprograms
649 Added support for parsing an array of strings in addition to the real
651 (Opt_Parser, Opt_Parser_Data): New type. As a result, some types had to
652 be moved from the body to the private part of the spec.
653 (*): All subprograms now have an extra parameter with default value to
654 specify which parser should be used. For backward compatibility, it
655 defaults to parsing the command line of the application. They were also
656 modified to properly handle cases where each of the argument does not
657 start at index 1 (which is always true for Ada.Command_Line, but not
658 when processing any Argument_List).
659 (Free): New subprogram
660 (Internal_Initialize_Option_Scan, Find_Longuest_Matching_Switch,
661 Argument): New subprograms
662 (Switch_Parameter_Type): New enum, which clarifies the code. The extra
663 special characters like ':', '=',... are now handled in a single place,
664 which makes the code more extensible eventually.
665 (Getopt, Full_Switch): When the switch was returned as part of the
666 special character '*', make sure it is prepended by the switch character
667 ('-' in general), so that the application knows whether "foo" or "-foo"
668 was specified on the command line.
670 2007-09-26 Florian Villoing <villoing@adacore.com>
672 * g-dirope.adb (Remove_Dir): In case we are removing directories
673 recursively, make sure that if an exception is raised during the
674 processing, the current working directory is reset to its initial
675 value before propagating the exception.
677 2007-09-26 Vincent Celier <celier@adacore.com>
679 * gnatbind.adb: If there are several ALI files specified and there is
680 a main program to bind, the first ALI is expected to contain the main
681 subprogram and the names of the binder generated files will be derived
682 from the first ALI file name.
683 (Gnatbind): Fix insertion character in invocation of Error_Msg
685 2007-09-26 Vincent Celier <celier@adacore.com>
687 * gnatcmd.adb (Check_Files): Do not include sources that have been
688 removed by attributes Exclude_Source_Files or Locally_Removed_Files.
690 2007-09-26 Ed Schonberg <schonberg@adacore.com>
692 * lib-xref.ads, lib-xref.adb: The entry for array types now carries
693 information about each of its index types, following the type
694 reference for its component type.
696 2007-09-26 Vincent Celier <celier@adacore.com>
698 * make.adb: (Kill): New procedure (__gnat_kill imported)
699 (Running_Compile, Outstanding_Compiles): Global variables that
700 were previously local to procedure Compile_Sources.
701 (Sigint_Intercepted): Send signal SIGINT to all outstanding
702 compilation processes.
704 (Gnatmake): If project files are used, create the mapping of all the
705 sources, so that the correct paths will be found.
707 * prj-env.ads, prj-env.adb (Create_Mapping): New procedure
709 2007-09-26 Vincent Celier <celier@adacore.com>
711 * makeutl.ads (Main_Config_Project): Moved to gpr_util.ads
713 * prj.ads, prj.adb (Default_Language): Remove function, no longer used
714 Replace components Compiler_Min_Options and Binder_Min_Options with
715 Compiler_Required_Switches and Binder_Required_Switches in record
717 Remove components Default_Language and Config in Project_Tree_Data,
720 * prj-attr.adb: New attributes Required_Switches (<language>) in
721 packages Compiler and Binder.
723 * prj-nmsc.adb: Major rewrite of the processing of configuration
724 attributes for gprbuild. No impact on GNAT tools.
726 * prj-proc.ads, prj-proc.adb (Process_Project_Tree_Phase_2): No longer
727 process configuration attributes: this is done in Prj.Nmsc.Check.
728 (Recursive_Process): Make a full copy of packages inherited from project
729 being extended, instead of a shallow copy.
730 (Process_Project_Tree_Phase_1): New procedure
731 (Process_Project_Tree_Phase_1): New procedure
732 (Process): Implementation now uses the two new procedures
734 * prj-util.adb (Executable_Of): Get the suffix and the default suffix
735 from the project config, not the tree config that no longer exists.
737 2007-09-26 Vincent Celier <celier@adacore.com>
739 * Make-lang.in: Update dependencies..
741 2007-09-26 Vincent Celier <celier@adacore.com>
743 * osint.adb, osint.ads: Minor reformatting
745 * osint-b.adb, osint-b.ads (Set_Current_File_Name_Index): New procedure
747 2007-09-26 Gary Dismukes <dismukes@adacore.com>
749 * par-ch4.adb (P_Record_Or_Array_Component_Association): Change Ada 95
750 message to cite use of <> in aggregate component associations rather
751 than wrongly indicating use of limited aggregates.
753 2007-09-26 Robert Dewar <dewar@adacore.com>
755 * sem_attr.adb (Analyze_Access_Attribute): Fix missing set of
758 2007-09-26 Ed Schonberg <schonberg@adacore.com>
760 * sem_ch3.adb (Derive_Subprograms): If the interface parent is a direct
761 ancestor of the derived type, the operations are inherited from the
762 primary dispatch table of the parent.
763 (OK_For_Limited_Init_In_05): Remove old comment. Reject in-place calls
764 when the context is an explicit type conversion.
766 2007-09-26 Ed Schonberg <schonberg@adacore.com>
768 * sem_ch4.adb (Analyze_Qualified_Expression): Apply name resolution
769 rule for qualified expressions properly, to detect improper conversions
770 and resolve some cases of overloading.
772 2007-09-26 Ed Schonberg <schonberg@adacore.com>
774 * sem_res.adb (Resolve_Call): If the call is dispatching, generate the
775 proper kind of reference to the primitive operation, for better source
777 (Valid_Conversion): A tagged conversion is legal if both operands are
780 2007-09-26 Robert Dewar <dewar@adacore.com>
782 * sem_warn.adb (Check_References): Catch more cases of unreferenced
785 2007-09-26 Vincent Celier <celier@adacore.com>
787 * snames.adb, snames.ads: Change Include_Option to Include_Switches
789 2007-09-26 Robert Dewar <dewar@adacore.com>
791 * s-wchstw.adb: provide messages for run time unit exceptions
793 * a-witeio.adb: Minor reformatting
795 * exp_ch13.adb: Minor reformatting
797 2007-09-26 Sergey Rybin <rybin@adacore.com>
799 * vms_data.ads: Revise gnatmetric qualifiers.
800 Add qualified for the new gnatbind option '-y'
802 * gnat_ugn.texi: Revise the gnatmetric section.
803 Add entry for new gnatbind option '-y'.
805 * gnat_rm.texi: Minor spelling correction.
806 Document restriction on overlaying controlled types
808 2007-09-26 Vincent Celier <celier@adacore.com>
810 * makegpr.adb (Link_Executables): Do not fail when the root project has
811 no sources, but is an extending project.
813 2007-09-25 Eric Botcazou <ebotcazou@adacore.com>
815 * trans.c: Fix misplaced #define.
817 2007-09-22 Eric Botcazou <ebotcazou@adacore.com>
819 * utils2.c (build_unary_op) <ADDR_EXPR> [INDIRECT_REF]: Propagate
820 the TYPE_REF_CAN_ALIAS_ALL flag to the result.
822 2007-09-21 Olivier Hainque <hainque@adacore.com>
824 * utils.c (type_for_nonaliased_component_p): Return false for
827 2007-09-17 Eric Botcazou <ebotcazou@adacore.com>
829 * decl.c (gnat_to_gnu_entity) <object>: Make again the type of an
830 object covered by 13.3(19) volatile.
832 2007-09-12 Eric Botcazou <ebotcazou@adacore.com>
836 * utils.c (unchecked_convert): Use a subtype as the intermediate type
837 in the special VIEW_CONVERT_EXPR case.
839 2007-09-12 Robert Dewar <dewar@adacore.com>
841 * types.ads, a-charac.ads, freeze.adb: Minor reformatting.
843 * a-except.adb, g-hesora.adb, g-speche.adb, lib.adb, lib.ads,
844 lib-load.adb, lib-writ.adb, s-assert.adb, s-carun8.adb,
845 s-casuti.adb, s-crc32.adb, s-exctab.adb, s-htable.adb, s-imgenu.adb,
846 s-mastop.adb, s-memory.adb, s-memory.ads, s-secsta.adb, s-soflin.adb,
847 s-sopco3.adb, s-sopco4.adb, s-sopco5.adb, s-stache.adb, s-stalib.adb,
848 s-stoele.adb, s-strcom.adb, s-strops.adb, s-traceb.adb, s-traent.adb,
849 s-wchcnv.adb, s-wchcon.adb, s-wchjis.adb, s-addope.adb, s-except.adb,
850 s-os_lib.adb, s-string.adb, s-utf_32.adb, a-elchha.adb,
851 a-chlat1.ads, a-elchha.ads, a-except.ads, g-hesora.ads, g-htable.ads,
852 g-speche.ads, par-prag.adb, restrict.adb, restrict.ads, s-assert.ads,
853 s-carun8.ads, s-casuti.ads, s-crc32.ads, sem_ch11.adb, sem_prag.adb,
854 s-exctab.ads, s-htable.ads, s-imgenu.ads, s-mastop.ads, snames.adb,
855 snames.ads, snames.h, s-purexc.ads, s-secsta.ads, s-soflin.ads,
856 s-sopco3.ads, s-sopco4.ads, s-sopco5.ads, s-stache.ads, s-stalib.ads,
857 s-stoele.ads, s-strcom.ads, s-strops.ads, s-traceb.ads, s-traent.ads,
858 s-unstyp.ads, s-wchcnv.ads, s-wchcon.ads, s-wchjis.ads, s-addope.ads,
859 s-except.ads, s-os_lib.ads, s-string.ads, s-utf_32.ads: Implement
860 pragma Compiler_Unit and adds it to relevant library units.
862 2007-09-12 Ed Schonberg <schonberg@adacore.com>
864 * sem_aggr.adb (Resolve_Record_Aggregate): An others association with
865 a box need not correspond to any component.
867 2007-09-12 Robert Dewar <dewar@adacore.com>
869 * g-thread.ads: Document use of "with GNAT.Threads" to ensure loading
870 the tasking version of the Ada run time when foreign threads are
871 present and there are no explicit Ada tasks or tasking constructs.
873 * gnat_rm.texi: Clarify documentation of GNAT.Threads.
875 2007-09-12 Hristian Kirtchev <kirtchev@adacore.com>
877 * bindusg.adb (Display): Correct comment for switch -X. Add a line for
878 the usage of switch -y.
880 * switch-b.adb (Scan_Binder_Switches): Set flag Leap_Seconds_Support
881 when switch -y is present.
883 * opt.ads: Add binder flag Leap_Seconds_Support used to enable/disable
884 leap seconds in Ada.Calendar and its children.
886 2007-09-12 Jose Ruiz <ruiz@adacore.com>
888 * a-extiti.ads (Timer): The discriminant is a "not null access
889 constant" in the Reference Manual.
890 (Cancel_Handler): Cancelled is an out parameter in the Reference Manual.
892 2007-09-12 Robert Dewar <dewar@adacore.com>
894 * a-swuwha.adb: Remove junk RM header
896 2007-09-12 Vincent Celier <celier@adacore.com>
898 * g-bytswa-x86.adb (Swap2, Swap4, Swap8): Remove explicit "in" mode
901 * g-bytswa.ads: Minor reformatting
903 2007-09-12 Thomas Quinot <quinot@adacore.com>
905 * g-soccon-solaris-64.ads, g-soccon-hpux-ia64.ads:
906 Add new constant Thread_Blocking_IO, always True by default, set False
907 on a per-runtime basis.
908 (Need_Netdb_Buffer): New constant.
910 2007-09-12 Arnaud Charlet <charlet@adacore.com>
912 * s-dsaser.ads (Get_Local_Partition_Id, Get_Passive_Partition_Id):
913 Added renames for corresponding functions in System.Partition_Interface.
915 2007-09-12 Doug Rupp <rupp@adacore.com>
917 * Makefile.in: Remove VMS specific System.CRTL packages which are no
920 * s-crtl-vms64.ads: Removed.
922 2007-09-12 Olivier Hainque <hainque@adacore.com>
924 * decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: For a subtype
925 with discriminant constraints, generalize the code for BIT_FIELDs
926 to PACKED fields of constant size and propagate DECL_PACKED.
928 2007-09-11 Eric Botcazou <ebotcazou@adacore.com>
930 * decl.c (array_type_has_nonaliased_component): New predicate.
931 (gnat_to_gnu_field) <E_Array_Type>: Invoke the above predicate to
932 set the TYPE_NONALIASED_COMPONENT flag on the type.
933 <E_Array_Subtype>: Likewise.
934 * gigi.h (type_for_nonaliased_component_p): Declare.
935 * utils.c (type_for_nonaliased_component_p): New predicate.
936 (create_field_decl): Invoke the above predicate to set the
937 DECL_NONADDRESSABLE_P flag on the field.
939 2007-09-11 Javier Miranda <miranda@adacore.com>
941 * einfo.ads, einfo.adb (Dispatch_Table_Wrapper): New attribute. Present
942 in library level record type entities if we are generating statically
943 allocated dispatch tables.
945 * exp_disp.adb (Make_Tags/Make_DT): Replace previous code
946 importing/exporting the _tag declaration by new code
947 importing/exporting the dispatch table wrapper. This change allows us
948 to statically allocate of the TSD.
949 (Make_DT.Export_DT): New procedure.
950 (Build_Static_DT): New function.
951 (Has_DT): New function.
953 * freeze.adb (Freeze_Static_Object): Code cleanup: Do not reset flags
954 True_Constant and Current_Value. Required to statically
955 allocate the dispatch tables.
956 (Check_Allocator): Make function iterative instead of recursive.
957 Also return inner allocator node, when present, so that we do not have
958 to look for that node again in the caller.
960 2007-09-11 Jan Hubicka <jh@suse.cz>
962 * misc.c (gnat_expand_body): Kill.
963 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
965 2007-09-10 Robert Dewar <dewar@adacore.com>
967 * exp_atag.ads, exp_atag.adb, mlib-tgt-tru64.adb, mlib-tgt-aix.adb,
968 mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
969 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
970 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, ali.adb, ali.ads,
971 ali-util.adb, ali-util.ads, atree.h, back_end.adb, back_end.ads,
972 bcheck.adb, bcheck.ads, binde.adb, binde.ads, binderr.adb, binderr.ads,
973 bindgen.adb, bindgen.ads, bindusg.adb, bindusg.ads, butil.adb,
974 butil.ads, checks.adb, checks.ads, clean.adb, clean.ads, comperr.adb,
975 comperr.ads, cstand.adb, cstand.ads, debug_a.adb, debug_a.ads,
976 elists.h, errout.adb, erroutc.ads, errutil.adb, errutil.ads,
977 err_vars.ads, eval_fat.adb, eval_fat.ads, exp_sel.ads, exp_sel.adb,
978 exp_aggr.adb, exp_aggr.ads, expander.adb, expander.ads, exp_attr.ads,
979 exp_ch10.ads, exp_ch11.adb, exp_ch12.adb, exp_ch12.ads, exp_ch13.adb,
980 exp_ch13.ads, exp_ch2.adb, exp_ch2.ads, exp_ch3.ads, exp_ch4.adb,
981 exp_ch4.ads, exp_ch5.adb, exp_ch5.ads, exp_ch6.adb, exp_ch6.ads,
982 exp_ch7.adb, exp_ch7.ads, exp_ch8.adb, exp_ch8.ads, exp_ch9.adb,
983 exp_ch9.ads, exp_code.adb, exp_code.ads, exp_dbug.adb, exp_dbug.ads,
984 exp_disp.ads, exp_dist.adb, exp_dist.ads, exp_fixd.adb, exp_fixd.ads,
985 exp_imgv.adb, exp_imgv.ads, exp_intr.adb, exp_intr.ads, exp_pakd.adb,
986 exp_pakd.ads, exp_prag.adb, exp_prag.ads, exp_smem.adb, exp_strm.adb,
987 exp_strm.ads, exp_tss.adb, exp_tss.ads, exp_util.adb, exp_util.ads,
988 exp_vfpt.adb, exp_vfpt.ads, fmap.adb, fmap.ads, fname-sf.adb,
989 fname-sf.ads, fname-uf.adb, fname-uf.ads, frontend.adb, frontend.ads,
990 get_targ.adb, get_targ.ads, gnat1drv.adb, gnat1drv.ads, gnatbind.adb,
991 gnatbind.ads, gnatbl.c, gnatchop.adb, gnatclean.adb, gnatcmd.adb,
992 gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatkr.adb, gnatkr.ads,
993 gnatlbr.adb, gnatlink.adb, gnatlink.ads, gnatls.adb, gnatls.ads,
994 gnatmake.adb, gnatmake.ads, gnatmem.adb, gnatname.adb, gnatname.ads,
995 gnatprep.adb, gnatprep.ads, gnatsym.adb, gnatxref.adb,
996 gprep.adb, gprep.ads, hlo.adb, hlo.ads, impunit.adb, impunit.ads,
997 inline.adb, inline.ads, itypes.adb, itypes.ads, layout.adb, layout.ads,
998 lib-load.adb, lib-load.ads, lib-util.adb, lib-util.ads, lib-writ.adb,
999 lib-writ.ads, lib-xref.adb, lib-xref.ads, live.adb, live.ads,
1000 make.adb, make.ads, makeutl.ads, makeutl.adb, makeusg.adb, makeusg.ads,
1001 mdll.adb, mdll.ads, mdll-fil.adb, mdll-fil.ads, mdll-utl.adb,
1002 mdll-utl.ads, memroot.adb, memroot.ads, mlib.adb, mlib.ads,
1003 mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb,
1004 mlib-tgt.ads, mlib-utl.adb, mlib-utl.ads, namet.h, nmake.adt,
1005 osint.adb, osint.ads, osint-b.adb, osint-b.ads, osint-c.adb,
1006 osint-c.ads, osint-l.adb, osint-l.ads, osint-m.adb, osint-m.ads,
1007 par.adb, par.ads, par-ch10.adb, par-ch11.adb, par-ch12.adb,
1008 par-ch13.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
1009 par-ch6.adb, par-ch7.adb, par-ch8.adb, par-ch9.adb, par-endh.adb,
1010 par-labl.adb, par-load.adb, par-prag.adb, par-sync.adb, par-tchk.adb,
1011 par-util.adb, prep.adb, prep.ads, prepcomp.adb, prepcomp.ads,
1012 prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-com.ads,
1013 prj-dect.adb, prj-dect.ads, prj-err.adb, prj-err.ads, prj-ext.adb,
1014 prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads,
1015 prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads,
1016 prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads,
1017 prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
1018 prj-util.adb, prj-util.ads, restrict.adb, restrict.ads,
1019 rtsfind.adb, rtsfind.ads, scn.adb, scn.ads,
1020 scng.adb, scng.ads, sdefault.ads, sem.ads, sem_aggr.ads, sem_attr.adb,
1021 sem_case.adb, sem_case.ads, sem_cat.adb, sem_cat.ads, sem_ch10.adb,
1022 sem_ch10.ads, sem_ch11.adb, sem_ch11.ads, sem_ch12.ads, sem_ch13.adb,
1023 sem_ch13.ads, sem_ch2.adb, sem_ch2.ads, sem_ch3.adb, sem_ch3.ads,
1024 sem_ch4.ads, sem_ch5.adb, sem_ch5.ads, sem_ch6.adb, sem_ch6.ads,
1025 sem_ch7.adb, sem_ch7.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
1026 sem_ch9.ads, sem_disp.adb, sem_disp.ads, sem_dist.adb, sem_dist.ads,
1027 sem_elab.adb, sem_elab.ads, sem_elim.adb, sem_elim.ads, sem_eval.adb,
1028 sem_eval.ads, sem_intr.adb, sem_intr.ads, sem_maps.adb, sem_maps.ads,
1029 sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_prag.ads, sem_res.adb,
1030 sem_res.ads, sem_smem.adb, sem_smem.ads, sem_type.adb, sem_type.ads,
1031 sem_util.adb, sem_util.ads, sem_vfpt.adb, sem_vfpt.ads, sem_warn.adb,
1032 sem_warn.ads, sfn_scan.ads, sinfo-cn.adb, sinfo-cn.ads, sinput-c.adb,
1033 sinput-c.ads, sinput-d.adb, sinput-d.ads, sinput-l.adb, sinput-l.ads,
1034 sinput-p.adb, sinput-p.ads, snames.h, sprint.adb, sprint.ads,
1035 stringt.h, style.ads, styleg.adb, styleg.ads, styleg-c.adb,
1036 styleg-c.ads, stylesw.adb, stylesw.ads, switch.adb, switch.ads,
1037 switch-b.adb, switch-b.ads, switch-c.adb, switch-c.ads, switch-m.adb,
1038 switch-m.ads, symbols.adb, symbols.ads, targparm.adb, tbuild.adb,
1039 tbuild.ads, tempdir.adb, tempdir.ads, tree_gen.adb, tree_gen.ads,
1040 treepr.adb, treepr.ads, treeprs.adt, ttypef.ads, ttypes.ads,
1041 types.h, uintp.h, urealp.h, usage.adb, usage.ads,
1042 validsw.adb, validsw.ads, vxaddr2line.adb, xeinfo.adb, xnmake.adb,
1043 xref_lib.adb, xref_lib.ads, xr_tabls.adb, xr_tabls.ads, xsinfo.adb,
1044 xtreeprs.adb, xsnames.adb, vms_conv.ads, vms_conv.adb, xgnatugn.adb,
1045 gprmake.adb, makegpr.ads, makegpr.adb, prj-attr-pm.ads, prj-attr-pm.adb,
1046 mlib-tgt-lynxos.adb, mlib-tgt-darwin.adb, symbols-vms.adb,
1047 symbols-processing-vms-alpha.adb, symbols-processing-vms-ia64.adb,
1048 mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-vms.adb,
1049 mlib-tgt-vms.ads: Replace headers with GPL v3 headers.
1051 2007-09-10 Emmanuel Briot <briot@adacore.com>
1053 * s-regpat.adb (Parse_Character_Class): Fix handling of empty character
1056 2007-09-10 Vasiliy Fofanov <fofanov@adacore.com>
1058 * adaint.c (__gnat_translate_vms): new function.
1060 2007-09-10 Gary Dismukes <dismukes@adacore.com>
1061 Thomas Quinot <quinot@adacore.com>
1063 * exp_ch3.adb (Predef_Spec_Or_Body): When the type is abstract, only
1064 create an abstract subprogram in the case of 'Input. For 'Output we now
1065 create a real spec/body when the type is abstract, since it can
1066 potentially be called.
1067 (Predefined_Primitive_Bodies): Now allow the creation of a predefined
1068 body for 'Output when the type is abstract (only the creation of the
1069 body for 'Input is excluded when the type is abstract).
1070 (Stream_Operation_OK): Add an additional condition in the return
1071 statement, so that False will be returned for TTS_Stream_Input if the
1072 associated tagged type is an abstract extension. Add comments for
1074 (Expand_N_Object_Declaration): For the case of a shared passive
1075 variable, insert init proc call only after the shared variable
1076 procedures have been processed, because the IP call needs to undergo
1077 shared passive variable reference expansion, which requires these
1078 procedures to be available (and elaborated).
1080 2007-09-10 Vincent Celier <celier@adacore.com>
1082 * prj-env.ads, prj-env.adb (Create_Mapping_File (Language)): Remove
1083 parameter Runtime_Project.
1085 2007-09-10 Ed Schonberg <schonberg@adacore.com>
1087 * sem_aggr.adb (Build_Record_Aggr_Code): If an aggregate component is
1088 given a box association, the type of the component is discriminated,
1089 and the value of the discriminant is the discriminant of the enclosing
1090 type, retrieve its value from the aggregate itself, where it must have
1093 * sem_ch4.adb (Analyze_One_Call): Further refinement to previous fix,
1094 to remove other spurious ambiguities on arithmetic operations involving
1095 literals and addresses, on systems where Address is a visible integer
1096 type, when the operator is called in functional notation.
1097 (Try_Primitive_Operation): Within an instance, a call in prefixed form
1098 is legal when the types match, even if the operation is currently
1101 2007-09-10 Ed Schonberg <schonberg@adacore.com>
1103 * sem_ch12.adb (Build_Local_Package): A formal package with no
1104 associations is legal if all formals have defaults. It is not
1105 equivalent to a formal declared with a box.
1107 2007-09-10 Sergey Rybin <rybin@adacore.com>
1109 * vms_data.ads: Add qualifier for the new gnatmetric '-lratio' option
1111 2007-09-10 Sergey Rybin <rybin@adacore.com>
1113 * gnat_ugn.texi: Add description of the new '-lratio' option
1114 Update 7.3.1 section about availability of the feature.
1116 2007-09-10 Thomas Quinot <quinot@adacore.com>
1118 * exp_smem.ads, exp_smem.adb (Make_Shared_Var_Procs): Return last
1121 2007-09-10 Olivier Hainque <hainque@adacore.com>
1123 * Makefile.in: (mips-irix section): Activate build of libgmem.
1125 2007-09-10 Eric Botcazou <ebotcazou@adacore.com>
1127 * a-numaux-x86.adb (Logarithmic_Pow): Do not silently clobber
1130 2007-09-10 Eric Botcazou <ebotcazou@adacore.com>
1132 * decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for
1133 a debug renaming declaration specially.
1135 2007-09-08 Eric Botcazou <ebotcazou@adacore.com>
1137 * decl.c (gnat_to_gnu_entity) <Object>: Simplify the condition under
1138 which a constant renaming is treated as a normal object declaration.
1139 * trans.c (lvalue_required_p) <N_Slice>: New case, extracted from
1140 the N_Indexed_Component case.
1141 <N_Indexed_Component>: Fall through to above case.
1142 <N_Object_Renaming_Declaration>: Return true for all composite types.
1144 2007-09-08 Eric Botcazou <ebotcazou@adacore.com>
1146 * decl.c (make_packable_type): If the new type has been given BLKmode,
1147 try again to get an integral mode for it.
1149 2007-09-07 Eric Botcazou <ebotcazou@adacore.com>
1151 Re-apply accidentally reverted change:
1153 2007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
1155 * raise-gcc.c (get_region_description_for, get_call_site_action_for,
1156 get_action_description_for): Replace _Unwind_Word with _uleb128_t
1157 and _Unwind_SWord with _sleb128_t.
1159 2007-09-06 Eric Botcazou <ebotcazou@adacore.com>
1161 * trans.c (convert_with_check): Update call to real_2expN.
1163 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1165 * trans.c (Compilation_unit_to_gnu): Use set_cfun.
1166 * utils.c (end_subprog_body): Likewise.
1168 2007-09-03 Nick Clifton <nickc@redhat.com>
1170 * Make-lang.in: Change copyright header to refer to version 3 of
1171 the GNU General Public License and to point readers at the
1172 COPYING3 file and the FSF's license web page.
1173 * ada-tree.def, nmake.adt, nlists.h, snames.h, utils.c,
1174 Makefile.rtl, Makefile.in, config-lang.in, uintp.h, urealp.h,
1175 namet.h, decl.c, utils2.c, lang.opt, elists.h, atree.h, types.h,
1176 treeprs.adt, lang-specs.h, cuintp.c, stringt.h, gnatbl.c:
1179 2007-08-31 Vincent Celier <celier@adacore.com>
1183 * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb,
1184 gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
1185 (Check_Version_And_Help): New procedure in package Switch to process
1186 switches --version and --help.
1187 Use Check_Version_And_Help in GNAT tools
1190 (Compile_Sources): Make sure that sources that are "excluded" are not
1192 (Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a
1193 project file is used.
1194 (Version_Switch): Remove, moved to Switch
1195 (Help_Switch): Remove, moved to Switch
1196 (Display_Version): Remove, moved to Switch
1198 * switch.ads, switch.adb (Check_Version_And_Help): New procedure in
1199 package Switch to process switches --version and --help.
1200 (Display_Version): New procedure
1202 * gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function.
1204 2007-08-31 Javier Miranda <miranda@adacore.com>
1206 * a-tags.adb (Internal_Tag): Protect the run-time against wrong
1209 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1211 * checks.adb (In_Declarative_Region_Of_Subprogram_Body): New routine.
1212 (Mark_Non_Null): If the node for which we just generated an access check
1213 is a reference to an *in* parameter and the reference appears in the
1214 declarative part of a subprogram body, mark the node as known non null.
1216 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1218 * einfo.ads, einfo.adb: New flag Is_Raised (Flag224). Update the
1219 structure of E_Exception to reflect the new flag.
1220 (Is_Raised, Set_Is_Raised): New inlined routines.
1221 Update the usage of available flag to reflect the addition of Is_Raised.
1222 (Is_Raised, Set_Is_Raised): Bodies of new routines.
1223 (Write_Entity_Flags): Write the status of flag Is_Raised.
1224 (Is_Descendent_Of_Address): New entity flag, to simplify handling of
1225 spurious ambiguities when integer literals appear in the context of an
1226 address type that is a visible integer type.
1228 * sem_ch11.adb (Analyze_Exception_Handler): Add code to warn on local
1229 exceptions never being raised.
1230 (Analyze_Raise_Statement): When analyzing an exception, mark it as being
1233 2007-08-31 Javier Miranda <miranda@adacore.com>
1235 * exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise
1236 statement when compiling under restriction No_Exceptions_Proparation.
1238 2007-08-31 Ed Schonberg <schonberg@adacore.com>
1240 * exp_ch3.adb (Build_Record_Init_Proc): If there is a static
1241 initialization aggregate for the type, generate itype references for
1242 thetypes of its (sub)components, to prevent out-of-scope errors in gigi.
1244 2007-08-31 Gary Dismukes <dismukes@adacore.com>
1246 * exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a
1247 library-level package renaming, pass the declaration associated with
1248 the renaming's special debug variable to Qualify_Entity_Names to ensure
1249 that its encoded name is properly qualified.
1251 * exp_dbug.adb (Qualify_All_Entity_Names): Check for a variable entity
1252 occurring in the list of entities to qualify, and do not attempt to
1253 traverse an entity list in that case. Variables associated with
1254 ` library-level package renamings can now occur in the table.
1256 * exp_dbug.ads: Revise documentation of the encoding for renaming
1259 2007-08-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1261 * layout.adb (Layout_Type): Use Underlying_Type to determine whether an
1262 access type points to an unconstrained array.
1264 2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1266 * restrict.adb, namet.adb, par-util.adb: Remove redundant type
1269 * sem_res.adb (Resolve_Qualified_Expression): Add machinery to detect
1270 simple redundant qualifications. The check is performed whenever the
1271 expression is a non-overloaded identifier.
1272 (Resolve_Type_Conversion): Enchance the redundant type conversion check
1273 to include loop parameters.
1274 (Valid_Conversion): Avoid generation of spurious error message.
1276 2007-08-31 Bob Duff <duff@adacore.com>
1278 * par-ch4.adb (P_Simple_Expression): Fold long sequences of
1279 concatenations of string literals into a single literal, in order to
1280 avoid very deep recursion in the front end, which was causing stack
1283 * sem_eval.adb (Eval_Concatenation): If the left operand is the empty
1284 string, and the right operand is a string literal (the case of "" &
1285 "..."), optimize by avoiding copying the right operand -- just use the
1286 value of the right operand directly.
1288 * stringt.adb (Store_String_Chars): Optimize by growing the
1289 String_Chars table all at once, rather than appending characters one by
1291 (Write_String_Table_Entry): If the string to be printed is very long,
1292 just print the first few characters, followed by the length. Otherwise,
1293 doing "pn(n)" in the debugger can take an extremely long time.
1295 * sem_prag.adb (Process_Interface_Name): Replace loop doing
1296 Store_String_Char with Store_String_Chars.
1298 2007-08-31 Vincent Celier <celier@adacore.com>
1300 * prj-attr.adb: Add new attribute Excluded_Source_Files
1302 * prj-nmsc.adb: Use attribute Excluded_Source_Files before
1303 Locally_Removed_Files.
1305 * snames.ads, snames.adb: New standard name Excluded_Source_Files
1307 2007-08-31 Ed Schonberg <schonberg@adacore.com>
1309 * sem_ch10.adb (Analyze_Subunit_Context): When analyzing context
1310 clauses of subunits, ignore limited_with_clauses that are illegal and
1311 have not been fully analyzed.
1313 2007-08-31 Ed Schonberg <schonberg@adacore.com>
1315 * sem_ch3.adb: The predicate Is_Descendent_Of_Address is now an entity
1316 flag, for effiency. It is called when analyzing arithmetic operators
1317 and also for actuals in calls that are universal_integers. The flag is
1318 set for the predefined type address, and for any type or subtype
1321 * sem_ch4.adb (Analyze_One_Call): Reject an actual that is a
1322 Universal_Integer, when the formal is a descendent of address and the
1323 call appears in user code.
1324 (Analyze_Selected_Component): if the prefix is a private extension, the
1325 tag component is visible.
1327 * sem_util.ads, sem_util.adb: Remove Is_Descendent_Of_Address, now an
1330 2007-08-31 Robert Dewar <dewar@adacore.com>
1332 * s-fileio.adb (Open): Normalize file name to lower case in non-case
1333 sensitive file name systems to avoid unexpected mismatch in Vista.
1335 2007-08-31 Vincent Celier <celier@adacore.com>
1337 * tempdir.adb: On VMS, take into account GNUTMPDIR before TMPDIR
1339 2007-08-31 Vincent Celier <celier@adacore.com>
1341 * symbols-vms.adb (Initialize): Read symbol files with continuation
1343 (Finalize): If symbol is long, split the line
1345 2007-08-31 Vincent Celier <celier@adacore.com>
1347 * fmap.ads: Minor comment updates
1349 2007-08-31 GNAT Script <nobody@adacore.com>
1351 * Make-lang.in: Makefile automatically updated
1353 2007-08-31 Bob Duff <duff@adacore.com>
1355 * sinfo.ads: Minor comment fix.
1357 2007-08-31 Thomas Quinot <quinot@adacore.com>
1359 * stand.ads: (Standard_Debug_Renaming_Type): Make comment consistent
1360 with implementation.
1361 Documentation cleanup only.
1363 2007-08-31 Sergey Rybin <rybin@adacore.com>
1365 * vms_data.ads: Add new qualifier /STMT_NAME_ON_NEW_LINE for the new
1366 gnatpp '--separate-stmt-name' option.
1367 Add new qualifier /USE_ON_NEW_LIN for the new gnatpp '--use-on-new-line'
1370 * gnat_ugn.texi: Add description for the new gnatpp
1371 '--separate-stmt-name' and '--use-on-new-line' options.
1373 2007-08-31 Ben Elliston <bje@au.ibm.com>
1375 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
1376 when compiling for powerpc64-*-linux.
1377 * system-linux-ppc64.ads: New file.
1379 2007-08-22 Krister Walfridsson <cato@df.lth.se>
1381 * env.c ( __gnat_clearenv): Use the __gnat_unsetenv mechanism for
1384 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1386 * misc.c (gnat_type_max_size): Constify.
1388 2007-08-16 Gary Dismukes <dismukes@adacore.com>
1390 * cstand.adb (Create_Standard): Create an entity for a zero-sized type
1391 associated with Standard_Debug_Renaming_Type, to be used as the type of
1392 the special variables whose names provide debugger encodings for
1393 renaming declarations.
1395 * einfo.ads, einfo.adb (Debug_Renaming_Link): Change to return Node25.
1396 (Set_Debug_Renaming_Link): Change to set Node25.
1397 (Write_Field13_Name): Remove case for E_Enumeration_Literal.
1398 (Write_Field25_Name): Add case for E_Variable to output
1399 "Debug_Renaming_Link".
1400 (Write_Field23_Name): Correct the output string for "Limited_View".
1402 * exp_dbug.adb: Add with and use of Tbuild.
1403 (Debug_Renaming_Declaration): Replace creation of an enumeration type
1404 and literal with creation of a variable of type
1405 Standard_Debug_Renaming_Type whose name encodes both the renamed object
1406 and the entity of the renaming declaration.
1407 (Qualify_Entity_Name): Add the delayed qualification of the entity name
1408 part of the name of a variable that has a Debug_Renaming_Link.
1410 * stand.ads (Standard_Debug_Renaming_Type): New Entity_Id denoting a
1411 special type to be associated with variables that provide debugger
1412 encodings for renaming declarations.
1414 2007-08-16 Gary Dismukes <dismukes@adacore.com>
1415 Ed Schonberg <schonberg@adacore.com>
1416 Javier Miranda <miranda@adacore.com>
1418 * exp_aggr.adb (Build_Record_Aggr_Code): Extend the test for an
1419 ancestor part given by an aggregate to test for an unchecked conversion,
1420 since this can occur in some cases when the ancestor part is a function
1421 call, and we don't want to fall into the recursive call to this
1422 procedure in that case.
1424 * exp_ch3.adb (Stream_Operation_OK): Revise tests for availability of
1425 stream attributes on limited types to account for user-specified
1426 attributes as well as whether Input (resp. Output) becomes available
1427 due to Read (resp. Write) being available for the type. Change Boolean
1428 variable to the more accurate name
1429 Has_Predefined_Or_Specified_Stream_Attribute. Change convoluted
1430 double-"not" predicate at beginning of return statement to more
1431 understandable form.
1433 * exp_ch5.adb (Expand_N_Extended_Return_Statement): If the extended
1434 return has an associated N_Handled_Sequence_Of_Statements, then wrap it
1435 in a block statement and use that as the first statement of the
1436 expanded return rather than incorrectly using the handled sequence as
1437 the first statement.
1439 * exp_ch6.adb (Expand_N_Subprogram_Declaration): If this is a protected
1440 operation, generate an explicit freeze node for it rather than
1441 generating extra formals, to ensure that gigi has the proper order of
1442 elaboration for anonymous subtypes in the signature of the subprograms.
1443 (Build_In_Place_Formal): Move assertion to beginning of loop.
1444 (Is_Build_In_Place_Function_Call): Allow for an unchecked conversion
1445 applied to a function call (occurs for some cases of 'Input).
1446 (Make_Build_In_Place_Call_In_*): Allow for an unchecked conversion
1447 applied to a function call (occurs for some cases of 'Input).
1449 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For Ada
1450 2005, generate an extended return statement enclosing the result object
1453 * freeze.adb (Freeze_Record_Type): Extend the current management of
1454 components that are access type with an allocator as default value: add
1455 missing support to the use of qualified expressions of the
1456 allocator (which also cause freezing of the designated type!)
1457 (Freeze_Entity): Call Freeze_Subprogram in the case of a predefined
1458 dispatching operation, since extra formals may be needed by calls to
1459 build-in-place functions (such as stream 'Input).
1461 * sem_ch6.adb (Create_Extra_Formals): Skip creation of the extra
1462 formals for 'Constrained and accessibility level in the case of a
1463 predefined dispatching operation.
1465 * exp_util.adb (Insert_Actions): A protected body is a valid insertion
1466 point, no need to find the parent node.
1468 2007-08-16 Javier Miranda <miranda@adacore.com>
1470 * exp_attr.adb (Attribute_Priority): Add missing support for entries
1473 2007-08-16 Javier Miranda <miranda@adacore.com>
1475 * exp_ch9.adb (Build_Protected_Entry): Undo previous change because it
1476 is not really required and can introduce regression with the debugger.
1477 The original problem is fixed with the patch written for checks.adb.
1479 2007-08-16 Thomas Quinot <quinot@adacore.com>
1481 * g-dyntab.adb, g-table.adb, table.adb: (Set_Item): Suppress
1482 Range_Check on Allocated_Table.
1484 2007-08-16 Vincent Celier <celier@adacore.com>
1486 * make.adb (Collect_Arguments): Call Test_If_Relative_Path with
1487 Including_Non_Switch set to False.
1488 (Gnatmake): For the compiler, call Test_If_Relative_Path with
1489 Including_Non_Switch set to False.
1491 * makeutl.adb, makeutl.ads (Test_If_Relative_Path): New Boolean
1492 parameter Including_Non_Switch, defaulted to True. When
1493 Including_Non_Switch is False, options that are not switches and
1494 appear as relative path are not converted to absolute paths.
1496 2007-08-16 Nicolas Roche <roche@adacore.com>
1498 * Makefile.in (gnatlib): Propagate FORCE_DEBUG_ADAFLAGS value to sub
1501 * Make-lang.in: Update dependencies
1503 2007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
1505 * sem_ch10.adb (Has_With_Clause): If the name of the with clause
1506 currently inspected is a selected component, retrieve the entity of
1508 (Install_Limited_Withed_Unit): Call Has_Limited_With_Clause starting
1509 from the immediate ancestor of Main_Unit_Entity.
1510 (Install_Limited_Withed_Unit): Do not install the limited view of
1511 package P if P is reachable through an ancestor chain from package C
1512 and C also has a with clause for P in its body.
1513 (Has_Limited_With_Clause): New routine.
1514 (Has_With_Clause): New routine.
1516 2007-08-16 Ed Schonberg <schonberg@adacore.com>
1518 * sem_ch12.adb (Copy_Generic_Node): A reference to a child unit of the
1519 generic for an enclosing instance is a global reference, even though
1520 its scope is the enclosing instance.
1522 2007-08-16 Gary Dismukes <dismukes@adacore.com>
1523 Javier Miranda <miranda@adacore.com>
1525 * sem_ch3.adb (OK_For_Limited_Init_In_05): Allow calls to 'Input to
1526 initialize a limited object.
1527 (Build_Derived_Record_Type): Add missing check of rules ARM 3.9.4
1529 Make sure Has_Complex_Representation is inherited by derived type.
1531 2007-08-16 Robert Dewar <dewar@adacore.com>
1533 * sem_ch5.adb (Analyze_Assignment): Make sure we still note update in
1536 2007-08-16 Ed Schonberg <schonberg@adacore.com>
1538 * sem_disp.adb (Check_Dispatching_Operation): If the operation
1539 implements an operation inherited from a progenitor interface, verify
1540 that they are subtype-conformant.
1542 2007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
1543 Bob Duff <duff@adacore.com>
1544 Nicolas Setton <setton@adacore.com>
1546 * sem_res.adb (Comes_From_Predefined_Lib_Unit): New.
1547 (Resolve): Alphabetize local variables. Add new variable From_Lib. When
1548 the statement which is being resolved comes from a predefined library
1549 unit, all non-predefined library interpretations are skipped.
1550 (Resolve_Op_Concat): If string concatenation was folded in the parser,
1551 but the "&" is user defined, give an error, because the folding would
1554 * sinfo.ads, sinfo.adb (Is_Folded_In_Parser): New flag to indicate that
1555 the parser has folded a long sequence of concatenations of string
1558 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Mark "JMPBUF_SAVE"
1559 and "JMP_BUF" variables as artificial.
1560 (N_String_Literal): Do not use alloca for very long string literals. Use
1561 xmalloc/free instead. Otherwise the stack might overflow.
1563 * utils.c (init_gigi_decls): Mark "JMPBUF_T" type as created by the
1566 2007-08-16 Vincent Celier <celier@adacore.com>
1568 * vms_conv.adb (Process_Argument): Ensure that project related options
1569 are not put in the -cargs section when using GNAT COMPILE.
1571 2007-08-16 Robert Dewar <dewar@adacore.com>
1573 * gnat_ugn.texi: Add note on preprocessing (output file not written)
1575 2007-08-16 Thomas Quinot <quinot@adacore.com>
1577 * a-tags.adb: Minor reformatting.
1579 2007-08-16 Bob Duff <duff@adacore.com>
1581 * sem_type.ads, sem_ch4.adb: Minor reformatting.
1583 2007-08-14 Thomas Quinot <quinot@adacore.com>
1585 * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads,
1586 s-osinte-interix.ads, system-interix.ads: Removed.
1588 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
1590 * a-calend-vms.adb, a-calend.adb ("+", "-", Add, Subtract): Remove
1591 calls to Check_Within_Time_Bounds.
1592 ("+", "-", Add, Subtract): Remove calls to Check_Within_Time_Bounds.
1593 (Difference): Account for possible rounding of the resulting difference
1595 2007-08-14 Robert Dewar <dewar@adacore.com>
1597 * uintp.adb, a-ztedit.adb, s-wchcon.adb, xnmake.adb, s-wchcon.adb,
1598 par-ch5.adb, par-ch10.adb, get_targ.adb, a-wtedit.adb, a-teioed.adb,
1599 s-osinte-solaris.adb, s-osinte-solaris.ads,
1600 s-osinte-freebsd.ads, s-osinte-freebsd.adb: Minor reformatting.
1602 * styleg.adb, styleg.ads, stylesw.adb, stylesw.ads: implement style
1603 switch -gnatyS. Enable -gnatyS in GNAT style check mode
1605 2007-08-14 Robert Dewar <dewar@adacore.com>
1606 Ed Schonberg <schonberg@adacore.com>
1608 * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads:
1609 Suppress unmodified in-out parameter warning in some cases
1610 This patch is a also fairly significant change to the way suppressible
1613 * checks.ads, checks.adb (Install_Null_Excluding_Check): No check
1614 needed for access to concurrent record types generated by the expander.
1615 (Generate_Range_Check): When generating a temporary to capture the
1616 value of a conversion that requires a range check, set the type of the
1617 temporary before rewriting the node, so that the type is always
1618 properly placed for back-end use.
1619 (Apply_Float_Conversion_Check): Handle case where the conversion is
1621 (Get_Discriminal): Code reformatting. Climb the scope stack looking
1622 for a protected type in order to examine its discriminants.
1624 2007-08-14 Robert Dewar <dewar@adacore.com>
1625 Gary Dismukes <dismukes@adacore.com>
1626 Ed Schonberg <schonberg@adacore.com>
1627 Thomas Quinot <quinot@adacore.com>
1629 * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb,
1630 a-stwisu.adb, a-strsup.adb: Fix warnings for range
1631 tests optimized out.
1633 * exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out.
1634 (Get_Allocator_Final_List): For the case of an anonymous access type
1635 that has a specified Associated_Final_Chain, do not go up to the
1637 (Expand_N_Type_Conversion): Test for the case of renamings of access
1638 parameters when deciding whether to apply a run-time accessibility
1640 (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded
1641 aggregate code before allocator, and ahead of declaration for
1642 temporary, to prevent access before elaboration when the allocator is
1643 an actual for an access parameter.
1644 (Expand_N_Type_Conversion): On an access type conversion involving an
1645 access parameter, do not apply an accessibility check when the
1646 operand's original node was an attribute other than 'Access. We now
1647 create access conversions for the expansion of 'Unchecked_Access and
1648 'Unrestricted_Access in certain cases and clearly accessibility should
1649 not be checked for those.
1651 * exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that
1652 includes a type conversion of a packed component that has been expanded,
1653 recover the original expression for the object, and use this expression
1654 in the post-call assignment statement, so that the assignment is made
1655 to the object and not to a back-end temporary.
1656 (Freeze_Subprogram): In case of primitives of tagged types not defined
1657 at the library level force generation of code to register the primitive
1658 in the dispatch table. In addition some code reorganization has been
1659 done to leave the implementation clear.
1660 (Expand_Call): When expanding an inherited implicit conversion,
1661 preserve the type of the inherited function after the intrinsic
1662 operation has been expanded.
1664 * exp_ch2.ads, exp_ch2.adb
1665 (Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference
1666 of an entry formal appearing in an assignment statement does not assign
1668 (Expand_Current_Value): Instead of calling a routine to determine
1669 whether the prefix of an attribute reference should be optimized or
1670 not, prevent the optimization of such prefixes all together.
1672 * lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected
1673 component whose prefix is known to be of an access type is an implicit
1674 dereference and does not assign to the prefix.
1676 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1677 Robert Dewar <dewar@adacore.com>
1679 * atree.ads, atree.adb (New_Copy_Tree): If hash table is being used and
1680 itype is visited, make an entry into table to link associated node and
1682 Add comments and correct harmless error in Build_NCT_Hash_Tables
1683 (Array_Aggr_Subtype): Associate each itype created for an index type to
1684 the corresponding range construct, and not to the aggregate itself. to
1685 maintain a one-to-one correspondence between itype and its associated
1686 node, to prevent errors when complex expression is copied.
1687 Fix mishandling of multiple levels of parens
1689 * sem_aggr.adb: Create a limited view of an incomplete type, to make
1690 treatment of limited views uniform for all visible declarations in a
1691 limited_withed package.
1692 (New_Copy_Tree): If hash table is being used and itype is visited,
1693 make an entry into table to link associated node and new itype.
1694 (Resolve_Record_Aggregate): Do not add an others box association for a
1695 discriminated record component that has only discriminants, when there
1696 is a box association for the component itself.
1698 * par-ch4.adb: Fix mishandling of multiple levels of parens
1700 2007-08-14 Robert Dewar <dewar@adacore.com>
1702 * comperr.adb: Fix problem with suppressing warning messages from gigi
1704 * erroutc.ads, erroutc.adb, errout.ads,
1705 errout.adb (Write_Eol): Remove trailing spaces before writing the line
1706 (Write_Eol_Keep_Blanks): New procedure to write a line, including
1707 possible trailing spaces.
1708 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
1709 Fix problem with suppressing warning messages from back end
1710 Improve handling of deleted warnings
1713 Fix problem with suppressing warning messages from back end
1714 Handle setting of Static_Dispatch_Tables flag.
1717 Fix problem with suppressing warning messages from back end
1719 * exp_intr.adb: Improve handling of deleted warnings
1721 2007-08-14 Robert Dewar <dewar@adacore.com>
1723 * debug.adb: Improve -gnatdI to cover all cases of serialization
1724 Add documentation of dZ, d.t
1726 * sprint.ads, sprint.adb: Improve -gnatdI to cover all cases of
1728 (Sprint_Node_Actual): Generate new output associated with implicit
1729 importation and implicit exportation of object declarations.
1731 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1732 Robert Dewar <dewar@adacore.com>
1733 Javier Miranda <miranda@adacore.com>
1734 Gary Dismukes <dismukes@adacore.com>
1736 * einfo.ads, einfo.adb: Create a limited view of an incomplete type,
1737 to make treatment of limited views uniform for all visible declarations
1738 in a limited_withed package.
1739 Improve warnings for in out parameters
1740 (Set_Related_Interaface/Related_Interface): Allow the use of this
1741 attribute with constants.
1742 (Write_Field26_Name): Handle attribute Related_Interface in constants.
1743 Warn on duplicate pragma Preelaborable_Initialialization
1745 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Force the
1746 generation of a freezing node to ensure proper management of null
1747 excluding access types in the backend.
1748 (Create_Extra_Formals): Test base type of the formal when checking for
1749 the need to add an extra accessibility-level formal. Pass the entity E
1750 on all calls to Add_Extra_Formal (rather than Scope (Formal) as was
1751 originally being done in a couple of cases), to ensure that the
1752 Extra_Formals list gets set on the entity E when the first entity is
1754 (Conforming_Types): Add missing calls to Base_Type to the code that
1755 handles anonymous access types. This is required to handle the
1756 general case because Process_Formals builds internal subtype entities
1757 to handle null-excluding access types.
1758 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
1759 functions that need it, even when not marked Requires_Overriding.
1760 Improve warnings for in out parameters
1761 (Analyze_Function_Return): Warn for disallowed null return
1762 Warn on return from procedure with unset out parameter
1763 Ensure consistent use of # in error messages
1764 (Check_Overriding_Indicator): Add in parameter Is_Primitive.
1765 (Analyze_Function_Return): Move call to Apply_Constraint_Check before
1766 the implicit conversion of the expression done for anonymous access
1767 types. This is required to generate the code of the null excluding
1768 check (if required).
1770 * sem_warn.ads, sem_warn.adb (Check_References.Publicly_Referenceable):
1771 A formal parameter is never publicly referenceable outside of its body.
1772 (Check_References): For an unreferenced formal parameter in an accept
1773 statement, use the same warning circuitry as for subprogram formal
1775 (Warn_On_Unreferenced_Entity): New subprogram, taken from
1776 Output_Unreferenced_Messages, containing the part of that routine that
1777 is now reused for entry formals as described above.
1778 (Goto_Spec_Entity): New function
1779 (Check_References): Do not give IN OUT warning for dispatching operation
1780 Improve warnings for in out parameters
1781 (Test_Ref): Check that the entity is not undefinite before calling
1782 Scope_Within, in order to avoid infinite loops.
1783 Warn on return from procedure with unset out parameter
1784 Improved warnings for unused variables
1786 2007-08-14 Robert Dewar <dewar@adacore.com>
1787 Javier Miranda <miranda@adacore.com>
1788 Gary Dismukes <dismukes@adacore.com>
1790 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of child unit
1791 (Expand_N_Attribute_Reference): Further unify the handling of the
1792 three forms of access attributes, using common code now for all three
1793 cases. Add a test for the case of applying an access attribute to
1794 an explicit dereference when the context is an access-to-interface
1795 type. In that case we need to apply the conversion to the prefix
1796 of the explicit dereference rather than the prefix of the attribute.
1797 (Attribute_Version, UET_Address): Set entity as internal to ensure
1798 proper dg output of implicit importation.
1799 (Expand_Access_To_Type): Removed.
1800 (Expand_N_Attribute_Reference): Merge the code from the three cases
1801 of access attributes, since the processing is largely identical for
1802 these cases. The substantive fix here is to process the case of a
1803 type name prefix (current instance case) before handling the case
1804 of interface prefixes.
1806 2007-08-14 Thomas Quinot <quinot@adacore.com>
1807 Ed Schonberg <schonberg@adacore.com>
1808 Javier Miranda <miranda@adacore.com>
1809 Robert Dewar <dewar@adacore.com>
1811 * exp_ch3.ads, exp_ch3.adb (Add_Final_Chain): New subprogram.
1812 (Freeze_Array_Type, Freeze_Record_Type): For the case of a component
1813 type that is an anonymous access to controlled object, establish
1814 an associated finalization chain to avoid corrupting the global
1815 finalization list when a dynamically allocated object designated
1816 by such a component is deallocated.
1817 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
1818 functions that need it, even when not marked Requires_Overriding.
1819 (Initialize_Tag): Replace call to has_discriminants by call to
1820 Is_Variable_Size_Record in the circuitry that handles the
1821 initialization of secondary tags.
1822 (Is_Variable_Size_Record): New implementation.
1823 (Expand_N_Object_Declaration): Suppress call to init proc if there is a
1824 Suppress_Initialization pragma for a derived type.
1825 (Is_Variable_Size_Record): New subprogram.
1826 (Build_Offset_To_Top_Functions): New implementation that simplifies the
1827 initial version of this routine and also fixes problems causing
1828 incomplete initialization of the table of interfaces.
1829 (Build_Init_Procedure): Improve the generation of code to initialize the
1830 the tag components of secondary dispatch tables.
1831 (Init_Secondary_Tags): New implementation that simplifies the previous
1832 version of this routine.
1833 (Make_DT): Add parameter to indicate when type has been frozen by an
1834 object declaration, for diagnostic purposes.
1835 (Check_Premature_Freezing): New subsidiary procedure of Make_DT, to
1836 diagnose attemps to freeze a subprogram when some untagged type of its
1837 profile is a private type whose full view has not been analyzed yet.
1838 (Freeze_Array_Type): Generate init proc for packed array if either
1839 Initialize or Normalize_Scalars is set.
1840 (Make_Controlling_Function_Wrappers, Make_Null_Procedure_Specs): when
1841 constructing the new profile, copy the null_exclusion indicator for each
1842 parameter, to ensure full conformance of the new body with the spec.
1844 * sem_type.ads, sem_type.adb (Make_Controlling_Function_Wrappers):
1845 Create wrappers for constructor functions that need it, even when not
1846 marked Requires_Overriding.
1847 (Covers): Handle properly designated types of anonymous access types,
1848 whose non-limited views are themselves incomplete types.
1849 (Add_Entry): Use an entity to store the abstract operation which hides
1851 (Binary_Op_May_Be_Hidden): Rename to Binary_Op_Interp_Has_Abstract_Op.
1852 (Collect_Interps): Use Empty as an actual for Abstract_Op in the
1853 initialization aggregate.
1854 (Function_Interp_May_Be_Hidden): Rename to
1855 Function_Interp_Has_Abstract_Op.
1856 (Has_Compatible_Type): Remove machinery that skips interpretations if
1857 they are labeled as potentially hidden by an abstract operator.
1858 (Has_Hidden_Interp): Rename to Has_Abstract_Op.
1859 (Set_May_Be_Hidden): Rename to Set_Abstract_Op.
1860 (Write_Overloads): Output the abstract operator if present.
1861 (Add_Entry): Before inserting a new entry into the interpretation table
1862 for a node, determine whether the entry will be disabled by an abstract
1864 (Binary_Op_Interp_May_Be_Hidden): New routine.
1865 (Collect_Interps): Add value for flag May_Be_Hidden in initialization
1867 (Function_Interp_May_Be_Hidden): New routine.
1868 (Has_Compatible_Type): Do not consider interpretations hidden by
1869 abstract operators when trying to determine whether two types are
1871 (Has_Hidden_Interp): New routine.
1872 (Set_May_Be_Hidden_Interp): New routine.
1873 (Write_Overloads): Write the status of flag May_Be_Hidden.
1875 2007-08-14 Ed Schonberg <schonberg@adacore.com>
1876 Javier Miranda <miranda@adacore.com>
1878 * exp_disp.ads, exp_disp.adb (Build_Dispatch_Tables): Handle tagged
1879 types declared in the declarative part of a nested package body or in
1880 the proper body of a stub.
1881 (Set_All_DT_Position): Add missing check to avoid wrong assignation
1882 of the same dispatch table slot to renamed primitives.
1883 (Make_Select_Specific_Data_Table): Handle private types.
1884 (Tagged_Kind): Handle private types.
1885 (Make_Tags, Make_DT): Set tag entity as internal to ensure proper dg
1886 output of implicit importation and exportation.
1887 (Expand_Interface_Thunk): Fix bug in the expansion assuming that the
1888 first formal of the thunk is always associated with the controlling
1889 type. In addition perform the following code cleanup: remove formal
1890 Thunk_Alias which is no longer required, cleanup evaluation of the
1891 the controlling type, and update the documentation.
1892 Replace occurrence of Default_Prim_Op_Count by
1893 Max_Predef_Prims. Addition of compile-time check to verify
1894 that the value of Max_Predef_Prims is correct.
1895 (Check_Premature_Freezing): Apply check in Ada95 mode as well.
1896 (Make_DT): Add parameter to indicate when type has been frozen by an
1897 object declaration, for diagnostic purposes.
1898 (Build_Static_Dispatch_Tables): New subprogram that takes care of the
1899 construction of statically allocated dispatch tables.
1900 (Make_DT): In case of library-level tagged types export the declaration
1901 of the primary tag. Remove generation of tags (now done by Make_Tags).
1902 Additional modifications to handle non-static generation of dispatch
1903 tables. Take care of building tables for asynchronous interface types
1904 (Make_Tags): New subprogram that generates the entities associated with
1905 the primary and secondary tags of Typ and fills the contents of Access_
1906 Disp_Table. In case of library-level tagged types imports the forward
1907 declaration of the primary tag that will be declared later by Make_DT.
1908 (Expand_Interface_Conversion): In case of access types to interfaces
1909 replace an itype declaration by an explicit type declaration to avoid
1910 problems associated with the scope of such itype in transient blocks.
1912 2007-08-14 Robert Dewar <dewar@adacore.com>
1913 Ed Schonberg <schonberg@adacore.com>
1914 Javier Miranda <miranda@adacore.com>
1916 * exp_util.ads, exp_util.adb:
1917 This patch replaces a number of occurrences of explicit tests for N_Null
1918 with calls to Known_Null. This improves tracking of null values, since
1919 Known_Null also catches null constants, and variables currently known to
1920 be null, so we get better tracking.
1921 (Ensure_Defined): create an itype reference only in the scope of the
1923 (Side_Effect_Free): A selected component of an access type that
1924 denotes a component with a rep clause must be treated as not
1925 side-effect free, because if it is part of a linked structure its
1926 value may be affected by a renaming.
1927 (Expand_Subtype_From_Expr): For limited objects initialized with build
1928 in place function calls, do nothing; otherwise we prematurely introduce
1929 an N_Reference node in the expression initializing the object, which
1930 breaks the circuitry that detects and adds the additional arguments to
1931 the called function. Bug found working in the new patch for statically
1932 allocated dispatch tables.
1933 (Is_Library_Level_Tagged_Type): New subprogram.
1934 (Remove_Side_Effects): If the expression of an elementary type is an
1935 operator treat as a function call.
1936 (Make_Literal_Range): If the index type of the array is not integer, use
1937 attributes properly to compute the constraint on the resulting aggregate
1940 * freeze.ads, freeze.adb (Freeze_Entity): If the entity is a
1941 class-wide type whose base type is an incomplete private type, leave
1942 class-wide type unfrozen so that freeze nodes can be generated
1943 properly at a later point.
1944 (Freeze_Entity, array case): Handle case of pragma Pack and component
1945 size attributre clause for same array.
1947 2007-08-14 Vincent Celier <celier@adacore.com>
1949 * prj.ads, prj.adb: Update Project Manager to new attribute names for
1951 Allow all valid declarations in configuration project files
1952 (Reset): Initialize all tables and hash tables in the project tree data
1953 Major update of the Project Manager and of the project aware tools,
1954 including gprmake, so that the same sources in the GNAT repository
1955 can be used by gprbuild.
1956 (Slash_Id): Change type to be Path_Name_Type
1957 (Slash): Return a Path_Name_Type instead of a File_Name_Type
1959 * prj-attr.ads, prj-attr.adb: Remove attributes no longer used by
1961 Update Project Manager to new attribute names for ghprbuild
1962 Allow all valid declarations in configuration project files
1963 Major update of the Project Manager and of the project aware tools,
1964 including gprmake, so that the same sources in the GNAT repository
1965 can be used by gprbuild.
1968 Major update of the Project Manager and of the project aware tools,
1969 including gprmake, so that the same sources in the GNAT repository
1970 can be used by gprbuild.
1972 * prj-dect.adb (Prj.Strt.Attribute_Reference): Set correctly the case
1973 insensitive flag for attributes with optional index.
1974 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
1975 array attribute, put the index in lower case.
1976 Update Project Manager to new attribute names for ghprbuild
1977 Allow all valid declarations in configuration project files
1978 Major update of the Project Manager and of the project aware tools,
1979 including gprmake, so that the same sources in the GNAT repository
1980 can be used by gprbuild.
1982 * prj-env.ads, prj-env.adb:
1983 Major update of the Project Manager and of the project aware tools,
1984 including gprmake, so that the same sources in the GNAT repository
1985 can be used by gprbuild.
1986 (Get_Reference): Change type of parameter Path to Path_Name_Type
1988 * prj-ext.ads, prj-ext.adb (Initialize_Project_Path): Make sure, after
1989 removing '-' from the path to start with the first character of the
1991 Major update of the Project Manager and of the project aware tools,
1992 including gprmake, so that the same sources in the GNAT repository
1993 can be used by gprbuild.
1994 Major update of the Project Manager and of the project aware tools,
1995 including gprmake, so that the same sources in the GNAT repository
1996 can be used by gprbuild.
1998 * prj-nmsc.ads, prj-nmsc.adb:
1999 Update Project Manager to new attribute names for ghprbuild
2000 Allow all valid declarations in configuration project files
2001 (Search_Directories): Detect subunits that are specified with an
2002 attribute Body in package Naming. Do not replace a source/unit in the
2003 same project when the order of the source dirs are known. Detect
2004 duplicate sources/units in the same project when the order of the
2005 source dirs are not known.
2006 (Check_Ada_Name): Allow all identifiers that are not reserved words
2008 Major update of the Project Manager and of the project aware tools,
2009 including gprmake, so that the same sources in the GNAT repository
2010 can be used by gprbuild.
2011 (Look_For_Sources): If the list of sources is empty, set the object
2012 directory of non extending project to nil.
2013 Change type of path name variables to be Path_Name_Type
2014 (Locate_Directory): Make sure that on Windows '/' is converted to '\',
2015 otherwise creating missing directories will fail.
2017 * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb,
2018 prj-part.ads, prj-part.adb:
2019 Major update of the Project Manager and of the project aware tools,
2020 including gprmake, so that the same sources in the GNAT repository
2021 can be used by gprbuild.
2023 * prj-strt.adb (Prj.Strt.Attribute_Reference): Set correctly the case
2024 insensitive flag for attributes with optional index.
2025 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
2026 array attribute, put the index in lower case.
2027 (Parse_Variable_Reference): Allow the current project name to be used in
2028 the prefix of an attribute reference.
2030 * prj-util.ads, prj-util.adb
2031 (Value_Of (for arrays)): New Boolean parameter Force_Lower_Case_Index,
2032 defaulted to False. When True, always check against indexes in lower
2035 * snames.ads, snames.h, snames.adb:
2036 Update Project Manager to new attribute names for gprbuild
2037 Allow all valid declarations in configuration project files
2039 2007-08-14 Robert Dewar <dewar@adacore.com>
2040 Ed Schonberg <schonberg@adacore.com>
2042 * opt.ads: Warning for non-local exception propagation now off by
2044 New switch -gnatI to disable representation clauses
2045 Implement new pragma Implicit_Packing
2048 Warning for non-local exception propagation now off by default
2049 Add warning for unchecked conversion of pointers wi different
2051 New switch -gnatI to disable representation clauses
2053 * usage.adb: new switch -gnatyS
2055 * gnat_ugn.texi: For the gnatcheck Non_Qualified_Aggregates rule add a
2056 note that aggregates of anonymous array types are not flagged.
2057 -gnatwc now includes membership tests optimized away
2058 -gnatw.x warnings are now off by default
2059 Added conditional compilation Appendix
2060 Add documentation of -gnatI
2061 Add documentation for new -gnatyS style check
2062 Update documentation about SAL and auto-init on Windows.
2065 Add documentation for pragma Check_Name and 'Enabled attribute
2066 Document that Eliminate on dispatching operation is ignored
2067 Document IDE attributes VCS_Repository_Root and VCS_Patch_Root.
2068 Document pragma Main
2069 Document pragma Implicit_Packing
2071 * sem_ch13.adb: Add warning for unchecked conversion of pointers wi
2072 different conventions
2073 New switch -gnatI to disable representation clauses
2075 * switch-c.adb (Scan_Front_End_Switches): When a -gnat switch is not
2076 recognized, report the invalid characters including "-gnat" instead of
2077 just the first character in the switch.
2078 New switch -gnatI to disable representation clauses
2079 Set Warn_On_Object_Renames_Function true for -gnatg
2081 * vms_data.ads: Add doc for /IGNORE_REP_CLAUSES
2082 Add STATEMENTS_AFTER_THEN_ELSE as synonym for -gnatyS
2083 Add qualifier /ADD_PROJECT_SEARCH_DIR= for different tools, equivalent
2084 to switch -aP (add directory to project search dir).
2086 * par-prag.adb: Implement new pragma Implicit_Packing
2088 * sem_prag.adb (Analyze_Pragma, case Complex_Representation): Mark the
2089 type as having a non-standard representation, to force expansion on
2090 conversion to related types.
2091 (Analyze_Pragma): Warn on misspelled pragma
2092 (Analyze_Pragma, case Convention_Identifier): Fix checking of second arg
2093 Ensure consistent use of # in error messages
2094 Implement pragma Implicit_Packing
2096 2007-08-14 Olivier Hainque <hainque@adacore.com>
2097 Eric Botcazou <ebotcazou@adacore.com>
2099 * targtyps.c (get_target_maximum_default_alignment): New function.
2101 that the compiler might choose by default for a type or object.
2102 (get_target_default_allocator_alignment): New function. Alignment known
2103 to be honored by the target default allocator.
2104 (get_target_maximum_allowed_alignment): New function. Maximum alignment
2105 we might accept for any type or object on the target.
2106 (get_target_maximum_alignment): Now synonym of maximum_default_alignment
2108 * gigi.h (get_target_maximum_default_alignment): Declare new function.
2109 (get_target_default_allocator_alignment): Likewise.
2110 (get_target_maximum_allowed_alignment): Likewise.
2113 * decl.c (gnat_to_gnu_entity) <object>: Except for the renaming of the
2114 result of a function call, first try to use a stabilized reference for
2115 a constant renaming too.
2116 (validate_alignment): Use target_maximum_allowed_alignment instead of
2117 MAX_OFILE_ALIGNMENT as the upper bound to what we accept.
2118 (gnat_to_gnu_entity): Use common nodes directly.
2119 (gnat_to_gnu_entity) <object>: Pick the values of the type to annotate
2120 alignment and size for the object.
2121 (lvalue_required_p): Handle N_Parameter_Association like N_Function_Call
2122 and N_Procedure_Call_Statement.
2123 (takes_address): Rename to lvalue_required_p, add third parameter
2124 'aliased' and adjust recursive calls.
2125 <N_Indexed_Component>: Update 'aliased' from the array type.
2126 <N_Selected_Component>: New case.
2127 <N_Object_Renaming_Declaration>: New Likewise.
2128 (Identifier_to_gnu): Adjust for above changes.
2129 (maybe_stabilize_reference) <CONST_DECL>: New case.
2131 * utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Look through conversion
2132 between type variants.
2133 (build_simple_component_ref): Likewise.
2134 (build_call_alloc_dealloc): Use target_default_allocator_alignment
2135 instead of BIGGEST_ALIGNMENT as the threshold to trigger the super
2136 aligning type circuitry for allocations from the default storage pool.
2137 (build_allocator): Likewise.
2138 (build_simple_component_ref): Manually fold the reference for a
2139 constructor if the record type contains a template.
2141 * utils.c (value_zerop): Delete.
2142 (gnat_init_decl_processing): Emit debug info for common types.
2143 (rest_of_record_type_compilation): If a union contains a field
2144 with a non-constant qualifier, treat it as variable-sized.
2145 (finish_record_type): Give the stub TYPE_DECL a name.
2146 (rest_of_record_type_compilation): Likewise.
2147 (convert) <CONSTRUCTOR>: New case. Build a new constructor if
2148 types are equivalent array types.
2149 (create_field_decl): Claim fields of any ARRAY_TYPE are addressable,
2150 even if the type is not passed by reference.
2151 (static_ctors, static_dtors): Delete.
2152 (end_subprog_body): Do not record constructors and destructors.
2153 (build_global_cdtor): Delete.
2154 (gnat_write_global_declarations): Do not call build_global_cdtor.
2156 * lang-spARGET_VXWORKS_RTP is defined, append -mrtp when
2157 -fRTS=rtp is specified.
2158 If CONFIG_DUAL_EXCEPTIONS is 1, append -fsjlj when -fRTS=sjlj is
2161 * misc.c (gnat_init_gcc_eh): Use __gnat_eh_personality_sj for the name
2162 of the personality function with SJLJ exceptions.
2164 * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
2165 the name of the personality function with SJLJ exceptions.
2167 2007-08-14 Robert Dewar <dewar@adacore.com>
2168 Ed Schonberg <schonberg@adacore.com>
2170 * par.ads, par.adb: Improve handling of extra right parens.
2171 (Par): Remove flag From_Limited_With_Clause.
2173 * par-util.adb, par-ch3.adb: Improve error recovery for bad constraint
2174 Improve handling of extra right parens.
2176 2007-08-14 Robert Dewar <dewar@adacore.com>
2178 * par-tchk.adb (TF_Semicolon): Improve error recovery
2180 2007-08-14 Robert Dewar <dewar@adacore.com>
2181 Ed Schonberg <schonberg@adacore.com>
2183 * sem_attr.ads, sem_attr.adb (Analyze_Attribute, case Value): For
2184 enumeration type, mark all literals as referenced.
2185 (Eval_Attribute, case 'Image): If the argument is an enumeration
2186 literal and names are available, constant-fold but mark nevertheless as
2188 Clean up function names.
2189 (Name_Modifies_Prefix): Rename to Name_Implies_Lvalue_Prefix. Clarify
2191 (Requires_Simple_Name_Prefix): Removed.
2193 2007-08-14 Robert Dewar <dewar@adacore.com>
2194 Ed Schonberg <schonberg@adacore.com>
2196 * sem_ch11.adb: Improved warnings for unused variables
2198 * sem_ch3.ads, sem_ch3.adb (Build_Derived_Record_Type): If the ancestor
2199 is a synchronized interface, the derived type is limited.
2200 (Analyze_Object_Declaration): Mark the potential coextensions in the
2201 definition and expression of an object declaration node.
2202 (Build_Derived_Type): For the completion of a private type declaration
2203 with a derived type declaration, chain the parent type's representation
2204 items to the last representation item of the derived type (not the
2205 first one) if they are not present already.
2206 (Analyze_Object_Declaration, Constant_Redeclaration): Allow incomplete
2207 object declaration of forward references to tags.
2208 (Access_Subprogram_Declaration): In Ada2005, anonymous access to
2209 subprogram types can appear as access discriminants of synchronized
2211 (OK_For_Limited_Init_In_05): The initialization is legal is it is a call
2212 given in prefixed form as a selected component.
2213 (Process_Discriminants): If not all discriminants have defaults, place
2214 error message on a default that is present.
2215 (Analyze_Private_Extension_Declaration): Diagnose properly an attempt to
2216 extend a synchronized tagged type.
2217 Improved warnings for unused variables
2218 (Is_Visible_Component): Fix a visibility hole on a component inherited
2219 by a private extension when parent is itself declared as a private
2220 extension, and the derivation is in a child unit.
2221 (Find_Hidden_Interface): Move spec from the package body.
2223 2007-08-14 Robert Dewar <dewar@adacore.com>
2224 Ed Schonberg <schonberg@adacore.com>
2226 * sem_ch5.adb: Improve warnings on redundant assignments
2228 * sem_util.ads, sem_util.adb: (Is_Variable): Add defense against junk
2230 (Is_Synchronized_Tagged_Type): New subprogram that returns true
2231 in case of synchronized tagged types (AARM 3.9.4 (6/2)).
2232 (Safe_To_Capture_Value): Can now return True for constants, even if Cond
2233 is set to False. Improves handling of Known_[Not_]Null.
2234 (Wrong_Type): Special case address arithmetic attempt
2235 (Collect_Abstract_Interfaces): Add new formal to allow collecting
2236 abstract interfaces just using the partial view of private types.
2237 (Has_Abstract_Interfaces): Add new formal to allow checking types
2238 covering interfaces using the partial view of private types.
2239 (Is_Fully_Initialized_Type): Special VM case for uTag component. This
2240 component still needs to be defined in this case, but is never
2241 initialized as VMs are using other dispatching mechanisms.
2242 (Abstract_Interface_List): For a protected type, use base type to get
2244 Improve warnings on redundant assignments
2245 (Is_Variable): Handle properly an implicit dereference of a prefixed
2247 (Build_Actual_Subtype): If this is an actual subtype for an
2248 unconstrained formal parameter, use the sloc of the body for the new
2249 declaration, to prevent anomalises in the debugger.
2251 2007-08-14 Robert Dewar <dewar@adacore.com>
2253 * sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for
2254 dispatching operation
2256 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2257 Gary Dismukes <dismukes@adacore.com>
2260 exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
2261 expanded aggregate code before allocator, and ahead of declaration for
2262 temporary, to prevent access before elaboration when the allocator is
2263 an actual for an access parameter.
2264 (Is_Static_Dispatch_Table_Aggregate): Handle aggregates initializing
2265 the TSD and the table of interfaces.
2266 (Convert_To_Assignments): Augment the test for delaying aggregate
2267 expansion for limited return statements to include the case of extended
2268 returns, to prevent creation of an unwanted transient scope.
2269 (Is_Static_Dispatch_Table_Aggregate): New subprogram.
2270 (Expand_Array_Aggregate): Handle aggregates associated with
2271 statically allocated dispatch tables.
2272 (Expand_Record_Aggregate): Handle aggregates associated with
2273 statically allocated dispatch tables.
2274 (Gen_Ctrl_Actions_For_Aggr): Generate a finalization list for allocators
2275 of anonymous access type.
2277 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2279 * exp_ch5.adb (Expand_Assign_Array): If source or target of assignment
2280 is a variable that renames a slice, use the variable itself in the
2281 expannsion when the renamed expression itself may be modified between
2282 the declaration of the renaming and the array assignment.
2284 2007-08-14 Jerome Guitton <guitton@adacore.com>
2286 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
2287 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb,
2288 s-taprop-vms.adb, s-taprop-posix.adb (Continue_Task, Stop_All_Tasks):
2289 New functions; dummy implementations.
2291 * s-osinte-vxworks.ads (Task_Stop, Task_Cont, Int_Lock, Int_Unlock): New
2292 functions, used to implement the multi-tasks mode routines on VxWorks.
2294 * s-osinte-vxworks.adb, s-osinte-vxworks6.adb (Task_Cont, Task_Stop):
2296 binding to the VxWorks routines which have changed between VxWorks 5
2298 (Int_Lock, Int_Unlock): New function, thin binding to kernel routines
2299 which are not callable from a RTP.
2301 * s-taprop-vxworks.adb (Stop_All_Tasks, Continue_Task): New functions,
2302 implemented for the multi-tasks mode on VxWorks 5 and 6.
2304 * s-taprop.ads (Stop_All_Tasks, Continue_Task): New functions.
2306 * s-tasdeb.ads, s-tasdeb.adb (Continue_All_Tasks, Stop_All_Tasks): New
2309 2007-08-14 Vincent Celier <celier@adacore.com>
2311 * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb,
2312 gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb
2313 mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb,
2314 mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
2315 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
2316 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb,
2317 mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New
2319 (Major_Id_Name): New function.
2320 mlib-tgt.ads/mlib.tgt.adb:
2321 (Library_Major_Minor_Id_Supported): New function, default returns True
2322 Most mlib-tgt-*.adb that support shared libraries and symbolic links:
2323 (Build_Dynamic_Library): Add support for major/minor ids for shared libs
2324 Other mlib-tgt-*.adb (aix, mingw, vms, vxworks, xi):
2325 Implementation of Library_Major_Minor_Id_Supported returns False
2327 (Clean_Library_Directory): If major/minor ids are supported, clean all
2329 Major update of the Project Manager and of the project aware tools,
2330 including gprmake, so that the same sources in the GNAT repository
2331 can be used by gprbuild.
2333 2007-08-14 Olivier Hainque <hainque@adacore.com>
2335 * system-solaris-x86.ads (ZCX_By_Default): Switch to True.
2336 (GCC_ZCX_Support): Switch to True.
2338 * s-intman-solaris.adb (Notify_Exception): Call
2339 Adjust_Context_For_Raise before raising, as expected for signal
2340 handlers in general.
2342 * s-intman-posix.adb (Notify_Exception): Remove declaration of
2343 Adjust_Context_For_Raise, moved to the spec of this unit to be visible
2344 to other implementation bodies.
2346 * s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to
2347 be visible by multiple implementation bodies.
2349 * init.c [VMS section] (__gnat_handle_vms_condition): Adjust context
2350 only for conditions coming from hardware.
2351 [alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement,
2352 adjustments to signal context prior to exception raise from signal
2354 (__gnat_map_signal for VxWorks): Map SIGSEGV to Storage_Error in RTP
2356 Solaris section: (__gnat_adjust_context_for_raise): New function.
2357 Implementation of the machine context adjustments to perform prior to
2358 raise from a signal handler. Version for both sparc and x86.
2359 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Define.
2360 (__gnat_error_handler): Expect a third argument, ucontext_t *. Adjust it
2361 prior to raising as expected for any handler, before possible nested
2362 faults to make sure all the contexts in a chain have been adjusted by
2363 the time we propagate.
2365 2007-08-14 Pascal Obry <obry@adacore.com>
2367 * s-osinte-mingw.ads: Add support for Ada.Execution_Time on Windows.
2368 (SYSTEM_INFO): New record.
2369 (SetThreadIdealProcessor): New imported routine needed for supporting
2370 task_info pragma on Windows.
2372 * s-taprop-mingw.adb (Enter_Task): Check if CPU number given in task
2373 info can be applied to the current host.
2374 (Create_Task): Set the ideal processor if information is present.
2376 * s-tasinf-mingw.adb, s-tasinf-mingw.ads,
2377 a-exetim-mingw.adb, a-exetim-mingw.ads: New files.
2379 2007-08-14 Olivier Hainque <hainque@adacore.com>
2381 * s-taprop-linux.adb (Get_Stack_Attributes): New subprogram. Fetch the
2382 stack size and initial stack pointer value for a given task.
2383 (Enter_Task): Get the stack attributes of the task we are entering and
2384 let the stack checking engine know about them.
2386 * s-stchop.adb, s-stchop.ads (Notify_Stack_Attributes): New subprogram.
2387 Let the stack-checking engine know about the initial sp value and stack
2388 size associated with the current task.
2389 (Set_Stack_Info): If a stack base has been notified for the current
2390 task, honor it. Fallback to the previous less accurate method otherwise.
2392 * s-stchop-vxworks.adb (Notify_Stack_Attributes): Dummy body.
2394 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2396 * sem_ch10.adb: Create a limited view of an incomplete type, to make
2397 treatment of limited views uniform for all visible declarations in a
2398 limited_withed package.
2399 Set flag indicating that a subprogram body for a child unit has a
2401 (Analyze_Compilation_Unit): If unit is a subprogram body that has no
2402 separate declaration, remove the unit name from visibility after
2403 compilation, so that environment is clean for subsequent compilations.
2404 (Install_Limited_Context_Clauses): Do not install a
2405 limited_private_with_clause unless the current unit is a body or a
2407 (Analyze_Subunit, Install_Parents): Treat generic and non-generic units
2408 in the same fashion.
2409 (Install_Limited_Withed_Unit): Do not install a limited with clause if
2410 it applies to the declaration of the current package body.
2411 (Remove_Private_With_Clauses): If there is a regular with_clause for
2412 the unit, delete Private_With_Clause from context, to prevent improper
2413 hiding when processing subsequent nested packages and instantiations.
2415 2007-08-14 Jose Ruiz <ruiz@adacore.com>
2417 * adaint.c (__gnat_is_absolute_path): For VxWorks systems we accept
2418 dir/file, device:/dir/file, and device:drive_letter:/dir/file as
2419 representing absolute path names.
2420 __gnat_set_file_time_name [VMS]: Fix some 64/32 bit issues.
2422 * cstreams.c (__gnat_full_name for VxWorks): Use
2423 __gnat_is_absolute_path to detect whether we need to add the current
2424 directory to normalize the path.
2426 2007-08-14 Javier Miranda <miranda@adacore.com>
2429 a-tags.adb (Displace): Associate a message with the raised CE
2431 (To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr,
2432 To_Object_Specific_Data_Ptr To_Predef_Prims_Ptr,
2433 To_Tag_Ptr, To_Type_Specific_Data_Ptr): Moved here from the package
2435 (Default_Prim_Op_Count): Removed.
2436 (IW_Membership, Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind,
2437 Register_Tag, Set_Entry_Index, Set_Offset_To_Top, Set_Prim_Op_Kind):
2438 Remove pragma Inline_Always.
2440 * rtsfind.ads (Default_Prim_Op_Count): Removed
2441 (Max_Predef_Prims): New entity
2442 (RE_Expanded_Name): Removed
2443 (RE_HT_Link): Removed
2444 (RE_Iface_Tag): Remmoved
2445 (RE_Ifaces_Table): Removed
2446 (RE_Interfaces_Array): Removed
2447 (RE_Interface_Data_Element): Removed
2448 (RE_Nb_Ifaces): Removed
2449 (RE_RC_Offset): Removed
2450 (RE_Static_Offset_To_Top): Removed
2452 * exp_atag.ads, exp_atag.adb (Build_Inherit_Prims): Addition of a new
2454 (Build_Inherit_Predefined_Prims): Replace occurrences of Default_
2455 Prim_Op_Count by Max_Predef_Prims.
2457 2007-08-14 Thomas Quinot <quinot@adacore.com>
2458 Vincent Celier <celier@adacore.com>
2460 * binde.adb (Elab_All_Links): Remove unnecessary call to
2461 Generic_Separately_Compiled (if a unit satisfies this predicate, there
2462 won't be an associated Afile).
2463 (Elab_All_Links): Fail if a referenced unit cannot be found
2466 Fix comments in bindgen regarding consistency checks done in Bcheck:
2467 the checks are made across units within a partition, not across several
2469 Fix generation of C binder file for VxWorks.
2471 * lib.ads, lib.adb (Generic_Separately_Compiled): Rename to
2472 Generic_May_Lack_ALI, more descriptive of the current use of the
2473 predicate, and update documentation.
2475 * lib-writ.ads, lib-writ.adb (Write_With_Lines): Minor code
2476 reorganization and documentation update for the case of predefined
2477 library generics (for which we do not reference an Afile).
2479 2007-08-14 Robert Dewar <dewar@adacore.com>
2481 * s-intman-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads,
2482 s-proinf-irix-athread.ads, s-osinte-hpux-dce.adb, s-osinte-hpux-dce.ads,
2483 s-parame-hpux.ads, s-intman-dummy.adb, s-tasinf-solaris.adb,
2484 s-tasinf-solaris.ads, s-asthan-vms-alpha.adb, s-inmaop-vms.adb,
2485 s-intman-vms.adb, s-intman-vms.ads, s-osprim-mingw.adb,
2486 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-intman-vxworks.ads,
2487 s-intman-vxworks.ads, s-intman-vxworks.adb, s-parame-vxworks.ads,
2488 s-tfsetr-vxworks.adb, s-interr.adb, s-interr.ads, a-tasatt.adb,
2489 exp_ch13.adb, s-htable.ads, s-imgboo.ads, s-imglli.ads, s-imgllu.ads,
2490 s-imguns.ads, g-eacodu.adb, par-ch12.adb, s-stache.ads, s-stausa.adb,
2491 s-poosiz.adb, s-parame.ads, s-mastop.ads, s-osinte-darwin.ads,
2492 a-chtgke.adb, s-asthan-vms-alpha.adb, s-parame-vms-alpha.ads,
2493 s-parame-vms-ia64.ads, s-parame-vxworks.adb, s-except.ads,
2494 g-altcon.adb: Minor reformatting
2496 ada-tree.h: Delete empty line.
2498 ali.ads: Minor reformatting
2499 Clarification of comments.
2500 Minor spelling correction
2502 * exp_dbug.adb: Add Warnings Off to suppress new warning
2504 * a-witeio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
2507 * a-strunb.adb (Set_Unbounded_String): Avoid memory leak by freeing old
2510 * a-textio.adb (Write): Remove an unnecessary IN OUT mode from
2512 * a-textio.ads: Reorder the standard input/output/error declarations
2515 * g-dirope.adb, g-dirope.ads: Change Dir to mode IN for Open call
2517 * par-ch2.adb: Recognize RM specially in errout
2518 Change 'R'M to RM in all error messages
2520 * scng.adb: Recognize RM specially in errout
2522 * sem.ads, sem.adb, exp_strm.adb, exp_ch5.ads, expander.adb: Rename
2523 N_Return node to be N_Simple_Return, to reflect Ada 2005 terminology.
2525 * s-direio.adb: Add missing routine header box.
2527 * sem_attr.ads: Add ??? comments
2529 * sem_eval.adb: Recognize RM specially in errout
2530 Change 'R'M to RM in all error messages
2532 * sem_maps.adb, sem_maps.ads: Remove some unnecessary IN OUT modes
2534 * s-tasinf.ads: Fix minor comment typo.
2536 * a-cihama.adb: Minor comment addition
2538 * a-ztexio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
2541 * s-tasinf-tru64.ads: Fix minor comment typo.
2543 * itypes.ads: Comment update.
2545 * ali-util.adb: Remove Generic_Separately_Compiled guard, not needed
2548 * argv.c: Added protection against null gnat_argv and gnat_envp.
2550 * bcheck.adb (Check_Consistency): Use correct markup character ({) in
2551 warning message when Tolerate_Consistency_Errors is True.
2553 * cstand.adb (Create_Standard): Do not call Init_Size_Alignment for
2554 Any_Id, as this subprogram is only applicable to *type* entities (it
2555 sets RM_Size). Instead initialize just Esize and Alignment.
2557 2007-08-14 Bob Duff <duff@adacore.com>
2559 * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
2560 a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
2561 a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads,
2562 a-cohata.ads, a-convec.adb, a-coinve.ads, a-coinve.adb, a-convec.ads,
2563 a-coorse.ads (Next): Applied pragma Inline.
2564 Make all Containers packages Remote_Types (unless they are already
2566 (Previous): applied pragma Inline
2567 (Elements_Type): is now a record instead of an array
2569 2007-08-14 Thomas Quinot <quinot@adacore.com>
2571 * table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
2573 (Set_Item): When the new item is an element of the currently allocated
2574 table passed by reference, save a copy on the stack if we're going
2575 to reallocate. Also, in Table.Set_Item, make sure we test the proper
2576 variable to determine whether to call Set_Last.
2578 * sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
2579 symbols-vms.adb, symbols-processing-vms-alpha.adb,
2580 symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
2581 some occurrences of the pattern
2583 T.Table (T.Last) := Value;
2584 with a cleaner call to
2587 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2588 Gary Dismukes <dismukes@adacore.com>
2589 Thomas Quinot <quinot@adacore.com>
2591 * sem_ch12.ads, sem_ch12.adb (Instantiate_Type): If the formal is a
2592 derived type with interface progenitors use the analyzed formal as the
2593 parent of the actual, to create renamings for all the inherited
2594 operations in Derive_Subprograms.
2595 (Collect_Previous_Instances): new procedure within of
2596 Load_Parent_Of_Generic, to instantiate all bodies in the compilation
2597 unit being loaded, to ensure that the generation of global symbols is
2598 consistent in different compilation modes.
2599 (Is_Tagged_Ancestor): New function testing the ancestor relation that
2600 takes progenitor types into account.
2601 (Validate_Derived_Type_Instance): Enforce the rule of 3.9.3(9) by
2602 traversing over the primitives of the formal and actual types to locate
2603 any abstract subprograms of the actual type that correspond to a
2604 nonabstract subprogram of the formal type's ancestor type(s), and issue
2605 an error if such is found.
2606 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation,
2607 Instantiate_Package_Body, Instantiate_Subprogram_Body):
2608 Remove bogus guard around calls to Inherit_Context.
2609 (Reset_Entity): If the entity is the selector of a selected component
2610 that denotes a named number, propagate constant-folding to the generic
2611 template only if the named number is global to the generic unit.
2612 (Set_Instance_Env): Only reset the compilation switches when compiling
2613 a predefined or internal unit.
2615 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2617 * sem_ch4.adb (Try_Class_Wide_Operation): use base type of first
2618 parameter to determine whether operation applies to the prefix.
2619 (Complete_Object_Operation): If actual has an access type and
2620 controlling formal is not an in_parameter, reject the actual if it is
2621 an access_to_constant type.
2622 (Try_Primitive_Operation): If the type of the prefix is a formal tagged
2623 type, the candidate operations are found in the scope of declaration of
2624 the type, because the type has no primitive subprograms.
2625 (Analyze_Selected_Component): If prefix is class-wide, and root type is
2626 a private extension, only examine visible components before trying to
2627 analyze as a prefixed call.
2628 Change Entity_List to Type_To_Use, for better readability.
2629 (Has_Fixed_Op): Use base type when checking whether the type of an
2630 operator has a user-defined multiplication/division
2631 (Check_Arithmetic_Pair): Use Ada 2005 rules to remove ambiguities when
2632 user-defined operators are available for fixed-point types.
2634 2007-08-14 Thomas Quinot <quinot@adacore.com>
2635 Ed Schonberg <schonberg@adacore.com>
2637 * sem_cat.ads, sem_cat.adb (Has_Stream_Attribute_Definition): New
2638 formal At_Any_Place indicating, when True, that we want to test for
2639 availability of the stream attribute at any place (as opposed to the
2640 current visibility context only).
2641 (Missing_Read_Write_Attributes): A stream attribute is missing for the
2642 purpose of enforcing E.2.2(8) only if it is not available at any place.
2643 Take into account the Ada2005 pragma Has_Preelaborable_Initialization
2644 when checking the legality of an extension aggregate in a preelaborable
2645 package. Treat the literal null as a valid default expression in a
2646 component declaration for a type with preelaborable initialization.
2647 A limited interface is a legal progenitor for the designated type of a
2648 remote access to class-wide type.
2650 2007-08-14 Thomas Quinot <quinot@adacore.com>
2651 Ed Schonberg <schonberg@adacore.com>
2653 * sem_ch8.ads, sem_ch8.adb (Find_Type, case of a 'Base attribute
2654 reference): Use correct entity as denoted entity for the selector of
2656 (Find_Direct_Name): Add comment about Generate_Reference incorrectly
2657 setting the Referenced_As_LHS flag for entities that are implicitly
2659 (Find_Type): If the type is an internally generated incomplete type,
2660 mark the full view as referenced, to prevent spurious warnings.
2661 (Find_Selected_Component, Has_Components): Handle properly non-limited
2662 views that are themselves incomplete types.
2663 Handle interfaces visible through limited-with clauses.
2664 (Analyze_Subprogram_Renaming): Disambiguate and set the entity of a
2665 subprogram generic actual for which we have generated a renaming.
2666 Warn when the renaming introduces a homonym of
2667 the renamed entity, and the renamed entity is directly visible.
2669 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2670 Hristian Kirtchev <kirtchev@adacore.com>
2672 * sem_res.adb (Resolve_Allocator): Propagate any coextensions that
2673 appear in the subtree to the current allocator if it is not a static
2675 (Resolve_Allocator): Perform cleanup if resolution has determined that
2676 the allocator is not a coextension.
2677 (Resolve): Skip an interpretation hidden by an abstract operator only
2678 when the type of the interpretation matches that of the context.
2679 (Resolve): When looping through all possible interpretations of a node,
2680 do not consider those that are hidden by abstract operators.
2681 (Resolve_Actuals): When verifying that an access to class-wide object
2682 is an actual for a controlling formal, ignore anonymous access to
2683 subprograms whose return type is an access to class_wide type.
2684 (Resolve_Slice): If the prefix of the slice is a selected component
2685 whose type depends on discriminants, build its actual subtype before
2686 applying range checks on the bounds of the slice.
2687 (Valid_Conversion): In an instance or inlined body, compare root types,
2688 to prevent anomalies between private and public views.
2689 (Resolve): Improve error message for ambiguous fixed multiplication
2690 expressions that involve universal_fixed multiplying operations.
2692 2007-08-14 Javier Miranda <miranda@adacore.com>
2693 Hristian Kirtchev <kirtchev@adacore.com>
2695 * exp_ch9.adb (Build_Protected_Entry): Propagate the original source
2696 location to allow the correct generation of errors in case of
2697 restrictions applied to the expanded code.
2698 (Expand_Entry_Barrier): Remove all generated renamings for a barrier
2699 function if the condition does not reference them.
2700 (Expand_Entry_Body_Declarations): Mark the index constant as having a
2703 2007-08-14 Thomas Quinot <quinot@adacore.com>
2705 * exp_dist.adb (PolyORB_Support.Build_TypeCode_Function): When creating
2706 typecode parameters for a union (in a variant record), remove
2707 extraneous layer of Any wrapping for member label.
2708 (Expand_Receiving_Stubs_Bodies): For an RCI package body that has
2709 elabration statements, register the package with the name server
2710 at the beginning, not at the end, of the elaboration statements so
2711 that they can create remote access to subprogram values that designate
2712 remote subprograms from the package.
2714 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
2716 * g-catiio.adb (Image): For the case of %s, use Ada.Calendar.Time
2717 values to compute the number of seconds since the Unix Epoc in order to
2718 account for Daylight Savings Time. Perform special processing for dates
2719 that are earlier than the Unix Epoc to obtain a negative number.
2721 2007-08-14 Emmanuel Briot <briot@adacore.com>
2723 * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing
2726 2007-08-14 Eric Botcazou <ebotcazou@adacore.com>
2728 * gnatlink.adb (Gnatlink): Pass switches to the linker even if the
2729 binder-generated file is not in Ada.
2730 Pass -mrtp to the linker if it is GCC and --RTS=rtp has been
2731 recorded in the ALI file.
2732 Pass -fsjlj to the linker if it is GCC and --RTS=sjlj has been recorded.
2734 2007-08-14 Vincent Celier <celier@adacore.com>
2736 * gnatls.adb: (Corresponding_Sdep_Entry): Always return a value
2737 (Output_Source): Do nothing if parameter is No_Sdep_Id
2739 * make.adb (Gnatmake): Do not rebuild an archive simply because a
2740 shared library it imports has a later time stamp.
2741 (Check): Resolve the symbolic links in the path name of the object
2743 Check that the ALI file is in the correct object directory
2744 Check if a file name does not correspond to the mapping of units
2746 (Display_Version): New procedure
2747 (Initialize): Process switches --version and --help
2748 Use type Path_Name_Type for path name
2750 2007-08-14 Paul Hilfinger <hilfinger@adacore.com>
2752 * impunit.adb: Re-organize System.Random_Numbers and
2753 GNAT.Random_Numbers and add to builds.
2755 * Makefile.rtl: Add s-rannum.ad* and g-rannum.ad*, a-assert*
2757 * s-rannum.ads, s-rannum.adb, g-rannum.ads, g-rannum.adb: New files.
2759 * a-assert.ads, a-assert.adb: New files.
2761 2007-08-14 Gary Dismukes <dismukes@adacore.com>
2763 * layout.adb (Layout_Type): In the case of access-to-subprogram types,
2764 if AAMP_On_Target is True, then the size of the type encompasses two
2765 addresses (a static link and a subprogram address), except in the case
2766 of library-level access types.
2768 2007-08-14 Vincent Celier <celier@adacore.com>
2770 * output.ads, output.adb (Write_Eol): Remove trailing spaces before
2772 (Write_Eol_Keep_Blanks): New procedure to write a line, including
2773 possible trailing spaces.
2774 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
2776 2007-08-14 Javier Miranda <miranda@adacore.com>
2778 * par-ch6.adb (P_Formal_Part): Fix wrong error message associated with
2779 null-excluding access types.
2781 2007-08-14 Javier Miranda <miranda@adacore.com>
2783 * sem_ch9.adb (Check_Interfaces): New subprogram that factorizes code
2784 that is common to Analyze_Protected_Type and Analyze_Task_Type. In case
2785 of private types add missing check on matching interfaces in the
2786 partial and full declarations.
2787 (Analyze_Protected_Type): Code cleanup.
2788 (Analyze_Task_Type): Code cleanup.
2790 2007-08-14 Javier Miranda <miranda@adacore.com>
2792 * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a
2793 generated interface thunk.
2795 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2797 * s-ficobl.ads: Declare AFCB as a tagged incomplete type, to prevent
2798 obsolescent warning on application of 'Class to an incomplete type.
2800 * s-finroo.ads: Declare Root_Controlled as a tagged incomplete type, to
2801 prevent obsolescent warning on application of 'Class to an incomplete
2804 2007-08-14 Pascal Obry <obry@adacore.com>
2806 * s-fileio.adb (Is_Open): Add check for usability of the underlying
2809 2007-08-14 Cyrille Comar <comar@adacore.com>
2811 * s-finimp.adb (Detach_From_Final_List): make this procedure idempotent
2812 since it is potentially used in cases implying double finalization of
2815 2007-08-14 Jose Ruiz <ruiz@adacore.com>
2817 * s-tasini.adb (Get_Stack_Info): Move this function to
2818 System.Soft_Links.Tasking because it is common to the full and the
2819 restricted run times.
2820 (Init_RTS): Do not set the Get_Stack_Info soft link because it is done
2821 in SSL.Tasking.Init_Tasking_Soft_Links.
2823 * s-solita.adb (Get_Stack_Info): Function moved from
2824 System.Tasking.Initialization because it is common to the full and the
2825 restricted run times.
2826 (Init_Tasking_Soft_Links): Set the tasking soft link for Get_Stack_Info.
2828 2007-08-14 Arnaud Charlet <charlet@adacore.com>
2830 * s-tpobop.ads, s-tpobop.adb, s-tasren.ads, s-tasren.adb,
2831 s-taskin.ads (Requeue_With_Abort): Rename field With_Abort.
2832 (PO_Do_Or_Queue, Task_Do_Or_Queue, Requeue_Call): Remove With_Abort
2835 * s-tassta.adb (Task_Wrapper): Increased value of the small overflow
2838 2007-08-14 Gary Dismukes <dismukes@adacore.com>
2840 * s-veboop.adb (SU): New named number initialized to
2841 System.Storage_Unit.
2842 (True_Val): The initialization expression is revised to use SU (=
2843 Storage_Unit) rather than assuming 8 for the component size of an
2844 unpacked Boolean array.
2846 2007-08-14 Tristan Gingold <gingold@adacore.com>
2848 * tracebak.c: Use tb-ivms.c on OpenVMS Itanium.
2850 * tb-ivms.c: New file.
2852 * g-trasym-vms-ia64.adb: Fixed for OpenVMS version 8.2
2854 2007-08-14 Geert Bosch <bosch@adacore.com>
2856 * i-forbla.ads, i-forbla.adb, a-ngcoar.adb, a-ngcoar.ads, i-forlap.ads,
2857 s-gearop.adb, s-gecobl.adb, s-gecobl.ads, s-gerela.adb, s-gerela.ads:
2858 Add required linker pragmas for automatically linking with the gnalasup
2859 linear algebra support library, and the systems math library.
2860 Rename cdot to cdotu and zdot to zdotu.
2861 Update header comment to describe purpose of package.
2863 2007-08-14 Thomas Quinot <quinot@adacore.com>
2865 * exp_ch7.adb (Find_Final_List): For an anonymous access type that has
2866 an explicitly specified Associated_Final_Chain, use that list.
2867 (Expand_N_Package_Body): Build dispatch tables of library level tagged
2869 (Expand_N_Package_Declaration): Build dispatch tables of library level
2870 tagged types. Minor code cleanup.
2872 2007-08-14 Vincent Celier <celier@adacore.com>
2874 * gnatchop.adb (Terminate_Program): Remove exception and use
2875 Types.Terminate_Program instead.
2877 * osint.ads, osint.adb (Current_Exit_Status): New global variable
2878 (Find_Program_Name): Added protection against empty name.
2879 (OS_Exit_Through_Exception): New procedure
2881 * s-os_lib.ads, s-os_lib.adb (OS_Exit): New procedure body
2882 (OS_Exit_Default): New procedure that contains the previous
2883 implementation of procedure OS_Exit.
2884 (Final_Value): Remove obsolete Interix stuff.
2886 2007-08-14 Thomas Quinot <quinot@adacore.com>
2888 * g-socket.ads: Reorganize example code so that it also works on
2891 2007-08-14 Tristan Gingold <gingold@adacore.com>
2893 * g-trasym.ads: AIX now supports symbolic backtraces.
2895 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2897 * lib-load.adb (From_Limited_With_Chain): Always scan the stack of
2898 units being loaded to detect circularities. A circularity may be
2899 present even if the current chain of pending units to load starts from
2900 a limited_with_clause.
2902 * lib-load.ads: Change profile of Load_Unit to use a with_clause
2903 rather than a boolean flag, in order to detect circularities in
2906 * par-load.adb: Use current with_clause in calls to Load_Unit, rather
2907 than propagating the From_Limited_With flag, in order to handle
2908 properly circularities involving with_clauses.
2910 2007-08-14 Nicolas Setton <setton@adacore.com>
2912 * link.c (FreeBSD): Add "const" keyword where needed, to eliminate
2915 2007-08-14 Arnaud Charlet <charlet@adacore.com>
2917 * Makefile.in: GNATRTL_LINEARALGEBRA_OBJS: New variable holding objects
2918 to build for libgnala.
2919 libgnat: Add rules to build libgnala.a
2920 (LIBGNAT_TARGET_PAIRS for VxWorks): Remove s-osinte-vxworks.adb from
2921 target pairs of the VxWorks 6 kernel runtime, use it only for VxWorks 5.
2922 Add s-osinte-vxworks-kernel.adb to the target pairs of the
2923 kernel run-time lib for VxWorks 6, which would provide a different
2924 implementation for Task_Cont and Task_Stop than the VxWorks 5 version.
2925 x86-solaris section (EH_MECHANISM): Set to -gcc, as this port is now
2926 running ZCX by default.
2927 Add g-sttsne-locking to LynxOS version.
2928 Remove g-sttsne-vxworks.ads; use g-sttsne-locking.ads instead.
2929 On x86/darwin, use a-numaux-x86.ad? and system-darwin-x86.ads.
2931 * system-darwin-x86.ads: New file.
2933 * Make-lang.in: Delete files before copying onto them, so if they are
2934 read-only, the copy won't fail.
2937 2007-08-14 Pascal Obry <obry@adacore.com>
2939 * mdll-fil.adb, * mdll.adb: Implement a more consistent libraries
2942 2007-08-14 Vincent Celier <celier@adacore.com>
2944 * mlib-utl.adb (Gcc_Name): Change from constant String to String_Access
2945 (Gcc): Initialize Gcc_Name at the first call
2947 2007-08-14 Ed Schonberg <schonberg@adacore.com>
2949 * sem_ch7.adb (Analyze_Package_Specification): Do not install private
2950 with_clauses of the enclosing unit when analyzing the package
2951 specification of a nested instance.
2953 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
2955 * sinfo.ads, sinfo.adb (Is_Coextension, Set_Is_Coextension): Removed.
2956 (Is_Dynamic_Coextension, Set_Is_Dynamic_Coextension): New routines.
2957 Remove flag Is_Coextension. Add flag Is_Dynamic_Coextension. Update the
2958 layout of N_Allocator.
2960 2007-08-14 Thomas Quinot <quinot@adacore.com>
2962 * rtsfind.adb (Check_RPC): Add PCS version check.
2964 * gnatvsn.ads, gnatvsn.adb: Add PCS version.
2965 (Gnat_Free_Software): New function.
2967 * sem_dist.ads, sem_dist.adb (Get_PCS_Version): New subprogram. Returns
2968 the PCS_Version value from s-parint, used to check that it is consistent
2969 with what exp_dist expects.
2971 * s-parint.ads (PCS_Version): New entity for checking consistency
2972 between exp_dist and PCS.
2974 * gen-soccon.c: (SO_REUSEPORT): New constant.
2976 2007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
2978 * a-calfor.adb (Image (Duration; Boolean)): Change type of local
2979 variable Sub_Second to Duration in order to accomodate a larger range
2980 of arithmetic operations.
2982 2007-08-14 Bob Duff <duff@adacore.com>
2984 * g-sttsne-locking.ads: Move comments from spec to body.
2985 * g-sttsne-locking.adb: Move comments from spec to body.
2986 * g-sttsne-vxworks.ads: Removed.
2987 * g-sttsne-vxworks.adb: Removed.
2989 2007-08-11 Ian Lance Taylor <iant@google.com>
2991 * misc.c (gnat_get_alias_set): Change return type to
2994 2007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2996 * decl.c, utils2.c: Fix whitespace in last change.
2998 2007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3000 * decl.c (compare_field_bitpos): Constify.
3001 * utils2.c (compare_elmt_bitpos): Likewise.
3003 2007-07-27 Aurelien Jarno <aurelien@aurel32.net>
3005 * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by
3006 anonymous access type.
3007 (pthread_sigmask): Now take an access sigset_t.
3009 2007-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
3011 * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
3013 2007-06-21 Eric Botcazou <ebotcazou@adacore.com>
3015 PR tree-optimization/25737
3016 * misc.c (gnat_post_options): Do not force flag_tree_salias to 0.
3018 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3020 * trans.c (Attribute_to_gnu): When subtracting an
3021 offset from a pointer, use POINTER_PLUS_EXPR with
3022 NEGATE_EXPR instead of MINUS_EXPR.
3023 (gnat_to_gnu): Likewise.
3024 * utils.c (convert): When converting between
3025 thin pointers, use POINTER_PLUS_EXPR and sizetype
3027 * utils2.c (known_alignment): POINTER_PLUS_EXPR
3028 have the same semantics as PLUS_EXPR for alignment.
3029 (build_binary_op): Add support for the semantics of
3030 POINTER_PLUS_EXPR's operands.
3031 When adding an offset to a pointer, use POINTER_PLUS_EXPR.
3033 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3035 * trans.c (Attribute_to_gnu): Use signed_or_unsigned_type_for instead
3036 of get_signed_or_unsigned_type.
3037 * misc.c (LANG_HOOKS_SIGNED_TYPE): Remove.
3039 2007-06-11 Bob Duff <duff@adacore.com>
3040 Thomas Quinot <quinot@adacore.com>
3042 * g-stsifd-sockets.adb (Create): Work around strange behavior of
3043 'bind' on windows that causes 'connect' to fail intermittently, by
3044 retrying the 'bind'.
3045 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
3047 2007-06-10 Duncan Sands <baldrick@free.fr>
3049 * decl.c (gnat_to_gnu_entity): Use pointers to dummy nodes, rather
3050 than to void, for the fields when making a new fat pointer type.
3051 (gnat_substitute_in_type): Now substitute_in_type.
3052 * gigi.h (gnat_substitute_in_type): Likewise. Adjust recursive calls.
3053 * trans.c (gnat_gimplify_expr): Remove COMPONENT_REF kludge.
3054 * utils.c (update_pointer_to): Update fat pointers by updating the
3055 dummy node pointers used for the fields.
3057 2007-06-06 Thomas Quinot <quinot@adacore.com>
3058 Bob Duff <duff@adacore.com>
3060 * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
3061 g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
3062 g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads: Add new
3063 constant Thread_Blocking_IO, always True by default, set False
3064 on a per-runtime basis.
3065 (Need_Netdb_Buffer): New constant.
3067 * g-stheme.adb, g-sttsne.ads, g-sttsne-locking.ads,
3068 g-sttsne-locking.adb, g-sttsne-vxworks.ads, g-sttsne-vxworks.adb: New
3071 * g-socthi-vxworks.ads, g-socthi-vxworks.adb,
3072 g-socthi-vms.ads, g-socthi-vms.adb (Safe_Gethostbyname,
3073 Safe_Gethostbyaddr, Safe_Getservbyname, Safe_Getservbyport): Use new
3074 child package Task_Safe_NetDB
3075 (Host_Error_Messages): Add stub body.
3076 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
3078 * g-soccon-mingw.ads: Add Windows-specific constants.
3079 (Need_Netdb_Buffer): New constant.
3080 (GNAT.Sockets.Thin.C_Inet_Addr, Windows version): Remove useless Ada
3081 wrapper and import inet_addr(3) from the standard sockets library
3083 (In_Addr): Add alignment clause.
3084 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
3086 2007-06-06 Robert Dewar <dewar@adacore.com>
3088 * a-taster.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
3089 s-osinte-irix.ads, s-interr-sigaction.adb, s-mastop-irix.adb,
3090 s-osinte-hpux-dce.ads, s-osinte-interix.ads, s-osinte-solaris.ads,
3091 s-taspri-solaris.ads, s-inmaop-vms.adb, s-interr-vms.adb,
3092 s-mastop-vms.adb, s-osinte-vms.ads, s-tpopde-vms.adb,
3093 s-osinte-mingw.ads, s-interr-vxworks.adb, i-cstrea-vms.adb,
3094 a-diocst.adb, a-direio.adb, a-interr.adb, a-sequio.adb, a-siocst.adb,
3095 a-ssicst.adb, a-storio.adb, a-ststio.adb, a-stwima.adb, a-tasatt.adb,
3096 a-taside.adb, a-tiocst.adb, a-witeio.adb, a-wtcstr.adb, g-crc32.adb,
3097 g-dirope.adb, g-dyntab.adb, g-memdum.adb, g-regexp.adb, g-spipat.adb,
3098 g-spitbo.adb, g-string.adb, g-string.ads, g-table.adb, g-thread.adb,
3099 i-cobol.adb, i-cpoint.adb, i-cstrea.adb, i-cstrin.adb, i-pacdec.adb,
3100 s-addima.adb, s-arit64.adb, s-auxdec.adb, s-auxdec.ads,
3101 s-auxdec-vms_64.ads, s-carsi8.adb, s-carun8.adb, s-casi16.adb,
3102 s-casi32.adb, s-casi64.adb, s-caun16.adb, s-caun32.adb, s-caun64.adb,
3103 s-direio.adb, s-fileio.adb, s-finimp.ads, s-geveop.adb, s-imgenu.adb,
3104 s-pack03.adb, s-pack05.adb, s-pack06.adb, s-pack07.adb, s-pack09.adb,
3105 s-pack10.adb, s-pack11.adb, s-pack12.adb, s-pack13.adb, s-pack14.adb,
3106 s-pack15.adb, s-pack17.adb, s-pack18.adb, s-pack19.adb, s-pack20.adb,
3107 s-pack21.adb, s-pack22.adb, s-pack23.adb, s-pack24.adb, s-pack25.adb,
3108 s-pack26.adb, s-pack27.adb, s-pack28.adb, s-pack29.adb, s-pack30.adb,
3109 s-pack31.adb, s-pack33.adb, s-pack34.adb, s-pack35.adb, s-pack36.adb,
3110 s-pack37.adb, s-pack38.adb, s-pack39.adb, s-pack40.adb, s-pack41.adb,
3111 s-pack42.adb, s-pack43.adb, s-pack44.adb, s-pack45.adb, s-pack46.adb,
3112 s-pack47.adb, s-pack48.adb, s-pack49.adb, s-pack50.adb, s-pack51.adb,
3113 s-pack52.adb, s-pack53.adb, s-pack54.adb, s-pack55.adb, s-pack56.adb,
3114 s-pack57.adb, s-pack58.adb, s-pack59.adb, s-pack60.adb, s-pack61.adb,
3115 s-pack62.adb, s-pack63.adb, s-pooloc.adb, s-poosiz.adb, s-scaval.adb,
3116 s-sequio.adb, s-shasto.adb, s-stalib.ads, s-stratt.adb, s-strcom.adb,
3117 s-taasde.adb, s-tasdeb.adb, s-tasuti.ads, s-tataat.ads, s-tpoben.ads,
3118 s-valenu.adb, s-widenu.adb, s-wwdenu.adb, s-addope.adb, a-stzmap.adb,
3119 a-ztcstr.adb, a-ztexio.adb, s-osinte-linux-hppa.ads: Replace
3120 Unchecked_* by Ada.Unchecked_*
3122 2007-06-06 Robert Dewar <dewar@adacore.com>
3124 * g-string.adb, s-proinf-irix-athread.adb, s-gloloc-mingw.adb,
3125 s-tfsetr-default.adb, gnatfind.adb, gnatxref.adb, gprep.adb,
3126 g-regexp.adb, g-regexp.ads, g-regpat.ads, g-tasloc.adb, g-tasloc.ads,
3127 output.adb, switch-m.ads, tree_in.ads, tree_io.ads, indepsw.ads,
3128 g-utf_32.adb, g-utf_32.ads, a-wichun.adb, a-wichun.ads, a-zchuni.adb,
3129 a-zchuni.ads: Replace GNAT.xxx by System.xxx when appropriate.
3131 * s-utf_32.adb, s-utf_32.ads, s-os_lib.adb, s-os_lib.ads, s-regexp.adb,
3132 s-regexp.ads, s-regpat.adb, s-regpat.ads, s-string.adb, s-string.ads,
3133 s-tasloc.adb, s-tasloc.ads: New files.
3135 2007-06-06 Bob Duff <duff@adacore.com>
3138 (Send_Signal, Close): Raise Invalid_Process if the process id is invalid.
3139 * g-expect.ads, g-expect.adb (Send): Avoid useless copy of the string.
3140 (Send_Signal, Close): Raise Invalid_Process if the process id is
3142 (Pattern_Matcher_Access): Is now a general access type to be able to
3145 2007-06-06 Thomas Quinot <quinot@adacore.com>
3146 Arnaud Charlet <charlet@adacore.com>
3148 * a-intnam-aix.ads: Adjust comment to account for SIGADAABORT change
3149 (SIGEMT is now used instead of SIGTERM on AIX).
3151 * s-osinte-aix.ads (Linker_Options): Use -pthread instead of -lpthreads.
3152 (Time_Slice_Supported): Set to True.
3153 Use SIGEMT instead of SIGTERM as SIGADAABORT.
3155 2007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
3157 * a-calend.ads, a-calend.adb, a-calend-vms.ads, a-calend-vms.adb ("-"
3158 (Time, Time)): Use To_Relative_Time rather than manual calculation to
3159 express the bounds of Duration as Time. Raise Time_Error when the
3160 result is greater or equal to the higher bound of Duration (on the
3162 ("+" (Time, Duration)): Reorder code. Remove the declaration of constant
3164 ("-" (Time, Duration)): Reorder code. Remove the declaration of constant
3166 ("-" (Time, Time)): Reorder code.
3167 (All_Leap_Seconds): Removed.
3168 (Arithmetic_Operations.Add): Remove sign related kludge.
3169 (Arithmetic_Operations.Difference): Control the leaps seconds processing
3170 with flag Leap_Support.
3171 (Arithmetic_Operations.Subtract): Remove sign related kludge.
3172 (Check_Within_Time_Bounds): New procedure.
3173 (Clock): Control the leap seconds processing with flag Leap_Support.
3174 (Cumulative_Leap_Seconds): Assert that the target supports leap seconds.
3175 (Formatting_Operations.Split): Control the leap seconds processing with
3177 (Formatting_Operations.Time_Of): Control the leaps seconds processing
3178 with flag Leap_Support. Adjust the year, month and day (if applicable)
3179 when the value of day seconds designates a new day.
3180 (Split): Use parameter associations for better readability. Integrate
3182 (Time_Of): Use parameter associations for better readability. Integrate
3185 * a-calfor.adb (Split): Use parameter associations for better
3186 readability. Integrate flag Is_Ada_05.
3187 (Time_Of): Remove flag Leap_Checks. Use parameter associations for
3188 better readability. Integrate flag Is_Ada_05.
3190 2007-06-06 Arnaud Charlet <charlet@adacore.com>
3192 * s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
3193 s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
3194 s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
3195 s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
3196 s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
3197 s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
3198 s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
3199 s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
3200 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
3201 s-taprop-mingw.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos-3.adb,
3202 s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
3203 time when entering this routine to detect a backward clock setting
3204 (manual setting or DST adjustment), to avoid waiting for a longer delay
3206 (Time_Duration, To_Timeval, struct_timeval): Removed when not relevant.
3207 Remove handling of deferred priority change, and replace by setting the
3208 task priority directly, as required by AI-188.
3210 (Max_Task_Image_Length): New constant.
3211 Replace Warnings (Off) by Unreferenced pragma, cleaner.
3212 (Dynamic_Priority_Support): Removed, no longer needed.
3213 (Poll_Base_Priority_Change): Ditto.
3214 (Set_Ceiling): Add this procedure to change the ceiling priority
3215 associated to a lock. This is a dummy implementation because dynamic
3216 priority ceilings are not supported by the underlying system.
3218 * a-dynpri.adb (Set_Priority): Take into account case where Target is
3219 accepting a RV with its priority boosted.
3220 Remove handling of deferred priority change, and replace by setting the
3221 task priority directly, as required by AI-188.
3223 * s-taenca.adb (Try_To_Cancel_Entry_Call): Remove special case for
3225 Remove handling of deferred priority change, and replace by setting the
3226 task priority directly, as required by AI-188.
3227 (Wait_For_Completion, Wait_For_Call, Timed_Selective_Wait): Change state
3230 * s-tasini.ads, s-tasini.adb (Wakeup_Entry_Caller): Relax assertion.
3231 (Poll_Base_Priority_Change): Removed.
3232 Code clean up: use SSL.Current_Target_Exception.
3234 * s-tasren.adb (Task_Count): Call Yield to let a chance to other tasks
3235 to run as this is a potentially dispatching point.
3236 (Call_Synchronous): Use Local_Defer_Abort.
3237 (Callable): Relax assertion.
3238 (Selective_Wait): Relax assertion in case abort is not allowed.
3239 Remove handling of deferred priority change, and replace by setting the
3240 task priority directly, as required by AI-188.
3242 * s-tasuti.adb (Make_Passive): Adjust assertions.
3243 Remove handling of deferred priority change, and replace by setting the
3244 task priority directly, as required by AI-188.
3246 2007-06-06 Arnaud Charlet <charlet@adacore.com>
3248 * system-vxworks-sparcv9.ads, system-solaris-x86.ads,
3249 system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
3250 system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
3251 system-vxworks-mips.ads, system-vxworks-alpha.ads,
3252 system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
3253 system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
3254 system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
3255 system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
3256 system-solaris-sparcv9.ads, system-vms.ads, system.ads,
3257 system-vms_64.ads, system-hpux-ia64.ads, system-linux-x86_64.ads,
3258 system-linux-ia64.ads: Document mapping between Ada and OS priorities.
3259 This patch changes the largest non-binary modulus from 2**31-1 to
3261 (Compiler_System_Version): Removed, no longer used.
3262 Clean up system files by removing flags only used on a single target.
3263 Also remove obsolete flags, only used during bootstrap from system.ads
3264 (Address): Add a pragma Preelaborable_Initialization.
3266 * system-aix.ads: Ditto.
3267 (GCC_ZCX_Support): Set to true.
3268 Update priority range on AIX and map Ada priorities to target
3269 priorities appropriately for different scheduling policies.
3271 * ttypes.ads: set largest non-binary modulus from 2**31-1 to 2**32-1
3273 2007-06-06 Vincent Celier <celier@adacore.com>
3275 * mlib-tgt-specific.adb, mlib-tgt-specific.ads,
3276 mlib-tgt-vms.adb, mlib-tgt-vms.ads: New files.
3278 * mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
3279 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
3280 mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
3281 mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
3282 mlib-tgt-hpux.adb, mlib-tgt-tru64.adb: Make a common body for package
3283 MLib.Tgt, containing the default versions of the exported subprograms.
3284 For each platform, create a specific version of the body of new child
3285 package MLib.Tgt.Specific that contains only the body of subprograms
3286 that are different from the default.
3287 (Archive_Builder_Append_Options): New function.
3289 2007-06-06 Matthew Gingell <gingell@adacore.com>
3291 * s-osinte-aix.adb: Map Ada priorities to target priorities
3292 appropriately for different scheduling policies.
3294 2007-06-06 Arnaud Charlet <charlet@adacore.com>
3296 * s-osinte-linux.ads (sigset_t): Bump alignment to match more closely
3298 Remove references to Unchecked_Conversion, and use Ada.xxx instead.
3299 Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
3301 2007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
3303 * s-osprim-vms.ads, s-osprim-vms.adb (Initialize): New procedure.
3304 Noop on VMS, added for interface commonality.
3306 2007-06-06 Eric Botcazou <ebotcazou@adacore.com>
3307 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3308 Olivier Hainque <hainque@adacore.com>
3310 * decl.c (gnat_to_gnu_entity) <object>: Manually mark the top of the
3311 renamed expression of a full renaming at toplevel.
3312 (gnat_to_gnu_entity, case object): If not defining, do not look inside
3313 the values the constant is initialized to if it is an N_Allocator.
3314 (gnat_to_gnu_entity) <E_Array_Subtype>: Manually mark the top of the
3315 TYPE_SIZE_UNIT of inner types after the stride is elaborated.
3316 (make_aligning_type): Accept an extra ROOM argument for storage to be
3317 made available before the aligned field, and an extra BASE_ALIGN
3318 argument for callers to pass the alignment guaranteed to be honored for
3319 the whole aligning object. Avoid call to finish_record_type, which only
3320 interferes with the sizes we want to set.
3321 (gnat_to_gnu_entity) <E_Variable>: Pass the required extra arguments to
3322 make_aligning_type for super-aligned objects on stack.
3323 (components_to_record): Pass the adjusted size of the type when creating
3324 fields in the qualified union for the variant part.
3325 (gnat_substitute_in_type): Copy TYPE_USER_ALIGN.
3326 (gnat_to_gnu_entity, case E_Signed_Integer_Subtype): Likewise for
3328 (maybe_pad_type): Set TYPE_USER_ALIGN.
3329 (make_aligning_type): Likewise.
3330 ALIGN argument is unsigned int.
3331 (gnat_to_gnu_entity, case E_Function): Back annotate return mechanism.
3332 (gnat_to_gnu_param): Likewise, for parameters.
3333 (gnat_to_gnu_entity) <object>: Always instantiate the renaming object
3334 if it is constant and stems from a function call.
3335 (gnat_to_gnu_entity) <E_Record_Type>: Set packed to -2 if the alignment
3336 of the record is specified. Adjust accordingly.
3337 (adjust_packed): New static function.
3338 (gnat_to_gnu_field): Use it to adjust the packedness setting.
3339 (components_to_record): Likewise.
3340 (gnat_to_gnu_entity) <object>: Do not test the renamed expression for
3341 side-effects if the object is deemed constant.
3342 (gnat_to_gnu_entity) <E_Array_Type>: Create a name for the fat pointer
3343 type instead of merely finalizing it. Tidy.
3344 <E_Access_Subprogram_Type>: Retrieve the type from the TYPE_DECL.
3345 <E_Access_Type>: Likewise.
3346 (defer_debug_incomplete_list): Rename to defer_finalize_list.
3347 (defer_debug_level): Delete.
3348 (gnat_to_gnu_entity) <debug_deferred>: Likewise
3349 <E_Array_Type>: Call rest_of_record_type_compilation on the fat pointer
3351 <E_Record_Type>: Do not explicitly defer finalizing the type.
3352 Adjust for write_record_type_debug_info renaming.
3353 <E_Subprogram_Type>: Likewise.
3354 Finalize deferred types right after deferred incomplete types are
3356 (rest_of_type_decl_compilation): New global function.
3357 (components_to_record): Rename defer_debug parameter to do_not_finalize.
3358 (components_to_record): Propagate the packedness to the fields of the
3359 qualified union type if there is a variant part.
3360 (gnat_to_gnu_entity) <E_Array_Type>: Use new function
3361 instead of inline code to adjust the XUT field offsets.
3362 (gnat_to_gnu_entity): Adjust for new prototype of finish_record_type.
3363 <E_Record_Subtype>: Do not let finish_record_type compute the sizes
3364 and write the debug info if the type derives from a discriminated one.
3365 (gnat_to_gnu_entity) <E_Array_Type>: Adjust call to create_index_type.
3366 <E_Array_Subtype>: Likewise.
3367 <E_String_Literal_Subtype>: Likewise.
3368 (gnat_to_gnu_entity): Set TYPE_USER_ALIGN on types only if they have
3369 an alignment clause.
3370 (maybe_pad_type): Update ORIG_SIZE to the minimum required to meet ALIGN
3371 before giving warning.
3372 (prepend_one_attribute_to): New function, helper to prepend an attribute
3373 to an attribute list.
3374 (gnat_to_gnu_entity) <E_Procedure>: Use it.
3375 (prepend_attributes): Likewise.
3376 (gnat_to_gnu_entity) <E_Variable>: Use constants of the proper type.
3377 <E_Array_Type>: Declare the padding type for the element type, if any.
3378 <E_Array_Subtype>: Likewise.
3379 (defer_limited_with): New variable.
3380 (Gigi_Equivalent_Type): New function.
3381 (gnat_to_gnu_entity): Use it at start and use result throughout.
3382 (gnat_to_gnu_entity, case E_Access_Type): Rework to use
3383 Gigi_Equivalent_Type, support Limited_With, allow two levels of
3384 indirection, precompute if unconstrained array to simplify logic, and
3385 use defer_limited_with to defer elaboration of some types from limited
3387 (finalize_from_with_types): New function.
3389 2007-06-06 Gary Dismukes <dismukes@adacore.com>
3390 Eric Botcazou <ebotcazou@adacore.com>
3391 Tristan Gingold <gingold@adacore.com>
3392 Olivier Hainque <hainque@adacore.com>
3394 * trans.c (Identifier_to_gnu): Change test for deferred constant by
3395 adding guard that the entity is an E_Constant before testing presence
3396 of Full_view (and remove unnecessary test that entity is not a type).
3397 For a CONST_DECL used by reference, manually retrieve
3398 the DECL_INITIAL. Do not invoke fold in the other DECL_P cases either.
3399 (struct language_function): Move from utils.c to here.
3400 (struct parm_attr): New structure.
3401 (parm_attr, parm_attr vector, parm_attr GC vector): New types.
3402 (f_parm_attr_cache): New macro.
3403 (Attribute_to_gnu) <Attr_Length>: When not optimizing, cache the
3404 expressions for the 'First, 'Last and 'Length attributes of the
3405 unconstrained array IN parameters.
3406 (Subprogram_Body_to_gnu): Use gnu_subprog_decl throughout.
3407 Allocate the information structure for the function earlier, as well
3408 as the language-specific part.
3409 If the parameter attributes cache has been populated, evaluate the
3410 cached expressions on entry.
3411 (takes_address): Add OPERAND_TYPE parameter. Handle N_Function_Call,
3412 N_Procedure_Call_Statement and N_Indexed_Component.
3413 (Pragma_to_gnu): Translate inspection_point to an asm statement
3414 containaing a comment and a reference to the object (either its address
3415 for BLKmode or its value).
3416 (Identifier_to_gnu): Use TREE_CONSTANT instead of CONST_DECL to decide
3417 to go to DECL_INITIAL. Together with the size constraint relaxation
3418 in create_var_decl, enlarges the set of situations in which an
3419 identifier may be used as an initializer without implying elaboration
3421 (Subprogram_Body_to_gnu): Do not fiddle with the debug interface but set
3422 DECL_IGNORED_P on the function if Needs_Debug_Info is not set on the
3424 (maybe_stabilize_reference): Remove lvalues_only parameter.
3425 (gnat_stabilize_reference): Adjust for above change.
3426 (gnat_to_gnu): Do not set location information on the result
3427 if it is a reference.
3428 (add_cleanup): Add gnat_node parameter and set the location of the
3430 (Handled_Sequence_Of_Statements_to_gnu): Adjust calls to add_cleanup.
3431 (Exception_Handler_to_gnu_zcx): Likewise.
3432 (gigi): Remove the cgraph node if the elaboration procedure is empty.
3433 (Subprogram_Body_to_gnu): If a stub is attached to the subprogram, emit
3434 the former right after the latter.
3435 (start_stmt_group): Make global.
3436 (end_stmt_group): Likewise.
3437 (gnu_constraint_error_label_stack, gnu_storage_error_label_stack): New
3439 (gnu_program_error_label_stack): Likewise.
3440 (gigi): Initialize them.
3441 (call_to_gnu, gnat_to_gnu, emit_check): Add new arg to build_call_raise.
3442 (gnat_to_gnu, N_{Push,Pop}_{Constraint,Storage,Program}_Error_Label):
3444 (push_exception_label_stack): New function.
3445 (takes_address): New function.
3447 * utils.c (struct language_function): Move to trans.c from here.
3448 (unchecked_convert): Do not wrap up integer constants in
3450 (create_var_decl_1): Decouple TREE_CONSTANT from CONST_DECL. Prevent
3451 the latter for aggregate types, unexpected by later passes, and relax an
3452 arbitrary size constraint on the former.
3453 (create_field_decl): Use tree_int_cst_equal instead of operand_equal_p
3454 to compare the sizes.
3455 (convert_vms_descriptor): When converting to a fat pointer type, be
3456 prepared for a S descriptor at runtime in spite of a SB specification.
3457 (shift_unc_components_for_thin_pointers): New function.
3458 (write_record_type_debug_info): For variable-sized fields, cap the
3459 alignment of the pointer to the computed alignment.
3460 (finish_record_type): Change HAS_REP parameter into REP_LEVEL.
3461 If REP_LEVEL is 2, do not compute the sizes.
3462 (build_vms_descriptor): Adjust for new prototype of finish_record_type.
3463 (build_unc_object_type): Likewise.
3464 (declare_debug_type): New function.
3466 * ada-tree.def: USE_STMT: removed (not emitted anymore).
3468 * misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
3469 no statement is expandable anymore.
3470 (gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
3471 (gnat_handle_option): Only allow flag_eliminate_debug_types to be set
3472 when the user requested it explicitely.
3473 (gnat_post_options): By default, set flag_eliminate_unused_debug_types
3475 (get_alias_set): Return alias set 0 for a type if
3476 TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
3478 * ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
3479 (DECL_FUNCTION_STUB): New accessor macro.
3480 (SET_DECL_FUNCTION_STUB): New setter macro.
3482 * lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
3484 * fe.h (Get_Local_Raise_Call_Entity, Get_RT_Exception_Entity): New
3487 2007-06-06 Jose Ruiz <ruiz@adacore.com>
3489 * s-intman-vxworks.ads, s-intman-vxworks.adb (Abort_Task_Signal):
3490 Rename to Abort_Task_Interrupt to be able to keep the same interface
3491 as the rest of the targets.
3493 * s-osinte-vxworks.ads s-osinte-vxworks.adb
3494 (To_VxWorks_Priority): Remove explicit "in" mode indicator
3496 * s-osinte-vxworks6.ads, s-vxwork-arm.ads, system-vxworks-arm.ads:
3499 2007-06-06 Robert Dewar <dewar@adacore.com>
3501 * a-chahan.ads: Remove obsolescent pragmas
3503 * a-chlat1.ads: Minor reformatting
3505 2007-06-06 Robert Dewar <dewar@adacore.com>
3507 * comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface
3510 * errout.adb: New Finalize/Compilation_Errors/Output_Messages
3513 * errout.ads (Finalize): Changed interface
3514 (Output_Messages): New procedure
3515 (Compilation_Errors): New Interface
3517 * prepcomp.ads, prepcomp.adb (Parse_Preprocessing_Data_File): New
3518 Finalize/Output_Messages interface for Errout
3519 (Prepare_To_Preprocess): New Finalize/Output_Messages interface for
3522 2007-06-06 Thomas Quinot <quinot@adacore.com>
3523 Olivier Hainque <hainque@adacore.com>
3524 Robert Dewar <dewar@adacore.com>
3526 * a-except.ads, a-except.adb: (Rmsg_28): Fix description for E.4(18)
3528 (Raise_Current_Excep): Call Debug_Raise_Exception just before
3529 propagation starts, to let debuggers know about the event in a reliable
3531 (Local_Raise): Moved to System.Exceptions
3532 More convenient to have this as a separate unit
3534 * s-except.adb, s-except.ads: New files.
3536 * a-exextr.adb (Unhandled_Exception): Delete - replaced by
3537 Debug_Unhandled_Exception in System.Exceptions where it belongs
3538 together with a couple of other debug helpers.
3539 (Notify_Unhandled_Exception): Use Debug_Unhandled_Exception instead of
3540 the former Unhandled_Exception.
3542 * exp_ch11.ads, exp_ch11.adb: (Possible_Local_Raise): New procedure
3543 (Warn_No_Exception_Propagation): New procedure
3544 (Warn_If_No_Propagation): Rewritten for new warning generation
3545 (Expand_Exception_Handlers): New warning generation
3546 (Expand_N_Raise_xxx_Error): Rewritten for new warnings
3547 (Add_Exception_Label): Use Special_Exception_Package_Used for test
3548 instead of Most_Recent_Exception_Used (accomodates Exception_Traces)
3549 (Expand_Local_Exception_Handlers): Unconditionally add extra block wrap
3550 even if restriction is set (makes life easier in Check_Returns)
3551 (Expand_Local_Exception_Handlers): Follow renamed entity chain when
3552 checking exception identities.
3553 (Expand_Local_Exception_Handlers): Do not optimize when all others case
3554 (Expand_Local_Exception_Handlers): Set Exception_Junk flag on generated
3555 block for handler (used by Check_Returns)
3556 (Expand_Local_Exception_Handlers): Local_Raise now takes an address
3557 (Expand_N_Handled_Sequence_Of_Statements): Properly handle -gnatd.x to
3558 remove all exception handlers when optimizing local raise statements.
3559 (Find_Local_Handler): Use Get_Renamed_Entity
3560 (Expand_N_Handled_Sequence_Of_Statements): If the handled sequence is
3561 marked analyzed after expanding exception handlers, do not generate
3562 redundant cleanup actions, because they have been constructed already.
3564 2007-06-06 Thomas Quinot <quinot@adacore.com>
3566 * a-finali.ads (Ada.Finalization): Add missing pragma Remote_Types. The
3567 presence of this categorization pragma is mandated by the language.
3568 (Limited_Controlled): Add missing pragma Preelaborable_Initialization
3571 2007-06-06 Vincent Celier <celier@adacore.com>
3572 Robert Dewar <dewar@adacore.com>
3574 * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb,
3575 butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads,
3576 err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads,
3577 fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads,
3578 lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads,
3579 makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb,
3580 par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb,
3581 prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads,
3582 prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb,
3583 sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb,
3584 uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb,
3586 Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to
3587 package Namet. Make File_Name_Type and Unit_Name_Type types derived from
3588 Mame_Id. Add new type Path_Name_Type, also derived from Name_Id.
3589 Use variables of types File_Name_Type and Unit_Name_Type in error
3591 (Get_Name): Add parameter Ignore_Special, and set it reading file name
3592 (New_Copy): When debugging the compiler, call New_Node_Debugging_Output
3594 Define flags Flag217-Flag230 with associated subprograms
3595 (Flag_Word5): New record type.
3596 (Flag_Word5_Ptr): New access type.
3597 (To_Flag_Word5): New unchecked conversion.
3598 (To_Flag_Word5_Ptr): Likewise.
3599 (Flag216): New function.
3600 (Set_Flag216): New procedure.
3602 2007-06-06 Arnaud Charlet <charlet@adacore.com>
3604 * a-stzunb.adb, a-stwiun.adb, a-strunb.adb: (Insert): Use 'Length
3607 * a-stwifi.ads, a-stzfix.ads: Minor reformatting
3609 2007-06-06 Javier Miranda <miranda@adacore.com>
3611 * a-tags.ads, a-tags.adb (Tag_Size): This constant is now internal to
3613 (Object_Specific_Data_Array): This is now internal to the package.
3614 (Object_Specific_Data): This is now internal to the package.
3615 (Select_Specific_Data_Element): This is now internal to the package.
3616 (Select_Specific_Data_Array): This is now internal to the package.
3617 (Select_Specific_Data): This is now internal to the package.
3618 (Offset_To_Top_Function_Ptr): This is now public.
3619 (To_Offset_To_Top_Function_Ptr): Removed.
3620 (Storage_Offset_Ptr,To_Storage_Offset_Ptr): These declarations are now
3621 local to subprogram Offset_To_Top.
3622 (Predefined_DT): Removed.
3623 (Typeinfo_Ptr): Removed.
3624 (OSD): This function is now internal to this package.
3625 (SSD): This function is now internal to this package.
3626 (DT): New function that displaces the pointer to the table of primitives
3627 to get access to the enclosing wrapper record.
3628 (IW_Membership): Code cleanup.
3629 (Offset_To_Top): Code cleanup.
3630 (Predefined_DT): Removed.
3631 (Register_Interface_Tag): Removed.
3632 (Set_Interface_Table): Removed.
3633 (Set_Offset_Index): Removed.
3634 (Set_Offset_To_Top): Code cleanup.
3636 (Set_Signature): Removed.
3638 (Set_Tagged_Kind): Removed.
3639 (Typeinfo_Ptr): Removed.
3641 (Displace): Add missing check on null actual.
3643 * exp_disp.ads, exp_disp.adb
3644 (Select_Expansion_Utilities): Removed.
3645 (Build_Common_Dispatching_Select_Statements): Moved to exp_atags.
3646 (Expand_Dispatching_Call): Update calls to Get_Prim_Op_Address because
3647 the interface requires a new parameter.
3648 (Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec,
3649 Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Replace
3650 calls to subprograms Build_T, Build_S, etc. by the corresponding code.
3651 Done to remove package Select_Expansion_Utilities.
3652 (Make_DT): New implementation for statically allocated dispatch tables.
3653 (Make_Secondary_DT): Moved to the scope of Make_DT.
3654 (Register_Primitive): Code cleanup plus incoporate the use of the new
3655 function DT_Address_Attribute.
3656 (Expand_Interface_Thunk): The profile of this subprogram has been
3657 changed to return the Thunk_Id and the corresponding code.
3658 (Fill_DT_Entry): Removed. Its functionality is now provided by
3659 subprogram Register_Primitive.
3660 (Fill_Secondary_DT_Entry): Removed. Its functionality is now provided by
3661 subprogram Register_Primitive.
3662 (Register_Primitive): New subprogram that incorporates the previous
3663 functionalities of Fill_DT_Entry and Fill_Secondary_DT_Entry.
3664 (Build_Common_Dispatching_Select_Statements): Remove formal Typ. This
3665 was only required to call Make_DT_Access_Action, which is now removed.
3666 (Ada_Actions): Removed
3667 (Action_Is_Proc): Removed
3668 (Action_Nb_Arg): Removed
3669 Replace all the calls to Make_DT_Access_Action by direct calls to
3670 Make_Procedure_Call_Statement or Make_Function_Call.
3671 (Set_DTC_Entity_Value): New subprogram.
3672 (Set_All_DT_Position): Add call to new subprogram Set_DTC_Entity_Value.
3673 (Expand_Interface_Thunk): Add missing support for primitives that are
3674 functions with a controlling result (case in which there is no need
3675 to generate the thunk).
3677 * exp_atag.ads, exp_atag.adb
3678 (Build_DT): New subprogram that displaces the pointer to reference the
3679 base of the wrapper record.
3680 (Build_Typeinfo_Offset): Removed.
3681 (RTE_Tag_Node): Removed.
3682 (Build_Common_Dispatching_Select_Statements): Moved here from exp_disp
3683 (Build_Get_RC_Offset): Removed.
3684 (Build_Inherit_Predefined_Prims): Removed.
3685 (Build_Inherit_TSD: Removed.
3686 (Build_New_TSD): Removed.
3687 (Build_Set_External_Tag): Removed.
3688 (Build_Set_Predefined_Prim_Op_Address): Add documentation.
3689 (Build_Set_Prim_Op_Address): Add documentation.
3690 (Build_Set_TSD): Removed.
3692 * rtsfind.ads, rtsfind.adb
3693 (Load_Fail): If load fails and we are not in configurable run-time
3694 mode, then raise Unrecoverable_Error.
3695 (Text_IO_Kludge): Generate an error message if a run-time library is
3696 not available in a given run-time (ie. zfp run-time).
3697 (RTE_Record_Component): Add code to check that the component we search
3698 for is not found in two records in the given run-time package.
3699 (RE_DT_Offset_To_Top_Size, RE_DT_Predef_Prims_Size): Removed
3700 (RE_DT_Predef_Prims_Offset): New entity
3701 (RE_Static_Offset_To_Top): New entity
3702 (RE_HT_Link): New entity.
3703 (System_Address_Image): Addition of this run-time package.
3704 (RE_Address_Image): New entity.
3705 (RE_Abstract_Interface): Removed.
3706 (RE_Default_Prim_Op_Count): Removed.
3707 (RE_DT_Entry_Size): Removed.
3708 (RE_DT_Min_Prologue_Size): Removed.
3709 (RE_DT_Prologue_Size): Removed.
3710 (RE_Ifaces_Table_Ptr): Removed.
3711 (RE_Interface_Data_Ptr): Removed.
3712 (RE_Type_Specific_Data): Removed.
3713 (RE_Primary_DT): Removed.
3714 (RE_Register_Interface_Tag): Removed.
3715 (RE_Set_Offset_Index): Removed.
3716 (RE_Set_OSD): Removed.
3717 (RE_Set_SSD): Removed.
3718 (RE_Set_Signature): Removed.
3719 (RE_Set_Tagged_Kind): Removed.
3720 (RE_Address_Array): New entity.
3721 (RE_DT): New entity.
3722 (RE_Iface_Tag): New entity.
3723 (RE_Interfaces_Table): New entity.
3724 (RE_No_Dispatch_Table): New entity.
3725 (RE_NDT_Prims_Ptr): New entity.
3726 (RE_NDT_TSD): New entity.
3727 (RE_Num_Prims): New entity.
3728 (RE_Offset_To_Top_Function_Ptr): New entity.
3729 (RE_OSD_Table): New entity.
3730 (RE_OSD_Num_Prims): New entity.
3731 (RE_Predef_Prims): New entity
3732 (RE_Predef_Prims_Table_Ptr): New entity.
3733 (RE_Primary_DT): New entity.
3734 (RE_Signature): New entity.
3735 (RE_SSD): New entity.
3736 (RE_TSD): New entity.
3737 (RE_Type_Specific_Data): New entity.
3738 (RE_Tag_Kind): New entity.
3740 2007-06-06 Thomas Quinot <quinot@adacore.com>
3742 * a-textio.ads, a-textio.adb (Write): Add explicit size clause for the
3743 C imported variable.
3744 (Skip_Line): Do not reset Before_LM_PM immediately when Before_LM is set
3747 2007-06-06 Robert Dewar <dewar@adacore.com>
3749 * a-tienio.adb (Get): Adjust buffer size to accomodate one extra
3752 2007-06-06 Vincent Celier <celier@adacore.com>
3754 * a-tifiio.adb (Put, internal): For negative numbers, check that there
3755 is room for at least one digit and the minus sign.
3756 (Put.Put_Character): Never put a character outside of the range of
3759 2007-06-06 Olivier Hainque <hainque@adacore.com>
3760 Eric Botcazou <ebotcazou@adacore.com>
3762 * utils2.c (build_allocator): Provide the extra arguments to
3763 make_aligning_type for super-aligned objects allocated from the default
3764 pool. Leave enough room for a pointer before the aligning field, and
3765 store the system's allocator return value there.
3766 (build_call_alloc_dealloc): When releasing a super-aligned object,
3767 retrieve the system's allocator return value from where build_allocator
3768 has stored it, just ahead of the adjusted address we are passed.
3769 (build_call_raise): Handle properly the gene